diff --git a/.apigentools-info b/.apigentools-info index a02e81530d4..027f2f1826d 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-04-28 14:00:36.914715", - "spec_repo_commit": "8964dc24" + "regenerated": "2025-04-29 16:12:51.964788", + "spec_repo_commit": "22937387" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-04-28 14:00:36.932916", - "spec_repo_commit": "8964dc24" + "regenerated": "2025-04-29 16:12:51.982170", + "spec_repo_commit": "22937387" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index eefe5bf72dd..a024ef35eeb 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -244,6 +244,20 @@ components: required: true schema: type: string + CustomFrameworkHandle: + description: The framework handle + in: path + name: handle + required: true + schema: + type: string + CustomFrameworkVersion: + description: The framework version + in: path + name: version + required: true + schema: + type: string EntityID: description: UUID or Entity Ref. in: path @@ -8862,6 +8876,22 @@ components: - id - type type: object + CreateCustomFrameworkRequest: + description: Request object to create a custom framework. + properties: + data: + $ref: '#/components/schemas/CustomFrameworkData' + required: + - data + type: object + CreateCustomFrameworkResponse: + description: Response object to create a custom framework. + properties: + data: + $ref: '#/components/schemas/FrameworkHandleAndVersionResponseData' + required: + - data + type: object CreateDataDeletionRequestBody: description: Object needed to create a data deletion request. properties: @@ -10219,6 +10249,146 @@ components: $ref: '#/components/schemas/CustomDestinationResponseDefinition' type: array type: object + CustomFrameworkControl: + description: Framework Control. + properties: + name: + description: Control Name. + example: A1.2 + type: string + rules_id: + description: Rule IDs. + example: + - '["def-000-abc"]' + items: + type: string + type: array + required: + - name + - rules_id + type: object + CustomFrameworkData: + description: Contains type and attributes for custom frameworks. + properties: + attributes: + $ref: '#/components/schemas/CustomFrameworkDataAttributes' + type: + $ref: '#/components/schemas/CustomFrameworkType' + required: + - type + - attributes + type: object + CustomFrameworkDataAttributes: + description: Framework Data Attributes. + properties: + description: + description: Framework Description + type: string + handle: + description: Framework Handle + example: sec2 + type: string + icon_url: + description: Framework Icon URL + type: string + name: + description: Framework Name + example: security-framework + type: string + requirements: + description: Framework Requirements + items: + $ref: '#/components/schemas/CustomFrameworkRequirement' + type: array + version: + description: Framework Version + example: '2' + type: string + required: + - handle + - version + - name + - requirements + type: object + CustomFrameworkDataHandleAndVersion: + description: Framework Handle and Version. + properties: + handle: + description: Framework Handle + example: sec2 + type: string + version: + description: Framework Version + example: '2' + type: string + type: object + CustomFrameworkMetadata: + description: Metadata for custom frameworks. + properties: + attributes: + $ref: '#/components/schemas/CustomFrameworkWithoutRequirements' + id: + description: The ID of the custom framework. + example: handle-version + type: string + type: + $ref: '#/components/schemas/CustomFrameworkType' + type: object + CustomFrameworkRequirement: + description: Framework Requirement. + properties: + controls: + description: Requirement Controls. + items: + $ref: '#/components/schemas/CustomFrameworkControl' + type: array + name: + description: Requirement Name. + example: criteria + type: string + required: + - name + - controls + type: object + CustomFrameworkType: + default: custom_framework + description: The type of the resource. The value must be `custom_framework`. + enum: + - custom_framework + example: custom_framework + type: string + x-enum-varnames: + - CUSTOM_FRAMEWORK + CustomFrameworkWithoutRequirements: + description: Framework without requirements. + properties: + description: + description: Framework Description + example: this is a security description + type: string + handle: + description: Framework Handle + example: sec2 + type: string + icon_url: + description: Framework Icon URL + example: https://example.com/icon.png + type: string + name: + description: Framework Name + example: security-framework + type: string + version: + description: Framework Version + example: '2' + type: string + required: + - handle + - version + - name + - description + - icon_url + type: object DORADeploymentRequest: description: Request to create a DORA deployment event. properties: @@ -10904,6 +11074,14 @@ components: - id - type type: object + DeleteCustomFrameworkResponse: + description: Response object to delete a custom framework. + properties: + data: + $ref: '#/components/schemas/CustomFrameworkMetadata' + required: + - data + type: object DependencyLocation: description: Static library vulnerability location. properties: @@ -14475,6 +14653,22 @@ components: order: $ref: '#/components/schemas/QuerySortOrder' type: object + FrameworkHandleAndVersionResponseData: + description: Contains type and attributes for custom frameworks. + properties: + attributes: + $ref: '#/components/schemas/CustomFrameworkDataHandleAndVersion' + id: + description: The ID of the custom framework. + example: handle-version + type: string + type: + $ref: '#/components/schemas/CustomFrameworkType' + required: + - id + - type + - attributes + type: object FullAPIKey: description: Datadog API key. properties: @@ -14574,6 +14768,58 @@ components: nullable: true type: array type: object + FullCustomFrameworkData: + description: Contains type and attributes for custom frameworks. + properties: + attributes: + $ref: '#/components/schemas/FullCustomFrameworkDataAttributes' + id: + description: The ID of the custom framework. + example: handle-version + type: string + type: + $ref: '#/components/schemas/CustomFrameworkType' + required: + - id + - type + - attributes + type: object + FullCustomFrameworkDataAttributes: + description: Full Framework Data Attributes. + properties: + description: + description: Framework Description + example: this is a security framework + type: string + handle: + description: Framework Handle + example: sec2 + type: string + icon_url: + description: Framework Icon URL + example: https://example.com/icon.png + type: string + name: + description: Framework Name + example: security-framework + type: string + requirements: + description: Framework Requirements + items: + $ref: '#/components/schemas/CustomFrameworkRequirement' + type: array + version: + description: Framework Version + example: '2' + type: string + required: + - handle + - version + - name + - description + - icon_url + - requirements + type: object GCPMetricNamespaceConfig: description: Configuration for a GCP metric namespace. properties: @@ -14850,6 +15096,14 @@ components: type: string type: array type: object + GetCustomFrameworkResponse: + description: Response object to get a custom framework. + properties: + data: + $ref: '#/components/schemas/FullCustomFrameworkData' + required: + - data + type: object GetDataDeletionsResponseBody: description: The response from the get data deletion requests endpoint. properties: @@ -35234,6 +35488,22 @@ components: type: string type: array type: object + UpdateCustomFrameworkRequest: + description: Request object to update a custom framework. + properties: + data: + $ref: '#/components/schemas/CustomFrameworkData' + required: + - data + type: object + UpdateCustomFrameworkResponse: + description: Response object to update a custom framework. + properties: + data: + $ref: '#/components/schemas/FrameworkHandleAndVersionResponseData' + required: + - data + type: object UpdateOpenAPIResponse: description: Response for `UpdateOpenAPI`. properties: @@ -39953,6 +40223,153 @@ paths: operator: OR permissions: - ci_visibility_read + /api/v2/cloud_security_management/custom_frameworks: + post: + description: Create a custom framework. + operationId: CreateCustomFramework + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateCustomFrameworkRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CreateCustomFrameworkResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '409': + $ref: '#/components/responses/ConflictResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + $ref: '#/components/responses/BadRequestResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_rules_read + - security_monitoring_rules_write + summary: Create a custom framework + tags: + - Security Monitoring + x-codegen-request-body-name: body + x-permission: + operator: AND + permissions: + - security_monitoring_rules_read + - security_monitoring_rules_write + /api/v2/cloud_security_management/custom_frameworks/{handle}/{version}: + delete: + description: Delete a custom framework. + operationId: DeleteCustomFramework + parameters: + - $ref: '#/components/parameters/CustomFrameworkHandle' + - $ref: '#/components/parameters/CustomFrameworkVersion' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteCustomFrameworkResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + $ref: '#/components/responses/BadRequestResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_rules_read + - security_monitoring_rules_write + summary: Delete a custom framework + tags: + - Security Monitoring + x-codegen-request-body-name: body + x-permission: + operator: AND + permissions: + - security_monitoring_rules_read + - security_monitoring_rules_write + get: + description: Get a custom framework. + operationId: GetCustomFramework + parameters: + - $ref: '#/components/parameters/CustomFrameworkHandle' + - $ref: '#/components/parameters/CustomFrameworkVersion' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GetCustomFrameworkResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + $ref: '#/components/responses/BadRequestResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_rules_read + summary: Get a custom framework + tags: + - Security Monitoring + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - security_monitoring_rules_read + put: + description: Update a custom framework. + operationId: UpdateCustomFramework + parameters: + - $ref: '#/components/parameters/CustomFrameworkHandle' + - $ref: '#/components/parameters/CustomFrameworkVersion' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateCustomFrameworkRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateCustomFrameworkResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + $ref: '#/components/responses/BadRequestResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_rules_read + - security_monitoring_rules_write + summary: Update a custom framework + tags: + - Security Monitoring + x-codegen-request-body-name: body + x-permission: + operator: AND + permissions: + - security_monitoring_rules_read + - security_monitoring_rules_write /api/v2/container_images: get: description: Get all Container Images for your organization. @@ -52695,11 +53112,6 @@ paths: $ref: '#/components/responses/NotFoundResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - security_monitoring_rules_read summary: Get a rule's version history tags: - Security Monitoring diff --git a/examples/v2/security-monitoring/CreateCustomFramework.java b/examples/v2/security-monitoring/CreateCustomFramework.java new file mode 100644 index 00000000000..78bac7a369a --- /dev/null +++ b/examples/v2/security-monitoring/CreateCustomFramework.java @@ -0,0 +1,54 @@ +// Create a custom framework returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.CreateCustomFrameworkRequest; +import com.datadog.api.client.v2.model.CreateCustomFrameworkResponse; +import com.datadog.api.client.v2.model.CustomFrameworkControl; +import com.datadog.api.client.v2.model.CustomFrameworkData; +import com.datadog.api.client.v2.model.CustomFrameworkDataAttributes; +import com.datadog.api.client.v2.model.CustomFrameworkRequirement; +import com.datadog.api.client.v2.model.CustomFrameworkType; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); + + CreateCustomFrameworkRequest body = + new CreateCustomFrameworkRequest() + .data( + new CustomFrameworkData() + .type(CustomFrameworkType.CUSTOM_FRAMEWORK) + .attributes( + new CustomFrameworkDataAttributes() + .name("name") + .handle("create-framework-new") + .version("10") + .iconUrl("test-url") + .requirements( + Collections.singletonList( + new CustomFrameworkRequirement() + .name("requirement") + .controls( + Collections.singletonList( + new CustomFrameworkControl() + .name("control") + .rulesId( + Collections.singletonList( + "def-000-be9")))))))); + + try { + CreateCustomFrameworkResponse result = apiInstance.createCustomFramework(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SecurityMonitoringApi#createCustomFramework"); + 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/security-monitoring/DeleteCustomFramework.java b/examples/v2/security-monitoring/DeleteCustomFramework.java new file mode 100644 index 00000000000..9b7469df4ce --- /dev/null +++ b/examples/v2/security-monitoring/DeleteCustomFramework.java @@ -0,0 +1,25 @@ +// Delete a custom framework returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.DeleteCustomFrameworkResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); + + try { + DeleteCustomFrameworkResponse result = + apiInstance.deleteCustomFramework("create-framework-new", "10"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SecurityMonitoringApi#deleteCustomFramework"); + 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/security-monitoring/GetCustomFramework.java b/examples/v2/security-monitoring/GetCustomFramework.java new file mode 100644 index 00000000000..02629a84268 --- /dev/null +++ b/examples/v2/security-monitoring/GetCustomFramework.java @@ -0,0 +1,25 @@ +// Get a custom framework returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.GetCustomFrameworkResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); + + try { + GetCustomFrameworkResponse result = + apiInstance.getCustomFramework("create-framework-new", "10"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SecurityMonitoringApi#getCustomFramework"); + 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/security-monitoring/UpdateCustomFramework.java b/examples/v2/security-monitoring/UpdateCustomFramework.java new file mode 100644 index 00000000000..f823dc6e39a --- /dev/null +++ b/examples/v2/security-monitoring/UpdateCustomFramework.java @@ -0,0 +1,55 @@ +// Update a custom framework returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.CustomFrameworkControl; +import com.datadog.api.client.v2.model.CustomFrameworkData; +import com.datadog.api.client.v2.model.CustomFrameworkDataAttributes; +import com.datadog.api.client.v2.model.CustomFrameworkRequirement; +import com.datadog.api.client.v2.model.CustomFrameworkType; +import com.datadog.api.client.v2.model.UpdateCustomFrameworkRequest; +import com.datadog.api.client.v2.model.UpdateCustomFrameworkResponse; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); + + UpdateCustomFrameworkRequest body = + new UpdateCustomFrameworkRequest() + .data( + new CustomFrameworkData() + .type(CustomFrameworkType.CUSTOM_FRAMEWORK) + .attributes( + new CustomFrameworkDataAttributes() + .name("name") + .handle("create-framework-new") + .version("10") + .iconUrl("test-url") + .requirements( + Collections.singletonList( + new CustomFrameworkRequirement() + .name("requirement") + .controls( + Collections.singletonList( + new CustomFrameworkControl() + .name("control") + .rulesId( + Collections.singletonList( + "def-000-be9")))))))); + + try { + UpdateCustomFrameworkResponse result = + apiInstance.updateCustomFramework("create-framework-new", "10", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SecurityMonitoringApi#updateCustomFramework"); + 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/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index 8021566cdb3..fe1222a4b15 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -372,6 +372,19 @@ public class ApiClient { put("v2.getOpenAPI", false); put("v2.listAPIs", false); put("v2.updateOpenAPI", false); + put("v2.cancelHistoricalJob", false); + put("v2.convertJobResultToSignal", false); + put("v2.deleteHistoricalJob", false); + put("v2.getFinding", false); + put("v2.getHistoricalJob", false); + put("v2.getRuleVersionHistory", false); + put("v2.getSBOM", false); + put("v2.listFindings", false); + put("v2.listHistoricalJobs", false); + put("v2.listVulnerabilities", false); + put("v2.listVulnerableAssets", false); + put("v2.muteFindings", false); + put("v2.runHistoricalJob", false); put("v2.cancelDataDeletionRequest", false); put("v2.createDataDeletionRequest", false); put("v2.getDataDeletionRequests", false); @@ -414,19 +427,6 @@ public class ApiClient { put("v2.getMonitorNotificationRules", false); put("v2.updateMonitorNotificationRule", false); put("v2.getAggregatedConnections", false); - put("v2.cancelHistoricalJob", false); - put("v2.convertJobResultToSignal", false); - put("v2.deleteHistoricalJob", false); - put("v2.getFinding", false); - put("v2.getHistoricalJob", false); - put("v2.getRuleVersionHistory", false); - put("v2.getSBOM", false); - put("v2.listFindings", false); - put("v2.listHistoricalJobs", false); - put("v2.listVulnerabilities", false); - put("v2.listVulnerableAssets", false); - put("v2.muteFindings", false); - put("v2.runHistoricalJob", false); put("v2.createPipeline", false); put("v2.deletePipeline", false); put("v2.getPipeline", false); diff --git a/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java b/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java index 60eede6b955..ed207320cd0 100644 --- a/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java @@ -9,11 +9,15 @@ import com.datadog.api.client.v2.model.BulkMuteFindingsRequest; import com.datadog.api.client.v2.model.BulkMuteFindingsResponse; import com.datadog.api.client.v2.model.ConvertJobResultsToSignalsRequest; +import com.datadog.api.client.v2.model.CreateCustomFrameworkRequest; +import com.datadog.api.client.v2.model.CreateCustomFrameworkResponse; import com.datadog.api.client.v2.model.CreateNotificationRuleParameters; +import com.datadog.api.client.v2.model.DeleteCustomFrameworkResponse; import com.datadog.api.client.v2.model.Finding; import com.datadog.api.client.v2.model.FindingEvaluation; import com.datadog.api.client.v2.model.FindingStatus; import com.datadog.api.client.v2.model.FindingVulnerabilityType; +import com.datadog.api.client.v2.model.GetCustomFrameworkResponse; import com.datadog.api.client.v2.model.GetFindingResponse; import com.datadog.api.client.v2.model.GetRuleVersionHistoryResponse; import com.datadog.api.client.v2.model.GetSBOMResponse; @@ -53,6 +57,8 @@ import com.datadog.api.client.v2.model.SecurityMonitoringSuppressionResponse; import com.datadog.api.client.v2.model.SecurityMonitoringSuppressionUpdateRequest; import com.datadog.api.client.v2.model.SecurityMonitoringSuppressionsResponse; +import com.datadog.api.client.v2.model.UpdateCustomFrameworkRequest; +import com.datadog.api.client.v2.model.UpdateCustomFrameworkResponse; import com.datadog.api.client.v2.model.VulnerabilityEcosystem; import com.datadog.api.client.v2.model.VulnerabilitySeverity; import com.datadog.api.client.v2.model.VulnerabilityStatus; @@ -691,6 +697,142 @@ public SecurityMonitoringRuleConvertResponse convertSecurityMonitoringRuleFromJS new GenericType() {}); } + /** + * Create a custom framework. + * + *

See {@link #createCustomFrameworkWithHttpInfo}. + * + * @param body (required) + * @return CreateCustomFrameworkResponse + * @throws ApiException if fails to make API call + */ + public CreateCustomFrameworkResponse createCustomFramework(CreateCustomFrameworkRequest body) + throws ApiException { + return createCustomFrameworkWithHttpInfo(body).getData(); + } + + /** + * Create a custom framework. + * + *

See {@link #createCustomFrameworkWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<CreateCustomFrameworkResponse> + */ + public CompletableFuture createCustomFrameworkAsync( + CreateCustomFrameworkRequest body) { + return createCustomFrameworkWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create a custom framework. + * + * @param body (required) + * @return ApiResponse<CreateCustomFrameworkResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
409 Conflict -
429 Too many requests -
500 Bad Request -
+ */ + public ApiResponse createCustomFrameworkWithHttpInfo( + CreateCustomFrameworkRequest body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createCustomFramework"); + } + // create path and map variables + String localVarPath = "/api/v2/cloud_security_management/custom_frameworks"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.createCustomFramework", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create a custom framework. + * + *

See {@link #createCustomFrameworkWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<CreateCustomFrameworkResponse>> + */ + public CompletableFuture> + createCustomFrameworkWithHttpInfoAsync(CreateCustomFrameworkRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling createCustomFramework")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/cloud_security_management/custom_frameworks"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.createCustomFramework", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Create a security filter. * @@ -1392,6 +1534,167 @@ public ApiResponse createVulnerabilityNotificationRule new GenericType() {}); } + /** + * Delete a custom framework. + * + *

See {@link #deleteCustomFrameworkWithHttpInfo}. + * + * @param handle The framework handle (required) + * @param version The framework version (required) + * @return DeleteCustomFrameworkResponse + * @throws ApiException if fails to make API call + */ + public DeleteCustomFrameworkResponse deleteCustomFramework(String handle, String version) + throws ApiException { + return deleteCustomFrameworkWithHttpInfo(handle, version).getData(); + } + + /** + * Delete a custom framework. + * + *

See {@link #deleteCustomFrameworkWithHttpInfoAsync}. + * + * @param handle The framework handle (required) + * @param version The framework version (required) + * @return CompletableFuture<DeleteCustomFrameworkResponse> + */ + public CompletableFuture deleteCustomFrameworkAsync( + String handle, String version) { + return deleteCustomFrameworkWithHttpInfoAsync(handle, version) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete a custom framework. + * + * @param handle The framework handle (required) + * @param version The framework version (required) + * @return ApiResponse<DeleteCustomFrameworkResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
429 Too many requests -
500 Bad Request -
+ */ + public ApiResponse deleteCustomFrameworkWithHttpInfo( + String handle, String version) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'handle' is set + if (handle == null) { + throw new ApiException( + 400, "Missing the required parameter 'handle' when calling deleteCustomFramework"); + } + + // verify the required parameter 'version' is set + if (version == null) { + throw new ApiException( + 400, "Missing the required parameter 'version' when calling deleteCustomFramework"); + } + // create path and map variables + String localVarPath = + "/api/v2/cloud_security_management/custom_frameworks/{handle}/{version}" + .replaceAll("\\{" + "handle" + "\\}", apiClient.escapeString(handle.toString())) + .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.deleteCustomFramework", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Delete a custom framework. + * + *

See {@link #deleteCustomFrameworkWithHttpInfo}. + * + * @param handle The framework handle (required) + * @param version The framework version (required) + * @return CompletableFuture<ApiResponse<DeleteCustomFrameworkResponse>> + */ + public CompletableFuture> + deleteCustomFrameworkWithHttpInfoAsync(String handle, String version) { + Object localVarPostBody = null; + + // verify the required parameter 'handle' is set + if (handle == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'handle' when calling deleteCustomFramework")); + return result; + } + + // verify the required parameter 'version' is set + if (version == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'version' when calling deleteCustomFramework")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/cloud_security_management/custom_frameworks/{handle}/{version}" + .replaceAll("\\{" + "handle" + "\\}", apiClient.escapeString(handle.toString())) + .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.deleteCustomFramework", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Delete an existing job. * @@ -2747,6 +3050,164 @@ public SecurityMonitoringSignalTriageUpdateResponse editSecurityMonitoringSignal new GenericType() {}); } + /** + * Get a custom framework. + * + *

See {@link #getCustomFrameworkWithHttpInfo}. + * + * @param handle The framework handle (required) + * @param version The framework version (required) + * @return GetCustomFrameworkResponse + * @throws ApiException if fails to make API call + */ + public GetCustomFrameworkResponse getCustomFramework(String handle, String version) + throws ApiException { + return getCustomFrameworkWithHttpInfo(handle, version).getData(); + } + + /** + * Get a custom framework. + * + *

See {@link #getCustomFrameworkWithHttpInfoAsync}. + * + * @param handle The framework handle (required) + * @param version The framework version (required) + * @return CompletableFuture<GetCustomFrameworkResponse> + */ + public CompletableFuture getCustomFrameworkAsync( + String handle, String version) { + return getCustomFrameworkWithHttpInfoAsync(handle, version) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a custom framework. + * + * @param handle The framework handle (required) + * @param version The framework version (required) + * @return ApiResponse<GetCustomFrameworkResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
429 Too many requests -
500 Bad Request -
+ */ + public ApiResponse getCustomFrameworkWithHttpInfo( + String handle, String version) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'handle' is set + if (handle == null) { + throw new ApiException( + 400, "Missing the required parameter 'handle' when calling getCustomFramework"); + } + + // verify the required parameter 'version' is set + if (version == null) { + throw new ApiException( + 400, "Missing the required parameter 'version' when calling getCustomFramework"); + } + // create path and map variables + String localVarPath = + "/api/v2/cloud_security_management/custom_frameworks/{handle}/{version}" + .replaceAll("\\{" + "handle" + "\\}", apiClient.escapeString(handle.toString())) + .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.getCustomFramework", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get a custom framework. + * + *

See {@link #getCustomFrameworkWithHttpInfo}. + * + * @param handle The framework handle (required) + * @param version The framework version (required) + * @return CompletableFuture<ApiResponse<GetCustomFrameworkResponse>> + */ + public CompletableFuture> + getCustomFrameworkWithHttpInfoAsync(String handle, String version) { + Object localVarPostBody = null; + + // verify the required parameter 'handle' is set + if (handle == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'handle' when calling getCustomFramework")); + return result; + } + + // verify the required parameter 'version' is set + if (version == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'version' when calling getCustomFramework")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/cloud_security_management/custom_frameworks/{handle}/{version}" + .replaceAll("\\{" + "handle" + "\\}", apiClient.escapeString(handle.toString())) + .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.getCustomFramework", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"AuthZ", "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 getFinding. */ public static class GetFindingOptionalParameters { private Long snapshotTimestamp; @@ -3264,7 +3725,7 @@ public ApiResponse getRuleVersionHistoryWithHttpI localVarHeaderParams, new HashMap(), new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + new String[] {"apiKeyAuth", "appKeyAuth"}); return apiClient.invokeAPI( "GET", builder, @@ -3333,7 +3794,7 @@ public ApiResponse getRuleVersionHistoryWithHttpI localVarHeaderParams, new HashMap(), new String[] {"application/json"}, - new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { CompletableFuture> result = new CompletableFuture<>(); @@ -8871,6 +9332,188 @@ public ApiResponse testSecurityMonitoringRul new GenericType() {}); } + /** + * Update a custom framework. + * + *

See {@link #updateCustomFrameworkWithHttpInfo}. + * + * @param handle The framework handle (required) + * @param version The framework version (required) + * @param body (required) + * @return UpdateCustomFrameworkResponse + * @throws ApiException if fails to make API call + */ + public UpdateCustomFrameworkResponse updateCustomFramework( + String handle, String version, UpdateCustomFrameworkRequest body) throws ApiException { + return updateCustomFrameworkWithHttpInfo(handle, version, body).getData(); + } + + /** + * Update a custom framework. + * + *

See {@link #updateCustomFrameworkWithHttpInfoAsync}. + * + * @param handle The framework handle (required) + * @param version The framework version (required) + * @param body (required) + * @return CompletableFuture<UpdateCustomFrameworkResponse> + */ + public CompletableFuture updateCustomFrameworkAsync( + String handle, String version, UpdateCustomFrameworkRequest body) { + return updateCustomFrameworkWithHttpInfoAsync(handle, version, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update a custom framework. + * + * @param handle The framework handle (required) + * @param version The framework version (required) + * @param body (required) + * @return ApiResponse<UpdateCustomFrameworkResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
429 Too many requests -
500 Bad Request -
+ */ + public ApiResponse updateCustomFrameworkWithHttpInfo( + String handle, String version, UpdateCustomFrameworkRequest body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'handle' is set + if (handle == null) { + throw new ApiException( + 400, "Missing the required parameter 'handle' when calling updateCustomFramework"); + } + + // verify the required parameter 'version' is set + if (version == null) { + throw new ApiException( + 400, "Missing the required parameter 'version' when calling updateCustomFramework"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateCustomFramework"); + } + // create path and map variables + String localVarPath = + "/api/v2/cloud_security_management/custom_frameworks/{handle}/{version}" + .replaceAll("\\{" + "handle" + "\\}", apiClient.escapeString(handle.toString())) + .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.updateCustomFramework", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update a custom framework. + * + *

See {@link #updateCustomFrameworkWithHttpInfo}. + * + * @param handle The framework handle (required) + * @param version The framework version (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<UpdateCustomFrameworkResponse>> + */ + public CompletableFuture> + updateCustomFrameworkWithHttpInfoAsync( + String handle, String version, UpdateCustomFrameworkRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'handle' is set + if (handle == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'handle' when calling updateCustomFramework")); + return result; + } + + // verify the required parameter 'version' is set + if (version == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'version' when calling updateCustomFramework")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling updateCustomFramework")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/cloud_security_management/custom_frameworks/{handle}/{version}" + .replaceAll("\\{" + "handle" + "\\}", apiClient.escapeString(handle.toString())) + .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.updateCustomFramework", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Update a security filter. * diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateCustomFrameworkRequest.java b/src/main/java/com/datadog/api/client/v2/model/CreateCustomFrameworkRequest.java new file mode 100644 index 00000000000..3d06d7e1506 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateCustomFrameworkRequest.java @@ -0,0 +1,146 @@ +/* + * 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; + +/** Request object to create a custom framework. */ +@JsonPropertyOrder({CreateCustomFrameworkRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateCustomFrameworkRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private CustomFrameworkData data; + + public CreateCustomFrameworkRequest() {} + + @JsonCreator + public CreateCustomFrameworkRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) CustomFrameworkData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public CreateCustomFrameworkRequest data(CustomFrameworkData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Contains type and attributes for custom frameworks. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CustomFrameworkData getData() { + return data; + } + + public void setData(CustomFrameworkData 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 CreateCustomFrameworkRequest + */ + @JsonAnySetter + public CreateCustomFrameworkRequest 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 CreateCustomFrameworkRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCustomFrameworkRequest createCustomFrameworkRequest = (CreateCustomFrameworkRequest) o; + return Objects.equals(this.data, createCustomFrameworkRequest.data) + && Objects.equals( + this.additionalProperties, createCustomFrameworkRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCustomFrameworkRequest {\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/CreateCustomFrameworkResponse.java b/src/main/java/com/datadog/api/client/v2/model/CreateCustomFrameworkResponse.java new file mode 100644 index 00000000000..dab46579864 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateCustomFrameworkResponse.java @@ -0,0 +1,147 @@ +/* + * 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; + +/** Response object to create a custom framework. */ +@JsonPropertyOrder({CreateCustomFrameworkResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateCustomFrameworkResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private FrameworkHandleAndVersionResponseData data; + + public CreateCustomFrameworkResponse() {} + + @JsonCreator + public CreateCustomFrameworkResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + FrameworkHandleAndVersionResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public CreateCustomFrameworkResponse data(FrameworkHandleAndVersionResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Contains type and attributes for custom frameworks. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FrameworkHandleAndVersionResponseData getData() { + return data; + } + + public void setData(FrameworkHandleAndVersionResponseData 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 CreateCustomFrameworkResponse + */ + @JsonAnySetter + public CreateCustomFrameworkResponse 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 CreateCustomFrameworkResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCustomFrameworkResponse createCustomFrameworkResponse = (CreateCustomFrameworkResponse) o; + return Objects.equals(this.data, createCustomFrameworkResponse.data) + && Objects.equals( + this.additionalProperties, createCustomFrameworkResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCustomFrameworkResponse {\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/CustomFrameworkControl.java b/src/main/java/com/datadog/api/client/v2/model/CustomFrameworkControl.java new file mode 100644 index 00000000000..2c45cab57cc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CustomFrameworkControl.java @@ -0,0 +1,180 @@ +/* + * 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.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Framework Control. */ +@JsonPropertyOrder({ + CustomFrameworkControl.JSON_PROPERTY_NAME, + CustomFrameworkControl.JSON_PROPERTY_RULES_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CustomFrameworkControl { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_RULES_ID = "rules_id"; + private List rulesId = new ArrayList<>(); + + public CustomFrameworkControl() {} + + @JsonCreator + public CustomFrameworkControl( + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_RULES_ID) List rulesId) { + this.name = name; + this.rulesId = rulesId; + } + + public CustomFrameworkControl name(String name) { + this.name = name; + return this; + } + + /** + * Control Name. + * + * @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 CustomFrameworkControl rulesId(List rulesId) { + this.rulesId = rulesId; + return this; + } + + public CustomFrameworkControl addRulesIdItem(String rulesIdItem) { + this.rulesId.add(rulesIdItem); + return this; + } + + /** + * Rule IDs. + * + * @return rulesId + */ + @JsonProperty(JSON_PROPERTY_RULES_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getRulesId() { + return rulesId; + } + + public void setRulesId(List rulesId) { + this.rulesId = rulesId; + } + + /** + * 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 CustomFrameworkControl + */ + @JsonAnySetter + public CustomFrameworkControl 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 CustomFrameworkControl object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomFrameworkControl customFrameworkControl = (CustomFrameworkControl) o; + return Objects.equals(this.name, customFrameworkControl.name) + && Objects.equals(this.rulesId, customFrameworkControl.rulesId) + && Objects.equals(this.additionalProperties, customFrameworkControl.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, rulesId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomFrameworkControl {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" rulesId: ").append(toIndentedString(rulesId)).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/CustomFrameworkData.java b/src/main/java/com/datadog/api/client/v2/model/CustomFrameworkData.java new file mode 100644 index 00000000000..eab9caed1eb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CustomFrameworkData.java @@ -0,0 +1,181 @@ +/* + * 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; + +/** Contains type and attributes for custom frameworks. */ +@JsonPropertyOrder({ + CustomFrameworkData.JSON_PROPERTY_ATTRIBUTES, + CustomFrameworkData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CustomFrameworkData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CustomFrameworkDataAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private CustomFrameworkType type = CustomFrameworkType.CUSTOM_FRAMEWORK; + + public CustomFrameworkData() {} + + @JsonCreator + public CustomFrameworkData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + CustomFrameworkDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) CustomFrameworkType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public CustomFrameworkData attributes(CustomFrameworkDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Framework Data Attributes. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CustomFrameworkDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(CustomFrameworkDataAttributes attributes) { + this.attributes = attributes; + } + + public CustomFrameworkData type(CustomFrameworkType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of the resource. The value must be custom_framework. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CustomFrameworkType getType() { + return type; + } + + public void setType(CustomFrameworkType 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 CustomFrameworkData + */ + @JsonAnySetter + public CustomFrameworkData 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 CustomFrameworkData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomFrameworkData customFrameworkData = (CustomFrameworkData) o; + return Objects.equals(this.attributes, customFrameworkData.attributes) + && Objects.equals(this.type, customFrameworkData.type) + && Objects.equals(this.additionalProperties, customFrameworkData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomFrameworkData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).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/CustomFrameworkDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CustomFrameworkDataAttributes.java new file mode 100644 index 00000000000..f2076e81a9f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CustomFrameworkDataAttributes.java @@ -0,0 +1,298 @@ +/* + * 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.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Framework Data Attributes. */ +@JsonPropertyOrder({ + CustomFrameworkDataAttributes.JSON_PROPERTY_DESCRIPTION, + CustomFrameworkDataAttributes.JSON_PROPERTY_HANDLE, + CustomFrameworkDataAttributes.JSON_PROPERTY_ICON_URL, + CustomFrameworkDataAttributes.JSON_PROPERTY_NAME, + CustomFrameworkDataAttributes.JSON_PROPERTY_REQUIREMENTS, + CustomFrameworkDataAttributes.JSON_PROPERTY_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CustomFrameworkDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_HANDLE = "handle"; + private String handle; + + public static final String JSON_PROPERTY_ICON_URL = "icon_url"; + private String iconUrl; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_REQUIREMENTS = "requirements"; + private List requirements = new ArrayList<>(); + + public static final String JSON_PROPERTY_VERSION = "version"; + private String version; + + public CustomFrameworkDataAttributes() {} + + @JsonCreator + public CustomFrameworkDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_HANDLE) String handle, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_REQUIREMENTS) + List requirements, + @JsonProperty(required = true, value = JSON_PROPERTY_VERSION) String version) { + this.handle = handle; + this.name = name; + this.requirements = requirements; + this.version = version; + } + + public CustomFrameworkDataAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Framework Description + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public CustomFrameworkDataAttributes handle(String handle) { + this.handle = handle; + return this; + } + + /** + * Framework Handle + * + * @return handle + */ + @JsonProperty(JSON_PROPERTY_HANDLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getHandle() { + return handle; + } + + public void setHandle(String handle) { + this.handle = handle; + } + + public CustomFrameworkDataAttributes iconUrl(String iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + /** + * Framework Icon URL + * + * @return iconUrl + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ICON_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIconUrl() { + return iconUrl; + } + + public void setIconUrl(String iconUrl) { + this.iconUrl = iconUrl; + } + + public CustomFrameworkDataAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Framework Name + * + * @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 CustomFrameworkDataAttributes requirements(List requirements) { + this.requirements = requirements; + for (CustomFrameworkRequirement item : requirements) { + this.unparsed |= item.unparsed; + } + return this; + } + + public CustomFrameworkDataAttributes addRequirementsItem( + CustomFrameworkRequirement requirementsItem) { + this.requirements.add(requirementsItem); + this.unparsed |= requirementsItem.unparsed; + return this; + } + + /** + * Framework Requirements + * + * @return requirements + */ + @JsonProperty(JSON_PROPERTY_REQUIREMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getRequirements() { + return requirements; + } + + public void setRequirements(List requirements) { + this.requirements = requirements; + } + + public CustomFrameworkDataAttributes version(String version) { + this.version = version; + return this; + } + + /** + * Framework Version + * + * @return version + */ + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + /** + * 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 CustomFrameworkDataAttributes + */ + @JsonAnySetter + public CustomFrameworkDataAttributes 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 CustomFrameworkDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomFrameworkDataAttributes customFrameworkDataAttributes = (CustomFrameworkDataAttributes) o; + return Objects.equals(this.description, customFrameworkDataAttributes.description) + && Objects.equals(this.handle, customFrameworkDataAttributes.handle) + && Objects.equals(this.iconUrl, customFrameworkDataAttributes.iconUrl) + && Objects.equals(this.name, customFrameworkDataAttributes.name) + && Objects.equals(this.requirements, customFrameworkDataAttributes.requirements) + && Objects.equals(this.version, customFrameworkDataAttributes.version) + && Objects.equals( + this.additionalProperties, customFrameworkDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + description, handle, iconUrl, name, requirements, version, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomFrameworkDataAttributes {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" handle: ").append(toIndentedString(handle)).append("\n"); + sb.append(" iconUrl: ").append(toIndentedString(iconUrl)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" requirements: ").append(toIndentedString(requirements)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).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/CustomFrameworkDataHandleAndVersion.java b/src/main/java/com/datadog/api/client/v2/model/CustomFrameworkDataHandleAndVersion.java new file mode 100644 index 00000000000..c80a1598d43 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CustomFrameworkDataHandleAndVersion.java @@ -0,0 +1,166 @@ +/* + * 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; + +/** Framework Handle and Version. */ +@JsonPropertyOrder({ + CustomFrameworkDataHandleAndVersion.JSON_PROPERTY_HANDLE, + CustomFrameworkDataHandleAndVersion.JSON_PROPERTY_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CustomFrameworkDataHandleAndVersion { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_HANDLE = "handle"; + private String handle; + + public static final String JSON_PROPERTY_VERSION = "version"; + private String version; + + public CustomFrameworkDataHandleAndVersion handle(String handle) { + this.handle = handle; + return this; + } + + /** + * Framework Handle + * + * @return handle + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HANDLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getHandle() { + return handle; + } + + public void setHandle(String handle) { + this.handle = handle; + } + + public CustomFrameworkDataHandleAndVersion version(String version) { + this.version = version; + return this; + } + + /** + * Framework Version + * + * @return version + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + /** + * 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 CustomFrameworkDataHandleAndVersion + */ + @JsonAnySetter + public CustomFrameworkDataHandleAndVersion 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 CustomFrameworkDataHandleAndVersion object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomFrameworkDataHandleAndVersion customFrameworkDataHandleAndVersion = + (CustomFrameworkDataHandleAndVersion) o; + return Objects.equals(this.handle, customFrameworkDataHandleAndVersion.handle) + && Objects.equals(this.version, customFrameworkDataHandleAndVersion.version) + && Objects.equals( + this.additionalProperties, customFrameworkDataHandleAndVersion.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(handle, version, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomFrameworkDataHandleAndVersion {\n"); + sb.append(" handle: ").append(toIndentedString(handle)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).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/CustomFrameworkMetadata.java b/src/main/java/com/datadog/api/client/v2/model/CustomFrameworkMetadata.java new file mode 100644 index 00000000000..4050a7e38fe --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CustomFrameworkMetadata.java @@ -0,0 +1,196 @@ +/* + * 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; + +/** Metadata for custom frameworks. */ +@JsonPropertyOrder({ + CustomFrameworkMetadata.JSON_PROPERTY_ATTRIBUTES, + CustomFrameworkMetadata.JSON_PROPERTY_ID, + CustomFrameworkMetadata.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CustomFrameworkMetadata { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CustomFrameworkWithoutRequirements attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private CustomFrameworkType type = CustomFrameworkType.CUSTOM_FRAMEWORK; + + public CustomFrameworkMetadata attributes(CustomFrameworkWithoutRequirements attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Framework without requirements. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CustomFrameworkWithoutRequirements getAttributes() { + return attributes; + } + + public void setAttributes(CustomFrameworkWithoutRequirements attributes) { + this.attributes = attributes; + } + + public CustomFrameworkMetadata id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the custom framework. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public CustomFrameworkMetadata type(CustomFrameworkType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of the resource. The value must be custom_framework. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CustomFrameworkType getType() { + return type; + } + + public void setType(CustomFrameworkType 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 CustomFrameworkMetadata + */ + @JsonAnySetter + public CustomFrameworkMetadata 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 CustomFrameworkMetadata object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomFrameworkMetadata customFrameworkMetadata = (CustomFrameworkMetadata) o; + return Objects.equals(this.attributes, customFrameworkMetadata.attributes) + && Objects.equals(this.id, customFrameworkMetadata.id) + && Objects.equals(this.type, customFrameworkMetadata.type) + && Objects.equals(this.additionalProperties, customFrameworkMetadata.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomFrameworkMetadata {\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/CustomFrameworkRequirement.java b/src/main/java/com/datadog/api/client/v2/model/CustomFrameworkRequirement.java new file mode 100644 index 00000000000..f016cddad55 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CustomFrameworkRequirement.java @@ -0,0 +1,186 @@ +/* + * 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.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Framework Requirement. */ +@JsonPropertyOrder({ + CustomFrameworkRequirement.JSON_PROPERTY_CONTROLS, + CustomFrameworkRequirement.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CustomFrameworkRequirement { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONTROLS = "controls"; + private List controls = new ArrayList<>(); + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public CustomFrameworkRequirement() {} + + @JsonCreator + public CustomFrameworkRequirement( + @JsonProperty(required = true, value = JSON_PROPERTY_CONTROLS) + List controls, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { + this.controls = controls; + this.name = name; + } + + public CustomFrameworkRequirement controls(List controls) { + this.controls = controls; + for (CustomFrameworkControl item : controls) { + this.unparsed |= item.unparsed; + } + return this; + } + + public CustomFrameworkRequirement addControlsItem(CustomFrameworkControl controlsItem) { + this.controls.add(controlsItem); + this.unparsed |= controlsItem.unparsed; + return this; + } + + /** + * Requirement Controls. + * + * @return controls + */ + @JsonProperty(JSON_PROPERTY_CONTROLS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getControls() { + return controls; + } + + public void setControls(List controls) { + this.controls = controls; + } + + public CustomFrameworkRequirement name(String name) { + this.name = name; + return this; + } + + /** + * Requirement Name. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + /** + * 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 CustomFrameworkRequirement + */ + @JsonAnySetter + public CustomFrameworkRequirement 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 CustomFrameworkRequirement object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomFrameworkRequirement customFrameworkRequirement = (CustomFrameworkRequirement) o; + return Objects.equals(this.controls, customFrameworkRequirement.controls) + && Objects.equals(this.name, customFrameworkRequirement.name) + && Objects.equals( + this.additionalProperties, customFrameworkRequirement.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(controls, name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomFrameworkRequirement {\n"); + sb.append(" controls: ").append(toIndentedString(controls)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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/CustomFrameworkType.java b/src/main/java/com/datadog/api/client/v2/model/CustomFrameworkType.java new file mode 100644 index 00000000000..cc646ff63fe --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CustomFrameworkType.java @@ -0,0 +1,56 @@ +/* + * 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 type of the resource. The value must be custom_framework. */ +@JsonSerialize(using = CustomFrameworkType.CustomFrameworkTypeSerializer.class) +public class CustomFrameworkType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("custom_framework")); + + public static final CustomFrameworkType CUSTOM_FRAMEWORK = + new CustomFrameworkType("custom_framework"); + + CustomFrameworkType(String value) { + super(value, allowedValues); + } + + public static class CustomFrameworkTypeSerializer extends StdSerializer { + public CustomFrameworkTypeSerializer(Class t) { + super(t); + } + + public CustomFrameworkTypeSerializer() { + this(null); + } + + @Override + public void serialize( + CustomFrameworkType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static CustomFrameworkType fromValue(String value) { + return new CustomFrameworkType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CustomFrameworkWithoutRequirements.java b/src/main/java/com/datadog/api/client/v2/model/CustomFrameworkWithoutRequirements.java new file mode 100644 index 00000000000..3ff48173e38 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CustomFrameworkWithoutRequirements.java @@ -0,0 +1,259 @@ +/* + * 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; + +/** Framework without requirements. */ +@JsonPropertyOrder({ + CustomFrameworkWithoutRequirements.JSON_PROPERTY_DESCRIPTION, + CustomFrameworkWithoutRequirements.JSON_PROPERTY_HANDLE, + CustomFrameworkWithoutRequirements.JSON_PROPERTY_ICON_URL, + CustomFrameworkWithoutRequirements.JSON_PROPERTY_NAME, + CustomFrameworkWithoutRequirements.JSON_PROPERTY_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CustomFrameworkWithoutRequirements { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_HANDLE = "handle"; + private String handle; + + public static final String JSON_PROPERTY_ICON_URL = "icon_url"; + private String iconUrl; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_VERSION = "version"; + private String version; + + public CustomFrameworkWithoutRequirements() {} + + @JsonCreator + public CustomFrameworkWithoutRequirements( + @JsonProperty(required = true, value = JSON_PROPERTY_DESCRIPTION) String description, + @JsonProperty(required = true, value = JSON_PROPERTY_HANDLE) String handle, + @JsonProperty(required = true, value = JSON_PROPERTY_ICON_URL) String iconUrl, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_VERSION) String version) { + this.description = description; + this.handle = handle; + this.iconUrl = iconUrl; + this.name = name; + this.version = version; + } + + public CustomFrameworkWithoutRequirements description(String description) { + this.description = description; + return this; + } + + /** + * Framework Description + * + * @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 CustomFrameworkWithoutRequirements handle(String handle) { + this.handle = handle; + return this; + } + + /** + * Framework Handle + * + * @return handle + */ + @JsonProperty(JSON_PROPERTY_HANDLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getHandle() { + return handle; + } + + public void setHandle(String handle) { + this.handle = handle; + } + + public CustomFrameworkWithoutRequirements iconUrl(String iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + /** + * Framework Icon URL + * + * @return iconUrl + */ + @JsonProperty(JSON_PROPERTY_ICON_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getIconUrl() { + return iconUrl; + } + + public void setIconUrl(String iconUrl) { + this.iconUrl = iconUrl; + } + + public CustomFrameworkWithoutRequirements name(String name) { + this.name = name; + return this; + } + + /** + * Framework Name + * + * @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 CustomFrameworkWithoutRequirements version(String version) { + this.version = version; + return this; + } + + /** + * Framework Version + * + * @return version + */ + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + /** + * 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 CustomFrameworkWithoutRequirements + */ + @JsonAnySetter + public CustomFrameworkWithoutRequirements 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 CustomFrameworkWithoutRequirements object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomFrameworkWithoutRequirements customFrameworkWithoutRequirements = + (CustomFrameworkWithoutRequirements) o; + return Objects.equals(this.description, customFrameworkWithoutRequirements.description) + && Objects.equals(this.handle, customFrameworkWithoutRequirements.handle) + && Objects.equals(this.iconUrl, customFrameworkWithoutRequirements.iconUrl) + && Objects.equals(this.name, customFrameworkWithoutRequirements.name) + && Objects.equals(this.version, customFrameworkWithoutRequirements.version) + && Objects.equals( + this.additionalProperties, customFrameworkWithoutRequirements.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(description, handle, iconUrl, name, version, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomFrameworkWithoutRequirements {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" handle: ").append(toIndentedString(handle)).append("\n"); + sb.append(" iconUrl: ").append(toIndentedString(iconUrl)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).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/DeleteCustomFrameworkResponse.java b/src/main/java/com/datadog/api/client/v2/model/DeleteCustomFrameworkResponse.java new file mode 100644 index 00000000000..2fce9439bcf --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DeleteCustomFrameworkResponse.java @@ -0,0 +1,146 @@ +/* + * 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; + +/** Response object to delete a custom framework. */ +@JsonPropertyOrder({DeleteCustomFrameworkResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DeleteCustomFrameworkResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private CustomFrameworkMetadata data; + + public DeleteCustomFrameworkResponse() {} + + @JsonCreator + public DeleteCustomFrameworkResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) CustomFrameworkMetadata data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public DeleteCustomFrameworkResponse data(CustomFrameworkMetadata data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Metadata for custom frameworks. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CustomFrameworkMetadata getData() { + return data; + } + + public void setData(CustomFrameworkMetadata 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 DeleteCustomFrameworkResponse + */ + @JsonAnySetter + public DeleteCustomFrameworkResponse 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 DeleteCustomFrameworkResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteCustomFrameworkResponse deleteCustomFrameworkResponse = (DeleteCustomFrameworkResponse) o; + return Objects.equals(this.data, deleteCustomFrameworkResponse.data) + && Objects.equals( + this.additionalProperties, deleteCustomFrameworkResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteCustomFrameworkResponse {\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/FrameworkHandleAndVersionResponseData.java b/src/main/java/com/datadog/api/client/v2/model/FrameworkHandleAndVersionResponseData.java new file mode 100644 index 00000000000..feb772b9329 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FrameworkHandleAndVersionResponseData.java @@ -0,0 +1,212 @@ +/* + * 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; + +/** Contains type and attributes for custom frameworks. */ +@JsonPropertyOrder({ + FrameworkHandleAndVersionResponseData.JSON_PROPERTY_ATTRIBUTES, + FrameworkHandleAndVersionResponseData.JSON_PROPERTY_ID, + FrameworkHandleAndVersionResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FrameworkHandleAndVersionResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CustomFrameworkDataHandleAndVersion attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private CustomFrameworkType type = CustomFrameworkType.CUSTOM_FRAMEWORK; + + public FrameworkHandleAndVersionResponseData() {} + + @JsonCreator + public FrameworkHandleAndVersionResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + CustomFrameworkDataHandleAndVersion attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) CustomFrameworkType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public FrameworkHandleAndVersionResponseData attributes( + CustomFrameworkDataHandleAndVersion attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Framework Handle and Version. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CustomFrameworkDataHandleAndVersion getAttributes() { + return attributes; + } + + public void setAttributes(CustomFrameworkDataHandleAndVersion attributes) { + this.attributes = attributes; + } + + public FrameworkHandleAndVersionResponseData id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the custom framework. + * + * @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 FrameworkHandleAndVersionResponseData type(CustomFrameworkType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of the resource. The value must be custom_framework. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CustomFrameworkType getType() { + return type; + } + + public void setType(CustomFrameworkType 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 FrameworkHandleAndVersionResponseData + */ + @JsonAnySetter + public FrameworkHandleAndVersionResponseData 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 FrameworkHandleAndVersionResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FrameworkHandleAndVersionResponseData frameworkHandleAndVersionResponseData = + (FrameworkHandleAndVersionResponseData) o; + return Objects.equals(this.attributes, frameworkHandleAndVersionResponseData.attributes) + && Objects.equals(this.id, frameworkHandleAndVersionResponseData.id) + && Objects.equals(this.type, frameworkHandleAndVersionResponseData.type) + && Objects.equals( + this.additionalProperties, frameworkHandleAndVersionResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FrameworkHandleAndVersionResponseData {\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/FullCustomFrameworkData.java b/src/main/java/com/datadog/api/client/v2/model/FullCustomFrameworkData.java new file mode 100644 index 00000000000..a9138d76d26 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FullCustomFrameworkData.java @@ -0,0 +1,209 @@ +/* + * 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; + +/** Contains type and attributes for custom frameworks. */ +@JsonPropertyOrder({ + FullCustomFrameworkData.JSON_PROPERTY_ATTRIBUTES, + FullCustomFrameworkData.JSON_PROPERTY_ID, + FullCustomFrameworkData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FullCustomFrameworkData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private FullCustomFrameworkDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private CustomFrameworkType type = CustomFrameworkType.CUSTOM_FRAMEWORK; + + public FullCustomFrameworkData() {} + + @JsonCreator + public FullCustomFrameworkData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + FullCustomFrameworkDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) CustomFrameworkType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public FullCustomFrameworkData attributes(FullCustomFrameworkDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Full Framework Data Attributes. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FullCustomFrameworkDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(FullCustomFrameworkDataAttributes attributes) { + this.attributes = attributes; + } + + public FullCustomFrameworkData id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the custom framework. + * + * @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 FullCustomFrameworkData type(CustomFrameworkType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of the resource. The value must be custom_framework. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CustomFrameworkType getType() { + return type; + } + + public void setType(CustomFrameworkType 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 FullCustomFrameworkData + */ + @JsonAnySetter + public FullCustomFrameworkData 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 FullCustomFrameworkData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FullCustomFrameworkData fullCustomFrameworkData = (FullCustomFrameworkData) o; + return Objects.equals(this.attributes, fullCustomFrameworkData.attributes) + && Objects.equals(this.id, fullCustomFrameworkData.id) + && Objects.equals(this.type, fullCustomFrameworkData.type) + && Objects.equals(this.additionalProperties, fullCustomFrameworkData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FullCustomFrameworkData {\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/FullCustomFrameworkDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/FullCustomFrameworkDataAttributes.java new file mode 100644 index 00000000000..420dcfa92d8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FullCustomFrameworkDataAttributes.java @@ -0,0 +1,302 @@ +/* + * 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.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Full Framework Data Attributes. */ +@JsonPropertyOrder({ + FullCustomFrameworkDataAttributes.JSON_PROPERTY_DESCRIPTION, + FullCustomFrameworkDataAttributes.JSON_PROPERTY_HANDLE, + FullCustomFrameworkDataAttributes.JSON_PROPERTY_ICON_URL, + FullCustomFrameworkDataAttributes.JSON_PROPERTY_NAME, + FullCustomFrameworkDataAttributes.JSON_PROPERTY_REQUIREMENTS, + FullCustomFrameworkDataAttributes.JSON_PROPERTY_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FullCustomFrameworkDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_HANDLE = "handle"; + private String handle; + + public static final String JSON_PROPERTY_ICON_URL = "icon_url"; + private String iconUrl; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_REQUIREMENTS = "requirements"; + private List requirements = new ArrayList<>(); + + public static final String JSON_PROPERTY_VERSION = "version"; + private String version; + + public FullCustomFrameworkDataAttributes() {} + + @JsonCreator + public FullCustomFrameworkDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_DESCRIPTION) String description, + @JsonProperty(required = true, value = JSON_PROPERTY_HANDLE) String handle, + @JsonProperty(required = true, value = JSON_PROPERTY_ICON_URL) String iconUrl, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_REQUIREMENTS) + List requirements, + @JsonProperty(required = true, value = JSON_PROPERTY_VERSION) String version) { + this.description = description; + this.handle = handle; + this.iconUrl = iconUrl; + this.name = name; + this.requirements = requirements; + this.version = version; + } + + public FullCustomFrameworkDataAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Framework Description + * + * @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 FullCustomFrameworkDataAttributes handle(String handle) { + this.handle = handle; + return this; + } + + /** + * Framework Handle + * + * @return handle + */ + @JsonProperty(JSON_PROPERTY_HANDLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getHandle() { + return handle; + } + + public void setHandle(String handle) { + this.handle = handle; + } + + public FullCustomFrameworkDataAttributes iconUrl(String iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + /** + * Framework Icon URL + * + * @return iconUrl + */ + @JsonProperty(JSON_PROPERTY_ICON_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getIconUrl() { + return iconUrl; + } + + public void setIconUrl(String iconUrl) { + this.iconUrl = iconUrl; + } + + public FullCustomFrameworkDataAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Framework Name + * + * @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 FullCustomFrameworkDataAttributes requirements( + List requirements) { + this.requirements = requirements; + for (CustomFrameworkRequirement item : requirements) { + this.unparsed |= item.unparsed; + } + return this; + } + + public FullCustomFrameworkDataAttributes addRequirementsItem( + CustomFrameworkRequirement requirementsItem) { + this.requirements.add(requirementsItem); + this.unparsed |= requirementsItem.unparsed; + return this; + } + + /** + * Framework Requirements + * + * @return requirements + */ + @JsonProperty(JSON_PROPERTY_REQUIREMENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getRequirements() { + return requirements; + } + + public void setRequirements(List requirements) { + this.requirements = requirements; + } + + public FullCustomFrameworkDataAttributes version(String version) { + this.version = version; + return this; + } + + /** + * Framework Version + * + * @return version + */ + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + /** + * 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 FullCustomFrameworkDataAttributes + */ + @JsonAnySetter + public FullCustomFrameworkDataAttributes 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 FullCustomFrameworkDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FullCustomFrameworkDataAttributes fullCustomFrameworkDataAttributes = + (FullCustomFrameworkDataAttributes) o; + return Objects.equals(this.description, fullCustomFrameworkDataAttributes.description) + && Objects.equals(this.handle, fullCustomFrameworkDataAttributes.handle) + && Objects.equals(this.iconUrl, fullCustomFrameworkDataAttributes.iconUrl) + && Objects.equals(this.name, fullCustomFrameworkDataAttributes.name) + && Objects.equals(this.requirements, fullCustomFrameworkDataAttributes.requirements) + && Objects.equals(this.version, fullCustomFrameworkDataAttributes.version) + && Objects.equals( + this.additionalProperties, fullCustomFrameworkDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + description, handle, iconUrl, name, requirements, version, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FullCustomFrameworkDataAttributes {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" handle: ").append(toIndentedString(handle)).append("\n"); + sb.append(" iconUrl: ").append(toIndentedString(iconUrl)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" requirements: ").append(toIndentedString(requirements)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).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/GetCustomFrameworkResponse.java b/src/main/java/com/datadog/api/client/v2/model/GetCustomFrameworkResponse.java new file mode 100644 index 00000000000..057551db65c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GetCustomFrameworkResponse.java @@ -0,0 +1,146 @@ +/* + * 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; + +/** Response object to get a custom framework. */ +@JsonPropertyOrder({GetCustomFrameworkResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GetCustomFrameworkResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private FullCustomFrameworkData data; + + public GetCustomFrameworkResponse() {} + + @JsonCreator + public GetCustomFrameworkResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) FullCustomFrameworkData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public GetCustomFrameworkResponse data(FullCustomFrameworkData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Contains type and attributes for custom frameworks. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FullCustomFrameworkData getData() { + return data; + } + + public void setData(FullCustomFrameworkData 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 GetCustomFrameworkResponse + */ + @JsonAnySetter + public GetCustomFrameworkResponse 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 GetCustomFrameworkResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCustomFrameworkResponse getCustomFrameworkResponse = (GetCustomFrameworkResponse) o; + return Objects.equals(this.data, getCustomFrameworkResponse.data) + && Objects.equals( + this.additionalProperties, getCustomFrameworkResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetCustomFrameworkResponse {\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/UpdateCustomFrameworkRequest.java b/src/main/java/com/datadog/api/client/v2/model/UpdateCustomFrameworkRequest.java new file mode 100644 index 00000000000..992d0f05fa9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UpdateCustomFrameworkRequest.java @@ -0,0 +1,146 @@ +/* + * 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; + +/** Request object to update a custom framework. */ +@JsonPropertyOrder({UpdateCustomFrameworkRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UpdateCustomFrameworkRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private CustomFrameworkData data; + + public UpdateCustomFrameworkRequest() {} + + @JsonCreator + public UpdateCustomFrameworkRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) CustomFrameworkData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public UpdateCustomFrameworkRequest data(CustomFrameworkData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Contains type and attributes for custom frameworks. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CustomFrameworkData getData() { + return data; + } + + public void setData(CustomFrameworkData 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 UpdateCustomFrameworkRequest + */ + @JsonAnySetter + public UpdateCustomFrameworkRequest 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 UpdateCustomFrameworkRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateCustomFrameworkRequest updateCustomFrameworkRequest = (UpdateCustomFrameworkRequest) o; + return Objects.equals(this.data, updateCustomFrameworkRequest.data) + && Objects.equals( + this.additionalProperties, updateCustomFrameworkRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateCustomFrameworkRequest {\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/UpdateCustomFrameworkResponse.java b/src/main/java/com/datadog/api/client/v2/model/UpdateCustomFrameworkResponse.java new file mode 100644 index 00000000000..70494d466d8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UpdateCustomFrameworkResponse.java @@ -0,0 +1,147 @@ +/* + * 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; + +/** Response object to update a custom framework. */ +@JsonPropertyOrder({UpdateCustomFrameworkResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UpdateCustomFrameworkResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private FrameworkHandleAndVersionResponseData data; + + public UpdateCustomFrameworkResponse() {} + + @JsonCreator + public UpdateCustomFrameworkResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + FrameworkHandleAndVersionResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public UpdateCustomFrameworkResponse data(FrameworkHandleAndVersionResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Contains type and attributes for custom frameworks. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FrameworkHandleAndVersionResponseData getData() { + return data; + } + + public void setData(FrameworkHandleAndVersionResponseData 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 UpdateCustomFrameworkResponse + */ + @JsonAnySetter + public UpdateCustomFrameworkResponse 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 UpdateCustomFrameworkResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateCustomFrameworkResponse updateCustomFrameworkResponse = (UpdateCustomFrameworkResponse) o; + return Objects.equals(this.data, updateCustomFrameworkResponse.data) + && Objects.equals( + this.additionalProperties, updateCustomFrameworkResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateCustomFrameworkResponse {\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/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..26b4fad4400 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2025-04-22T19:24:37.090Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_Bad_Request_response.json new file mode 100644 index 00000000000..bf136d12ccd --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_Bad_Request_response.json @@ -0,0 +1,32 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"handle\":\"\",\"icon_url\":\"test-url\",\"name\":\"name\",\"requirements\":[{\"controls\":[{\"name\":\"control\",\"rules_id\":[\"def-000-be9\"]}],\"name\":\"requirement\"}],\"version\":\"10\"},\"type\":\"custom_framework\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/cloud_security_management/custom_frameworks", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"input_validation_error(Field 'data.attributes.handle' is invalid: field 'handle' must not be empty)\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 400, + "reasonPhrase": "Bad Request" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "b6310146-4855-3877-23a1-6dd21278b8d7" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_Conflict_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_Conflict_response.freeze new file mode 100644 index 00000000000..e4a37fd195f --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_Conflict_response.freeze @@ -0,0 +1 @@ +2025-04-22T19:27:16.633Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_Conflict_response.json b/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_Conflict_response.json new file mode 100644 index 00000000000..7e392b663eb --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_Conflict_response.json @@ -0,0 +1,88 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"handle\":\"create-framework-new\",\"icon_url\":\"test-url\",\"name\":\"name\",\"requirements\":[{\"controls\":[{\"name\":\"control\",\"rules_id\":[\"def-000-be9\"]}],\"name\":\"requirement\"}],\"version\":\"10\"},\"type\":\"custom_framework\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/cloud_security_management/custom_frameworks", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"create-framework-new-10\",\"type\":\"custom_framework\",\"attributes\":{\"handle\":\"create-framework-new\",\"version\":\"10\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "13fe9685-b072-5fe0-c841-4499a9e71c74" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"handle\":\"create-framework-new\",\"icon_url\":\"test-url\",\"name\":\"name\",\"requirements\":[{\"controls\":[{\"name\":\"control\",\"rules_id\":[\"def-000-be9\"]}],\"name\":\"requirement\"}],\"version\":\"10\"},\"type\":\"custom_framework\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/cloud_security_management/custom_frameworks", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"status\":\"409\",\"title\":\"Status Conflict\",\"detail\":\"already_exists(Framework 'create-framework-new' already existed)\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 409, + "reasonPhrase": "Conflict" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "13fe9685-b072-5fe0-c841-4499a9e71c75" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/cloud_security_management/custom_frameworks/create-framework-new/10", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"create-framework-new-10\",\"type\":\"custom_framework\",\"attributes\":{\"created_at\":1744297581542,\"created_by\":\"frog@datadoghq.com\",\"description\":\"\",\"handle\":\"create-framework-new\",\"icon_url\":\"test-url\",\"modified_at\":1745349916258,\"name\":\"name\",\"org_id\":321813,\"version\":\"10\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "e535722a-99e3-30cf-49f7-2d093bd78b3d" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_OK_response.freeze new file mode 100644 index 00000000000..492c237dc75 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-04-22T20:53:54.694Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_OK_response.json new file mode 100644 index 00000000000..ad63cd81994 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_OK_response.json @@ -0,0 +1,58 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"handle\":\"create-framework-new\",\"icon_url\":\"test-url\",\"name\":\"name\",\"requirements\":[{\"controls\":[{\"name\":\"control\",\"rules_id\":[\"def-000-be9\"]}],\"name\":\"requirement\"}],\"version\":\"10\"},\"type\":\"custom_framework\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/cloud_security_management/custom_frameworks", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"create-framework-new-10\",\"type\":\"custom_framework\",\"attributes\":{\"handle\":\"create-framework-new\",\"version\":\"10\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "13fe9685-b072-5fe0-c841-4499a9e71c72" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/cloud_security_management/custom_frameworks/create-framework-new/10", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"create-framework-new-10\",\"type\":\"custom_framework\",\"attributes\":{\"created_at\":1744297581542,\"created_by\":\"team-intg-tools-libs-spam@datadoghq.com\",\"description\":\"\",\"handle\":\"create-framework-new\",\"icon_url\":\"test-url\",\"modified_at\":1745353074397,\"name\":\"name\",\"org_id\":321813,\"version\":\"10\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "e535722a-99e3-30cf-49f7-2d093bd78b3b" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_a_custom_framework_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Delete_a_custom_framework_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..3d412affcde --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_a_custom_framework_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2025-04-28T15:24:28.339Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_a_custom_framework_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Delete_a_custom_framework_returns_Bad_Request_response.json new file mode 100644 index 00000000000..77ac43685b0 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_a_custom_framework_returns_Bad_Request_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/cloud_security_management/custom_frameworks/handle-does-not-exist/version-does-not-exist", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 400, + "reasonPhrase": "Bad Request" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "bc85a397-4e17-4db6-2056-c293e3241d32" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_a_custom_framework_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Delete_a_custom_framework_returns_OK_response.freeze new file mode 100644 index 00000000000..ad55978398d --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_a_custom_framework_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-04-28T15:24:37.124Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_a_custom_framework_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_a_custom_framework_returns_OK_response.json new file mode 100644 index 00000000000..bf3d084fa30 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_a_custom_framework_returns_OK_response.json @@ -0,0 +1,84 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"handle\":\"create-framework-new\",\"icon_url\":\"test-url\",\"name\":\"name\",\"requirements\":[{\"controls\":[{\"name\":\"control\",\"rules_id\":[\"def-000-be9\"]}],\"name\":\"requirement\"}],\"version\":\"10\"},\"type\":\"custom_framework\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/cloud_security_management/custom_frameworks", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"create-framework-new-10\",\"type\":\"custom_framework\",\"attributes\":{\"handle\":\"create-framework-new\",\"version\":\"10\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "13fe9685-b072-5fe0-c841-4499a9e71c76" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/cloud_security_management/custom_frameworks/create-framework-new/10", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"create-framework-new-10\",\"type\":\"custom_framework\",\"attributes\":{\"description\":\"\",\"handle\":\"create-framework-new\",\"icon_url\":\"test-url\",\"name\":\"name\",\"version\":\"10\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "e535722a-99e3-30cf-49f7-2d093bd78b3e" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/cloud_security_management/custom_frameworks/create-framework-new/10", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 400, + "reasonPhrase": "Bad Request" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "e535722a-99e3-30cf-49f7-2d093bd78b3f" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_custom_framework_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Get_a_custom_framework_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..7ca4884601a --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_a_custom_framework_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2025-04-27T22:14:15.789Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_custom_framework_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Get_a_custom_framework_returns_Bad_Request_response.json new file mode 100644 index 00000000000..8a7100ab2de --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_a_custom_framework_returns_Bad_Request_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/cloud_security_management/custom_frameworks/frame-does-not-exist/frame-does-not-exist", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 400, + "reasonPhrase": "Bad Request" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "b97e714a-db25-582b-5f67-fbfd77e8f693" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_custom_framework_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_a_custom_framework_returns_OK_response.freeze new file mode 100644 index 00000000000..333d856a168 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_a_custom_framework_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-04-27T22:14:16.448Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_custom_framework_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_a_custom_framework_returns_OK_response.json new file mode 100644 index 00000000000..e93ef2631cf --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_a_custom_framework_returns_OK_response.json @@ -0,0 +1,84 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"handle\":\"create-framework-new\",\"icon_url\":\"test-url\",\"name\":\"name\",\"requirements\":[{\"controls\":[{\"name\":\"control\",\"rules_id\":[\"def-000-be9\"]}],\"name\":\"requirement\"}],\"version\":\"10\"},\"type\":\"custom_framework\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/cloud_security_management/custom_frameworks", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"create-framework-new-10\",\"type\":\"custom_framework\",\"attributes\":{\"handle\":\"create-framework-new\",\"version\":\"10\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "13fe9685-b072-5fe0-c841-4499a9e71c71" + }, + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/cloud_security_management/custom_frameworks/create-framework-new/10", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"create-framework-new-10\",\"type\":\"custom_framework\",\"attributes\":{\"description\":\"\",\"handle\":\"create-framework-new\",\"icon_url\":\"test-url\",\"name\":\"name\",\"requirements\":[{\"name\":\"requirement\",\"controls\":[{\"name\":\"control\",\"rules_id\":[\"def-000-be9\"]}]}],\"version\":\"10\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "2d05687e-af69-d556-0b4d-5a69c2280ff4" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/cloud_security_management/custom_frameworks/create-framework-new/10", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"create-framework-new-10\",\"type\":\"custom_framework\",\"attributes\":{\"description\":\"\",\"handle\":\"create-framework-new\",\"icon_url\":\"test-url\",\"name\":\"name\",\"version\":\"10\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "e535722a-99e3-30cf-49f7-2d093bd78b3a" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_custom_framework_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Update_a_custom_framework_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..7f12adf7b17 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_a_custom_framework_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2025-04-22T20:18:00.917Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_custom_framework_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_a_custom_framework_returns_Bad_Request_response.json new file mode 100644 index 00000000000..eeafaf40103 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_a_custom_framework_returns_Bad_Request_response.json @@ -0,0 +1,32 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"handle\":\"\",\"name\":\"\",\"requirements\":[{\"controls\":[{\"name\":\"\",\"rules_id\":[\"\"]}],\"name\":\"\"}],\"version\":\"\"},\"type\":\"custom_framework\"}}" + }, + "headers": {}, + "method": "PUT", + "path": "/api/v2/cloud_security_management/custom_frameworks/create-framework-new/10", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"input_validation_error(Field 'data.attributes.requirements.name' is invalid: field 'requirements.name' must not be empty), input_validation_error(Field 'data.attributes.controls.name' is invalid: field 'controls.name' must not be empty), input_validation_error(Field 'data.attributes.name' is invalid: field 'name' must not be empty)\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 400, + "reasonPhrase": "Bad Request" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "32b0bd24-0336-5d0f-102b-3da1a84d7902" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_custom_framework_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_a_custom_framework_returns_OK_response.freeze new file mode 100644 index 00000000000..1b2c58bb0f1 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_a_custom_framework_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-04-22T20:17:53.528Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_custom_framework_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_a_custom_framework_returns_OK_response.json new file mode 100644 index 00000000000..a9254ecc9d4 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_a_custom_framework_returns_OK_response.json @@ -0,0 +1,88 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"handle\":\"create-framework-new\",\"icon_url\":\"test-url\",\"name\":\"name\",\"requirements\":[{\"controls\":[{\"name\":\"control\",\"rules_id\":[\"def-000-be9\"]}],\"name\":\"requirement\"}],\"version\":\"10\"},\"type\":\"custom_framework\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/cloud_security_management/custom_frameworks", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"create-framework-new-10\",\"type\":\"custom_framework\",\"attributes\":{\"handle\":\"create-framework-new\",\"version\":\"10\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "13fe9685-b072-5fe0-c841-4499a9e71c73" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"handle\":\"create-framework-new\",\"icon_url\":\"test-url\",\"name\":\"name\",\"requirements\":[{\"controls\":[{\"name\":\"control\",\"rules_id\":[\"def-000-be9\"]}],\"name\":\"requirement\"}],\"version\":\"10\"},\"type\":\"custom_framework\"}}" + }, + "headers": {}, + "method": "PUT", + "path": "/api/v2/cloud_security_management/custom_frameworks/create-framework-new/10", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"create-framework-new-10\",\"type\":\"custom_framework\",\"attributes\":{\"handle\":\"create-framework-new\",\"version\":\"10\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "94936cae-e61b-3f92-1d07-d9a6ab0cb353" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/cloud_security_management/custom_frameworks/create-framework-new/10", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"create-framework-new-10\",\"type\":\"custom_framework\",\"attributes\":{\"created_at\":1744297581542,\"created_by\":\"frog@datadoghq.com\",\"description\":\"\",\"handle\":\"create-framework-new\",\"icon_url\":\"test-url\",\"modified_at\":1745353074397,\"name\":\"name\",\"org_id\":321813,\"version\":\"10\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "e535722a-99e3-30cf-49f7-2d093bd78b3c" + } +] \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/given.json b/src/test/resources/com/datadog/api/client/v2/api/given.json index dcce70aed76..950b601c71f 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/given.json +++ b/src/test/resources/com/datadog/api/client/v2/api/given.json @@ -108,6 +108,18 @@ "tag": "Software Catalog", "operationId": "UpsertCatalogEntity" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"type\":\"custom_framework\",\n \"attributes\":{\n \"name\":\"name\",\n \"handle\":\"create-framework-new\",\n \"version\":\"10\",\n \"icon_url\":\"test-url\",\n \"requirements\":[{\n \"name\":\"requirement\",\n \"controls\":[{\n \"name\":\"control\",\n \"rules_id\":\n [\"def-000-be9\"]\n }]\n }]\n }\n }\n}" + } + ], + "step": "there is a valid \"custom_framework\" in the system", + "key": "custom_framework", + "tag": "Security Monitoring", + "operationId": "CreateCustomFramework" + }, { "parameters": [ { diff --git a/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature b/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature index a26ccb54906..05ed7211b50 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature @@ -172,6 +172,28 @@ Feature: Security Monitoring And the response "options.complianceRuleOptions.resourceType" is equal to "gcp_compute_disk" @team:DataDog/k9-cloud-security-platform + Scenario: Create a custom framework returns "Bad Request" response + Given new "CreateCustomFramework" request + And body with value {"data":{"type":"custom_framework","attributes":{"name":"name","handle":"","version":"10","icon_url":"test-url","requirements":[{"name":"requirement","controls":[{"name":"control","rules_id":["def-000-be9"]}]}]}}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/k9-cloud-security-platform + Scenario: Create a custom framework returns "Conflict" response + Given there is a valid "custom_framework" in the system + And new "CreateCustomFramework" request + And body with value {"data":{"type":"custom_framework","attributes":{"name":"name","handle":"create-framework-new","version":"10","icon_url":"test-url","requirements":[{"name":"requirement","controls":[{"name":"control","rules_id":["def-000-be9"]}]}]}}} + When the request is sent + Then the response status is 409 Conflict + + @team:DataDog/k9-cloud-security-platform + Scenario: Create a custom framework returns "OK" response + Given new "CreateCustomFramework" request + And body with value {"data":{"type":"custom_framework","attributes":{"name":"name","handle":"create-framework-new","version":"10","icon_url":"test-url","requirements":[{"name":"requirement","controls":[{"name":"control","rules_id":["def-000-be9"]}]}]}}} + When the request is sent + Then the response status is 200 OK + + @skip @team:DataDog/k9-cloud-security-platform Scenario: Create a detection rule returns "Bad Request" response Given new "CreateSecurityMonitoringRule" request And body with value {"name":"{{ unique }}", "queries":[{"query":""}],"cases":[{"status":"info"}],"options":{},"message":"Test rule","tags":[],"isEnabled":true} @@ -334,6 +356,23 @@ Feature: Security Monitoring And the response "data.attributes.rule_query" is equal to "type:log_detection source:cloudtrail" And the response "data.attributes.data_exclusion_query" is equal to "account_id:12345" + @team:DataDog/k9-cloud-security-platform + Scenario: Delete a custom framework returns "Bad Request" response + Given new "DeleteCustomFramework" request + And request contains "handle" parameter with value "handle-does-not-exist" + And request contains "version" parameter with value "version-does-not-exist" + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/k9-cloud-security-platform + Scenario: Delete a custom framework returns "OK" response + Given there is a valid "custom_framework" in the system + And new "DeleteCustomFramework" request + And request contains "handle" parameter with value "create-framework-new" + And request contains "version" parameter with value "10" + When the request is sent + Then the response status is 200 OK + @skip @team:DataDog/k9-cloud-security-platform Scenario: Delete a non existing rule returns "Not Found" response Given new "DeleteSecurityMonitoringRule" request @@ -492,6 +531,23 @@ Feature: Security Monitoring And the response "name" is equal to "{{ unique }}_cloud" And the response "id" has the same value as "cloud_configuration_rule.id" + @team:DataDog/k9-cloud-security-platform + Scenario: Get a custom framework returns "Bad Request" response + Given new "GetCustomFramework" request + And request contains "handle" parameter with value "frame-does-not-exist" + And request contains "version" parameter with value "frame-does-not-exist" + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/k9-cloud-security-platform + Scenario: Get a custom framework returns "OK" response + Given there is a valid "custom_framework" in the system + And new "GetCustomFramework" request + And request contains "handle" parameter with value "create-framework-new" + And request contains "version" parameter with value "10" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/cloud-security-posture-management Scenario: Get a finding returns "Bad Request: The server cannot process the request due to invalid syntax in the request." response Given operation "GetFinding" enabled @@ -1085,6 +1141,25 @@ Feature: Security Monitoring And the response "name" is equal to "{{ unique }}_cloud_updated" And the response "id" has the same value as "cloud_configuration_rule.id" + @team:DataDog/k9-cloud-security-platform + Scenario: Update a custom framework returns "Bad Request" response + Given new "UpdateCustomFramework" request + And request contains "handle" parameter with value "create-framework-new" + And request contains "version" parameter with value "10" + And body with value {"data": {"attributes": {"handle": "", "name": "", "requirements": [{"controls": [{"name": "", "rules_id": [""]}], "name": ""}], "version": ""}, "type": "custom_framework"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/k9-cloud-security-platform + Scenario: Update a custom framework returns "OK" response + Given there is a valid "custom_framework" in the system + And new "UpdateCustomFramework" request + And request contains "handle" parameter with value "create-framework-new" + And request contains "version" parameter with value "10" + And body with value {"data":{"type":"custom_framework","attributes":{"name":"name","handle":"create-framework-new","version":"10","icon_url":"test-url","requirements":[{"name":"requirement","controls":[{"name":"control","rules_id":["def-000-be9"]}]}]}}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/k9-cloud-security-platform Scenario: Update a security filter returns "Bad Request" response Given new "UpdateSecurityFilter" 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 85514d18997..67dca81fb69 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 @@ -513,6 +513,41 @@ "type": "safe" } }, + "CreateCustomFramework": { + "tag": "Security Monitoring", + "undo": { + "operationId": "DeleteCustomFramework", + "parameters": [ + { + "name": "handle", + "source": "data.attributes.handle" + }, + { + "name": "version", + "source": "data.attributes.version" + } + ], + "type": "unsafe" + } + }, + "DeleteCustomFramework": { + "tag": "Security Monitoring", + "undo": { + "type": "idempotent" + } + }, + "GetCustomFramework": { + "tag": "Security Monitoring", + "undo": { + "type": "safe" + } + }, + "UpdateCustomFramework": { + "tag": "Security Monitoring", + "undo": { + "type": "idempotent" + } + }, "ListContainerImages": { "tag": "Container Images", "undo": {