Skip to content

Commit a23c44a

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit a7c729e of spec repo
1 parent c658240 commit a23c44a

25 files changed

+3452
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 223 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17294,11 +17294,201 @@ components:
1729417294
schema:
1729517295
$ref: '#/components/schemas/EntityToSchema'
1729617296
type: object
17297+
EntityResponseArray:
17298+
properties:
17299+
data:
17300+
items:
17301+
$ref: '#/components/schemas/PreviewEntityResponseData'
17302+
type: array
17303+
required:
17304+
- data
17305+
type: object
1729717306
EntityResponseData:
1729817307
description: List of entity data.
1729917308
items:
1730017309
$ref: '#/components/schemas/EntityData'
1730117310
type: array
17311+
EntityResponseDataAttributes:
17312+
properties:
17313+
apiVersion:
17314+
type: string
17315+
description:
17316+
type: string
17317+
displayName:
17318+
type: string
17319+
kind:
17320+
type: string
17321+
name:
17322+
type: string
17323+
namespace:
17324+
type: string
17325+
owner:
17326+
type: string
17327+
properties:
17328+
additionalProperties: {}
17329+
type: object
17330+
tags:
17331+
items:
17332+
type: string
17333+
type: array
17334+
type: object
17335+
EntityResponseDataRelationships:
17336+
properties:
17337+
incidents:
17338+
$ref: '#/components/schemas/EntityResponseDataRelationshipsIncidents'
17339+
oncalls:
17340+
$ref: '#/components/schemas/EntityResponseDataRelationshipsOncalls'
17341+
rawSchema:
17342+
$ref: '#/components/schemas/EntityResponseDataRelationshipsRawSchema'
17343+
relatedEntities:
17344+
$ref: '#/components/schemas/EntityResponseDataRelationshipsRelatedEntities'
17345+
schema:
17346+
$ref: '#/components/schemas/EntityResponseDataRelationshipsSchema'
17347+
type: object
17348+
EntityResponseDataRelationshipsIncidents:
17349+
properties:
17350+
data:
17351+
items:
17352+
$ref: '#/components/schemas/EntityResponseDataRelationshipsIncidentsDataItems'
17353+
type: array
17354+
type: object
17355+
EntityResponseDataRelationshipsIncidentsDataItems:
17356+
properties:
17357+
id:
17358+
example: ''
17359+
type: string
17360+
type:
17361+
$ref: '#/components/schemas/EntityResponseDataRelationshipsIncidentsDataItemsType'
17362+
required:
17363+
- type
17364+
- id
17365+
type: object
17366+
EntityResponseDataRelationshipsIncidentsDataItemsType:
17367+
default: incident
17368+
description: Incident resource type.
17369+
enum:
17370+
- incident
17371+
example: incident
17372+
type: string
17373+
x-enum-varnames:
17374+
- INCIDENT
17375+
EntityResponseDataRelationshipsOncalls:
17376+
properties:
17377+
data:
17378+
items:
17379+
$ref: '#/components/schemas/EntityResponseDataRelationshipsOncallsDataItems'
17380+
type: array
17381+
type: object
17382+
EntityResponseDataRelationshipsOncallsDataItems:
17383+
properties:
17384+
id:
17385+
example: ''
17386+
type: string
17387+
type:
17388+
$ref: '#/components/schemas/EntityResponseDataRelationshipsOncallsDataItemsType'
17389+
required:
17390+
- type
17391+
- id
17392+
type: object
17393+
EntityResponseDataRelationshipsOncallsDataItemsType:
17394+
default: oncall
17395+
description: Oncall resource type.
17396+
enum:
17397+
- oncall
17398+
example: oncall
17399+
type: string
17400+
x-enum-varnames:
17401+
- ONCALL
17402+
EntityResponseDataRelationshipsRawSchema:
17403+
properties:
17404+
data:
17405+
$ref: '#/components/schemas/EntityResponseDataRelationshipsRawSchemaData'
17406+
required:
17407+
- data
17408+
type: object
17409+
EntityResponseDataRelationshipsRawSchemaData:
17410+
properties:
17411+
id:
17412+
example: ''
17413+
type: string
17414+
type:
17415+
$ref: '#/components/schemas/EntityResponseDataRelationshipsRawSchemaDataType'
17416+
required:
17417+
- type
17418+
- id
17419+
type: object
17420+
EntityResponseDataRelationshipsRawSchemaDataType:
17421+
default: rawSchema
17422+
description: Raw schema resource type.
17423+
enum:
17424+
- rawSchema
17425+
example: rawSchema
17426+
type: string
17427+
x-enum-varnames:
17428+
- RAWSCHEMA
17429+
EntityResponseDataRelationshipsRelatedEntities:
17430+
properties:
17431+
data:
17432+
items:
17433+
$ref: '#/components/schemas/EntityResponseDataRelationshipsRelatedEntitiesDataItems'
17434+
type: array
17435+
type: object
17436+
EntityResponseDataRelationshipsRelatedEntitiesDataItems:
17437+
properties:
17438+
id:
17439+
example: ''
17440+
type: string
17441+
type:
17442+
$ref: '#/components/schemas/EntityResponseDataRelationshipsRelatedEntitiesDataItemsType'
17443+
required:
17444+
- type
17445+
- id
17446+
type: object
17447+
EntityResponseDataRelationshipsRelatedEntitiesDataItemsType:
17448+
default: relatedEntity
17449+
description: Related entity resource type.
17450+
enum:
17451+
- relatedEntity
17452+
example: relatedEntity
17453+
type: string
17454+
x-enum-varnames:
17455+
- RELATEDENTITY
17456+
EntityResponseDataRelationshipsSchema:
17457+
properties:
17458+
data:
17459+
$ref: '#/components/schemas/EntityResponseDataRelationshipsSchemaData'
17460+
required:
17461+
- data
17462+
type: object
17463+
EntityResponseDataRelationshipsSchemaData:
17464+
properties:
17465+
id:
17466+
example: ''
17467+
type: string
17468+
type:
17469+
$ref: '#/components/schemas/EntityResponseDataRelationshipsSchemaDataType'
17470+
required:
17471+
- type
17472+
- id
17473+
type: object
17474+
EntityResponseDataRelationshipsSchemaDataType:
17475+
default: schema
17476+
description: Schema resource type.
17477+
enum:
17478+
- schema
17479+
example: schema
17480+
type: string
17481+
x-enum-varnames:
17482+
- SCHEMA
17483+
EntityResponseDataType:
17484+
default: entity
17485+
description: Entity resource type.
17486+
enum:
17487+
- entity
17488+
example: entity
17489+
type: string
17490+
x-enum-varnames:
17491+
- ENTITY
1730217492
EntityResponseIncludedIncident:
1730317493
description: Included incident.
1730417494
properties:
@@ -37681,6 +37871,19 @@ components:
3768137871
description: Offset type.
3768237872
type: string
3768337873
type: object
37874+
PreviewEntityResponseData:
37875+
properties:
37876+
attributes:
37877+
$ref: '#/components/schemas/EntityResponseDataAttributes'
37878+
id:
37879+
type: string
37880+
relationships:
37881+
$ref: '#/components/schemas/EntityResponseDataRelationships'
37882+
type:
37883+
$ref: '#/components/schemas/EntityResponseDataType'
37884+
required:
37885+
- type
37886+
type: object
3768437887
ProcessSummariesMeta:
3768537888
description: Response metadata object.
3768637889
properties:
@@ -58421,6 +58624,26 @@ paths:
5842158624
tags:
5842258625
- Software Catalog
5842358626
x-codegen-request-body-name: body
58627+
/api/v2/catalog/entity/preview:
58628+
post:
58629+
operationId: PreviewCatalogEntities
58630+
responses:
58631+
'202':
58632+
content:
58633+
application/json:
58634+
schema:
58635+
$ref: '#/components/schemas/EntityResponseArray'
58636+
description: Accepted
58637+
'429':
58638+
$ref: '#/components/responses/TooManyRequestsResponse'
58639+
security:
58640+
- apiKeyAuth: []
58641+
appKeyAuth: []
58642+
- AuthZ:
58643+
- apm_service_catalog_read
58644+
summary: Preview catalog entities
58645+
tags:
58646+
- Software Catalog
5842458647
/api/v2/catalog/entity/{entity_id}:
5842558648
delete:
5842658649
description: Delete a single entity in Software Catalog.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Preview catalog entities returns "Accepted" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.SoftwareCatalogApi;
6+
import com.datadog.api.client.v2.model.EntityResponseArray;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
SoftwareCatalogApi apiInstance = new SoftwareCatalogApi(defaultClient);
12+
13+
try {
14+
EntityResponseArray result = apiInstance.previewCatalogEntities();
15+
System.out.println(result);
16+
} catch (ApiException e) {
17+
System.err.println("Exception when calling SoftwareCatalogApi#previewCatalogEntities");
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/v2/api/SoftwareCatalogApi.java

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import com.datadog.api.client.PaginationIterable;
77
import com.datadog.api.client.Pair;
88
import com.datadog.api.client.v2.model.EntityData;
9+
import com.datadog.api.client.v2.model.EntityResponseArray;
910
import com.datadog.api.client.v2.model.IncludeType;
1011
import com.datadog.api.client.v2.model.KindData;
1112
import com.datadog.api.client.v2.model.ListEntityCatalogResponse;
@@ -1268,6 +1269,113 @@ public ApiResponse<ListRelationCatalogResponse> listCatalogRelationWithHttpInfo(
12681269
new GenericType<ListRelationCatalogResponse>() {});
12691270
}
12701271

1272+
/**
1273+
* Preview catalog entities.
1274+
*
1275+
* <p>See {@link #previewCatalogEntitiesWithHttpInfo}.
1276+
*
1277+
* @return EntityResponseArray
1278+
* @throws ApiException if fails to make API call
1279+
*/
1280+
public EntityResponseArray previewCatalogEntities() throws ApiException {
1281+
return previewCatalogEntitiesWithHttpInfo().getData();
1282+
}
1283+
1284+
/**
1285+
* Preview catalog entities.
1286+
*
1287+
* <p>See {@link #previewCatalogEntitiesWithHttpInfoAsync}.
1288+
*
1289+
* @return CompletableFuture&lt;EntityResponseArray&gt;
1290+
*/
1291+
public CompletableFuture<EntityResponseArray> previewCatalogEntitiesAsync() {
1292+
return previewCatalogEntitiesWithHttpInfoAsync()
1293+
.thenApply(
1294+
response -> {
1295+
return response.getData();
1296+
});
1297+
}
1298+
1299+
/**
1300+
* @return ApiResponse&lt;EntityResponseArray&gt;
1301+
* @throws ApiException if fails to make API call
1302+
* @http.response.details
1303+
* <table border="1">
1304+
* <caption>Response details</caption>
1305+
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
1306+
* <tr><td> 202 </td><td> Accepted </td><td> - </td></tr>
1307+
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
1308+
* </table>
1309+
*/
1310+
public ApiResponse<EntityResponseArray> previewCatalogEntitiesWithHttpInfo() throws ApiException {
1311+
Object localVarPostBody = null;
1312+
// create path and map variables
1313+
String localVarPath = "/api/v2/catalog/entity/preview";
1314+
1315+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
1316+
1317+
Invocation.Builder builder =
1318+
apiClient.createBuilder(
1319+
"v2.SoftwareCatalogApi.previewCatalogEntities",
1320+
localVarPath,
1321+
new ArrayList<Pair>(),
1322+
localVarHeaderParams,
1323+
new HashMap<String, String>(),
1324+
new String[] {"application/json"},
1325+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
1326+
return apiClient.invokeAPI(
1327+
"POST",
1328+
builder,
1329+
localVarHeaderParams,
1330+
new String[] {},
1331+
localVarPostBody,
1332+
new HashMap<String, Object>(),
1333+
false,
1334+
new GenericType<EntityResponseArray>() {});
1335+
}
1336+
1337+
/**
1338+
* Preview catalog entities.
1339+
*
1340+
* <p>See {@link #previewCatalogEntitiesWithHttpInfo}.
1341+
*
1342+
* @return CompletableFuture&lt;ApiResponse&lt;EntityResponseArray&gt;&gt;
1343+
*/
1344+
public CompletableFuture<ApiResponse<EntityResponseArray>>
1345+
previewCatalogEntitiesWithHttpInfoAsync() {
1346+
Object localVarPostBody = null;
1347+
// create path and map variables
1348+
String localVarPath = "/api/v2/catalog/entity/preview";
1349+
1350+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
1351+
1352+
Invocation.Builder builder;
1353+
try {
1354+
builder =
1355+
apiClient.createBuilder(
1356+
"v2.SoftwareCatalogApi.previewCatalogEntities",
1357+
localVarPath,
1358+
new ArrayList<Pair>(),
1359+
localVarHeaderParams,
1360+
new HashMap<String, String>(),
1361+
new String[] {"application/json"},
1362+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
1363+
} catch (ApiException ex) {
1364+
CompletableFuture<ApiResponse<EntityResponseArray>> result = new CompletableFuture<>();
1365+
result.completeExceptionally(ex);
1366+
return result;
1367+
}
1368+
return apiClient.invokeAPIAsync(
1369+
"POST",
1370+
builder,
1371+
localVarHeaderParams,
1372+
new String[] {},
1373+
localVarPostBody,
1374+
new HashMap<String, Object>(),
1375+
false,
1376+
new GenericType<EntityResponseArray>() {});
1377+
}
1378+
12711379
/**
12721380
* Create or update entities.
12731381
*

0 commit comments

Comments
 (0)