From 37d062792bcf7717c1cb6e61c51c29bd725cfc55 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 27 Oct 2025 20:31:51 +0000 Subject: [PATCH] Regenerate client from commit 3711875 of spec repo --- .generator/schemas/v2/openapi.yaml | 362 +++++++ .../security-monitoring/GetSecretsRules.java | 25 + .../ListMultipleRulesets.java | 36 + .../com/datadog/api/client/ApiClient.java | 2 + .../client/v2/api/SecurityMonitoringApi.java | 279 ++++++ .../v2/model/GetMultipleRulesetsRequest.java | 137 +++ .../model/GetMultipleRulesetsRequestData.java | 210 ++++ ...MultipleRulesetsRequestDataAttributes.java | 207 ++++ .../GetMultipleRulesetsRequestDataType.java | 59 ++ .../v2/model/GetMultipleRulesetsResponse.java | 137 +++ .../GetMultipleRulesetsResponseData.java | 210 ++++ ...ultipleRulesetsResponseDataAttributes.java | 154 +++ ...tsResponseDataAttributesRulesetsItems.java | 286 ++++++ ...sponseDataAttributesRulesetsItemsData.java | 189 ++++ ...seDataAttributesRulesetsItemsDataType.java | 64 ++ ...DataAttributesRulesetsItemsRulesItems.java | 930 ++++++++++++++++++ ...RulesetsItemsRulesItemsArgumentsItems.java | 183 ++++ ...AttributesRulesetsItemsRulesItemsData.java | 192 ++++ ...ibutesRulesetsItemsRulesItemsDataType.java | 67 ++ ...utesRulesetsItemsRulesItemsTestsItems.java | 212 ++++ .../GetMultipleRulesetsResponseDataType.java | 59 ++ .../api/client/v2/model/SecretRuleArray.java | 154 +++ .../api/client/v2/model/SecretRuleData.java | 205 ++++ .../v2/model/SecretRuleDataAttributes.java | 387 ++++++++ ...cretRuleDataAttributesMatchValidation.java | 405 ++++++++ ...hValidationInvalidHttpStatusCodeItems.java | 174 ++++ ...tchValidationValidHttpStatusCodeItems.java | 174 ++++ .../client/v2/model/SecretRuleDataType.java | 54 + .../client/v2/api/security_monitoring.feature | 19 +- .../com/datadog/api/client/v2/api/undo.json | 14 + 30 files changed, 5584 insertions(+), 2 deletions(-) create mode 100644 examples/v2/security-monitoring/GetSecretsRules.java create mode 100644 examples/v2/security-monitoring/ListMultipleRulesets.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsRequestData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsRequestDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsRequestDataType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataAttributesRulesetsItems.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataAttributesRulesetsItemsData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecretRuleArray.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecretRuleData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecretRuleDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecretRuleDataAttributesMatchValidation.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecretRuleDataAttributesMatchValidationInvalidHttpStatusCodeItems.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecretRuleDataAttributesMatchValidationValidHttpStatusCodeItems.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SecretRuleDataType.java diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 76247abeacc..2f29c0ae8f4 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -21612,6 +21612,207 @@ components: - ASSIGNEE - CASE - TEAM_OWNERS + GetMultipleRulesetsRequest: + properties: + data: + $ref: '#/components/schemas/GetMultipleRulesetsRequestData' + type: object + GetMultipleRulesetsRequestData: + properties: + attributes: + $ref: '#/components/schemas/GetMultipleRulesetsRequestDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/GetMultipleRulesetsRequestDataType' + required: + - type + type: object + GetMultipleRulesetsRequestDataAttributes: + properties: + include_testing_rules: + type: boolean + include_tests: + type: boolean + rulesets: + items: + type: string + type: array + type: object + GetMultipleRulesetsRequestDataType: + default: get_multiple_rulesets_request + description: Get multiple rulesets request resource type. + enum: + - get_multiple_rulesets_request + example: get_multiple_rulesets_request + type: string + x-enum-varnames: + - GET_MULTIPLE_RULESETS_REQUEST + GetMultipleRulesetsResponse: + properties: + data: + $ref: '#/components/schemas/GetMultipleRulesetsResponseData' + type: object + GetMultipleRulesetsResponseData: + properties: + attributes: + $ref: '#/components/schemas/GetMultipleRulesetsResponseDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/GetMultipleRulesetsResponseDataType' + required: + - type + type: object + GetMultipleRulesetsResponseDataAttributes: + properties: + rulesets: + items: + $ref: '#/components/schemas/GetMultipleRulesetsResponseDataAttributesRulesetsItems' + type: array + type: object + GetMultipleRulesetsResponseDataAttributesRulesetsItems: + properties: + data: + $ref: '#/components/schemas/GetMultipleRulesetsResponseDataAttributesRulesetsItemsData' + description: + type: string + name: + type: string + rules: + items: + $ref: '#/components/schemas/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems' + type: array + short_description: + type: string + required: + - data + type: object + GetMultipleRulesetsResponseDataAttributesRulesetsItemsData: + properties: + id: + type: string + type: + $ref: '#/components/schemas/GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataType' + required: + - type + type: object + GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataType: + default: rulesets + description: Rulesets resource type. + enum: + - rulesets + example: rulesets + type: string + x-enum-varnames: + - RULESETS + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems: + properties: + arguments: + items: + $ref: '#/components/schemas/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems' + type: array + category: + type: string + checksum: + type: string + code: + type: string + created_at: + format: date-time + type: string + created_by: + type: string + cve: + type: string + cwe: + type: string + data: + $ref: '#/components/schemas/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData' + description: + type: string + documentation_url: + type: string + entity_checked: + type: string + is_published: + type: boolean + is_testing: + type: boolean + language: + type: string + last_updated_at: + format: date-time + type: string + last_updated_by: + type: string + name: + type: string + regex: + type: string + severity: + type: string + short_description: + type: string + should_use_ai_fix: + type: boolean + tests: + items: + $ref: '#/components/schemas/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems' + type: array + tree_sitter_query: + type: string + type: + type: string + required: + - data + type: object + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems: + properties: + description: + type: string + name: + type: string + type: object + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData: + properties: + id: + type: string + type: + $ref: '#/components/schemas/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType' + required: + - type + type: object + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType: + default: rules + description: Rules resource type. + enum: + - rules + example: rules + type: string + x-enum-varnames: + - RULES + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems: + properties: + annotation_count: + format: int64 + maximum: 65535 + minimum: 0 + type: integer + code: + type: string + filename: + type: string + type: object + GetMultipleRulesetsResponseDataType: + default: get_multiple_rulesets_response + description: Get multiple rulesets response resource type. + enum: + - get_multiple_rulesets_response + example: get_multiple_rulesets_response + type: string + x-enum-varnames: + - GET_MULTIPLE_RULESETS_RESPONSE GetResourceEvaluationFiltersResponse: description: The definition of `GetResourceEvaluationFiltersResponse` object. properties: @@ -42844,6 +43045,116 @@ components: - ISSUE_ASSIGNEE - ISSUE_CASE - ISSUE_TEAM_OWNERS + SecretRuleArray: + properties: + data: + items: + $ref: '#/components/schemas/SecretRuleData' + type: array + required: + - data + type: object + SecretRuleData: + properties: + attributes: + $ref: '#/components/schemas/SecretRuleDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/SecretRuleDataType' + required: + - type + type: object + SecretRuleDataAttributes: + properties: + default_included_keywords: + items: + type: string + type: array + description: + type: string + license: + type: string + match_validation: + $ref: '#/components/schemas/SecretRuleDataAttributesMatchValidation' + name: + type: string + pattern: + type: string + priority: + type: string + sds_id: + type: string + validators: + items: + type: string + type: array + type: object + SecretRuleDataAttributesMatchValidation: + properties: + endpoint: + type: string + hosts: + items: + type: string + type: array + http_method: + type: string + invalid_http_status_code: + items: + $ref: '#/components/schemas/SecretRuleDataAttributesMatchValidationInvalidHttpStatusCodeItems' + type: array + request_headers: + additionalProperties: + type: string + type: object + timeout_seconds: + format: int64 + maximum: 1.8446744073709552e+19 + minimum: 0 + type: integer + type: + type: string + valid_http_status_code: + items: + $ref: '#/components/schemas/SecretRuleDataAttributesMatchValidationValidHttpStatusCodeItems' + type: array + type: object + SecretRuleDataAttributesMatchValidationInvalidHttpStatusCodeItems: + properties: + end: + format: int64 + maximum: 1.8446744073709552e+19 + minimum: 0 + type: integer + start: + format: int64 + maximum: 1.8446744073709552e+19 + minimum: 0 + type: integer + type: object + SecretRuleDataAttributesMatchValidationValidHttpStatusCodeItems: + properties: + end: + format: int64 + maximum: 1.8446744073709552e+19 + minimum: 0 + type: integer + start: + format: int64 + maximum: 1.8446744073709552e+19 + minimum: 0 + type: integer + type: object + SecretRuleDataType: + default: secret_rule + description: Secret rule resource type. + enum: + - secret_rule + example: secret_rule + type: string + x-enum-varnames: + - SECRET_RULE SecurityFilter: description: The security filter's properties. properties: @@ -77328,6 +77639,57 @@ paths: tags: - Static Analysis x-unstable: '**Note**: This endpoint may be subject to changes.' + /api/v2/static-analysis/rulesets: + post: + description: Get rules for multiple rulesets in batch. + operationId: ListMultipleRulesets + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GetMultipleRulesetsRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GetMultipleRulesetsResponse' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - code_analysis_read + summary: Ruleset get multiple + tags: + - Security Monitoring + x-unstable: '**Note**: This endpoint may be subject to changes.' + /api/v2/static-analysis/secrets/rules: + get: + description: Returns list of Secrets rules with ID, Pattern, Description, Priority, + and SDS ID + operationId: GetSecretsRules + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SecretRuleArray' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - code_analysis_read + summary: Returns list of Secrets rules + tags: + - Security Monitoring + x-unstable: '**Note**: This endpoint may be subject to changes.' /api/v2/synthetics/settings/on_demand_concurrency_cap: get: description: Get the on-demand concurrency cap. diff --git a/examples/v2/security-monitoring/GetSecretsRules.java b/examples/v2/security-monitoring/GetSecretsRules.java new file mode 100644 index 00000000000..9a2dda746b3 --- /dev/null +++ b/examples/v2/security-monitoring/GetSecretsRules.java @@ -0,0 +1,25 @@ +// Returns list of Secrets rules 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.SecretRuleArray; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getSecretsRules", true); + SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); + + try { + SecretRuleArray result = apiInstance.getSecretsRules(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SecurityMonitoringApi#getSecretsRules"); + 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/ListMultipleRulesets.java b/examples/v2/security-monitoring/ListMultipleRulesets.java new file mode 100644 index 00000000000..04972f5ea22 --- /dev/null +++ b/examples/v2/security-monitoring/ListMultipleRulesets.java @@ -0,0 +1,36 @@ +// Ruleset get multiple 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.GetMultipleRulesetsRequest; +import com.datadog.api.client.v2.model.GetMultipleRulesetsRequestData; +import com.datadog.api.client.v2.model.GetMultipleRulesetsRequestDataAttributes; +import com.datadog.api.client.v2.model.GetMultipleRulesetsRequestDataType; +import com.datadog.api.client.v2.model.GetMultipleRulesetsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listMultipleRulesets", true); + SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); + + GetMultipleRulesetsRequest body = + new GetMultipleRulesetsRequest() + .data( + new GetMultipleRulesetsRequestData() + .attributes(new GetMultipleRulesetsRequestDataAttributes()) + .type(GetMultipleRulesetsRequestDataType.GET_MULTIPLE_RULESETS_REQUEST)); + + try { + GetMultipleRulesetsResponse result = apiInstance.listMultipleRulesets(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SecurityMonitoringApi#listMultipleRulesets"); + 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 45f3ef73e30..790a403d960 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -702,11 +702,13 @@ public class ApiClient { put("v2.getFinding", false); put("v2.getRuleVersionHistory", false); put("v2.getSBOM", false); + put("v2.getSecretsRules", false); put("v2.getSecurityMonitoringHistsignal", false); put("v2.getSecurityMonitoringHistsignalsByJobId", false); put("v2.getThreatHuntingJob", false); put("v2.listAssetsSBOMs", false); put("v2.listFindings", false); + put("v2.listMultipleRulesets", false); put("v2.listScannedAssetsMetadata", false); put("v2.listSecurityMonitoringHistsignals", false); put("v2.listThreatHuntingJobs", 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 505dce2ee7e..b0d0c42beda 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 @@ -20,6 +20,8 @@ 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.GetMultipleRulesetsRequest; +import com.datadog.api.client.v2.model.GetMultipleRulesetsResponse; import com.datadog.api.client.v2.model.GetResourceEvaluationFiltersResponse; import com.datadog.api.client.v2.model.GetRuleVersionHistoryResponse; import com.datadog.api.client.v2.model.GetSBOMResponse; @@ -35,6 +37,7 @@ import com.datadog.api.client.v2.model.SBOMComponentLicenseType; import com.datadog.api.client.v2.model.SBOMFormat; import com.datadog.api.client.v2.model.ScannedAssetsMetadata; +import com.datadog.api.client.v2.model.SecretRuleArray; import com.datadog.api.client.v2.model.SecurityFilterCreateRequest; import com.datadog.api.client.v2.model.SecurityFilterResponse; import com.datadog.api.client.v2.model.SecurityFilterUpdateRequest; @@ -4137,6 +4140,131 @@ public CompletableFuture> getSBOMWithHttpInfoAsync( new GenericType() {}); } + /** + * Returns list of Secrets rules. + * + *

See {@link #getSecretsRulesWithHttpInfo}. + * + * @return SecretRuleArray + * @throws ApiException if fails to make API call + */ + public SecretRuleArray getSecretsRules() throws ApiException { + return getSecretsRulesWithHttpInfo().getData(); + } + + /** + * Returns list of Secrets rules. + * + *

See {@link #getSecretsRulesWithHttpInfoAsync}. + * + * @return CompletableFuture<SecretRuleArray> + */ + public CompletableFuture getSecretsRulesAsync() { + return getSecretsRulesWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Returns list of Secrets rules with ID, Pattern, Description, Priority, and SDS ID + * + * @return ApiResponse<SecretRuleArray> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
+ */ + public ApiResponse getSecretsRulesWithHttpInfo() throws ApiException { + // Check if unstable operation is enabled + String operationId = "getSecretsRules"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/static-analysis/secrets/rules"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.getSecretsRules", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Returns list of Secrets rules. + * + *

See {@link #getSecretsRulesWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<SecretRuleArray>> + */ + public CompletableFuture> getSecretsRulesWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "getSecretsRules"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/static-analysis/secrets/rules"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.getSecretsRules", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Get a security filter. * @@ -6997,6 +7125,157 @@ public CompletableFuture> listFindingsWithHttp new GenericType() {}); } + /** + * Ruleset get multiple. + * + *

See {@link #listMultipleRulesetsWithHttpInfo}. + * + * @param body (required) + * @return GetMultipleRulesetsResponse + * @throws ApiException if fails to make API call + */ + public GetMultipleRulesetsResponse listMultipleRulesets(GetMultipleRulesetsRequest body) + throws ApiException { + return listMultipleRulesetsWithHttpInfo(body).getData(); + } + + /** + * Ruleset get multiple. + * + *

See {@link #listMultipleRulesetsWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<GetMultipleRulesetsResponse> + */ + public CompletableFuture listMultipleRulesetsAsync( + GetMultipleRulesetsRequest body) { + return listMultipleRulesetsWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get rules for multiple rulesets in batch. + * + * @param body (required) + * @return ApiResponse<GetMultipleRulesetsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
+ */ + public ApiResponse listMultipleRulesetsWithHttpInfo( + GetMultipleRulesetsRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listMultipleRulesets"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling listMultipleRulesets"); + } + // create path and map variables + String localVarPath = "/api/v2/static-analysis/rulesets"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.listMultipleRulesets", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Ruleset get multiple. + * + *

See {@link #listMultipleRulesetsWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<GetMultipleRulesetsResponse>> + */ + public CompletableFuture> + listMultipleRulesetsWithHttpInfoAsync(GetMultipleRulesetsRequest body) { + // Check if unstable operation is enabled + String operationId = "listMultipleRulesets"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + 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 listMultipleRulesets")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/static-analysis/rulesets"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.listMultipleRulesets", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } 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() {}); + } + /** Manage optional parameters to listScannedAssetsMetadata. */ public static class ListScannedAssetsMetadataOptionalParameters { private String pageToken; diff --git a/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsRequest.java b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsRequest.java new file mode 100644 index 00000000000..f260241a8ca --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsRequest.java @@ -0,0 +1,137 @@ +/* + * 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; + +/** */ +@JsonPropertyOrder({GetMultipleRulesetsRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GetMultipleRulesetsRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private GetMultipleRulesetsRequestData data; + + public GetMultipleRulesetsRequest data(GetMultipleRulesetsRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public GetMultipleRulesetsRequestData getData() { + return data; + } + + public void setData(GetMultipleRulesetsRequestData 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 GetMultipleRulesetsRequest + */ + @JsonAnySetter + public GetMultipleRulesetsRequest 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 GetMultipleRulesetsRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMultipleRulesetsRequest getMultipleRulesetsRequest = (GetMultipleRulesetsRequest) o; + return Objects.equals(this.data, getMultipleRulesetsRequest.data) + && Objects.equals( + this.additionalProperties, getMultipleRulesetsRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetMultipleRulesetsRequest {\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/GetMultipleRulesetsRequestData.java b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsRequestData.java new file mode 100644 index 00000000000..3ccd1f9c26d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsRequestData.java @@ -0,0 +1,210 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + GetMultipleRulesetsRequestData.JSON_PROPERTY_ATTRIBUTES, + GetMultipleRulesetsRequestData.JSON_PROPERTY_ID, + GetMultipleRulesetsRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GetMultipleRulesetsRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private GetMultipleRulesetsRequestDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private GetMultipleRulesetsRequestDataType type = + GetMultipleRulesetsRequestDataType.GET_MULTIPLE_RULESETS_REQUEST; + + public GetMultipleRulesetsRequestData() {} + + @JsonCreator + public GetMultipleRulesetsRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + GetMultipleRulesetsRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public GetMultipleRulesetsRequestData attributes( + GetMultipleRulesetsRequestDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public GetMultipleRulesetsRequestDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(GetMultipleRulesetsRequestDataAttributes attributes) { + this.attributes = attributes; + } + + public GetMultipleRulesetsRequestData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @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 GetMultipleRulesetsRequestData type(GetMultipleRulesetsRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Get multiple rulesets request resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GetMultipleRulesetsRequestDataType getType() { + return type; + } + + public void setType(GetMultipleRulesetsRequestDataType 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 GetMultipleRulesetsRequestData + */ + @JsonAnySetter + public GetMultipleRulesetsRequestData 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 GetMultipleRulesetsRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMultipleRulesetsRequestData getMultipleRulesetsRequestData = + (GetMultipleRulesetsRequestData) o; + return Objects.equals(this.attributes, getMultipleRulesetsRequestData.attributes) + && Objects.equals(this.id, getMultipleRulesetsRequestData.id) + && Objects.equals(this.type, getMultipleRulesetsRequestData.type) + && Objects.equals( + this.additionalProperties, getMultipleRulesetsRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetMultipleRulesetsRequestData {\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/GetMultipleRulesetsRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsRequestDataAttributes.java new file mode 100644 index 00000000000..178be030b37 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsRequestDataAttributes.java @@ -0,0 +1,207 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + GetMultipleRulesetsRequestDataAttributes.JSON_PROPERTY_INCLUDE_TESTING_RULES, + GetMultipleRulesetsRequestDataAttributes.JSON_PROPERTY_INCLUDE_TESTS, + GetMultipleRulesetsRequestDataAttributes.JSON_PROPERTY_RULESETS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GetMultipleRulesetsRequestDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INCLUDE_TESTING_RULES = "include_testing_rules"; + private Boolean includeTestingRules; + + public static final String JSON_PROPERTY_INCLUDE_TESTS = "include_tests"; + private Boolean includeTests; + + public static final String JSON_PROPERTY_RULESETS = "rulesets"; + private List rulesets = null; + + public GetMultipleRulesetsRequestDataAttributes includeTestingRules(Boolean includeTestingRules) { + this.includeTestingRules = includeTestingRules; + return this; + } + + /** + * GetincludeTestingRules + * + * @return includeTestingRules + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDE_TESTING_RULES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIncludeTestingRules() { + return includeTestingRules; + } + + public void setIncludeTestingRules(Boolean includeTestingRules) { + this.includeTestingRules = includeTestingRules; + } + + public GetMultipleRulesetsRequestDataAttributes includeTests(Boolean includeTests) { + this.includeTests = includeTests; + return this; + } + + /** + * GetincludeTests + * + * @return includeTests + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDE_TESTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIncludeTests() { + return includeTests; + } + + public void setIncludeTests(Boolean includeTests) { + this.includeTests = includeTests; + } + + public GetMultipleRulesetsRequestDataAttributes rulesets(List rulesets) { + this.rulesets = rulesets; + return this; + } + + public GetMultipleRulesetsRequestDataAttributes addRulesetsItem(String rulesetsItem) { + if (this.rulesets == null) { + this.rulesets = new ArrayList<>(); + } + this.rulesets.add(rulesetsItem); + return this; + } + + /** + * Getrulesets + * + * @return rulesets + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RULESETS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getRulesets() { + return rulesets; + } + + public void setRulesets(List rulesets) { + this.rulesets = rulesets; + } + + /** + * 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 GetMultipleRulesetsRequestDataAttributes + */ + @JsonAnySetter + public GetMultipleRulesetsRequestDataAttributes 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 GetMultipleRulesetsRequestDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMultipleRulesetsRequestDataAttributes getMultipleRulesetsRequestDataAttributes = + (GetMultipleRulesetsRequestDataAttributes) o; + return Objects.equals( + this.includeTestingRules, getMultipleRulesetsRequestDataAttributes.includeTestingRules) + && Objects.equals(this.includeTests, getMultipleRulesetsRequestDataAttributes.includeTests) + && Objects.equals(this.rulesets, getMultipleRulesetsRequestDataAttributes.rulesets) + && Objects.equals( + this.additionalProperties, + getMultipleRulesetsRequestDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(includeTestingRules, includeTests, rulesets, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetMultipleRulesetsRequestDataAttributes {\n"); + sb.append(" includeTestingRules: ") + .append(toIndentedString(includeTestingRules)) + .append("\n"); + sb.append(" includeTests: ").append(toIndentedString(includeTests)).append("\n"); + sb.append(" rulesets: ").append(toIndentedString(rulesets)).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/GetMultipleRulesetsRequestDataType.java b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsRequestDataType.java new file mode 100644 index 00000000000..0e422484dfa --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsRequestDataType.java @@ -0,0 +1,59 @@ +/* + * 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; + +/** Get multiple rulesets request resource type. */ +@JsonSerialize( + using = GetMultipleRulesetsRequestDataType.GetMultipleRulesetsRequestDataTypeSerializer.class) +public class GetMultipleRulesetsRequestDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("get_multiple_rulesets_request")); + + public static final GetMultipleRulesetsRequestDataType GET_MULTIPLE_RULESETS_REQUEST = + new GetMultipleRulesetsRequestDataType("get_multiple_rulesets_request"); + + GetMultipleRulesetsRequestDataType(String value) { + super(value, allowedValues); + } + + public static class GetMultipleRulesetsRequestDataTypeSerializer + extends StdSerializer { + public GetMultipleRulesetsRequestDataTypeSerializer( + Class t) { + super(t); + } + + public GetMultipleRulesetsRequestDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + GetMultipleRulesetsRequestDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static GetMultipleRulesetsRequestDataType fromValue(String value) { + return new GetMultipleRulesetsRequestDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponse.java b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponse.java new file mode 100644 index 00000000000..d83cd6bc160 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponse.java @@ -0,0 +1,137 @@ +/* + * 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; + +/** */ +@JsonPropertyOrder({GetMultipleRulesetsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GetMultipleRulesetsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private GetMultipleRulesetsResponseData data; + + public GetMultipleRulesetsResponse data(GetMultipleRulesetsResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public GetMultipleRulesetsResponseData getData() { + return data; + } + + public void setData(GetMultipleRulesetsResponseData 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 GetMultipleRulesetsResponse + */ + @JsonAnySetter + public GetMultipleRulesetsResponse 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 GetMultipleRulesetsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMultipleRulesetsResponse getMultipleRulesetsResponse = (GetMultipleRulesetsResponse) o; + return Objects.equals(this.data, getMultipleRulesetsResponse.data) + && Objects.equals( + this.additionalProperties, getMultipleRulesetsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetMultipleRulesetsResponse {\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/GetMultipleRulesetsResponseData.java b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseData.java new file mode 100644 index 00000000000..f82b268f711 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseData.java @@ -0,0 +1,210 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + GetMultipleRulesetsResponseData.JSON_PROPERTY_ATTRIBUTES, + GetMultipleRulesetsResponseData.JSON_PROPERTY_ID, + GetMultipleRulesetsResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GetMultipleRulesetsResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private GetMultipleRulesetsResponseDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private GetMultipleRulesetsResponseDataType type = + GetMultipleRulesetsResponseDataType.GET_MULTIPLE_RULESETS_RESPONSE; + + public GetMultipleRulesetsResponseData() {} + + @JsonCreator + public GetMultipleRulesetsResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + GetMultipleRulesetsResponseDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public GetMultipleRulesetsResponseData attributes( + GetMultipleRulesetsResponseDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public GetMultipleRulesetsResponseDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(GetMultipleRulesetsResponseDataAttributes attributes) { + this.attributes = attributes; + } + + public GetMultipleRulesetsResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @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 GetMultipleRulesetsResponseData type(GetMultipleRulesetsResponseDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Get multiple rulesets response resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GetMultipleRulesetsResponseDataType getType() { + return type; + } + + public void setType(GetMultipleRulesetsResponseDataType 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 GetMultipleRulesetsResponseData + */ + @JsonAnySetter + public GetMultipleRulesetsResponseData 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 GetMultipleRulesetsResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMultipleRulesetsResponseData getMultipleRulesetsResponseData = + (GetMultipleRulesetsResponseData) o; + return Objects.equals(this.attributes, getMultipleRulesetsResponseData.attributes) + && Objects.equals(this.id, getMultipleRulesetsResponseData.id) + && Objects.equals(this.type, getMultipleRulesetsResponseData.type) + && Objects.equals( + this.additionalProperties, getMultipleRulesetsResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetMultipleRulesetsResponseData {\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/GetMultipleRulesetsResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataAttributes.java new file mode 100644 index 00000000000..603c4724a0c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataAttributes.java @@ -0,0 +1,154 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({GetMultipleRulesetsResponseDataAttributes.JSON_PROPERTY_RULESETS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GetMultipleRulesetsResponseDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_RULESETS = "rulesets"; + private List rulesets = null; + + public GetMultipleRulesetsResponseDataAttributes rulesets( + List rulesets) { + this.rulesets = rulesets; + for (GetMultipleRulesetsResponseDataAttributesRulesetsItems item : rulesets) { + this.unparsed |= item.unparsed; + } + return this; + } + + public GetMultipleRulesetsResponseDataAttributes addRulesetsItem( + GetMultipleRulesetsResponseDataAttributesRulesetsItems rulesetsItem) { + if (this.rulesets == null) { + this.rulesets = new ArrayList<>(); + } + this.rulesets.add(rulesetsItem); + this.unparsed |= rulesetsItem.unparsed; + return this; + } + + /** + * Getrulesets + * + * @return rulesets + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RULESETS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getRulesets() { + return rulesets; + } + + public void setRulesets(List rulesets) { + this.rulesets = rulesets; + } + + /** + * 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 GetMultipleRulesetsResponseDataAttributes + */ + @JsonAnySetter + public GetMultipleRulesetsResponseDataAttributes 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 GetMultipleRulesetsResponseDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMultipleRulesetsResponseDataAttributes getMultipleRulesetsResponseDataAttributes = + (GetMultipleRulesetsResponseDataAttributes) o; + return Objects.equals(this.rulesets, getMultipleRulesetsResponseDataAttributes.rulesets) + && Objects.equals( + this.additionalProperties, + getMultipleRulesetsResponseDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(rulesets, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetMultipleRulesetsResponseDataAttributes {\n"); + sb.append(" rulesets: ").append(toIndentedString(rulesets)).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/GetMultipleRulesetsResponseDataAttributesRulesetsItems.java b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataAttributesRulesetsItems.java new file mode 100644 index 00000000000..81acc1269a4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataAttributesRulesetsItems.java @@ -0,0 +1,286 @@ +/* + * 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; + +/** */ +@JsonPropertyOrder({ + GetMultipleRulesetsResponseDataAttributesRulesetsItems.JSON_PROPERTY_DATA, + GetMultipleRulesetsResponseDataAttributesRulesetsItems.JSON_PROPERTY_DESCRIPTION, + GetMultipleRulesetsResponseDataAttributesRulesetsItems.JSON_PROPERTY_NAME, + GetMultipleRulesetsResponseDataAttributesRulesetsItems.JSON_PROPERTY_RULES, + GetMultipleRulesetsResponseDataAttributesRulesetsItems.JSON_PROPERTY_SHORT_DESCRIPTION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GetMultipleRulesetsResponseDataAttributesRulesetsItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private GetMultipleRulesetsResponseDataAttributesRulesetsItemsData data; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_RULES = "rules"; + private List rules = null; + + public static final String JSON_PROPERTY_SHORT_DESCRIPTION = "short_description"; + private String shortDescription; + + public GetMultipleRulesetsResponseDataAttributesRulesetsItems() {} + + @JsonCreator + public GetMultipleRulesetsResponseDataAttributesRulesetsItems( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + GetMultipleRulesetsResponseDataAttributesRulesetsItemsData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItems data( + GetMultipleRulesetsResponseDataAttributesRulesetsItemsData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsData getData() { + return data; + } + + public void setData(GetMultipleRulesetsResponseDataAttributesRulesetsItemsData data) { + this.data = data; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItems description(String description) { + this.description = description; + return this; + } + + /** + * Getdescription + * + * @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 GetMultipleRulesetsResponseDataAttributesRulesetsItems name(String name) { + this.name = name; + return this; + } + + /** + * Getname + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItems rules( + List rules) { + this.rules = rules; + for (GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems item : rules) { + this.unparsed |= item.unparsed; + } + return this; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItems addRulesItem( + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems rulesItem) { + if (this.rules == null) { + this.rules = new ArrayList<>(); + } + this.rules.add(rulesItem); + this.unparsed |= rulesItem.unparsed; + return this; + } + + /** + * Getrules + * + * @return rules + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RULES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getRules() { + return rules; + } + + public void setRules( + List rules) { + this.rules = rules; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItems shortDescription( + String shortDescription) { + this.shortDescription = shortDescription; + return this; + } + + /** + * GetshortDescription + * + * @return shortDescription + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHORT_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getShortDescription() { + return shortDescription; + } + + public void setShortDescription(String shortDescription) { + this.shortDescription = shortDescription; + } + + /** + * 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 GetMultipleRulesetsResponseDataAttributesRulesetsItems + */ + @JsonAnySetter + public GetMultipleRulesetsResponseDataAttributesRulesetsItems 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 GetMultipleRulesetsResponseDataAttributesRulesetsItems object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMultipleRulesetsResponseDataAttributesRulesetsItems + getMultipleRulesetsResponseDataAttributesRulesetsItems = + (GetMultipleRulesetsResponseDataAttributesRulesetsItems) o; + return Objects.equals(this.data, getMultipleRulesetsResponseDataAttributesRulesetsItems.data) + && Objects.equals( + this.description, getMultipleRulesetsResponseDataAttributesRulesetsItems.description) + && Objects.equals(this.name, getMultipleRulesetsResponseDataAttributesRulesetsItems.name) + && Objects.equals(this.rules, getMultipleRulesetsResponseDataAttributesRulesetsItems.rules) + && Objects.equals( + this.shortDescription, + getMultipleRulesetsResponseDataAttributesRulesetsItems.shortDescription) + && Objects.equals( + this.additionalProperties, + getMultipleRulesetsResponseDataAttributesRulesetsItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, description, name, rules, shortDescription, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetMultipleRulesetsResponseDataAttributesRulesetsItems {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" rules: ").append(toIndentedString(rules)).append("\n"); + sb.append(" shortDescription: ").append(toIndentedString(shortDescription)).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/GetMultipleRulesetsResponseDataAttributesRulesetsItemsData.java b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataAttributesRulesetsItemsData.java new file mode 100644 index 00000000000..78849c2c8f6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataAttributesRulesetsItemsData.java @@ -0,0 +1,189 @@ +/* + * 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; + +/** */ +@JsonPropertyOrder({ + GetMultipleRulesetsResponseDataAttributesRulesetsItemsData.JSON_PROPERTY_ID, + GetMultipleRulesetsResponseDataAttributesRulesetsItemsData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GetMultipleRulesetsResponseDataAttributesRulesetsItemsData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataType type = + GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataType.RULESETS; + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsData() {} + + @JsonCreator + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @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 GetMultipleRulesetsResponseDataAttributesRulesetsItemsData type( + GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Rulesets resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataType getType() { + return type; + } + + public void setType(GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataType 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 GetMultipleRulesetsResponseDataAttributesRulesetsItemsData + */ + @JsonAnySetter + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsData 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 GetMultipleRulesetsResponseDataAttributesRulesetsItemsData object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMultipleRulesetsResponseDataAttributesRulesetsItemsData + getMultipleRulesetsResponseDataAttributesRulesetsItemsData = + (GetMultipleRulesetsResponseDataAttributesRulesetsItemsData) o; + return Objects.equals(this.id, getMultipleRulesetsResponseDataAttributesRulesetsItemsData.id) + && Objects.equals( + this.type, getMultipleRulesetsResponseDataAttributesRulesetsItemsData.type) + && Objects.equals( + this.additionalProperties, + getMultipleRulesetsResponseDataAttributesRulesetsItemsData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetMultipleRulesetsResponseDataAttributesRulesetsItemsData {\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/GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataType.java b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataType.java new file mode 100644 index 00000000000..c9c38bb7f65 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataType.java @@ -0,0 +1,64 @@ +/* + * 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; + +/** Rulesets resource type. */ +@JsonSerialize( + using = + GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataType + .GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataTypeSerializer.class) +public class GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataType + extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("rulesets")); + + public static final GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataType RULESETS = + new GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataType("rulesets"); + + GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataType(String value) { + super(value, allowedValues); + } + + public static class GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataTypeSerializer + extends StdSerializer { + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataTypeSerializer( + Class t) { + super(t); + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataType fromValue( + String value) { + return new GetMultipleRulesetsResponseDataAttributesRulesetsItemsDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.java b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.java new file mode 100644 index 00000000000..56744e736bc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.java @@ -0,0 +1,930 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.JSON_PROPERTY_ARGUMENTS, + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.JSON_PROPERTY_CATEGORY, + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.JSON_PROPERTY_CHECKSUM, + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.JSON_PROPERTY_CODE, + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.JSON_PROPERTY_CREATED_AT, + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.JSON_PROPERTY_CREATED_BY, + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.JSON_PROPERTY_CVE, + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.JSON_PROPERTY_CWE, + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.JSON_PROPERTY_DATA, + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.JSON_PROPERTY_DESCRIPTION, + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.JSON_PROPERTY_DOCUMENTATION_URL, + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.JSON_PROPERTY_ENTITY_CHECKED, + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.JSON_PROPERTY_IS_PUBLISHED, + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.JSON_PROPERTY_IS_TESTING, + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.JSON_PROPERTY_LANGUAGE, + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.JSON_PROPERTY_LAST_UPDATED_AT, + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.JSON_PROPERTY_LAST_UPDATED_BY, + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.JSON_PROPERTY_NAME, + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.JSON_PROPERTY_REGEX, + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.JSON_PROPERTY_SEVERITY, + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.JSON_PROPERTY_SHORT_DESCRIPTION, + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.JSON_PROPERTY_SHOULD_USE_AI_FIX, + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.JSON_PROPERTY_TESTS, + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.JSON_PROPERTY_TREE_SITTER_QUERY, + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ARGUMENTS = "arguments"; + private List + arguments = null; + + public static final String JSON_PROPERTY_CATEGORY = "category"; + private String category; + + public static final String JSON_PROPERTY_CHECKSUM = "checksum"; + private String checksum; + + public static final String JSON_PROPERTY_CODE = "code"; + private String code; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_CREATED_BY = "created_by"; + private String createdBy; + + public static final String JSON_PROPERTY_CVE = "cve"; + private String cve; + + public static final String JSON_PROPERTY_CWE = "cwe"; + private String cwe; + + public static final String JSON_PROPERTY_DATA = "data"; + private GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData data; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_DOCUMENTATION_URL = "documentation_url"; + private String documentationUrl; + + public static final String JSON_PROPERTY_ENTITY_CHECKED = "entity_checked"; + private String entityChecked; + + public static final String JSON_PROPERTY_IS_PUBLISHED = "is_published"; + private Boolean isPublished; + + public static final String JSON_PROPERTY_IS_TESTING = "is_testing"; + private Boolean isTesting; + + public static final String JSON_PROPERTY_LANGUAGE = "language"; + private String language; + + public static final String JSON_PROPERTY_LAST_UPDATED_AT = "last_updated_at"; + private OffsetDateTime lastUpdatedAt; + + public static final String JSON_PROPERTY_LAST_UPDATED_BY = "last_updated_by"; + private String lastUpdatedBy; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_REGEX = "regex"; + private String regex; + + public static final String JSON_PROPERTY_SEVERITY = "severity"; + private String severity; + + public static final String JSON_PROPERTY_SHORT_DESCRIPTION = "short_description"; + private String shortDescription; + + public static final String JSON_PROPERTY_SHOULD_USE_AI_FIX = "should_use_ai_fix"; + private Boolean shouldUseAiFix; + + public static final String JSON_PROPERTY_TESTS = "tests"; + private List tests = + null; + + public static final String JSON_PROPERTY_TREE_SITTER_QUERY = "tree_sitter_query"; + private String treeSitterQuery; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems() {} + + @JsonCreator + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems arguments( + List + arguments) { + this.arguments = arguments; + for (GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems item : + arguments) { + this.unparsed |= item.unparsed; + } + return this; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems addArgumentsItem( + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems + argumentsItem) { + if (this.arguments == null) { + this.arguments = new ArrayList<>(); + } + this.arguments.add(argumentsItem); + this.unparsed |= argumentsItem.unparsed; + return this; + } + + /** + * Getarguments + * + * @return arguments + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARGUMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List + getArguments() { + return arguments; + } + + public void setArguments( + List + arguments) { + this.arguments = arguments; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems category( + String category) { + this.category = category; + return this; + } + + /** + * Getcategory + * + * @return category + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCategory() { + return category; + } + + public void setCategory(String category) { + this.category = category; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems checksum( + String checksum) { + this.checksum = checksum; + return this; + } + + /** + * Getchecksum + * + * @return checksum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHECKSUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getChecksum() { + return checksum; + } + + public void setChecksum(String checksum) { + this.checksum = checksum; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems code(String code) { + this.code = code; + return this; + } + + /** + * Getcode + * + * @return code + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems createdAt( + OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * GetcreatedAt + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems createdBy( + String createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + * GetcreatedBy + * + * @return createdBy + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems cve(String cve) { + this.cve = cve; + return this; + } + + /** + * Getcve + * + * @return cve + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCve() { + return cve; + } + + public void setCve(String cve) { + this.cve = cve; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems cwe(String cwe) { + this.cwe = cwe; + return this; + } + + /** + * Getcwe + * + * @return cwe + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CWE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCwe() { + return cwe; + } + + public void setCwe(String cwe) { + this.cwe = cwe; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems data( + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData getData() { + return data; + } + + public void setData(GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData data) { + this.data = data; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems description( + String description) { + this.description = description; + return this; + } + + /** + * Getdescription + * + * @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 GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems documentationUrl( + String documentationUrl) { + this.documentationUrl = documentationUrl; + return this; + } + + /** + * GetdocumentationUrl + * + * @return documentationUrl + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DOCUMENTATION_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDocumentationUrl() { + return documentationUrl; + } + + public void setDocumentationUrl(String documentationUrl) { + this.documentationUrl = documentationUrl; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems entityChecked( + String entityChecked) { + this.entityChecked = entityChecked; + return this; + } + + /** + * GetentityChecked + * + * @return entityChecked + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENTITY_CHECKED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEntityChecked() { + return entityChecked; + } + + public void setEntityChecked(String entityChecked) { + this.entityChecked = entityChecked; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems isPublished( + Boolean isPublished) { + this.isPublished = isPublished; + return this; + } + + /** + * GetisPublished + * + * @return isPublished + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_PUBLISHED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsPublished() { + return isPublished; + } + + public void setIsPublished(Boolean isPublished) { + this.isPublished = isPublished; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems isTesting( + Boolean isTesting) { + this.isTesting = isTesting; + return this; + } + + /** + * GetisTesting + * + * @return isTesting + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_TESTING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsTesting() { + return isTesting; + } + + public void setIsTesting(Boolean isTesting) { + this.isTesting = isTesting; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems language( + String language) { + this.language = language; + return this; + } + + /** + * Getlanguage + * + * @return language + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LANGUAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLanguage() { + return language; + } + + public void setLanguage(String language) { + this.language = language; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems lastUpdatedAt( + OffsetDateTime lastUpdatedAt) { + this.lastUpdatedAt = lastUpdatedAt; + return this; + } + + /** + * GetlastUpdatedAt + * + * @return lastUpdatedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getLastUpdatedAt() { + return lastUpdatedAt; + } + + public void setLastUpdatedAt(OffsetDateTime lastUpdatedAt) { + this.lastUpdatedAt = lastUpdatedAt; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems lastUpdatedBy( + String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + return this; + } + + /** + * GetlastUpdatedBy + * + * @return lastUpdatedBy + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_UPDATED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems name(String name) { + this.name = name; + return this; + } + + /** + * Getname + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems regex(String regex) { + this.regex = regex; + return this; + } + + /** + * Getregex + * + * @return regex + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REGEX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRegex() { + return regex; + } + + public void setRegex(String regex) { + this.regex = regex; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems severity( + String severity) { + this.severity = severity; + return this; + } + + /** + * Getseverity + * + * @return severity + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SEVERITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSeverity() { + return severity; + } + + public void setSeverity(String severity) { + this.severity = severity; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems shortDescription( + String shortDescription) { + this.shortDescription = shortDescription; + return this; + } + + /** + * GetshortDescription + * + * @return shortDescription + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHORT_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getShortDescription() { + return shortDescription; + } + + public void setShortDescription(String shortDescription) { + this.shortDescription = shortDescription; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems shouldUseAiFix( + Boolean shouldUseAiFix) { + this.shouldUseAiFix = shouldUseAiFix; + return this; + } + + /** + * GetshouldUseAiFix + * + * @return shouldUseAiFix + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOULD_USE_AI_FIX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShouldUseAiFix() { + return shouldUseAiFix; + } + + public void setShouldUseAiFix(Boolean shouldUseAiFix) { + this.shouldUseAiFix = shouldUseAiFix; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems tests( + List tests) { + this.tests = tests; + for (GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems item : tests) { + this.unparsed |= item.unparsed; + } + return this; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems addTestsItem( + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems testsItem) { + if (this.tests == null) { + this.tests = new ArrayList<>(); + } + this.tests.add(testsItem); + this.unparsed |= testsItem.unparsed; + return this; + } + + /** + * Gettests + * + * @return tests + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TESTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List + getTests() { + return tests; + } + + public void setTests( + List tests) { + this.tests = tests; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems treeSitterQuery( + String treeSitterQuery) { + this.treeSitterQuery = treeSitterQuery; + return this; + } + + /** + * GettreeSitterQuery + * + * @return treeSitterQuery + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TREE_SITTER_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTreeSitterQuery() { + return treeSitterQuery; + } + + public void setTreeSitterQuery(String treeSitterQuery) { + this.treeSitterQuery = treeSitterQuery; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems type(String type) { + this.type = type; + return this; + } + + /** + * Gettype + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } + + public void setType(String type) { + 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 GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems + */ + @JsonAnySetter + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems 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 GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems + getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems = + (GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems) o; + return Objects.equals( + this.arguments, + getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.arguments) + && Objects.equals( + this.category, + getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.category) + && Objects.equals( + this.checksum, + getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.checksum) + && Objects.equals( + this.code, getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.code) + && Objects.equals( + this.createdAt, + getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.createdAt) + && Objects.equals( + this.createdBy, + getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.createdBy) + && Objects.equals( + this.cve, getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.cve) + && Objects.equals( + this.cwe, getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.cwe) + && Objects.equals( + this.data, getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.data) + && Objects.equals( + this.description, + getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.description) + && Objects.equals( + this.documentationUrl, + getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.documentationUrl) + && Objects.equals( + this.entityChecked, + getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.entityChecked) + && Objects.equals( + this.isPublished, + getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.isPublished) + && Objects.equals( + this.isTesting, + getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.isTesting) + && Objects.equals( + this.language, + getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.language) + && Objects.equals( + this.lastUpdatedAt, + getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.lastUpdatedAt) + && Objects.equals( + this.lastUpdatedBy, + getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.lastUpdatedBy) + && Objects.equals( + this.name, getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.name) + && Objects.equals( + this.regex, getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.regex) + && Objects.equals( + this.severity, + getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.severity) + && Objects.equals( + this.shortDescription, + getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.shortDescription) + && Objects.equals( + this.shouldUseAiFix, + getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.shouldUseAiFix) + && Objects.equals( + this.tests, getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.tests) + && Objects.equals( + this.treeSitterQuery, + getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.treeSitterQuery) + && Objects.equals( + this.type, getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.type) + && Objects.equals( + this.additionalProperties, + getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + arguments, + category, + checksum, + code, + createdAt, + createdBy, + cve, + cwe, + data, + description, + documentationUrl, + entityChecked, + isPublished, + isTesting, + language, + lastUpdatedAt, + lastUpdatedBy, + name, + regex, + severity, + shortDescription, + shouldUseAiFix, + tests, + treeSitterQuery, + type, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItems {\n"); + sb.append(" arguments: ").append(toIndentedString(arguments)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" checksum: ").append(toIndentedString(checksum)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" cve: ").append(toIndentedString(cve)).append("\n"); + sb.append(" cwe: ").append(toIndentedString(cwe)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" documentationUrl: ").append(toIndentedString(documentationUrl)).append("\n"); + sb.append(" entityChecked: ").append(toIndentedString(entityChecked)).append("\n"); + sb.append(" isPublished: ").append(toIndentedString(isPublished)).append("\n"); + sb.append(" isTesting: ").append(toIndentedString(isTesting)).append("\n"); + sb.append(" language: ").append(toIndentedString(language)).append("\n"); + sb.append(" lastUpdatedAt: ").append(toIndentedString(lastUpdatedAt)).append("\n"); + sb.append(" lastUpdatedBy: ").append(toIndentedString(lastUpdatedBy)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" regex: ").append(toIndentedString(regex)).append("\n"); + sb.append(" severity: ").append(toIndentedString(severity)).append("\n"); + sb.append(" shortDescription: ").append(toIndentedString(shortDescription)).append("\n"); + sb.append(" shouldUseAiFix: ").append(toIndentedString(shouldUseAiFix)).append("\n"); + sb.append(" tests: ").append(toIndentedString(tests)).append("\n"); + sb.append(" treeSitterQuery: ").append(toIndentedString(treeSitterQuery)).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/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems.java b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems.java new file mode 100644 index 00000000000..570c90b18e3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems.java @@ -0,0 +1,183 @@ +/* + * 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; + +/** */ +@JsonPropertyOrder({ + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems + .JSON_PROPERTY_DESCRIPTION, + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems description( + String description) { + this.description = description; + return this; + } + + /** + * Getdescription + * + * @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 GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems name( + String name) { + this.name = name; + return this; + } + + /** + * Getname + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + 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 GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems + */ + @JsonAnySetter + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems + 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 + * GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems + getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems = + (GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems) o; + return Objects.equals( + this.description, + getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems + .description) + && Objects.equals( + this.name, + getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems.name) + && Objects.equals( + this.additionalProperties, + getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems + .additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(description, name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append( + "class GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsArgumentsItems {\n"); + sb.append(" description: ").append(toIndentedString(description)).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/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData.java b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData.java new file mode 100644 index 00000000000..27321b7cd08 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData.java @@ -0,0 +1,192 @@ +/* + * 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; + +/** */ +@JsonPropertyOrder({ + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData.JSON_PROPERTY_ID, + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType type = + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType.RULES; + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData() {} + + @JsonCreator + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @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 GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData type( + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Rules resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType getType() { + return type; + } + + public void setType( + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType 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 GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData + */ + @JsonAnySetter + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData 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 GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData object + * is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData + getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData = + (GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData) o; + return Objects.equals( + this.id, getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData.id) + && Objects.equals( + this.type, getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData.type) + && Objects.equals( + this.additionalProperties, + getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData + .additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsData {\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/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType.java b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType.java new file mode 100644 index 00000000000..fba0da317b2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType.java @@ -0,0 +1,67 @@ +/* + * 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; + +/** Rules resource type. */ +@JsonSerialize( + using = + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType + .GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataTypeSerializer + .class) +public class GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType + extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("rules")); + + public static final GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType + RULES = new GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType("rules"); + + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType(String value) { + super(value, allowedValues); + } + + public static + class GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataTypeSerializer + extends StdSerializer< + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType> { + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataTypeSerializer( + Class t) { + super(t); + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType fromValue( + String value) { + return new GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems.java b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems.java new file mode 100644 index 00000000000..e3b757ddac9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems.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.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; + +/** */ +@JsonPropertyOrder({ + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems + .JSON_PROPERTY_ANNOTATION_COUNT, + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems.JSON_PROPERTY_CODE, + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems.JSON_PROPERTY_FILENAME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ANNOTATION_COUNT = "annotation_count"; + private Long annotationCount; + + public static final String JSON_PROPERTY_CODE = "code"; + private String code; + + public static final String JSON_PROPERTY_FILENAME = "filename"; + private String filename; + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems annotationCount( + Long annotationCount) { + this.annotationCount = annotationCount; + return this; + } + + /** + * GetannotationCount minimum: 0 maximum: 65535 + * + * @return annotationCount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANNOTATION_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getAnnotationCount() { + return annotationCount; + } + + public void setAnnotationCount(Long annotationCount) { + this.annotationCount = annotationCount; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems code( + String code) { + this.code = code; + return this; + } + + /** + * Getcode + * + * @return code + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems filename( + String filename) { + this.filename = filename; + return this; + } + + /** + * Getfilename + * + * @return filename + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILENAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFilename() { + return filename; + } + + public void setFilename(String filename) { + this.filename = filename; + } + + /** + * 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 GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems + */ + @JsonAnySetter + public GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems + 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 GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems + * object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems + getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems = + (GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems) o; + return Objects.equals( + this.annotationCount, + getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems + .annotationCount) + && Objects.equals( + this.code, + getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems.code) + && Objects.equals( + this.filename, + getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems.filename) + && Objects.equals( + this.additionalProperties, + getMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems + .additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(annotationCount, code, filename, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append( + "class GetMultipleRulesetsResponseDataAttributesRulesetsItemsRulesItemsTestsItems {\n"); + sb.append(" annotationCount: ").append(toIndentedString(annotationCount)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" filename: ").append(toIndentedString(filename)).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/GetMultipleRulesetsResponseDataType.java b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataType.java new file mode 100644 index 00000000000..1686ebcb400 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GetMultipleRulesetsResponseDataType.java @@ -0,0 +1,59 @@ +/* + * 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; + +/** Get multiple rulesets response resource type. */ +@JsonSerialize( + using = GetMultipleRulesetsResponseDataType.GetMultipleRulesetsResponseDataTypeSerializer.class) +public class GetMultipleRulesetsResponseDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("get_multiple_rulesets_response")); + + public static final GetMultipleRulesetsResponseDataType GET_MULTIPLE_RULESETS_RESPONSE = + new GetMultipleRulesetsResponseDataType("get_multiple_rulesets_response"); + + GetMultipleRulesetsResponseDataType(String value) { + super(value, allowedValues); + } + + public static class GetMultipleRulesetsResponseDataTypeSerializer + extends StdSerializer { + public GetMultipleRulesetsResponseDataTypeSerializer( + Class t) { + super(t); + } + + public GetMultipleRulesetsResponseDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + GetMultipleRulesetsResponseDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static GetMultipleRulesetsResponseDataType fromValue(String value) { + return new GetMultipleRulesetsResponseDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SecretRuleArray.java b/src/main/java/com/datadog/api/client/v2/model/SecretRuleArray.java new file mode 100644 index 00000000000..1217bafe2d0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecretRuleArray.java @@ -0,0 +1,154 @@ +/* + * 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; + +/** */ +@JsonPropertyOrder({SecretRuleArray.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecretRuleArray { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public SecretRuleArray() {} + + @JsonCreator + public SecretRuleArray( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) { + this.data = data; + } + + public SecretRuleArray data(List data) { + this.data = data; + for (SecretRuleData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public SecretRuleArray addDataItem(SecretRuleData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SecretRuleArray + */ + @JsonAnySetter + public SecretRuleArray 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 SecretRuleArray object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecretRuleArray secretRuleArray = (SecretRuleArray) o; + return Objects.equals(this.data, secretRuleArray.data) + && Objects.equals(this.additionalProperties, secretRuleArray.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecretRuleArray {\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/SecretRuleData.java b/src/main/java/com/datadog/api/client/v2/model/SecretRuleData.java new file mode 100644 index 00000000000..c9533b87729 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecretRuleData.java @@ -0,0 +1,205 @@ +/* + * 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; + +/** */ +@JsonPropertyOrder({ + SecretRuleData.JSON_PROPERTY_ATTRIBUTES, + SecretRuleData.JSON_PROPERTY_ID, + SecretRuleData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecretRuleData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private SecretRuleDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SecretRuleDataType type = SecretRuleDataType.SECRET_RULE; + + public SecretRuleData() {} + + @JsonCreator + public SecretRuleData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SecretRuleDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public SecretRuleData attributes(SecretRuleDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SecretRuleDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(SecretRuleDataAttributes attributes) { + this.attributes = attributes; + } + + public SecretRuleData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @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 SecretRuleData type(SecretRuleDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Secret rule resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SecretRuleDataType getType() { + return type; + } + + public void setType(SecretRuleDataType 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 SecretRuleData + */ + @JsonAnySetter + public SecretRuleData 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 SecretRuleData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecretRuleData secretRuleData = (SecretRuleData) o; + return Objects.equals(this.attributes, secretRuleData.attributes) + && Objects.equals(this.id, secretRuleData.id) + && Objects.equals(this.type, secretRuleData.type) + && Objects.equals(this.additionalProperties, secretRuleData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecretRuleData {\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/SecretRuleDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SecretRuleDataAttributes.java new file mode 100644 index 00000000000..eabb3294c05 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecretRuleDataAttributes.java @@ -0,0 +1,387 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + SecretRuleDataAttributes.JSON_PROPERTY_DEFAULT_INCLUDED_KEYWORDS, + SecretRuleDataAttributes.JSON_PROPERTY_DESCRIPTION, + SecretRuleDataAttributes.JSON_PROPERTY_LICENSE, + SecretRuleDataAttributes.JSON_PROPERTY_MATCH_VALIDATION, + SecretRuleDataAttributes.JSON_PROPERTY_NAME, + SecretRuleDataAttributes.JSON_PROPERTY_PATTERN, + SecretRuleDataAttributes.JSON_PROPERTY_PRIORITY, + SecretRuleDataAttributes.JSON_PROPERTY_SDS_ID, + SecretRuleDataAttributes.JSON_PROPERTY_VALIDATORS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecretRuleDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DEFAULT_INCLUDED_KEYWORDS = "default_included_keywords"; + private List defaultIncludedKeywords = null; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_LICENSE = "license"; + private String license; + + public static final String JSON_PROPERTY_MATCH_VALIDATION = "match_validation"; + private SecretRuleDataAttributesMatchValidation matchValidation; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_PATTERN = "pattern"; + private String pattern; + + public static final String JSON_PROPERTY_PRIORITY = "priority"; + private String priority; + + public static final String JSON_PROPERTY_SDS_ID = "sds_id"; + private String sdsId; + + public static final String JSON_PROPERTY_VALIDATORS = "validators"; + private List validators = null; + + public SecretRuleDataAttributes defaultIncludedKeywords(List defaultIncludedKeywords) { + this.defaultIncludedKeywords = defaultIncludedKeywords; + return this; + } + + public SecretRuleDataAttributes addDefaultIncludedKeywordsItem( + String defaultIncludedKeywordsItem) { + if (this.defaultIncludedKeywords == null) { + this.defaultIncludedKeywords = new ArrayList<>(); + } + this.defaultIncludedKeywords.add(defaultIncludedKeywordsItem); + return this; + } + + /** + * GetdefaultIncludedKeywords + * + * @return defaultIncludedKeywords + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEFAULT_INCLUDED_KEYWORDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getDefaultIncludedKeywords() { + return defaultIncludedKeywords; + } + + public void setDefaultIncludedKeywords(List defaultIncludedKeywords) { + this.defaultIncludedKeywords = defaultIncludedKeywords; + } + + public SecretRuleDataAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Getdescription + * + * @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 SecretRuleDataAttributes license(String license) { + this.license = license; + return this; + } + + /** + * Getlicense + * + * @return license + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LICENSE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLicense() { + return license; + } + + public void setLicense(String license) { + this.license = license; + } + + public SecretRuleDataAttributes matchValidation( + SecretRuleDataAttributesMatchValidation matchValidation) { + this.matchValidation = matchValidation; + this.unparsed |= matchValidation.unparsed; + return this; + } + + /** + * GetmatchValidation + * + * @return matchValidation + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MATCH_VALIDATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SecretRuleDataAttributesMatchValidation getMatchValidation() { + return matchValidation; + } + + public void setMatchValidation(SecretRuleDataAttributesMatchValidation matchValidation) { + this.matchValidation = matchValidation; + } + + public SecretRuleDataAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Getname + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public SecretRuleDataAttributes pattern(String pattern) { + this.pattern = pattern; + return this; + } + + /** + * Getpattern + * + * @return pattern + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PATTERN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPattern() { + return pattern; + } + + public void setPattern(String pattern) { + this.pattern = pattern; + } + + public SecretRuleDataAttributes priority(String priority) { + this.priority = priority; + return this; + } + + /** + * Getpriority + * + * @return priority + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRIORITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPriority() { + return priority; + } + + public void setPriority(String priority) { + this.priority = priority; + } + + public SecretRuleDataAttributes sdsId(String sdsId) { + this.sdsId = sdsId; + return this; + } + + /** + * GetsdsId + * + * @return sdsId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SDS_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSdsId() { + return sdsId; + } + + public void setSdsId(String sdsId) { + this.sdsId = sdsId; + } + + public SecretRuleDataAttributes validators(List validators) { + this.validators = validators; + return this; + } + + public SecretRuleDataAttributes addValidatorsItem(String validatorsItem) { + if (this.validators == null) { + this.validators = new ArrayList<>(); + } + this.validators.add(validatorsItem); + return this; + } + + /** + * Getvalidators + * + * @return validators + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALIDATORS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getValidators() { + return validators; + } + + public void setValidators(List validators) { + this.validators = validators; + } + + /** + * 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 SecretRuleDataAttributes + */ + @JsonAnySetter + public SecretRuleDataAttributes 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 SecretRuleDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecretRuleDataAttributes secretRuleDataAttributes = (SecretRuleDataAttributes) o; + return Objects.equals( + this.defaultIncludedKeywords, secretRuleDataAttributes.defaultIncludedKeywords) + && Objects.equals(this.description, secretRuleDataAttributes.description) + && Objects.equals(this.license, secretRuleDataAttributes.license) + && Objects.equals(this.matchValidation, secretRuleDataAttributes.matchValidation) + && Objects.equals(this.name, secretRuleDataAttributes.name) + && Objects.equals(this.pattern, secretRuleDataAttributes.pattern) + && Objects.equals(this.priority, secretRuleDataAttributes.priority) + && Objects.equals(this.sdsId, secretRuleDataAttributes.sdsId) + && Objects.equals(this.validators, secretRuleDataAttributes.validators) + && Objects.equals(this.additionalProperties, secretRuleDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + defaultIncludedKeywords, + description, + license, + matchValidation, + name, + pattern, + priority, + sdsId, + validators, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecretRuleDataAttributes {\n"); + sb.append(" defaultIncludedKeywords: ") + .append(toIndentedString(defaultIncludedKeywords)) + .append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" license: ").append(toIndentedString(license)).append("\n"); + sb.append(" matchValidation: ").append(toIndentedString(matchValidation)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" pattern: ").append(toIndentedString(pattern)).append("\n"); + sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); + sb.append(" sdsId: ").append(toIndentedString(sdsId)).append("\n"); + sb.append(" validators: ").append(toIndentedString(validators)).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/SecretRuleDataAttributesMatchValidation.java b/src/main/java/com/datadog/api/client/v2/model/SecretRuleDataAttributesMatchValidation.java new file mode 100644 index 00000000000..0b9026c75a8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecretRuleDataAttributesMatchValidation.java @@ -0,0 +1,405 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + SecretRuleDataAttributesMatchValidation.JSON_PROPERTY_ENDPOINT, + SecretRuleDataAttributesMatchValidation.JSON_PROPERTY_HOSTS, + SecretRuleDataAttributesMatchValidation.JSON_PROPERTY_HTTP_METHOD, + SecretRuleDataAttributesMatchValidation.JSON_PROPERTY_INVALID_HTTP_STATUS_CODE, + SecretRuleDataAttributesMatchValidation.JSON_PROPERTY_REQUEST_HEADERS, + SecretRuleDataAttributesMatchValidation.JSON_PROPERTY_TIMEOUT_SECONDS, + SecretRuleDataAttributesMatchValidation.JSON_PROPERTY_TYPE, + SecretRuleDataAttributesMatchValidation.JSON_PROPERTY_VALID_HTTP_STATUS_CODE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecretRuleDataAttributesMatchValidation { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENDPOINT = "endpoint"; + private String endpoint; + + public static final String JSON_PROPERTY_HOSTS = "hosts"; + private List hosts = null; + + public static final String JSON_PROPERTY_HTTP_METHOD = "http_method"; + private String httpMethod; + + public static final String JSON_PROPERTY_INVALID_HTTP_STATUS_CODE = "invalid_http_status_code"; + private List + invalidHttpStatusCode = null; + + public static final String JSON_PROPERTY_REQUEST_HEADERS = "request_headers"; + private Map requestHeaders = null; + + public static final String JSON_PROPERTY_TIMEOUT_SECONDS = "timeout_seconds"; + private Long timeoutSeconds; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_VALID_HTTP_STATUS_CODE = "valid_http_status_code"; + private List + validHttpStatusCode = null; + + public SecretRuleDataAttributesMatchValidation endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /** + * Getendpoint + * + * @return endpoint + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENDPOINT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEndpoint() { + return endpoint; + } + + public void setEndpoint(String endpoint) { + this.endpoint = endpoint; + } + + public SecretRuleDataAttributesMatchValidation hosts(List hosts) { + this.hosts = hosts; + return this; + } + + public SecretRuleDataAttributesMatchValidation addHostsItem(String hostsItem) { + if (this.hosts == null) { + this.hosts = new ArrayList<>(); + } + this.hosts.add(hostsItem); + return this; + } + + /** + * Gethosts + * + * @return hosts + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOSTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getHosts() { + return hosts; + } + + public void setHosts(List hosts) { + this.hosts = hosts; + } + + public SecretRuleDataAttributesMatchValidation httpMethod(String httpMethod) { + this.httpMethod = httpMethod; + return this; + } + + /** + * GethttpMethod + * + * @return httpMethod + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HTTP_METHOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getHttpMethod() { + return httpMethod; + } + + public void setHttpMethod(String httpMethod) { + this.httpMethod = httpMethod; + } + + public SecretRuleDataAttributesMatchValidation invalidHttpStatusCode( + List + invalidHttpStatusCode) { + this.invalidHttpStatusCode = invalidHttpStatusCode; + for (SecretRuleDataAttributesMatchValidationInvalidHttpStatusCodeItems item : + invalidHttpStatusCode) { + this.unparsed |= item.unparsed; + } + return this; + } + + public SecretRuleDataAttributesMatchValidation addInvalidHttpStatusCodeItem( + SecretRuleDataAttributesMatchValidationInvalidHttpStatusCodeItems invalidHttpStatusCodeItem) { + if (this.invalidHttpStatusCode == null) { + this.invalidHttpStatusCode = new ArrayList<>(); + } + this.invalidHttpStatusCode.add(invalidHttpStatusCodeItem); + this.unparsed |= invalidHttpStatusCodeItem.unparsed; + return this; + } + + /** + * GetinvalidHttpStatusCode + * + * @return invalidHttpStatusCode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INVALID_HTTP_STATUS_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List + getInvalidHttpStatusCode() { + return invalidHttpStatusCode; + } + + public void setInvalidHttpStatusCode( + List + invalidHttpStatusCode) { + this.invalidHttpStatusCode = invalidHttpStatusCode; + } + + public SecretRuleDataAttributesMatchValidation requestHeaders( + Map requestHeaders) { + this.requestHeaders = requestHeaders; + return this; + } + + public SecretRuleDataAttributesMatchValidation putRequestHeadersItem( + String key, String requestHeadersItem) { + if (this.requestHeaders == null) { + this.requestHeaders = new HashMap<>(); + } + this.requestHeaders.put(key, requestHeadersItem); + return this; + } + + /** + * GetrequestHeaders + * + * @return requestHeaders + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUEST_HEADERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getRequestHeaders() { + return requestHeaders; + } + + public void setRequestHeaders(Map requestHeaders) { + this.requestHeaders = requestHeaders; + } + + public SecretRuleDataAttributesMatchValidation timeoutSeconds(Long timeoutSeconds) { + this.timeoutSeconds = timeoutSeconds; + return this; + } + + /** + * GettimeoutSeconds minimum: 0 maximum: 1.8446744073709552e+19 + * + * @return timeoutSeconds + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMEOUT_SECONDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getTimeoutSeconds() { + return timeoutSeconds; + } + + public void setTimeoutSeconds(Long timeoutSeconds) { + this.timeoutSeconds = timeoutSeconds; + } + + public SecretRuleDataAttributesMatchValidation type(String type) { + this.type = type; + return this; + } + + /** + * Gettype + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public SecretRuleDataAttributesMatchValidation validHttpStatusCode( + List validHttpStatusCode) { + this.validHttpStatusCode = validHttpStatusCode; + for (SecretRuleDataAttributesMatchValidationValidHttpStatusCodeItems item : + validHttpStatusCode) { + this.unparsed |= item.unparsed; + } + return this; + } + + public SecretRuleDataAttributesMatchValidation addValidHttpStatusCodeItem( + SecretRuleDataAttributesMatchValidationValidHttpStatusCodeItems validHttpStatusCodeItem) { + if (this.validHttpStatusCode == null) { + this.validHttpStatusCode = new ArrayList<>(); + } + this.validHttpStatusCode.add(validHttpStatusCodeItem); + this.unparsed |= validHttpStatusCodeItem.unparsed; + return this; + } + + /** + * GetvalidHttpStatusCode + * + * @return validHttpStatusCode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALID_HTTP_STATUS_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List + getValidHttpStatusCode() { + return validHttpStatusCode; + } + + public void setValidHttpStatusCode( + List validHttpStatusCode) { + this.validHttpStatusCode = validHttpStatusCode; + } + + /** + * 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 SecretRuleDataAttributesMatchValidation + */ + @JsonAnySetter + public SecretRuleDataAttributesMatchValidation 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 SecretRuleDataAttributesMatchValidation object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecretRuleDataAttributesMatchValidation secretRuleDataAttributesMatchValidation = + (SecretRuleDataAttributesMatchValidation) o; + return Objects.equals(this.endpoint, secretRuleDataAttributesMatchValidation.endpoint) + && Objects.equals(this.hosts, secretRuleDataAttributesMatchValidation.hosts) + && Objects.equals(this.httpMethod, secretRuleDataAttributesMatchValidation.httpMethod) + && Objects.equals( + this.invalidHttpStatusCode, + secretRuleDataAttributesMatchValidation.invalidHttpStatusCode) + && Objects.equals( + this.requestHeaders, secretRuleDataAttributesMatchValidation.requestHeaders) + && Objects.equals( + this.timeoutSeconds, secretRuleDataAttributesMatchValidation.timeoutSeconds) + && Objects.equals(this.type, secretRuleDataAttributesMatchValidation.type) + && Objects.equals( + this.validHttpStatusCode, secretRuleDataAttributesMatchValidation.validHttpStatusCode) + && Objects.equals( + this.additionalProperties, + secretRuleDataAttributesMatchValidation.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + endpoint, + hosts, + httpMethod, + invalidHttpStatusCode, + requestHeaders, + timeoutSeconds, + type, + validHttpStatusCode, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecretRuleDataAttributesMatchValidation {\n"); + sb.append(" endpoint: ").append(toIndentedString(endpoint)).append("\n"); + sb.append(" hosts: ").append(toIndentedString(hosts)).append("\n"); + sb.append(" httpMethod: ").append(toIndentedString(httpMethod)).append("\n"); + sb.append(" invalidHttpStatusCode: ") + .append(toIndentedString(invalidHttpStatusCode)) + .append("\n"); + sb.append(" requestHeaders: ").append(toIndentedString(requestHeaders)).append("\n"); + sb.append(" timeoutSeconds: ").append(toIndentedString(timeoutSeconds)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" validHttpStatusCode: ") + .append(toIndentedString(validHttpStatusCode)) + .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/SecretRuleDataAttributesMatchValidationInvalidHttpStatusCodeItems.java b/src/main/java/com/datadog/api/client/v2/model/SecretRuleDataAttributesMatchValidationInvalidHttpStatusCodeItems.java new file mode 100644 index 00000000000..35daf54a0fc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecretRuleDataAttributesMatchValidationInvalidHttpStatusCodeItems.java @@ -0,0 +1,174 @@ +/* + * 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; + +/** */ +@JsonPropertyOrder({ + SecretRuleDataAttributesMatchValidationInvalidHttpStatusCodeItems.JSON_PROPERTY_END, + SecretRuleDataAttributesMatchValidationInvalidHttpStatusCodeItems.JSON_PROPERTY_START +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecretRuleDataAttributesMatchValidationInvalidHttpStatusCodeItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_END = "end"; + private Long end; + + public static final String JSON_PROPERTY_START = "start"; + private Long start; + + public SecretRuleDataAttributesMatchValidationInvalidHttpStatusCodeItems end(Long end) { + this.end = end; + return this; + } + + /** + * Getend minimum: 0 maximum: 1.8446744073709552e+19 + * + * @return end + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_END) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getEnd() { + return end; + } + + public void setEnd(Long end) { + this.end = end; + } + + public SecretRuleDataAttributesMatchValidationInvalidHttpStatusCodeItems start(Long start) { + this.start = start; + return this; + } + + /** + * Getstart minimum: 0 maximum: 1.8446744073709552e+19 + * + * @return start + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getStart() { + return start; + } + + public void setStart(Long start) { + this.start = start; + } + + /** + * 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 SecretRuleDataAttributesMatchValidationInvalidHttpStatusCodeItems + */ + @JsonAnySetter + public SecretRuleDataAttributesMatchValidationInvalidHttpStatusCodeItems 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 SecretRuleDataAttributesMatchValidationInvalidHttpStatusCodeItems object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecretRuleDataAttributesMatchValidationInvalidHttpStatusCodeItems + secretRuleDataAttributesMatchValidationInvalidHttpStatusCodeItems = + (SecretRuleDataAttributesMatchValidationInvalidHttpStatusCodeItems) o; + return Objects.equals( + this.end, secretRuleDataAttributesMatchValidationInvalidHttpStatusCodeItems.end) + && Objects.equals( + this.start, secretRuleDataAttributesMatchValidationInvalidHttpStatusCodeItems.start) + && Objects.equals( + this.additionalProperties, + secretRuleDataAttributesMatchValidationInvalidHttpStatusCodeItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(end, start, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecretRuleDataAttributesMatchValidationInvalidHttpStatusCodeItems {\n"); + sb.append(" end: ").append(toIndentedString(end)).append("\n"); + sb.append(" start: ").append(toIndentedString(start)).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/SecretRuleDataAttributesMatchValidationValidHttpStatusCodeItems.java b/src/main/java/com/datadog/api/client/v2/model/SecretRuleDataAttributesMatchValidationValidHttpStatusCodeItems.java new file mode 100644 index 00000000000..d1bebc51967 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecretRuleDataAttributesMatchValidationValidHttpStatusCodeItems.java @@ -0,0 +1,174 @@ +/* + * 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; + +/** */ +@JsonPropertyOrder({ + SecretRuleDataAttributesMatchValidationValidHttpStatusCodeItems.JSON_PROPERTY_END, + SecretRuleDataAttributesMatchValidationValidHttpStatusCodeItems.JSON_PROPERTY_START +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SecretRuleDataAttributesMatchValidationValidHttpStatusCodeItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_END = "end"; + private Long end; + + public static final String JSON_PROPERTY_START = "start"; + private Long start; + + public SecretRuleDataAttributesMatchValidationValidHttpStatusCodeItems end(Long end) { + this.end = end; + return this; + } + + /** + * Getend minimum: 0 maximum: 1.8446744073709552e+19 + * + * @return end + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_END) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getEnd() { + return end; + } + + public void setEnd(Long end) { + this.end = end; + } + + public SecretRuleDataAttributesMatchValidationValidHttpStatusCodeItems start(Long start) { + this.start = start; + return this; + } + + /** + * Getstart minimum: 0 maximum: 1.8446744073709552e+19 + * + * @return start + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getStart() { + return start; + } + + public void setStart(Long start) { + this.start = start; + } + + /** + * 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 SecretRuleDataAttributesMatchValidationValidHttpStatusCodeItems + */ + @JsonAnySetter + public SecretRuleDataAttributesMatchValidationValidHttpStatusCodeItems 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 SecretRuleDataAttributesMatchValidationValidHttpStatusCodeItems object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecretRuleDataAttributesMatchValidationValidHttpStatusCodeItems + secretRuleDataAttributesMatchValidationValidHttpStatusCodeItems = + (SecretRuleDataAttributesMatchValidationValidHttpStatusCodeItems) o; + return Objects.equals( + this.end, secretRuleDataAttributesMatchValidationValidHttpStatusCodeItems.end) + && Objects.equals( + this.start, secretRuleDataAttributesMatchValidationValidHttpStatusCodeItems.start) + && Objects.equals( + this.additionalProperties, + secretRuleDataAttributesMatchValidationValidHttpStatusCodeItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(end, start, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecretRuleDataAttributesMatchValidationValidHttpStatusCodeItems {\n"); + sb.append(" end: ").append(toIndentedString(end)).append("\n"); + sb.append(" start: ").append(toIndentedString(start)).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/SecretRuleDataType.java b/src/main/java/com/datadog/api/client/v2/model/SecretRuleDataType.java new file mode 100644 index 00000000000..fca476c4790 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SecretRuleDataType.java @@ -0,0 +1,54 @@ +/* + * 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; + +/** Secret rule resource type. */ +@JsonSerialize(using = SecretRuleDataType.SecretRuleDataTypeSerializer.class) +public class SecretRuleDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("secret_rule")); + + public static final SecretRuleDataType SECRET_RULE = new SecretRuleDataType("secret_rule"); + + SecretRuleDataType(String value) { + super(value, allowedValues); + } + + public static class SecretRuleDataTypeSerializer extends StdSerializer { + public SecretRuleDataTypeSerializer(Class t) { + super(t); + } + + public SecretRuleDataTypeSerializer() { + this(null); + } + + @Override + public void serialize(SecretRuleDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SecretRuleDataType fromValue(String value) { + return new SecretRuleDataType(value); + } +} 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 703fc3e460f..2937151efb2 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 @@ -5,9 +5,9 @@ Feature: Security Monitoring information. Background: - Given a valid "apiKeyAuth" key in the system + Given an instance of "SecurityMonitoring" API + And a valid "apiKeyAuth" key in the system And a valid "appKeyAuth" key in the system - And an instance of "SecurityMonitoring" API @team:DataDog/k9-cloud-security-platform Scenario: Cancel a historical job returns "Bad Request" response @@ -1295,6 +1295,21 @@ Feature: Security Monitoring When the request is sent Then the response status is 422 The server cannot process the request because it contains invalid data. + @generated @skip @team:DataDog/asm-vm + Scenario: Returns list of Secrets rules returns "OK" response + Given operation "GetSecretsRules" enabled + And new "GetSecretsRules" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/asm-vm + Scenario: Ruleset get multiple returns "OK" response + Given operation "ListMultipleRulesets" enabled + And new "ListMultipleRulesets" request + And body with value {"data": {"attributes": {"rulesets": []}, "type": "get_multiple_rulesets_request"}} + When the request is sent + Then the response status is 200 OK + @team:DataDog/k9-cloud-security-platform Scenario: Run a threat hunting job returns "Bad Request" response Given operation "RunThreatHuntingJob" enabled 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 eb1380ab6b8..cd58e7f6da4 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 @@ -4005,6 +4005,20 @@ "type": "safe" } }, + "ListMultipleRulesets": { + "tag": "Security Monitoring", + "undo": { + "operationId": "TODO", + "parameters": [], + "type": "unsafe" + } + }, + "GetSecretsRules": { + "tag": "Security Monitoring", + "undo": { + "type": "safe" + } + }, "GetOnDemandConcurrencyCap": { "tag": "Synthetics", "undo": {