Skip to content

Commit 5e9f17f

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 5d914f6 of spec repo
1 parent cc15cdb commit 5e9f17f

File tree

13 files changed

+1077
-2
lines changed

13 files changed

+1077
-2
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51083,6 +51083,49 @@ components:
5108351083
$ref: '#/components/schemas/ServiceDefinitionData'
5108451084
type: array
5108551085
type: object
51086+
ServiceList:
51087+
properties:
51088+
data:
51089+
$ref: '#/components/schemas/ServiceListData'
51090+
type: object
51091+
ServiceListData:
51092+
properties:
51093+
attributes:
51094+
$ref: '#/components/schemas/ServiceListDataAttributes'
51095+
id:
51096+
type: string
51097+
type:
51098+
$ref: '#/components/schemas/ServiceListDataType'
51099+
required:
51100+
- type
51101+
type: object
51102+
ServiceListDataAttributes:
51103+
properties:
51104+
metadata:
51105+
items:
51106+
$ref: '#/components/schemas/ServiceListDataAttributesMetadataItems'
51107+
type: array
51108+
services:
51109+
items:
51110+
type: string
51111+
type: array
51112+
type: object
51113+
ServiceListDataAttributesMetadataItems:
51114+
properties:
51115+
isTraced:
51116+
type: boolean
51117+
isUsm:
51118+
type: boolean
51119+
type: object
51120+
ServiceListDataType:
51121+
default: services_list
51122+
description: Services list resource type.
51123+
enum:
51124+
- services_list
51125+
example: services_list
51126+
type: string
51127+
x-enum-varnames:
51128+
- SERVICES_LIST
5108651129
ServiceNowBasicAuth:
5108751130
description: The definition of the `ServiceNowBasicAuth` object.
5108851131
properties:
@@ -61276,6 +61319,26 @@ paths:
6127661319
permissions:
6127761320
- apm_retention_filter_write
6127861321
- apm_pipelines_write
61322+
/api/v2/apm/services:
61323+
get:
61324+
operationId: GetServiceList
61325+
responses:
61326+
'200':
61327+
content:
61328+
application/json:
61329+
schema:
61330+
$ref: '#/components/schemas/ServiceList'
61331+
description: OK
61332+
'429':
61333+
$ref: '#/components/responses/TooManyRequestsResponse'
61334+
security:
61335+
- apiKeyAuth: []
61336+
appKeyAuth: []
61337+
- AuthZ:
61338+
- apm_read
61339+
summary: Get service list
61340+
tags:
61341+
- APM
6127961342
/api/v2/app-builder/apps:
6128061343
delete:
6128161344
description: Delete multiple apps in a single request from a list of app IDs.
@@ -69009,6 +69072,9 @@ paths:
6900969072
operator: OR
6901069073
permissions:
6901169074
- incident_read
69075+
x-unstable: '**Note**: This endpoint is in Preview.
69076+
69077+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6901269078
post:
6901369079
description: Create an impact for an incident.
6901469080
operationId: CreateIncidentImpact
@@ -69052,6 +69118,9 @@ paths:
6905269118
operator: OR
6905369119
permissions:
6905469120
- incident_write
69121+
x-unstable: '**Note**: This endpoint is in Preview.
69122+
69123+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6905569124
/api/v2/incidents/{incident_id}/impacts/{impact_id}:
6905669125
delete:
6905769126
description: Delete an incident impact.
@@ -69082,6 +69151,9 @@ paths:
6908269151
operator: OR
6908369152
permissions:
6908469153
- incident_write
69154+
x-unstable: '**Note**: This endpoint is in Preview.
69155+
69156+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6908569157
/api/v2/incidents/{incident_id}/relationships/integrations:
6908669158
get:
6908769159
description: Get all integration metadata for an incident.
@@ -88017,6 +88089,9 @@ servers:
8801788089
tags:
8801888090
- description: Configure your API endpoints through the Datadog API.
8801988091
name: API Management
88092+
- description: Observe, troubleshoot, and improve cloud-scale applications with all
88093+
telemetry in context
88094+
name: APM
8802088095
- description: Manage configuration of [APM retention filters](https://app.datadoghq.com/apm/traces/retention-filters)
8802188096
for your organization. You need an API and application key with Admin rights to
8802288097
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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,12 +748,14 @@ public class ApiClient {
748748
put("v2.updateDeploymentGate", false);
749749
put("v2.updateDeploymentRule", false);
750750
put("v2.createIncident", false);
751+
put("v2.createIncidentImpact", false);
751752
put("v2.createIncidentIntegration", false);
752753
put("v2.createIncidentNotificationRule", false);
753754
put("v2.createIncidentNotificationTemplate", false);
754755
put("v2.createIncidentTodo", false);
755756
put("v2.createIncidentType", false);
756757
put("v2.deleteIncident", false);
758+
put("v2.deleteIncidentImpact", false);
757759
put("v2.deleteIncidentIntegration", false);
758760
put("v2.deleteIncidentNotificationRule", false);
759761
put("v2.deleteIncidentNotificationTemplate", false);
@@ -766,6 +768,7 @@ public class ApiClient {
766768
put("v2.getIncidentTodo", false);
767769
put("v2.getIncidentType", false);
768770
put("v2.listIncidentAttachments", false);
771+
put("v2.listIncidentImpacts", false);
769772
put("v2.listIncidentIntegrations", false);
770773
put("v2.listIncidentNotificationRules", false);
771774
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)