Skip to content

Commit ecfa3ec

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit f0355b7 of spec repo
1 parent 496dbe6 commit ecfa3ec

File tree

13 files changed

+1012
-67
lines changed

13 files changed

+1012
-67
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 66 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51339,6 +51339,49 @@ components:
5133951339
$ref: '#/components/schemas/ServiceDefinitionData'
5134051340
type: array
5134151341
type: object
51342+
ServiceList:
51343+
properties:
51344+
data:
51345+
$ref: '#/components/schemas/ServiceListData'
51346+
type: object
51347+
ServiceListData:
51348+
properties:
51349+
attributes:
51350+
$ref: '#/components/schemas/ServiceListDataAttributes'
51351+
id:
51352+
type: string
51353+
type:
51354+
$ref: '#/components/schemas/ServiceListDataType'
51355+
required:
51356+
- type
51357+
type: object
51358+
ServiceListDataAttributes:
51359+
properties:
51360+
metadata:
51361+
items:
51362+
$ref: '#/components/schemas/ServiceListDataAttributesMetadataItems'
51363+
type: array
51364+
services:
51365+
items:
51366+
type: string
51367+
type: array
51368+
type: object
51369+
ServiceListDataAttributesMetadataItems:
51370+
properties:
51371+
isTraced:
51372+
type: boolean
51373+
isUsm:
51374+
type: boolean
51375+
type: object
51376+
ServiceListDataType:
51377+
default: services_list
51378+
description: Services list resource type.
51379+
enum:
51380+
- services_list
51381+
example: services_list
51382+
type: string
51383+
x-enum-varnames:
51384+
- SERVICES_LIST
5134251385
ServiceNowBasicAuth:
5134351386
description: The definition of the `ServiceNowBasicAuth` object.
5134451387
properties:
@@ -61601,6 +61644,26 @@ paths:
6160161644
permissions:
6160261645
- apm_retention_filter_write
6160361646
- apm_pipelines_write
61647+
/api/v2/apm/services:
61648+
get:
61649+
operationId: GetServiceList
61650+
responses:
61651+
'200':
61652+
content:
61653+
application/json:
61654+
schema:
61655+
$ref: '#/components/schemas/ServiceList'
61656+
description: OK
61657+
'429':
61658+
$ref: '#/components/responses/TooManyRequestsResponse'
61659+
security:
61660+
- apiKeyAuth: []
61661+
appKeyAuth: []
61662+
- AuthZ:
61663+
- apm_read
61664+
summary: Get service list
61665+
tags:
61666+
- APM
6160461667
/api/v2/app-builder/apps:
6160561668
delete:
6160661669
description: Delete multiple apps in a single request from a list of app IDs.
@@ -69334,9 +69397,6 @@ paths:
6933469397
operator: OR
6933569398
permissions:
6933669399
- incident_read
69337-
x-unstable: '**Note**: This endpoint is in Preview.
69338-
69339-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6934069400
post:
6934169401
description: Create an impact for an incident.
6934269402
operationId: CreateIncidentImpact
@@ -69380,9 +69440,6 @@ paths:
6938069440
operator: OR
6938169441
permissions:
6938269442
- incident_write
69383-
x-unstable: '**Note**: This endpoint is in Preview.
69384-
69385-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6938669443
/api/v2/incidents/{incident_id}/impacts/{impact_id}:
6938769444
delete:
6938869445
description: Delete an incident impact.
@@ -69413,9 +69470,6 @@ paths:
6941369470
operator: OR
6941469471
permissions:
6941569472
- incident_write
69416-
x-unstable: '**Note**: This endpoint is in Preview.
69417-
69418-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6941969473
/api/v2/incidents/{incident_id}/relationships/integrations:
6942069474
get:
6942169475
description: Get all integration metadata for an incident.
@@ -88586,6 +88640,9 @@ servers:
8858688640
tags:
8858788641
- description: Configure your API endpoints through the Datadog API.
8858888642
name: API Management
88643+
- description: Observe, troubleshoot, and improve cloud-scale applications with all
88644+
telemetry in context
88645+
name: APM
8858988646
- description: Manage configuration of [APM retention filters](https://app.datadoghq.com/apm/traces/retention-filters)
8859088647
for your organization. You need an API and application key with Admin rights to
8859188648
interact with this endpoint. See [retention filters](https://docs.datadoghq.com/tracing/trace_pipeline/trace_retention/#retention-filters)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Get service list 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.ApmApi;
6+
import com.datadog.api.client.v2.model.ServiceList;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
ApmApi apiInstance = new ApmApi(defaultClient);
12+
13+
try {
14+
ServiceList result = apiInstance.getServiceList();
15+
System.out.println(result);
16+
} catch (ApiException e) {
17+
System.err.println("Exception when calling ApmApi#getServiceList");
18+
System.err.println("Status code: " + e.getCode());
19+
System.err.println("Reason: " + e.getResponseBody());
20+
System.err.println("Response headers: " + e.getResponseHeaders());
21+
e.printStackTrace();
22+
}
23+
}
24+
}

src/main/java/com/datadog/api/client/ApiClient.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -748,14 +748,12 @@ public class ApiClient {
748748
put("v2.updateDeploymentGate", false);
749749
put("v2.updateDeploymentRule", false);
750750
put("v2.createIncident", false);
751-
put("v2.createIncidentImpact", false);
752751
put("v2.createIncidentIntegration", false);
753752
put("v2.createIncidentNotificationRule", false);
754753
put("v2.createIncidentNotificationTemplate", false);
755754
put("v2.createIncidentTodo", false);
756755
put("v2.createIncidentType", false);
757756
put("v2.deleteIncident", false);
758-
put("v2.deleteIncidentImpact", false);
759757
put("v2.deleteIncidentIntegration", false);
760758
put("v2.deleteIncidentNotificationRule", false);
761759
put("v2.deleteIncidentNotificationTemplate", false);
@@ -768,7 +766,6 @@ public class ApiClient {
768766
put("v2.getIncidentTodo", false);
769767
put("v2.getIncidentType", false);
770768
put("v2.listIncidentAttachments", false);
771-
put("v2.listIncidentImpacts", false);
772769
put("v2.listIncidentIntegrations", false);
773770
put("v2.listIncidentNotificationRules", false);
774771
put("v2.listIncidentNotificationTemplates", false);
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
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.ServiceList;
8+
import jakarta.ws.rs.client.Invocation;
9+
import jakarta.ws.rs.core.GenericType;
10+
import java.util.ArrayList;
11+
import java.util.HashMap;
12+
import java.util.Map;
13+
import java.util.concurrent.CompletableFuture;
14+
15+
@jakarta.annotation.Generated(
16+
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
17+
public class ApmApi {
18+
private ApiClient apiClient;
19+
20+
public ApmApi() {
21+
this(ApiClient.getDefaultApiClient());
22+
}
23+
24+
public ApmApi(ApiClient apiClient) {
25+
this.apiClient = apiClient;
26+
}
27+
28+
/**
29+
* Get the API client.
30+
*
31+
* @return API client
32+
*/
33+
public ApiClient getApiClient() {
34+
return apiClient;
35+
}
36+
37+
/**
38+
* Set the API client.
39+
*
40+
* @param apiClient an instance of API client
41+
*/
42+
public void setApiClient(ApiClient apiClient) {
43+
this.apiClient = apiClient;
44+
}
45+
46+
/**
47+
* Get service list.
48+
*
49+
* <p>See {@link #getServiceListWithHttpInfo}.
50+
*
51+
* @return ServiceList
52+
* @throws ApiException if fails to make API call
53+
*/
54+
public ServiceList getServiceList() throws ApiException {
55+
return getServiceListWithHttpInfo().getData();
56+
}
57+
58+
/**
59+
* Get service list.
60+
*
61+
* <p>See {@link #getServiceListWithHttpInfoAsync}.
62+
*
63+
* @return CompletableFuture&lt;ServiceList&gt;
64+
*/
65+
public CompletableFuture<ServiceList> getServiceListAsync() {
66+
return getServiceListWithHttpInfoAsync()
67+
.thenApply(
68+
response -> {
69+
return response.getData();
70+
});
71+
}
72+
73+
/**
74+
* @return ApiResponse&lt;ServiceList&gt;
75+
* @throws ApiException if fails to make API call
76+
* @http.response.details
77+
* <table border="1">
78+
* <caption>Response details</caption>
79+
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
80+
* <tr><td> 200 </td><td> OK </td><td> - </td></tr>
81+
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
82+
* </table>
83+
*/
84+
public ApiResponse<ServiceList> getServiceListWithHttpInfo() throws ApiException {
85+
Object localVarPostBody = null;
86+
// create path and map variables
87+
String localVarPath = "/api/v2/apm/services";
88+
89+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
90+
91+
Invocation.Builder builder =
92+
apiClient.createBuilder(
93+
"v2.ApmApi.getServiceList",
94+
localVarPath,
95+
new ArrayList<Pair>(),
96+
localVarHeaderParams,
97+
new HashMap<String, String>(),
98+
new String[] {"application/json"},
99+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
100+
return apiClient.invokeAPI(
101+
"GET",
102+
builder,
103+
localVarHeaderParams,
104+
new String[] {},
105+
localVarPostBody,
106+
new HashMap<String, Object>(),
107+
false,
108+
new GenericType<ServiceList>() {});
109+
}
110+
111+
/**
112+
* Get service list.
113+
*
114+
* <p>See {@link #getServiceListWithHttpInfo}.
115+
*
116+
* @return CompletableFuture&lt;ApiResponse&lt;ServiceList&gt;&gt;
117+
*/
118+
public CompletableFuture<ApiResponse<ServiceList>> getServiceListWithHttpInfoAsync() {
119+
Object localVarPostBody = null;
120+
// create path and map variables
121+
String localVarPath = "/api/v2/apm/services";
122+
123+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
124+
125+
Invocation.Builder builder;
126+
try {
127+
builder =
128+
apiClient.createBuilder(
129+
"v2.ApmApi.getServiceList",
130+
localVarPath,
131+
new ArrayList<Pair>(),
132+
localVarHeaderParams,
133+
new HashMap<String, String>(),
134+
new String[] {"application/json"},
135+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
136+
} catch (ApiException ex) {
137+
CompletableFuture<ApiResponse<ServiceList>> result = new CompletableFuture<>();
138+
result.completeExceptionally(ex);
139+
return result;
140+
}
141+
return apiClient.invokeAPIAsync(
142+
"GET",
143+
builder,
144+
localVarHeaderParams,
145+
new String[] {},
146+
localVarPostBody,
147+
new HashMap<String, Object>(),
148+
false,
149+
new GenericType<ServiceList>() {});
150+
}
151+
}

0 commit comments

Comments
 (0)