diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 39623cac69e..727f58f8906 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -4657,6 +4657,15 @@ components: - OPENURL - DOWNLOADFILE - SETSTATEVARIABLEVALUE + AppBuilderListTagsResponse: + description: The response for listing tags associated with apps. + properties: + data: + description: An array of tags. + items: + $ref: "#/components/schemas/TagData" + type: array + type: object AppDefinitionType: default: appDefinitions description: The app definition type. @@ -8891,6 +8900,161 @@ components: data: $ref: "#/components/schemas/BillingDimensionsMappingBody" type: object + BlueprintAttributes: + description: The attributes of a blueprint resource. + properties: + created_at: + description: The timestamp when the blueprint was created. + example: "" + format: date-time + type: string + definition: + $ref: "#/components/schemas/AppDefinitionType" + description: + description: A description of what the blueprint does. + example: "" + type: string + embedded_datastore_blueprints: + additionalProperties: {} + description: Embedded datastore blueprints. + type: object + embedded_native_actions: + description: Embedded native actions. + items: + $ref: "#/components/schemas/BlueprintNativeAction" + type: array + embedded_workflow_blueprints: + additionalProperties: {} + description: Embedded workflow blueprints. + type: object + integration_id: + description: The integration ID associated with the blueprint. + type: string + mocked_outputs: + additionalProperties: {} + description: Mocked outputs for testing the blueprint. + type: object + name: + description: The human-readable name of the blueprint. + example: AWS Service Manager + type: string + slug: + description: The unique slug identifier of the blueprint. + example: aws-service-manager + type: string + tags: + description: Tags associated with the blueprint. + items: + type: string + type: array + tile_background: + description: The background style of the blueprint tile. + type: string + tile_icon_action_fqn: + description: The fully qualified name of the action used as the tile icon. + type: string + updated_at: + description: The timestamp when the blueprint was last updated. + example: "" + format: date-time + type: string + required: + - slug + - name + - description + - definition + - created_at + - updated_at + type: object + BlueprintData: + description: A blueprint resource. + properties: + attributes: + $ref: "#/components/schemas/BlueprintAttributes" + id: + description: The ID of the blueprint. + example: 65bb1f25-52e1-4510-9f8d-22d1516ed693 + format: uuid + type: string + type: + $ref: "#/components/schemas/BlueprintDataType" + required: + - id + - type + - attributes + type: object + BlueprintDataType: + description: The resource type for a blueprint. + enum: + - blueprint + example: blueprint + type: string + x-enum-varnames: + - BLUEPRINT + BlueprintMetadataAttributes: + description: The attributes of a blueprint metadata resource. + properties: + created_at: + description: The timestamp when the blueprint was created. + example: "" + format: date-time + type: string + description: + description: A description of what the blueprint does. + example: "" + type: string + name: + description: The human-readable name of the blueprint. + example: AWS Service Manager + type: string + slug: + description: The unique slug identifier of the blueprint. + example: aws-service-manager + type: string + tags: + description: Tags associated with the blueprint. + items: + type: string + type: array + tile_background: + description: The background style of the blueprint tile. + type: string + tile_icon_action_fqn: + description: The fully qualified name of the action used as the tile icon. + type: string + updated_at: + description: The timestamp when the blueprint was last updated. + example: "" + format: date-time + type: string + required: + - slug + - name + - description + - created_at + - updated_at + type: object + BlueprintMetadataData: + description: A blueprint metadata resource. + properties: + attributes: + $ref: "#/components/schemas/BlueprintMetadataAttributes" + id: + description: The ID of the blueprint. + example: 65bb1f25-52e1-4510-9f8d-22d1516ed693 + format: uuid + type: string + type: + $ref: "#/components/schemas/BlueprintDataType" + required: + - id + - type + - attributes + type: object + BlueprintNativeAction: + additionalProperties: {} + description: An embedded native action in a blueprint. + type: object BranchCoverageSummaryRequest: description: Request object for getting code coverage summary for a branch. properties: @@ -32282,6 +32446,21 @@ components: type: string type: array type: object + GetBlueprintResponse: + description: The response for retrieving a single blueprint. + properties: + data: + $ref: "#/components/schemas/BlueprintData" + type: object + GetBlueprintsResponse: + description: The response for retrieving multiple blueprints. + properties: + data: + description: An array of blueprints. + items: + $ref: "#/components/schemas/BlueprintData" + type: array + type: object GetCustomFrameworkResponse: description: Response object to get a custom framework. properties: @@ -42410,6 +42589,15 @@ components: required: - data type: object + ListBlueprintsResponse: + description: The response for listing available blueprints. + properties: + data: + description: An array of blueprint metadata. + items: + $ref: "#/components/schemas/BlueprintMetadataData" + type: array + type: object ListCampaignsResponse: description: Response containing a list of campaigns. properties: @@ -78435,6 +78623,27 @@ components: - type - id type: object + TagData: + description: A tag resource associated with an app. + properties: + id: + description: The name of the tag. + example: production + type: string + type: + $ref: "#/components/schemas/TagDataType" + required: + - id + - type + type: object + TagDataType: + description: The resource type for a tag. + enum: + - tag + example: tag + type: string + x-enum-varnames: + - TAG TagsEventAttribute: description: Array of tags associated with your event. example: ["team:A"] @@ -91593,6 +91802,252 @@ paths: permissions: - apps_run - connections_read + "/api/v2/app-builder/blueprint/{blueprint_id}": + get: + description: Retrieve an app blueprint by its ID. + operationId: GetBlueprint + parameters: + - description: The ID of the blueprint to retrieve. + example: 65bb1f25-52e1-4510-9f8d-22d1516ed693 + in: path + name: blueprint_id + required: true + schema: + format: uuid + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-01T00:00:00Z" + definition: {} + description: Manage your AWS services from Datadog. + name: AWS Service Manager + slug: aws-service-manager + updated_at: "2024-01-01T00:00:00Z" + id: 65bb1f25-52e1-4510-9f8d-22d1516ed693 + type: blueprint + schema: + $ref: "#/components/schemas/GetBlueprintResponse" + description: OK + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get Blueprint + tags: + - App Builder + "x-permission": + operator: OR + permissions: + - apps_run + - apps_write + - connections_read + - connections_write + /api/v2/app-builder/blueprints: + get: + description: List available app blueprints. + operationId: ListBlueprints + parameters: + - description: The number of blueprints to return per page. Defaults to 10. Maximum is 100. + in: query + name: limit + required: false + schema: + format: int64 + type: integer + - description: The page of results to return. Starts at 0. + in: query + name: page + required: false + schema: + format: int64 + type: integer + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + created_at: "2024-01-01T00:00:00Z" + description: Manage your AWS services from Datadog. + name: AWS Service Manager + slug: aws-service-manager + updated_at: "2024-01-01T00:00:00Z" + id: 65bb1f25-52e1-4510-9f8d-22d1516ed693 + type: blueprint + schema: + $ref: "#/components/schemas/ListBlueprintsResponse" + description: OK + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List Blueprints + tags: + - App Builder + "x-permission": + operator: OR + permissions: + - apps_run + - apps_write + - connections_read + - connections_write + "/api/v2/app-builder/blueprints/integration-id/{integration_id}": + get: + description: List app blueprints associated with a specific integration ID. + operationId: GetBlueprintsByIntegrationId + parameters: + - description: The integration ID to filter blueprints by. + example: aws + in: path + name: integration_id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + created_at: "2024-01-01T00:00:00Z" + definition: {} + description: Manage your AWS services from Datadog. + integration_id: aws + name: AWS Service Manager + slug: aws-service-manager + updated_at: "2024-01-01T00:00:00Z" + id: 65bb1f25-52e1-4510-9f8d-22d1516ed693 + type: blueprint + schema: + $ref: "#/components/schemas/GetBlueprintsResponse" + description: OK + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get Blueprints by Integration ID + tags: + - App Builder + "x-permission": + operator: OR + permissions: + - apps_run + - apps_write + - connections_read + - connections_write + "/api/v2/app-builder/blueprints/slugs/{slugs}": + get: + description: Retrieve app blueprints by their slugs. + operationId: GetBlueprintsBySlugs + parameters: + - description: A comma-separated list of blueprint slugs. + example: aws-service-manager + in: path + name: slugs + required: true + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + created_at: "2024-01-01T00:00:00Z" + definition: {} + description: Manage your AWS services from Datadog. + name: AWS Service Manager + slug: aws-service-manager + updated_at: "2024-01-01T00:00:00Z" + id: 65bb1f25-52e1-4510-9f8d-22d1516ed693 + type: blueprint + schema: + $ref: "#/components/schemas/GetBlueprintsResponse" + description: OK + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get Blueprints by Slugs + tags: + - App Builder + "x-permission": + operator: OR + permissions: + - apps_run + - apps_write + - connections_read + - connections_write + /api/v2/app-builder/tags: + get: + description: List all tags associated with the authenticated user's apps. + operationId: ListTags + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - id: production + type: tag + schema: + $ref: "#/components/schemas/AppBuilderListTagsResponse" + description: OK + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List Tags + tags: + - App Builder + "x-permission": + operator: OR + permissions: + - apps_run /api/v2/application_keys: get: description: List all application keys available for your org diff --git a/examples/v2/app-builder/GetBlueprint.java b/examples/v2/app-builder/GetBlueprint.java new file mode 100644 index 00000000000..b096e8f6817 --- /dev/null +++ b/examples/v2/app-builder/GetBlueprint.java @@ -0,0 +1,26 @@ +// Get Blueprint returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AppBuilderApi; +import com.datadog.api.client.v2.model.GetBlueprintResponse; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + AppBuilderApi apiInstance = new AppBuilderApi(defaultClient); + + try { + GetBlueprintResponse result = + apiInstance.getBlueprint(UUID.fromString("65bb1f25-52e1-4510-9f8d-22d1516ed693")); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppBuilderApi#getBlueprint"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/app-builder/GetBlueprintsByIntegrationId.java b/examples/v2/app-builder/GetBlueprintsByIntegrationId.java new file mode 100644 index 00000000000..0f1e3c13777 --- /dev/null +++ b/examples/v2/app-builder/GetBlueprintsByIntegrationId.java @@ -0,0 +1,24 @@ +// Get Blueprints by Integration ID returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AppBuilderApi; +import com.datadog.api.client.v2.model.GetBlueprintsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + AppBuilderApi apiInstance = new AppBuilderApi(defaultClient); + + try { + GetBlueprintsResponse result = apiInstance.getBlueprintsByIntegrationId("aws"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppBuilderApi#getBlueprintsByIntegrationId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/app-builder/GetBlueprintsBySlugs.java b/examples/v2/app-builder/GetBlueprintsBySlugs.java new file mode 100644 index 00000000000..67a98583210 --- /dev/null +++ b/examples/v2/app-builder/GetBlueprintsBySlugs.java @@ -0,0 +1,24 @@ +// Get Blueprints by Slugs returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AppBuilderApi; +import com.datadog.api.client.v2.model.GetBlueprintsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + AppBuilderApi apiInstance = new AppBuilderApi(defaultClient); + + try { + GetBlueprintsResponse result = apiInstance.getBlueprintsBySlugs("aws-service-manager"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppBuilderApi#getBlueprintsBySlugs"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/app-builder/ListBlueprints.java b/examples/v2/app-builder/ListBlueprints.java new file mode 100644 index 00000000000..943ceb7c83a --- /dev/null +++ b/examples/v2/app-builder/ListBlueprints.java @@ -0,0 +1,24 @@ +// List Blueprints returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AppBuilderApi; +import com.datadog.api.client.v2.model.ListBlueprintsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + AppBuilderApi apiInstance = new AppBuilderApi(defaultClient); + + try { + ListBlueprintsResponse result = apiInstance.listBlueprints(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppBuilderApi#listBlueprints"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/app-builder/ListTags.java b/examples/v2/app-builder/ListTags.java new file mode 100644 index 00000000000..3669fdd69d1 --- /dev/null +++ b/examples/v2/app-builder/ListTags.java @@ -0,0 +1,24 @@ +// List Tags returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AppBuilderApi; +import com.datadog.api.client.v2.model.AppBuilderListTagsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + AppBuilderApi apiInstance = new AppBuilderApi(defaultClient); + + try { + AppBuilderListTagsResponse result = apiInstance.listTags(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppBuilderApi#listTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/datadog/api/client/v2/api/AppBuilderApi.java b/src/main/java/com/datadog/api/client/v2/api/AppBuilderApi.java index c7980db2382..0f5762bf5de 100644 --- a/src/main/java/com/datadog/api/client/v2/api/AppBuilderApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/AppBuilderApi.java @@ -4,6 +4,7 @@ import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; +import com.datadog.api.client.v2.model.AppBuilderListTagsResponse; import com.datadog.api.client.v2.model.AppsSortField; import com.datadog.api.client.v2.model.CreateAppRequest; import com.datadog.api.client.v2.model.CreateAppResponse; @@ -12,8 +13,11 @@ import com.datadog.api.client.v2.model.DeleteAppsRequest; import com.datadog.api.client.v2.model.DeleteAppsResponse; import com.datadog.api.client.v2.model.GetAppResponse; +import com.datadog.api.client.v2.model.GetBlueprintResponse; +import com.datadog.api.client.v2.model.GetBlueprintsResponse; import com.datadog.api.client.v2.model.ListAppVersionsResponse; import com.datadog.api.client.v2.model.ListAppsResponse; +import com.datadog.api.client.v2.model.ListBlueprintsResponse; import com.datadog.api.client.v2.model.PublishAppResponse; import com.datadog.api.client.v2.model.UnpublishAppResponse; import com.datadog.api.client.v2.model.UpdateAppFavoriteRequest; @@ -827,6 +831,419 @@ public CompletableFuture> getAppWithHttpInfoAsync( new GenericType() {}); } + /** + * Get Blueprint. + * + *

See {@link #getBlueprintWithHttpInfo}. + * + * @param blueprintId The ID of the blueprint to retrieve. (required) + * @return GetBlueprintResponse + * @throws ApiException if fails to make API call + */ + public GetBlueprintResponse getBlueprint(UUID blueprintId) throws ApiException { + return getBlueprintWithHttpInfo(blueprintId).getData(); + } + + /** + * Get Blueprint. + * + *

See {@link #getBlueprintWithHttpInfoAsync}. + * + * @param blueprintId The ID of the blueprint to retrieve. (required) + * @return CompletableFuture<GetBlueprintResponse> + */ + public CompletableFuture getBlueprintAsync(UUID blueprintId) { + return getBlueprintWithHttpInfoAsync(blueprintId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve an app blueprint by its ID. + * + * @param blueprintId The ID of the blueprint to retrieve. (required) + * @return ApiResponse<GetBlueprintResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getBlueprintWithHttpInfo(UUID blueprintId) + throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'blueprintId' is set + if (blueprintId == null) { + throw new ApiException( + 400, "Missing the required parameter 'blueprintId' when calling getBlueprint"); + } + // create path and map variables + String localVarPath = + "/api/v2/app-builder/blueprint/{blueprint_id}" + .replaceAll( + "\\{" + "blueprint_id" + "\\}", apiClient.escapeString(blueprintId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AppBuilderApi.getBlueprint", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get Blueprint. + * + *

See {@link #getBlueprintWithHttpInfo}. + * + * @param blueprintId The ID of the blueprint to retrieve. (required) + * @return CompletableFuture<ApiResponse<GetBlueprintResponse>> + */ + public CompletableFuture> getBlueprintWithHttpInfoAsync( + UUID blueprintId) { + Object localVarPostBody = null; + + // verify the required parameter 'blueprintId' is set + if (blueprintId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'blueprintId' when calling getBlueprint")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/app-builder/blueprint/{blueprint_id}" + .replaceAll( + "\\{" + "blueprint_id" + "\\}", apiClient.escapeString(blueprintId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AppBuilderApi.getBlueprint", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get Blueprints by Integration ID. + * + *

See {@link #getBlueprintsByIntegrationIdWithHttpInfo}. + * + * @param integrationId The integration ID to filter blueprints by. (required) + * @return GetBlueprintsResponse + * @throws ApiException if fails to make API call + */ + public GetBlueprintsResponse getBlueprintsByIntegrationId(String integrationId) + throws ApiException { + return getBlueprintsByIntegrationIdWithHttpInfo(integrationId).getData(); + } + + /** + * Get Blueprints by Integration ID. + * + *

See {@link #getBlueprintsByIntegrationIdWithHttpInfoAsync}. + * + * @param integrationId The integration ID to filter blueprints by. (required) + * @return CompletableFuture<GetBlueprintsResponse> + */ + public CompletableFuture getBlueprintsByIntegrationIdAsync( + String integrationId) { + return getBlueprintsByIntegrationIdWithHttpInfoAsync(integrationId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List app blueprints associated with a specific integration ID. + * + * @param integrationId The integration ID to filter blueprints by. (required) + * @return ApiResponse<GetBlueprintsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse getBlueprintsByIntegrationIdWithHttpInfo( + String integrationId) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'integrationId' is set + if (integrationId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'integrationId' when calling" + + " getBlueprintsByIntegrationId"); + } + // create path and map variables + String localVarPath = + "/api/v2/app-builder/blueprints/integration-id/{integration_id}" + .replaceAll( + "\\{" + "integration_id" + "\\}", apiClient.escapeString(integrationId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AppBuilderApi.getBlueprintsByIntegrationId", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get Blueprints by Integration ID. + * + *

See {@link #getBlueprintsByIntegrationIdWithHttpInfo}. + * + * @param integrationId The integration ID to filter blueprints by. (required) + * @return CompletableFuture<ApiResponse<GetBlueprintsResponse>> + */ + public CompletableFuture> + getBlueprintsByIntegrationIdWithHttpInfoAsync(String integrationId) { + Object localVarPostBody = null; + + // verify the required parameter 'integrationId' is set + if (integrationId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'integrationId' when calling" + + " getBlueprintsByIntegrationId")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/app-builder/blueprints/integration-id/{integration_id}" + .replaceAll( + "\\{" + "integration_id" + "\\}", apiClient.escapeString(integrationId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AppBuilderApi.getBlueprintsByIntegrationId", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get Blueprints by Slugs. + * + *

See {@link #getBlueprintsBySlugsWithHttpInfo}. + * + * @param slugs A comma-separated list of blueprint slugs. (required) + * @return GetBlueprintsResponse + * @throws ApiException if fails to make API call + */ + public GetBlueprintsResponse getBlueprintsBySlugs(String slugs) throws ApiException { + return getBlueprintsBySlugsWithHttpInfo(slugs).getData(); + } + + /** + * Get Blueprints by Slugs. + * + *

See {@link #getBlueprintsBySlugsWithHttpInfoAsync}. + * + * @param slugs A comma-separated list of blueprint slugs. (required) + * @return CompletableFuture<GetBlueprintsResponse> + */ + public CompletableFuture getBlueprintsBySlugsAsync(String slugs) { + return getBlueprintsBySlugsWithHttpInfoAsync(slugs) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve app blueprints by their slugs. + * + * @param slugs A comma-separated list of blueprint slugs. (required) + * @return ApiResponse<GetBlueprintsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse getBlueprintsBySlugsWithHttpInfo(String slugs) + throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'slugs' is set + if (slugs == null) { + throw new ApiException( + 400, "Missing the required parameter 'slugs' when calling getBlueprintsBySlugs"); + } + // create path and map variables + String localVarPath = + "/api/v2/app-builder/blueprints/slugs/{slugs}" + .replaceAll("\\{" + "slugs" + "\\}", apiClient.escapeString(slugs.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AppBuilderApi.getBlueprintsBySlugs", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get Blueprints by Slugs. + * + *

See {@link #getBlueprintsBySlugsWithHttpInfo}. + * + * @param slugs A comma-separated list of blueprint slugs. (required) + * @return CompletableFuture<ApiResponse<GetBlueprintsResponse>> + */ + public CompletableFuture> + getBlueprintsBySlugsWithHttpInfoAsync(String slugs) { + Object localVarPostBody = null; + + // verify the required parameter 'slugs' is set + if (slugs == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'slugs' when calling getBlueprintsBySlugs")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/app-builder/blueprints/slugs/{slugs}" + .replaceAll("\\{" + "slugs" + "\\}", apiClient.escapeString(slugs.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AppBuilderApi.getBlueprintsBySlugs", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** Manage optional parameters to listApps. */ public static class ListAppsOptionalParameters { private Long limit; @@ -1374,6 +1791,300 @@ public CompletableFuture> listAppVersionsWi new GenericType() {}); } + /** Manage optional parameters to listBlueprints. */ + public static class ListBlueprintsOptionalParameters { + private Long limit; + private Long page; + + /** + * Set limit. + * + * @param limit The number of blueprints to return per page. Defaults to 10. Maximum is 100. + * (optional) + * @return ListBlueprintsOptionalParameters + */ + public ListBlueprintsOptionalParameters limit(Long limit) { + this.limit = limit; + return this; + } + + /** + * Set page. + * + * @param page The page of results to return. Starts at 0. (optional) + * @return ListBlueprintsOptionalParameters + */ + public ListBlueprintsOptionalParameters page(Long page) { + this.page = page; + return this; + } + } + + /** + * List Blueprints. + * + *

See {@link #listBlueprintsWithHttpInfo}. + * + * @return ListBlueprintsResponse + * @throws ApiException if fails to make API call + */ + public ListBlueprintsResponse listBlueprints() throws ApiException { + return listBlueprintsWithHttpInfo(new ListBlueprintsOptionalParameters()).getData(); + } + + /** + * List Blueprints. + * + *

See {@link #listBlueprintsWithHttpInfoAsync}. + * + * @return CompletableFuture<ListBlueprintsResponse> + */ + public CompletableFuture listBlueprintsAsync() { + return listBlueprintsWithHttpInfoAsync(new ListBlueprintsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List Blueprints. + * + *

See {@link #listBlueprintsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return ListBlueprintsResponse + * @throws ApiException if fails to make API call + */ + public ListBlueprintsResponse listBlueprints(ListBlueprintsOptionalParameters parameters) + throws ApiException { + return listBlueprintsWithHttpInfo(parameters).getData(); + } + + /** + * List Blueprints. + * + *

See {@link #listBlueprintsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ListBlueprintsResponse> + */ + public CompletableFuture listBlueprintsAsync( + ListBlueprintsOptionalParameters parameters) { + return listBlueprintsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List available app blueprints. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<ListBlueprintsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse listBlueprintsWithHttpInfo( + ListBlueprintsOptionalParameters parameters) throws ApiException { + Object localVarPostBody = null; + Long limit = parameters.limit; + Long page = parameters.page; + // create path and map variables + String localVarPath = "/api/v2/app-builder/blueprints"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page", page)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AppBuilderApi.listBlueprints", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List Blueprints. + * + *

See {@link #listBlueprintsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<ListBlueprintsResponse>> + */ + public CompletableFuture> listBlueprintsWithHttpInfoAsync( + ListBlueprintsOptionalParameters parameters) { + Object localVarPostBody = null; + Long limit = parameters.limit; + Long page = parameters.page; + // create path and map variables + String localVarPath = "/api/v2/app-builder/blueprints"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page", page)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AppBuilderApi.listBlueprints", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List Tags. + * + *

See {@link #listTagsWithHttpInfo}. + * + * @return AppBuilderListTagsResponse + * @throws ApiException if fails to make API call + */ + public AppBuilderListTagsResponse listTags() throws ApiException { + return listTagsWithHttpInfo().getData(); + } + + /** + * List Tags. + * + *

See {@link #listTagsWithHttpInfoAsync}. + * + * @return CompletableFuture<AppBuilderListTagsResponse> + */ + public CompletableFuture listTagsAsync() { + return listTagsWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all tags associated with the authenticated user's apps. + * + * @return ApiResponse<AppBuilderListTagsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse listTagsWithHttpInfo() throws ApiException { + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/app-builder/tags"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AppBuilderApi.listTags", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List Tags. + * + *

See {@link #listTagsWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<AppBuilderListTagsResponse>> + */ + public CompletableFuture> listTagsWithHttpInfoAsync() { + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/app-builder/tags"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AppBuilderApi.listTags", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Publish App. * diff --git a/src/main/java/com/datadog/api/client/v2/model/AppBuilderListTagsResponse.java b/src/main/java/com/datadog/api/client/v2/model/AppBuilderListTagsResponse.java new file mode 100644 index 00000000000..ad4616209b3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AppBuilderListTagsResponse.java @@ -0,0 +1,150 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The response for listing tags associated with apps. */ +@JsonPropertyOrder({AppBuilderListTagsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AppBuilderListTagsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = null; + + public AppBuilderListTagsResponse data(List data) { + this.data = data; + for (TagData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AppBuilderListTagsResponse addDataItem(TagData dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * An array of tags. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AppBuilderListTagsResponse + */ + @JsonAnySetter + public AppBuilderListTagsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this AppBuilderListTagsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppBuilderListTagsResponse appBuilderListTagsResponse = (AppBuilderListTagsResponse) o; + return Objects.equals(this.data, appBuilderListTagsResponse.data) + && Objects.equals( + this.additionalProperties, appBuilderListTagsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppBuilderListTagsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/BlueprintAttributes.java b/src/main/java/com/datadog/api/client/v2/model/BlueprintAttributes.java new file mode 100644 index 00000000000..dc4c731661b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/BlueprintAttributes.java @@ -0,0 +1,580 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The attributes of a blueprint resource. */ +@JsonPropertyOrder({ + BlueprintAttributes.JSON_PROPERTY_CREATED_AT, + BlueprintAttributes.JSON_PROPERTY_DEFINITION, + BlueprintAttributes.JSON_PROPERTY_DESCRIPTION, + BlueprintAttributes.JSON_PROPERTY_EMBEDDED_DATASTORE_BLUEPRINTS, + BlueprintAttributes.JSON_PROPERTY_EMBEDDED_NATIVE_ACTIONS, + BlueprintAttributes.JSON_PROPERTY_EMBEDDED_WORKFLOW_BLUEPRINTS, + BlueprintAttributes.JSON_PROPERTY_INTEGRATION_ID, + BlueprintAttributes.JSON_PROPERTY_MOCKED_OUTPUTS, + BlueprintAttributes.JSON_PROPERTY_NAME, + BlueprintAttributes.JSON_PROPERTY_SLUG, + BlueprintAttributes.JSON_PROPERTY_TAGS, + BlueprintAttributes.JSON_PROPERTY_TILE_BACKGROUND, + BlueprintAttributes.JSON_PROPERTY_TILE_ICON_ACTION_FQN, + BlueprintAttributes.JSON_PROPERTY_UPDATED_AT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class BlueprintAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_DEFINITION = "definition"; + private AppDefinitionType definition = AppDefinitionType.APPDEFINITIONS; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_EMBEDDED_DATASTORE_BLUEPRINTS = + "embedded_datastore_blueprints"; + private Map embeddedDatastoreBlueprints = null; + + public static final String JSON_PROPERTY_EMBEDDED_NATIVE_ACTIONS = "embedded_native_actions"; + private List> embeddedNativeActions = null; + + public static final String JSON_PROPERTY_EMBEDDED_WORKFLOW_BLUEPRINTS = + "embedded_workflow_blueprints"; + private Map embeddedWorkflowBlueprints = null; + + public static final String JSON_PROPERTY_INTEGRATION_ID = "integration_id"; + private String integrationId; + + public static final String JSON_PROPERTY_MOCKED_OUTPUTS = "mocked_outputs"; + private Map mockedOutputs = null; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SLUG = "slug"; + private String slug; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + public static final String JSON_PROPERTY_TILE_BACKGROUND = "tile_background"; + private String tileBackground; + + public static final String JSON_PROPERTY_TILE_ICON_ACTION_FQN = "tile_icon_action_fqn"; + private String tileIconActionFqn; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private OffsetDateTime updatedAt; + + public BlueprintAttributes() {} + + @JsonCreator + public BlueprintAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_DEFINITION) AppDefinitionType definition, + @JsonProperty(required = true, value = JSON_PROPERTY_DESCRIPTION) String description, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_SLUG) String slug, + @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt) { + this.createdAt = createdAt; + this.definition = definition; + this.unparsed |= !definition.isValid(); + this.description = description; + this.name = name; + this.slug = slug; + this.updatedAt = updatedAt; + } + + public BlueprintAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The timestamp when the blueprint was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public BlueprintAttributes definition(AppDefinitionType definition) { + this.definition = definition; + this.unparsed |= !definition.isValid(); + return this; + } + + /** + * The app definition type. + * + * @return definition + */ + @JsonProperty(JSON_PROPERTY_DEFINITION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AppDefinitionType getDefinition() { + return definition; + } + + public void setDefinition(AppDefinitionType definition) { + if (!definition.isValid()) { + this.unparsed = true; + } + this.definition = definition; + } + + public BlueprintAttributes description(String description) { + this.description = description; + return this; + } + + /** + * A description of what the blueprint does. + * + * @return description + */ + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public BlueprintAttributes embeddedDatastoreBlueprints( + Map embeddedDatastoreBlueprints) { + this.embeddedDatastoreBlueprints = embeddedDatastoreBlueprints; + return this; + } + + public BlueprintAttributes putEmbeddedDatastoreBlueprintsItem( + String key, Object embeddedDatastoreBlueprintsItem) { + if (this.embeddedDatastoreBlueprints == null) { + this.embeddedDatastoreBlueprints = new HashMap<>(); + } + this.embeddedDatastoreBlueprints.put(key, embeddedDatastoreBlueprintsItem); + return this; + } + + /** + * Embedded datastore blueprints. + * + * @return embeddedDatastoreBlueprints + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMBEDDED_DATASTORE_BLUEPRINTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getEmbeddedDatastoreBlueprints() { + return embeddedDatastoreBlueprints; + } + + public void setEmbeddedDatastoreBlueprints(Map embeddedDatastoreBlueprints) { + this.embeddedDatastoreBlueprints = embeddedDatastoreBlueprints; + } + + public BlueprintAttributes embeddedNativeActions( + List> embeddedNativeActions) { + this.embeddedNativeActions = embeddedNativeActions; + return this; + } + + public BlueprintAttributes addEmbeddedNativeActionsItem( + Map embeddedNativeActionsItem) { + if (this.embeddedNativeActions == null) { + this.embeddedNativeActions = new ArrayList<>(); + } + this.embeddedNativeActions.add(embeddedNativeActionsItem); + return this; + } + + /** + * Embedded native actions. + * + * @return embeddedNativeActions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMBEDDED_NATIVE_ACTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List> getEmbeddedNativeActions() { + return embeddedNativeActions; + } + + public void setEmbeddedNativeActions(List> embeddedNativeActions) { + this.embeddedNativeActions = embeddedNativeActions; + } + + public BlueprintAttributes embeddedWorkflowBlueprints( + Map embeddedWorkflowBlueprints) { + this.embeddedWorkflowBlueprints = embeddedWorkflowBlueprints; + return this; + } + + public BlueprintAttributes putEmbeddedWorkflowBlueprintsItem( + String key, Object embeddedWorkflowBlueprintsItem) { + if (this.embeddedWorkflowBlueprints == null) { + this.embeddedWorkflowBlueprints = new HashMap<>(); + } + this.embeddedWorkflowBlueprints.put(key, embeddedWorkflowBlueprintsItem); + return this; + } + + /** + * Embedded workflow blueprints. + * + * @return embeddedWorkflowBlueprints + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMBEDDED_WORKFLOW_BLUEPRINTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getEmbeddedWorkflowBlueprints() { + return embeddedWorkflowBlueprints; + } + + public void setEmbeddedWorkflowBlueprints(Map embeddedWorkflowBlueprints) { + this.embeddedWorkflowBlueprints = embeddedWorkflowBlueprints; + } + + public BlueprintAttributes integrationId(String integrationId) { + this.integrationId = integrationId; + return this; + } + + /** + * The integration ID associated with the blueprint. + * + * @return integrationId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTEGRATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIntegrationId() { + return integrationId; + } + + public void setIntegrationId(String integrationId) { + this.integrationId = integrationId; + } + + public BlueprintAttributes mockedOutputs(Map mockedOutputs) { + this.mockedOutputs = mockedOutputs; + return this; + } + + public BlueprintAttributes putMockedOutputsItem(String key, Object mockedOutputsItem) { + if (this.mockedOutputs == null) { + this.mockedOutputs = new HashMap<>(); + } + this.mockedOutputs.put(key, mockedOutputsItem); + return this; + } + + /** + * Mocked outputs for testing the blueprint. + * + * @return mockedOutputs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MOCKED_OUTPUTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getMockedOutputs() { + return mockedOutputs; + } + + public void setMockedOutputs(Map mockedOutputs) { + this.mockedOutputs = mockedOutputs; + } + + public BlueprintAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The human-readable name of the blueprint. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public BlueprintAttributes slug(String slug) { + this.slug = slug; + return this; + } + + /** + * The unique slug identifier of the blueprint. + * + * @return slug + */ + @JsonProperty(JSON_PROPERTY_SLUG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSlug() { + return slug; + } + + public void setSlug(String slug) { + this.slug = slug; + } + + public BlueprintAttributes tags(List tags) { + this.tags = tags; + return this; + } + + public BlueprintAttributes addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Tags associated with the blueprint. + * + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + public BlueprintAttributes tileBackground(String tileBackground) { + this.tileBackground = tileBackground; + return this; + } + + /** + * The background style of the blueprint tile. + * + * @return tileBackground + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TILE_BACKGROUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTileBackground() { + return tileBackground; + } + + public void setTileBackground(String tileBackground) { + this.tileBackground = tileBackground; + } + + public BlueprintAttributes tileIconActionFqn(String tileIconActionFqn) { + this.tileIconActionFqn = tileIconActionFqn; + return this; + } + + /** + * The fully qualified name of the action used as the tile icon. + * + * @return tileIconActionFqn + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TILE_ICON_ACTION_FQN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTileIconActionFqn() { + return tileIconActionFqn; + } + + public void setTileIconActionFqn(String tileIconActionFqn) { + this.tileIconActionFqn = tileIconActionFqn; + } + + public BlueprintAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * The timestamp when the blueprint was last updated. + * + * @return updatedAt + */ + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return BlueprintAttributes + */ + @JsonAnySetter + public BlueprintAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this BlueprintAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BlueprintAttributes blueprintAttributes = (BlueprintAttributes) o; + return Objects.equals(this.createdAt, blueprintAttributes.createdAt) + && Objects.equals(this.definition, blueprintAttributes.definition) + && Objects.equals(this.description, blueprintAttributes.description) + && Objects.equals( + this.embeddedDatastoreBlueprints, blueprintAttributes.embeddedDatastoreBlueprints) + && Objects.equals(this.embeddedNativeActions, blueprintAttributes.embeddedNativeActions) + && Objects.equals( + this.embeddedWorkflowBlueprints, blueprintAttributes.embeddedWorkflowBlueprints) + && Objects.equals(this.integrationId, blueprintAttributes.integrationId) + && Objects.equals(this.mockedOutputs, blueprintAttributes.mockedOutputs) + && Objects.equals(this.name, blueprintAttributes.name) + && Objects.equals(this.slug, blueprintAttributes.slug) + && Objects.equals(this.tags, blueprintAttributes.tags) + && Objects.equals(this.tileBackground, blueprintAttributes.tileBackground) + && Objects.equals(this.tileIconActionFqn, blueprintAttributes.tileIconActionFqn) + && Objects.equals(this.updatedAt, blueprintAttributes.updatedAt) + && Objects.equals(this.additionalProperties, blueprintAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + definition, + description, + embeddedDatastoreBlueprints, + embeddedNativeActions, + embeddedWorkflowBlueprints, + integrationId, + mockedOutputs, + name, + slug, + tags, + tileBackground, + tileIconActionFqn, + updatedAt, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BlueprintAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" definition: ").append(toIndentedString(definition)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" embeddedDatastoreBlueprints: ") + .append(toIndentedString(embeddedDatastoreBlueprints)) + .append("\n"); + sb.append(" embeddedNativeActions: ") + .append(toIndentedString(embeddedNativeActions)) + .append("\n"); + sb.append(" embeddedWorkflowBlueprints: ") + .append(toIndentedString(embeddedWorkflowBlueprints)) + .append("\n"); + sb.append(" integrationId: ").append(toIndentedString(integrationId)).append("\n"); + sb.append(" mockedOutputs: ").append(toIndentedString(mockedOutputs)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" slug: ").append(toIndentedString(slug)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" tileBackground: ").append(toIndentedString(tileBackground)).append("\n"); + sb.append(" tileIconActionFqn: ").append(toIndentedString(tileIconActionFqn)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/BlueprintData.java b/src/main/java/com/datadog/api/client/v2/model/BlueprintData.java new file mode 100644 index 00000000000..298a67f0f8a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/BlueprintData.java @@ -0,0 +1,210 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** A blueprint resource. */ +@JsonPropertyOrder({ + BlueprintData.JSON_PROPERTY_ATTRIBUTES, + BlueprintData.JSON_PROPERTY_ID, + BlueprintData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class BlueprintData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private BlueprintAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private BlueprintDataType type; + + public BlueprintData() {} + + @JsonCreator + public BlueprintData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + BlueprintAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) BlueprintDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public BlueprintData attributes(BlueprintAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The attributes of a blueprint resource. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BlueprintAttributes getAttributes() { + return attributes; + } + + public void setAttributes(BlueprintAttributes attributes) { + this.attributes = attributes; + } + + public BlueprintData id(UUID id) { + this.id = id; + return this; + } + + /** + * The ID of the blueprint. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public BlueprintData type(BlueprintDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type for a blueprint. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BlueprintDataType getType() { + return type; + } + + public void setType(BlueprintDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return BlueprintData + */ + @JsonAnySetter + public BlueprintData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this BlueprintData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BlueprintData blueprintData = (BlueprintData) o; + return Objects.equals(this.attributes, blueprintData.attributes) + && Objects.equals(this.id, blueprintData.id) + && Objects.equals(this.type, blueprintData.type) + && Objects.equals(this.additionalProperties, blueprintData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BlueprintData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/BlueprintDataType.java b/src/main/java/com/datadog/api/client/v2/model/BlueprintDataType.java new file mode 100644 index 00000000000..98eded26b02 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/BlueprintDataType.java @@ -0,0 +1,53 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The resource type for a blueprint. */ +@JsonSerialize(using = BlueprintDataType.BlueprintDataTypeSerializer.class) +public class BlueprintDataType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("blueprint")); + + public static final BlueprintDataType BLUEPRINT = new BlueprintDataType("blueprint"); + + BlueprintDataType(String value) { + super(value, allowedValues); + } + + public static class BlueprintDataTypeSerializer extends StdSerializer { + public BlueprintDataTypeSerializer(Class t) { + super(t); + } + + public BlueprintDataTypeSerializer() { + this(null); + } + + @Override + public void serialize(BlueprintDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static BlueprintDataType fromValue(String value) { + return new BlueprintDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/BlueprintMetadataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/BlueprintMetadataAttributes.java new file mode 100644 index 00000000000..d1fa88e627c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/BlueprintMetadataAttributes.java @@ -0,0 +1,359 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The attributes of a blueprint metadata resource. */ +@JsonPropertyOrder({ + BlueprintMetadataAttributes.JSON_PROPERTY_CREATED_AT, + BlueprintMetadataAttributes.JSON_PROPERTY_DESCRIPTION, + BlueprintMetadataAttributes.JSON_PROPERTY_NAME, + BlueprintMetadataAttributes.JSON_PROPERTY_SLUG, + BlueprintMetadataAttributes.JSON_PROPERTY_TAGS, + BlueprintMetadataAttributes.JSON_PROPERTY_TILE_BACKGROUND, + BlueprintMetadataAttributes.JSON_PROPERTY_TILE_ICON_ACTION_FQN, + BlueprintMetadataAttributes.JSON_PROPERTY_UPDATED_AT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class BlueprintMetadataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SLUG = "slug"; + private String slug; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + public static final String JSON_PROPERTY_TILE_BACKGROUND = "tile_background"; + private String tileBackground; + + public static final String JSON_PROPERTY_TILE_ICON_ACTION_FQN = "tile_icon_action_fqn"; + private String tileIconActionFqn; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private OffsetDateTime updatedAt; + + public BlueprintMetadataAttributes() {} + + @JsonCreator + public BlueprintMetadataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_DESCRIPTION) String description, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_SLUG) String slug, + @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt) { + this.createdAt = createdAt; + this.description = description; + this.name = name; + this.slug = slug; + this.updatedAt = updatedAt; + } + + public BlueprintMetadataAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The timestamp when the blueprint was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public BlueprintMetadataAttributes description(String description) { + this.description = description; + return this; + } + + /** + * A description of what the blueprint does. + * + * @return description + */ + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public BlueprintMetadataAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The human-readable name of the blueprint. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public BlueprintMetadataAttributes slug(String slug) { + this.slug = slug; + return this; + } + + /** + * The unique slug identifier of the blueprint. + * + * @return slug + */ + @JsonProperty(JSON_PROPERTY_SLUG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSlug() { + return slug; + } + + public void setSlug(String slug) { + this.slug = slug; + } + + public BlueprintMetadataAttributes tags(List tags) { + this.tags = tags; + return this; + } + + public BlueprintMetadataAttributes addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Tags associated with the blueprint. + * + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + public BlueprintMetadataAttributes tileBackground(String tileBackground) { + this.tileBackground = tileBackground; + return this; + } + + /** + * The background style of the blueprint tile. + * + * @return tileBackground + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TILE_BACKGROUND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTileBackground() { + return tileBackground; + } + + public void setTileBackground(String tileBackground) { + this.tileBackground = tileBackground; + } + + public BlueprintMetadataAttributes tileIconActionFqn(String tileIconActionFqn) { + this.tileIconActionFqn = tileIconActionFqn; + return this; + } + + /** + * The fully qualified name of the action used as the tile icon. + * + * @return tileIconActionFqn + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TILE_ICON_ACTION_FQN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTileIconActionFqn() { + return tileIconActionFqn; + } + + public void setTileIconActionFqn(String tileIconActionFqn) { + this.tileIconActionFqn = tileIconActionFqn; + } + + public BlueprintMetadataAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * The timestamp when the blueprint was last updated. + * + * @return updatedAt + */ + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return BlueprintMetadataAttributes + */ + @JsonAnySetter + public BlueprintMetadataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this BlueprintMetadataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BlueprintMetadataAttributes blueprintMetadataAttributes = (BlueprintMetadataAttributes) o; + return Objects.equals(this.createdAt, blueprintMetadataAttributes.createdAt) + && Objects.equals(this.description, blueprintMetadataAttributes.description) + && Objects.equals(this.name, blueprintMetadataAttributes.name) + && Objects.equals(this.slug, blueprintMetadataAttributes.slug) + && Objects.equals(this.tags, blueprintMetadataAttributes.tags) + && Objects.equals(this.tileBackground, blueprintMetadataAttributes.tileBackground) + && Objects.equals(this.tileIconActionFqn, blueprintMetadataAttributes.tileIconActionFqn) + && Objects.equals(this.updatedAt, blueprintMetadataAttributes.updatedAt) + && Objects.equals( + this.additionalProperties, blueprintMetadataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + description, + name, + slug, + tags, + tileBackground, + tileIconActionFqn, + updatedAt, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BlueprintMetadataAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" slug: ").append(toIndentedString(slug)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" tileBackground: ").append(toIndentedString(tileBackground)).append("\n"); + sb.append(" tileIconActionFqn: ").append(toIndentedString(tileIconActionFqn)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/BlueprintMetadataData.java b/src/main/java/com/datadog/api/client/v2/model/BlueprintMetadataData.java new file mode 100644 index 00000000000..c06c3fdfedf --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/BlueprintMetadataData.java @@ -0,0 +1,210 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** A blueprint metadata resource. */ +@JsonPropertyOrder({ + BlueprintMetadataData.JSON_PROPERTY_ATTRIBUTES, + BlueprintMetadataData.JSON_PROPERTY_ID, + BlueprintMetadataData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class BlueprintMetadataData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private BlueprintMetadataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private BlueprintDataType type; + + public BlueprintMetadataData() {} + + @JsonCreator + public BlueprintMetadataData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + BlueprintMetadataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) BlueprintDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public BlueprintMetadataData attributes(BlueprintMetadataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The attributes of a blueprint metadata resource. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BlueprintMetadataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(BlueprintMetadataAttributes attributes) { + this.attributes = attributes; + } + + public BlueprintMetadataData id(UUID id) { + this.id = id; + return this; + } + + /** + * The ID of the blueprint. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public BlueprintMetadataData type(BlueprintDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type for a blueprint. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BlueprintDataType getType() { + return type; + } + + public void setType(BlueprintDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return BlueprintMetadataData + */ + @JsonAnySetter + public BlueprintMetadataData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this BlueprintMetadataData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BlueprintMetadataData blueprintMetadataData = (BlueprintMetadataData) o; + return Objects.equals(this.attributes, blueprintMetadataData.attributes) + && Objects.equals(this.id, blueprintMetadataData.id) + && Objects.equals(this.type, blueprintMetadataData.type) + && Objects.equals(this.additionalProperties, blueprintMetadataData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BlueprintMetadataData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GetBlueprintResponse.java b/src/main/java/com/datadog/api/client/v2/model/GetBlueprintResponse.java new file mode 100644 index 00000000000..e28674571ff --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GetBlueprintResponse.java @@ -0,0 +1,136 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The response for retrieving a single blueprint. */ +@JsonPropertyOrder({GetBlueprintResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GetBlueprintResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private BlueprintData data; + + public GetBlueprintResponse data(BlueprintData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * A blueprint resource. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BlueprintData getData() { + return data; + } + + public void setData(BlueprintData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GetBlueprintResponse + */ + @JsonAnySetter + public GetBlueprintResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GetBlueprintResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetBlueprintResponse getBlueprintResponse = (GetBlueprintResponse) o; + return Objects.equals(this.data, getBlueprintResponse.data) + && Objects.equals(this.additionalProperties, getBlueprintResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetBlueprintResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GetBlueprintsResponse.java b/src/main/java/com/datadog/api/client/v2/model/GetBlueprintsResponse.java new file mode 100644 index 00000000000..07743536649 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GetBlueprintsResponse.java @@ -0,0 +1,149 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The response for retrieving multiple blueprints. */ +@JsonPropertyOrder({GetBlueprintsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GetBlueprintsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = null; + + public GetBlueprintsResponse data(List data) { + this.data = data; + for (BlueprintData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public GetBlueprintsResponse addDataItem(BlueprintData dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * An array of blueprints. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GetBlueprintsResponse + */ + @JsonAnySetter + public GetBlueprintsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GetBlueprintsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetBlueprintsResponse getBlueprintsResponse = (GetBlueprintsResponse) o; + return Objects.equals(this.data, getBlueprintsResponse.data) + && Objects.equals(this.additionalProperties, getBlueprintsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetBlueprintsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ListBlueprintsResponse.java b/src/main/java/com/datadog/api/client/v2/model/ListBlueprintsResponse.java new file mode 100644 index 00000000000..f6ed7d3d910 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ListBlueprintsResponse.java @@ -0,0 +1,149 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The response for listing available blueprints. */ +@JsonPropertyOrder({ListBlueprintsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ListBlueprintsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = null; + + public ListBlueprintsResponse data(List data) { + this.data = data; + for (BlueprintMetadataData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ListBlueprintsResponse addDataItem(BlueprintMetadataData dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * An array of blueprint metadata. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ListBlueprintsResponse + */ + @JsonAnySetter + public ListBlueprintsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ListBlueprintsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListBlueprintsResponse listBlueprintsResponse = (ListBlueprintsResponse) o; + return Objects.equals(this.data, listBlueprintsResponse.data) + && Objects.equals(this.additionalProperties, listBlueprintsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListBlueprintsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagData.java b/src/main/java/com/datadog/api/client/v2/model/TagData.java new file mode 100644 index 00000000000..a0cf8a305cb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagData.java @@ -0,0 +1,175 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A tag resource associated with an app. */ +@JsonPropertyOrder({TagData.JSON_PROPERTY_ID, TagData.JSON_PROPERTY_TYPE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private TagDataType type; + + public TagData() {} + + @JsonCreator + public TagData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) TagDataType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public TagData id(String id) { + this.id = id; + return this; + } + + /** + * The name of the tag. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public TagData type(TagDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type for a tag. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TagDataType getType() { + return type; + } + + public void setType(TagDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagData + */ + @JsonAnySetter + public TagData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagData tagData = (TagData) o; + return Objects.equals(this.id, tagData.id) + && Objects.equals(this.type, tagData.type) + && Objects.equals(this.additionalProperties, tagData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagDataType.java b/src/main/java/com/datadog/api/client/v2/model/TagDataType.java new file mode 100644 index 00000000000..20ed498b759 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagDataType.java @@ -0,0 +1,53 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The resource type for a tag. */ +@JsonSerialize(using = TagDataType.TagDataTypeSerializer.class) +public class TagDataType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("tag")); + + public static final TagDataType TAG = new TagDataType("tag"); + + TagDataType(String value) { + super(value, allowedValues); + } + + public static class TagDataTypeSerializer extends StdSerializer { + public TagDataTypeSerializer(Class t) { + super(t); + } + + public TagDataTypeSerializer() { + this(null); + } + + @Override + public void serialize(TagDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static TagDataType fromValue(String value) { + return new TagDataType(value); + } +} diff --git a/src/test/resources/com/datadog/api/client/v2/api/app_builder.feature b/src/test/resources/com/datadog/api/client/v2/api/app_builder.feature index bbc0caf196f..bb1af2f0f74 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/app_builder.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/app_builder.feature @@ -139,6 +139,34 @@ Feature: App Builder And the response "data.id" has the same value as "app.data.id" And the response "data.type" is equal to "appDefinitions" + @skip @team:DataDog/app-builder-backend + Scenario: Get Blueprint returns "Not Found" response + Given new "GetBlueprint" request + And request contains "blueprint_id" parameter with value "00000000-0000-0000-0000-000000000001" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/app-builder-backend + Scenario: Get Blueprint returns "OK" response + Given new "GetBlueprint" request + And request contains "blueprint_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @skip @team:DataDog/app-builder-backend + Scenario: Get Blueprints by Integration ID returns "OK" response + Given new "GetBlueprintsByIntegrationId" request + And request contains "integration_id" parameter with value "aws" + When the request is sent + Then the response status is 200 OK + + @skip @team:DataDog/app-builder-backend + Scenario: Get Blueprints by Slugs returns "OK" response + Given new "GetBlueprintsBySlugs" request + And request contains "slugs" parameter with value "aws-service-manager" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/app-builder-backend Scenario: List App Versions returns "Bad Request" response Given new "ListAppVersions" request @@ -172,6 +200,18 @@ Feature: App Builder When the request is sent Then the response status is 200 OK + @skip @team:DataDog/app-builder-backend + Scenario: List Blueprints returns "OK" response + Given new "ListBlueprints" request + When the request is sent + Then the response status is 200 OK + + @skip @team:DataDog/app-builder-backend + Scenario: List Tags returns "OK" response + Given new "ListTags" request + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/app-builder-backend Scenario: Name App Version returns "Bad Request" response Given new "UpdateAppVersionName" request diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index 7a5941a2c04..a6814010da9 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/undo.json +++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json @@ -687,6 +687,36 @@ "type": "safe" } }, + "GetBlueprint": { + "tag": "App Builder", + "undo": { + "type": "safe" + } + }, + "ListBlueprints": { + "tag": "App Builder", + "undo": { + "type": "safe" + } + }, + "GetBlueprintsByIntegrationId": { + "tag": "App Builder", + "undo": { + "type": "safe" + } + }, + "GetBlueprintsBySlugs": { + "tag": "App Builder", + "undo": { + "type": "safe" + } + }, + "ListTags": { + "tag": "App Builder", + "undo": { + "type": "safe" + } + }, "ListApplicationKeys": { "tag": "Key Management", "undo": {