|
6 | 6 | import com.datadog.api.client.PaginationIterable; |
7 | 7 | import com.datadog.api.client.Pair; |
8 | 8 | import com.datadog.api.client.v2.model.EntityData; |
| 9 | +import com.datadog.api.client.v2.model.EntityResponseArray; |
9 | 10 | import com.datadog.api.client.v2.model.IncludeType; |
10 | 11 | import com.datadog.api.client.v2.model.KindData; |
11 | 12 | import com.datadog.api.client.v2.model.ListEntityCatalogResponse; |
@@ -1268,6 +1269,113 @@ public ApiResponse<ListRelationCatalogResponse> listCatalogRelationWithHttpInfo( |
1268 | 1269 | new GenericType<ListRelationCatalogResponse>() {}); |
1269 | 1270 | } |
1270 | 1271 |
|
| 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<EntityResponseArray> |
| 1290 | + */ |
| 1291 | + public CompletableFuture<EntityResponseArray> previewCatalogEntitiesAsync() { |
| 1292 | + return previewCatalogEntitiesWithHttpInfoAsync() |
| 1293 | + .thenApply( |
| 1294 | + response -> { |
| 1295 | + return response.getData(); |
| 1296 | + }); |
| 1297 | + } |
| 1298 | + |
| 1299 | + /** |
| 1300 | + * @return ApiResponse<EntityResponseArray> |
| 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<ApiResponse<EntityResponseArray>> |
| 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 | + |
1271 | 1379 | /** |
1272 | 1380 | * Create or update entities. |
1273 | 1381 | * |
|
0 commit comments