Skip to content

Commit c545806

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit b0c2692 of spec repo (#3943)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 4d3dc5e commit c545806

11 files changed

Lines changed: 1203 additions & 0 deletions

File tree

‎.generator/schemas/v2/openapi.yaml‎

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86739,6 +86739,89 @@ components:
8673986739
required:
8674086740
- data
8674186741
type: object
86742+
StegadographyGetWidgetsRequest:
86743+
description: Multipart form data containing the PNG image to scan for watermarks.
86744+
properties:
86745+
image:
86746+
description: PNG image file to scan for embedded watermarks.
86747+
example: "screenshot.png"
86748+
format: binary
86749+
type: string
86750+
required:
86751+
- image
86752+
type: object
86753+
StegadographyGetWidgetsResponse:
86754+
description: Response containing watermarked widgets recovered from an image.
86755+
properties:
86756+
data:
86757+
$ref: "#/components/schemas/StegadographyWidgetItems"
86758+
required:
86759+
- data
86760+
type: object
86761+
StegadographyWidget:
86762+
description: A single watermarked widget resource recovered from an image.
86763+
properties:
86764+
attributes:
86765+
$ref: "#/components/schemas/StegadographyWidgetAttributes"
86766+
id:
86767+
description: Composite identifier formed from the organization ID and watermark, separated by a colon.
86768+
example: "abc123:0123456789abcdef"
86769+
type: string
86770+
type:
86771+
$ref: "#/components/schemas/StegadographyWidgetType"
86772+
required:
86773+
- id
86774+
- type
86775+
- attributes
86776+
type: object
86777+
StegadographyWidgetAttributes:
86778+
description: Attributes of a watermarked widget recovered from an image.
86779+
properties:
86780+
locationx:
86781+
description: Horizontal pixel coordinate where the watermark was found in the image.
86782+
example: 100
86783+
format: int64
86784+
type: integer
86785+
locationy:
86786+
description: Vertical pixel coordinate where the watermark was found in the image.
86787+
example: 200
86788+
format: int64
86789+
type: integer
86790+
rawData:
86791+
description: JSON-encoded string representing the widget state.
86792+
example: '{"widgetType":"timeseries","requests":[]}'
86793+
type: string
86794+
watermark:
86795+
description: Hex-encoded watermark string identifying the widget.
86796+
example: "0123456789abcdef"
86797+
type: string
86798+
required:
86799+
- rawData
86800+
- watermark
86801+
- locationx
86802+
- locationy
86803+
type: object
86804+
StegadographyWidgetItems:
86805+
description: List of watermarked widget resources recovered from an image.
86806+
example:
86807+
- attributes:
86808+
locationx: 100
86809+
locationy: 200
86810+
rawData: '{"widgetType":"timeseries","requests":[]}'
86811+
watermark: "0123456789abcdef"
86812+
id: "abc123:0123456789abcdef"
86813+
type: widget
86814+
items:
86815+
$ref: "#/components/schemas/StegadographyWidget"
86816+
type: array
86817+
StegadographyWidgetType:
86818+
description: Stegadography widget resource type.
86819+
enum:
86820+
- widget
86821+
example: widget
86822+
type: string
86823+
x-enum-varnames:
86824+
- WIDGET
8674286825
Step:
8674386826
description: A Step is a sub-component of a workflow. Each Step performs an action.
8674486827
properties:
@@ -167338,6 +167421,75 @@ paths:
167338167421
- status_pages_settings_write
167339167422
- status_pages_public_page_publish
167340167423
- status_pages_internal_page_publish
167424+
/api/v2/stegadography/get-widgets:
167425+
post:
167426+
description: |-
167427+
Extracts watermarks from a PNG image and returns the cached widget data
167428+
associated with each watermark found. The image must be uploaded as a
167429+
`multipart/form-data` request with the file in the `image` field.
167430+
Only widgets belonging to the authenticated organization are returned.
167431+
operationId: GetStegadographyWidgets
167432+
requestBody:
167433+
content:
167434+
multipart/form-data:
167435+
examples:
167436+
default:
167437+
value:
167438+
image: "screenshot.png"
167439+
schema:
167440+
$ref: "#/components/schemas/StegadographyGetWidgetsRequest"
167441+
description: PNG image to extract watermarks from.
167442+
required: true
167443+
responses:
167444+
"200":
167445+
content:
167446+
application/json:
167447+
examples:
167448+
default:
167449+
value:
167450+
data:
167451+
- attributes:
167452+
locationx: 100
167453+
locationy: 200
167454+
rawData: '{"widgetType":"timeseries","requests":[]}'
167455+
watermark: "0123456789abcdef"
167456+
id: "abc123:0123456789abcdef"
167457+
type: widget
167458+
schema:
167459+
$ref: "#/components/schemas/StegadographyGetWidgetsResponse"
167460+
description: OK
167461+
"400":
167462+
content:
167463+
application/json:
167464+
schema:
167465+
$ref: "#/components/schemas/JSONAPIErrorResponse"
167466+
description: Bad Request
167467+
"403":
167468+
content:
167469+
application/json:
167470+
schema:
167471+
$ref: "#/components/schemas/JSONAPIErrorResponse"
167472+
description: Forbidden
167473+
"415":
167474+
content:
167475+
application/json:
167476+
schema:
167477+
$ref: "#/components/schemas/JSONAPIErrorResponse"
167478+
description: Unsupported Media Type
167479+
"429":
167480+
$ref: "#/components/responses/TooManyRequestsResponse"
167481+
"500":
167482+
content:
167483+
application/json:
167484+
schema:
167485+
$ref: "#/components/schemas/JSONAPIErrorResponse"
167486+
description: Internal Server Error
167487+
security:
167488+
- apiKeyAuth: []
167489+
appKeyAuth: []
167490+
summary: Get widgets from an image
167491+
tags:
167492+
- Stegadography
167341167493
/api/v2/synthetics/api-multistep/subtests/{public_id}:
167342167494
get:
167343167495
description: |-
@@ -175651,6 +175803,8 @@ tags:
175651175803
externalDocs:
175652175804
url: https://docs.datadoghq.com/api/latest/statuspage-integration
175653175805
name: Statuspage Integration
175806+
- description: Extract watermarks embedded in dashboard screenshots to retrieve cached widget state.
175807+
name: Stegadography
175654175808
- description: |-
175655175809
Enable Storage Management for S3 buckets, GCS buckets, and Azure containers. Each configuration registers the destination that holds inventory reports for the storage being monitored.
175656175810
name: Storage Management
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Get widgets from an image returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.StegadographyApi;
6+
import com.datadog.api.client.v2.model.StegadographyGetWidgetsResponse;
7+
import java.io.File;
8+
9+
public class Example {
10+
public static void main(String[] args) {
11+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
12+
StegadographyApi apiInstance = new StegadographyApi(defaultClient);
13+
14+
try {
15+
StegadographyGetWidgetsResponse result =
16+
apiInstance.getStegadographyWidgets(new File("fixtures/stegadography/image.png"));
17+
System.out.println(result);
18+
} catch (ApiException e) {
19+
System.err.println("Exception when calling StegadographyApi#getStegadographyWidgets");
20+
System.err.println("Status code: " + e.getCode());
21+
System.err.println("Reason: " + e.getResponseBody());
22+
System.err.println("Response headers: " + e.getResponseHeaders());
23+
e.printStackTrace();
24+
}
25+
}
26+
}
Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
package com.datadog.api.client.v2.api;
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.ApiResponse;
6+
import com.datadog.api.client.Pair;
7+
import com.datadog.api.client.v2.model.StegadographyGetWidgetsResponse;
8+
import jakarta.ws.rs.client.Invocation;
9+
import jakarta.ws.rs.core.GenericType;
10+
import java.io.File;
11+
import java.util.ArrayList;
12+
import java.util.HashMap;
13+
import java.util.Map;
14+
import java.util.concurrent.CompletableFuture;
15+
16+
@jakarta.annotation.Generated(
17+
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
18+
public class StegadographyApi {
19+
private ApiClient apiClient;
20+
21+
public StegadographyApi() {
22+
this(ApiClient.getDefaultApiClient());
23+
}
24+
25+
public StegadographyApi(ApiClient apiClient) {
26+
this.apiClient = apiClient;
27+
}
28+
29+
/**
30+
* Get the API client.
31+
*
32+
* @return API client
33+
*/
34+
public ApiClient getApiClient() {
35+
return apiClient;
36+
}
37+
38+
/**
39+
* Set the API client.
40+
*
41+
* @param apiClient an instance of API client
42+
*/
43+
public void setApiClient(ApiClient apiClient) {
44+
this.apiClient = apiClient;
45+
}
46+
47+
/**
48+
* Get widgets from an image.
49+
*
50+
* <p>See {@link #getStegadographyWidgetsWithHttpInfo}.
51+
*
52+
* @param image PNG image file to scan for embedded watermarks. (required)
53+
* @return StegadographyGetWidgetsResponse
54+
* @throws ApiException if fails to make API call
55+
*/
56+
public StegadographyGetWidgetsResponse getStegadographyWidgets(File image) throws ApiException {
57+
return getStegadographyWidgetsWithHttpInfo(image).getData();
58+
}
59+
60+
/**
61+
* Get widgets from an image.
62+
*
63+
* <p>See {@link #getStegadographyWidgetsWithHttpInfoAsync}.
64+
*
65+
* @param image PNG image file to scan for embedded watermarks. (required)
66+
* @return CompletableFuture&lt;StegadographyGetWidgetsResponse&gt;
67+
*/
68+
public CompletableFuture<StegadographyGetWidgetsResponse> getStegadographyWidgetsAsync(
69+
File image) {
70+
return getStegadographyWidgetsWithHttpInfoAsync(image)
71+
.thenApply(
72+
response -> {
73+
return response.getData();
74+
});
75+
}
76+
77+
/**
78+
* Extracts watermarks from a PNG image and returns the cached widget data associated with each
79+
* watermark found. The image must be uploaded as a <code>multipart/form-data</code> request with
80+
* the file in the <code>image</code> field. Only widgets belonging to the authenticated
81+
* organization are returned.
82+
*
83+
* @param image PNG image file to scan for embedded watermarks. (required)
84+
* @return ApiResponse&lt;StegadographyGetWidgetsResponse&gt;
85+
* @throws ApiException if fails to make API call
86+
* @http.response.details
87+
* <table border="1">
88+
* <caption>Response details</caption>
89+
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
90+
* <tr><td> 200 </td><td> OK </td><td> - </td></tr>
91+
* <tr><td> 400 </td><td> Bad Request </td><td> - </td></tr>
92+
* <tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
93+
* <tr><td> 415 </td><td> Unsupported Media Type </td><td> - </td></tr>
94+
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
95+
* <tr><td> 500 </td><td> Internal Server Error </td><td> - </td></tr>
96+
* </table>
97+
*/
98+
public ApiResponse<StegadographyGetWidgetsResponse> getStegadographyWidgetsWithHttpInfo(
99+
File image) throws ApiException {
100+
Object localVarPostBody = null;
101+
102+
// verify the required parameter 'image' is set
103+
if (image == null) {
104+
throw new ApiException(
105+
400, "Missing the required parameter 'image' when calling getStegadographyWidgets");
106+
}
107+
// create path and map variables
108+
String localVarPath = "/api/v2/stegadography/get-widgets";
109+
110+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
111+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
112+
113+
if (image != null) {
114+
localVarFormParams.put("image", image);
115+
}
116+
117+
Invocation.Builder builder =
118+
apiClient.createBuilder(
119+
"v2.StegadographyApi.getStegadographyWidgets",
120+
localVarPath,
121+
new ArrayList<Pair>(),
122+
localVarHeaderParams,
123+
new HashMap<String, String>(),
124+
new String[] {"application/json"},
125+
new String[] {"apiKeyAuth", "appKeyAuth"});
126+
return apiClient.invokeAPI(
127+
"POST",
128+
builder,
129+
localVarHeaderParams,
130+
new String[] {"multipart/form-data"},
131+
localVarPostBody,
132+
localVarFormParams,
133+
false,
134+
new GenericType<StegadographyGetWidgetsResponse>() {});
135+
}
136+
137+
/**
138+
* Get widgets from an image.
139+
*
140+
* <p>See {@link #getStegadographyWidgetsWithHttpInfo}.
141+
*
142+
* @param image PNG image file to scan for embedded watermarks. (required)
143+
* @return CompletableFuture&lt;ApiResponse&lt;StegadographyGetWidgetsResponse&gt;&gt;
144+
*/
145+
public CompletableFuture<ApiResponse<StegadographyGetWidgetsResponse>>
146+
getStegadographyWidgetsWithHttpInfoAsync(File image) {
147+
Object localVarPostBody = null;
148+
149+
// verify the required parameter 'image' is set
150+
if (image == null) {
151+
CompletableFuture<ApiResponse<StegadographyGetWidgetsResponse>> result =
152+
new CompletableFuture<>();
153+
result.completeExceptionally(
154+
new ApiException(
155+
400, "Missing the required parameter 'image' when calling getStegadographyWidgets"));
156+
return result;
157+
}
158+
// create path and map variables
159+
String localVarPath = "/api/v2/stegadography/get-widgets";
160+
161+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
162+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
163+
164+
if (image != null) {
165+
localVarFormParams.put("image", image);
166+
}
167+
168+
Invocation.Builder builder;
169+
try {
170+
builder =
171+
apiClient.createBuilder(
172+
"v2.StegadographyApi.getStegadographyWidgets",
173+
localVarPath,
174+
new ArrayList<Pair>(),
175+
localVarHeaderParams,
176+
new HashMap<String, String>(),
177+
new String[] {"application/json"},
178+
new String[] {"apiKeyAuth", "appKeyAuth"});
179+
} catch (ApiException ex) {
180+
CompletableFuture<ApiResponse<StegadographyGetWidgetsResponse>> result =
181+
new CompletableFuture<>();
182+
result.completeExceptionally(ex);
183+
return result;
184+
}
185+
return apiClient.invokeAPIAsync(
186+
"POST",
187+
builder,
188+
localVarHeaderParams,
189+
new String[] {"multipart/form-data"},
190+
localVarPostBody,
191+
localVarFormParams,
192+
false,
193+
new GenericType<StegadographyGetWidgetsResponse>() {});
194+
}
195+
}

0 commit comments

Comments
 (0)