From f24904e6c5648eba7ffd10cc6b8d384c4c1ed677 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Fri, 5 Jun 2026 16:43:58 +0000 Subject: [PATCH 1/2] Regenerate client from commit a2914c2 of spec repo (#3455) Co-authored-by: ci.datadog-api-spec --- .generator/schemas/v2/openapi.yaml | 8 ++++++++ features/scenarios_model_mapping.rb | 1 + lib/datadog_api_client/v2/api/key_management_api.rb | 2 ++ 3 files changed, 11 insertions(+) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index cb8c6e6c18e2..4dbff64aee88 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -161,6 +161,13 @@ components: schema: example: "2020-11-24T18:46:21+00:00" type: string + ApplicationKeyFilterOwnedByParameter: + description: Filter application keys by owner ID. + in: query + name: filter[owned_by] + required: false + schema: + type: string ApplicationKeyFilterParameter: description: Filter application keys by the specified string. in: query @@ -107769,6 +107776,7 @@ paths: - $ref: "#/components/parameters/ApplicationKeyFilterParameter" - $ref: "#/components/parameters/ApplicationKeyFilterCreatedAtStartParameter" - $ref: "#/components/parameters/ApplicationKeyFilterCreatedAtEndParameter" + - $ref: "#/components/parameters/ApplicationKeyFilterOwnedByParameter" - $ref: "#/components/parameters/ApplicationKeyIncludeParameter" responses: "200": diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index b963f10152ef..f4bff744941e 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -1353,6 +1353,7 @@ "filter" => "String", "filter_created_at_start" => "String", "filter_created_at_end" => "String", + "filter_owned_by" => "String", "include" => "String", }, "v2.DeleteApplicationKey" => { diff --git a/lib/datadog_api_client/v2/api/key_management_api.rb b/lib/datadog_api_client/v2/api/key_management_api.rb index baf9ca3368d5..5b23a16920d7 100644 --- a/lib/datadog_api_client/v2/api/key_management_api.rb +++ b/lib/datadog_api_client/v2/api/key_management_api.rb @@ -789,6 +789,7 @@ def list_application_keys(opts = {}) # @option opts [String] :filter Filter application keys by the specified string. # @option opts [String] :filter_created_at_start Only include application keys created on or after the specified date. # @option opts [String] :filter_created_at_end Only include application keys created on or before the specified date. + # @option opts [String] :filter_owned_by Filter application keys by owner ID. # @option opts [String] :include Resource path for related resources to include in the response. Only `owned_by` is supported. # @return [Array<(ListApplicationKeysResponse, Integer, Hash)>] ListApplicationKeysResponse data, response status code and response headers def list_application_keys_with_http_info(opts = {}) @@ -811,6 +812,7 @@ def list_application_keys_with_http_info(opts = {}) query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? query_params[:'filter[created_at][start]'] = opts[:'filter_created_at_start'] if !opts[:'filter_created_at_start'].nil? query_params[:'filter[created_at][end]'] = opts[:'filter_created_at_end'] if !opts[:'filter_created_at_end'].nil? + query_params[:'filter[owned_by]'] = opts[:'filter_owned_by'] if !opts[:'filter_owned_by'].nil? query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? # header parameters From 01ab38925f3bc164208cd458967a1a9c217cae11 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Fri, 5 Jun 2026 17:09:44 +0000 Subject: [PATCH 2/2] Regenerate client from commit 60ad0ae of spec repo (#3362) Co-authored-by: ci.datadog-api-spec --- .generator/schemas/v2/openapi.yaml | 222 ++++++++++++++++++ .../aws-integration/ValidateAWSCCMConfig.rb | 21 ++ features/scenarios_model_mapping.rb | 3 + features/v2/aws_integration.feature | 16 ++ features/v2/undo.json | 6 + lib/datadog_api_client/configuration.rb | 1 + lib/datadog_api_client/inflector.rb | 9 + .../v2/api/aws_integration_api.rb | 74 ++++++ .../models/aws_ccm_config_validation_issue.rb | 144 ++++++++++++ .../aws_ccm_config_validation_issue_code.rb | 42 ++++ .../aws_ccm_config_validation_request.rb | 123 ++++++++++ ...cm_config_validation_request_attributes.rb | 196 ++++++++++++++++ .../aws_ccm_config_validation_request_data.rb | 144 ++++++++++++ .../aws_ccm_config_validation_response.rb | 123 ++++++++++ ...m_config_validation_response_attributes.rb | 146 ++++++++++++ ...aws_ccm_config_validation_response_data.rb | 165 +++++++++++++ .../models/aws_ccm_config_validation_type.rb | 26 ++ 17 files changed, 1461 insertions(+) create mode 100644 examples/v2/aws-integration/ValidateAWSCCMConfig.rb create mode 100644 lib/datadog_api_client/v2/models/aws_ccm_config_validation_issue.rb create mode 100644 lib/datadog_api_client/v2/models/aws_ccm_config_validation_issue_code.rb create mode 100644 lib/datadog_api_client/v2/models/aws_ccm_config_validation_request.rb create mode 100644 lib/datadog_api_client/v2/models/aws_ccm_config_validation_request_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/aws_ccm_config_validation_request_data.rb create mode 100644 lib/datadog_api_client/v2/models/aws_ccm_config_validation_response.rb create mode 100644 lib/datadog_api_client/v2/models/aws_ccm_config_validation_response_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/aws_ccm_config_validation_response_data.rb create mode 100644 lib/datadog_api_client/v2/models/aws_ccm_config_validation_type.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 4dbff64aee88..2b0efd759c66 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -2700,6 +2700,158 @@ components: type: string x-enum-varnames: - CCM_CONFIG + AWSCcmConfigValidationIssue: + description: A single validation issue found while validating an AWS Cost and Usage Report (CUR) 2.0 configuration. + properties: + code: + $ref: "#/components/schemas/AWSCcmConfigValidationIssueCode" + description: + description: Human-readable description of the validation issue. + example: 'no CUR 2.0 export named "cost-and-usage-report" found' + type: string + required: + - code + - description + type: object + AWSCcmConfigValidationIssueCode: + description: Identifies the specific reason a Cost and Usage Report (CUR) 2.0 configuration failed validation. + enum: + - ISSUE_CODE_UNSPECIFIED + - CREDENTIAL_ERROR + - BUCKET_NAME_INVALID_GOVCLOUD + - S3_LIST_PERMISSION_MISSING + - S3_GET_PERMISSION_MISSING + - S3_BUCKET_REGION_MISMATCH + - S3_BUCKET_NOT_ACCESSIBLE + - EXPORT_LIST_PERMISSION_MISSING + - EXPORT_GET_PERMISSION_MISSING + - EXPORT_NOT_FOUND + - EXPORT_STATUS_UNHEALTHY + - TIME_GRANULARITY_INVALID + - FILE_FORMAT_INVALID + - INCLUDE_RESOURCES_DISABLED + - REFRESH_CADENCE_INVALID + - OVERWRITE_MODE_INVALID + - QUERY_STATEMENT_INVALID + example: "EXPORT_NOT_FOUND" + type: string + x-enum-varnames: + - ISSUE_CODE_UNSPECIFIED + - CREDENTIAL_ERROR + - BUCKET_NAME_INVALID_GOVCLOUD + - S3_LIST_PERMISSION_MISSING + - S3_GET_PERMISSION_MISSING + - S3_BUCKET_REGION_MISMATCH + - S3_BUCKET_NOT_ACCESSIBLE + - EXPORT_LIST_PERMISSION_MISSING + - EXPORT_GET_PERMISSION_MISSING + - EXPORT_NOT_FOUND + - EXPORT_STATUS_UNHEALTHY + - TIME_GRANULARITY_INVALID + - FILE_FORMAT_INVALID + - INCLUDE_RESOURCES_DISABLED + - REFRESH_CADENCE_INVALID + - OVERWRITE_MODE_INVALID + - QUERY_STATEMENT_INVALID + AWSCcmConfigValidationIssues: + description: List of validation issues found for the Cost and Usage Report (CUR) 2.0 configuration. Empty when the configuration is valid. + items: + $ref: "#/components/schemas/AWSCcmConfigValidationIssue" + type: array + AWSCcmConfigValidationRequest: + description: AWS CCM config validation request body. + properties: + data: + $ref: "#/components/schemas/AWSCcmConfigValidationRequestData" + required: + - data + type: object + AWSCcmConfigValidationRequestAttributes: + description: Attributes for an AWS CCM config validation request. + properties: + account_id: + description: Your AWS Account ID without dashes. + example: "123456789012" + type: string + bucket_name: + description: Name of the S3 bucket where the Cost and Usage Report is stored. + example: "billing" + type: string + bucket_region: + description: AWS region of the S3 bucket. + example: "us-east-1" + type: string + report_name: + description: Name of the Cost and Usage Report. + example: "cost-and-usage-report" + type: string + report_prefix: + description: S3 prefix where the Cost and Usage Report is stored. + example: "reports" + type: string + required: + - account_id + - bucket_name + - bucket_region + - report_name + type: object + AWSCcmConfigValidationRequestData: + description: AWS CCM config validation request data. + properties: + attributes: + $ref: "#/components/schemas/AWSCcmConfigValidationRequestAttributes" + type: + $ref: "#/components/schemas/AWSCcmConfigValidationType" + required: + - attributes + - type + type: object + AWSCcmConfigValidationResponse: + description: AWS CCM config validation response body. + properties: + data: + $ref: "#/components/schemas/AWSCcmConfigValidationResponseData" + required: + - data + type: object + AWSCcmConfigValidationResponseAttributes: + description: Attributes for an AWS CCM config validation response. + properties: + account_id: + description: Your AWS Account ID without dashes. + example: "123456789012" + type: string + issues: + $ref: "#/components/schemas/AWSCcmConfigValidationIssues" + required: + - account_id + - issues + type: object + AWSCcmConfigValidationResponseData: + description: AWS CCM config validation response data. + properties: + attributes: + $ref: "#/components/schemas/AWSCcmConfigValidationResponseAttributes" + id: + description: AWS CCM config validation resource identifier. + example: "ccm_config_validation" + type: string + type: + $ref: "#/components/schemas/AWSCcmConfigValidationType" + required: + - attributes + - id + - type + type: object + AWSCcmConfigValidationType: + default: "ccm_config_validation" + description: AWS CCM config validation resource type. + enum: + - ccm_config_validation + example: "ccm_config_validation" + type: string + x-enum-varnames: + - CCM_CONFIG_VALIDATION AWSCloudAuthPersonaMappingAttributesResponse: description: Attributes for AWS cloud authentication persona mapping response properties: @@ -128868,6 +129020,76 @@ paths: operator: OR permissions: - aws_configuration_read + /api/v2/integration/aws/validate_ccm_config: + post: + description: |- + Validate a Cloud Cost Management config for an AWS account using Cost and Usage Report + (CUR) 2.0 against Datadog's ingest requirements without persisting it. + operationId: ValidateAWSCCMConfig + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + account_id: "123456789012" + bucket_name: billing + bucket_region: us-east-1 + report_name: cost-and-usage-report + report_prefix: reports + type: ccm_config_validation + schema: + $ref: "#/components/schemas/AWSCcmConfigValidationRequest" + description: Validate a Cloud Cost Management config for an AWS account integration config. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + account_id: "123456789012" + issues: + - code: EXPORT_NOT_FOUND + description: 'no CUR 2.0 export named "cost-and-usage-report" found' + id: ccm_config_validation + type: ccm_config_validation + schema: + $ref: "#/components/schemas/AWSCcmConfigValidationResponse" + description: AWS CCM Config validation result + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + $ref: "#/components/responses/ForbiddenResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "503": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Service Unavailable + summary: Validate AWS CCM config + tags: + - AWS Integration + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - cloud_cost_management_read + - cloud_cost_management_write + x-unstable: |- + **Note**: This endpoint is in Preview and may be subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/integration/gcp/accounts: get: description: List all GCP STS-enabled service accounts configured in your Datadog account. diff --git a/examples/v2/aws-integration/ValidateAWSCCMConfig.rb b/examples/v2/aws-integration/ValidateAWSCCMConfig.rb new file mode 100644 index 000000000000..9fb0bbca04cc --- /dev/null +++ b/examples/v2/aws-integration/ValidateAWSCCMConfig.rb @@ -0,0 +1,21 @@ +# Validate AWS CCM config returns "AWS CCM Config validation result" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.validate_awsccm_config".to_sym] = true +end +api_instance = DatadogAPIClient::V2::AWSIntegrationAPI.new + +body = DatadogAPIClient::V2::AWSCcmConfigValidationRequest.new({ + data: DatadogAPIClient::V2::AWSCcmConfigValidationRequestData.new({ + attributes: DatadogAPIClient::V2::AWSCcmConfigValidationRequestAttributes.new({ + account_id: "123456789012", + bucket_name: "billing", + bucket_region: "us-east-1", + report_name: "cost-and-usage-report", + report_prefix: "reports", + }), + type: DatadogAPIClient::V2::AWSCcmConfigValidationType::CCM_CONFIG_VALIDATION, + }), +}) +p api_instance.validate_awsccm_config(body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index f4bff744941e..a858ad1cb5f8 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -3394,6 +3394,9 @@ "v2.CreateAWSEventBridgeSource" => { "body" => "AWSEventBridgeCreateRequest", }, + "v2.ValidateAWSCCMConfig" => { + "body" => "AWSCcmConfigValidationRequest", + }, "v2.CreateGCPSTSAccount" => { "body" => "GCPSTSServiceAccountCreateRequest", }, diff --git a/features/v2/aws_integration.feature b/features/v2/aws_integration.feature index 5989319f4eee..dac51bb7449c 100644 --- a/features/v2/aws_integration.feature +++ b/features/v2/aws_integration.feature @@ -292,3 +292,19 @@ Feature: AWS Integration And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"role_name": "DatadogIntegrationRole"}, "aws_account_id": "123456789012", "aws_partition": "aws", "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"], "log_source_config": {"tag_filters": [{"source": "s3", "tags": ["test:test"]}]}, "sources": ["s3"]}}, "metrics_config": {"automute_enabled": true, "collect_cloudwatch_alarms": true, "collect_custom_metrics": true, "enabled": true, "tag_filters": [{"namespace": "AWS/EC2", "tags": ["key:value"]}]}, "resources_config": {"cloud_security_posture_management_collection": false, "extended_collection": false}, "traces_config": {}}, "type": "account"}} When the request is sent Then the response status is 404 Not Found + + @generated @skip @team:DataDog/aws-integrations + Scenario: Validate AWS CCM config returns "AWS CCM Config validation result" response + Given operation "ValidateAWSCCMConfig" enabled + And new "ValidateAWSCCMConfig" request + And body with value {"data": {"attributes": {"account_id": "123456789012", "bucket_name": "billing", "bucket_region": "us-east-1", "report_name": "cost-and-usage-report", "report_prefix": "reports"}, "type": "ccm_config_validation"}} + When the request is sent + Then the response status is 200 AWS CCM Config validation result + + @generated @skip @team:DataDog/aws-integrations + Scenario: Validate AWS CCM config returns "Bad Request" response + Given operation "ValidateAWSCCMConfig" enabled + And new "ValidateAWSCCMConfig" request + And body with value {"data": {"attributes": {"account_id": "123456789012", "bucket_name": "billing", "bucket_region": "us-east-1", "report_name": "cost-and-usage-report", "report_prefix": "reports"}, "type": "ccm_config_validation"}} + When the request is sent + Then the response status is 400 Bad Request diff --git a/features/v2/undo.json b/features/v2/undo.json index 3b02c97a856d..1ee7a0112290 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -3193,6 +3193,12 @@ "type": "safe" } }, + "ValidateAWSCCMConfig": { + "tag": "AWS Integration", + "undo": { + "type": "safe" + } + }, "ListGCPSTSAccounts": { "tag": "GCP Integration", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index c93fc183d448..abe15ac5b80b 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -494,6 +494,7 @@ def initialize "v2.delete_aws_account_ccm_config": false, "v2.get_aws_account_ccm_config": false, "v2.update_aws_account_ccm_config": false, + "v2.validate_awsccm_config": false, "v2.create_jira_issue_template": false, "v2.delete_jira_account": false, "v2.delete_jira_issue_template": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 8c52cb654964..a1d28330aa99 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1594,6 +1594,15 @@ def overrides "v2.aws_ccm_config_response_attributes" => "AWSCcmConfigResponseAttributes", "v2.aws_ccm_config_response_data" => "AWSCcmConfigResponseData", "v2.aws_ccm_config_type" => "AWSCcmConfigType", + "v2.aws_ccm_config_validation_issue" => "AWSCcmConfigValidationIssue", + "v2.aws_ccm_config_validation_issue_code" => "AWSCcmConfigValidationIssueCode", + "v2.aws_ccm_config_validation_request" => "AWSCcmConfigValidationRequest", + "v2.aws_ccm_config_validation_request_attributes" => "AWSCcmConfigValidationRequestAttributes", + "v2.aws_ccm_config_validation_request_data" => "AWSCcmConfigValidationRequestData", + "v2.aws_ccm_config_validation_response" => "AWSCcmConfigValidationResponse", + "v2.aws_ccm_config_validation_response_attributes" => "AWSCcmConfigValidationResponseAttributes", + "v2.aws_ccm_config_validation_response_data" => "AWSCcmConfigValidationResponseData", + "v2.aws_ccm_config_validation_type" => "AWSCcmConfigValidationType", "v2.aws_cloud_auth_persona_mapping_attributes_response" => "AWSCloudAuthPersonaMappingAttributesResponse", "v2.aws_cloud_auth_persona_mapping_create_attributes" => "AWSCloudAuthPersonaMappingCreateAttributes", "v2.aws_cloud_auth_persona_mapping_create_data" => "AWSCloudAuthPersonaMappingCreateData", diff --git a/lib/datadog_api_client/v2/api/aws_integration_api.rb b/lib/datadog_api_client/v2/api/aws_integration_api.rb index 461de897313f..f61a84388f84 100644 --- a/lib/datadog_api_client/v2/api/aws_integration_api.rb +++ b/lib/datadog_api_client/v2/api/aws_integration_api.rb @@ -1149,5 +1149,79 @@ def update_aws_account_ccm_config_with_http_info(aws_account_config_id, body, op end return data, status_code, headers end + + # Validate AWS CCM config. + # + # @see #validate_awsccm_config_with_http_info + def validate_awsccm_config(body, opts = {}) + data, _status_code, _headers = validate_awsccm_config_with_http_info(body, opts) + data + end + + # Validate AWS CCM config. + # + # Validate a Cloud Cost Management config for an AWS account using Cost and Usage Report + # (CUR) 2.0 against Datadog's ingest requirements without persisting it. + # + # @param body [AWSCcmConfigValidationRequest] Validate a Cloud Cost Management config for an AWS account integration config. + # @param opts [Hash] the optional parameters + # @return [Array<(AWSCcmConfigValidationResponse, Integer, Hash)>] AWSCcmConfigValidationResponse data, response status code and response headers + def validate_awsccm_config_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.validate_awsccm_config".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.validate_awsccm_config") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.validate_awsccm_config")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AWSIntegrationAPI.validate_awsccm_config ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling AWSIntegrationAPI.validate_awsccm_config" + end + # resource path + local_var_path = '/api/v2/integration/aws/validate_ccm_config' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'AWSCcmConfigValidationResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :validate_awsccm_config, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AWSIntegrationAPI#validate_awsccm_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end end end diff --git a/lib/datadog_api_client/v2/models/aws_ccm_config_validation_issue.rb b/lib/datadog_api_client/v2/models/aws_ccm_config_validation_issue.rb new file mode 100644 index 000000000000..d4860d2f73e3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aws_ccm_config_validation_issue.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A single validation issue found while validating an AWS Cost and Usage Report (CUR) 2.0 configuration. + class AWSCcmConfigValidationIssue + include BaseGenericModel + + # Identifies the specific reason a Cost and Usage Report (CUR) 2.0 configuration failed validation. + attr_reader :code + + # Human-readable description of the validation issue. + attr_reader :description + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'code' => :'code', + :'description' => :'description' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'code' => :'AWSCcmConfigValidationIssueCode', + :'description' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AWSCcmConfigValidationIssue` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @code.nil? + return false if @description.nil? + true + end + + # Custom attribute writer method with validation + # @param code [Object] Object to be assigned + # @!visibility private + def code=(code) + if code.nil? + fail ArgumentError, 'invalid value for "code", code cannot be nil.' + end + @code = code + end + + # Custom attribute writer method with validation + # @param description [Object] Object to be assigned + # @!visibility private + def description=(description) + if description.nil? + fail ArgumentError, 'invalid value for "description", description cannot be nil.' + end + @description = description + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + description == o.description && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [code, description, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aws_ccm_config_validation_issue_code.rb b/lib/datadog_api_client/v2/models/aws_ccm_config_validation_issue_code.rb new file mode 100644 index 000000000000..be7853f957c8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aws_ccm_config_validation_issue_code.rb @@ -0,0 +1,42 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Identifies the specific reason a Cost and Usage Report (CUR) 2.0 configuration failed validation. + class AWSCcmConfigValidationIssueCode + include BaseEnumModel + + ISSUE_CODE_UNSPECIFIED = "ISSUE_CODE_UNSPECIFIED".freeze + CREDENTIAL_ERROR = "CREDENTIAL_ERROR".freeze + BUCKET_NAME_INVALID_GOVCLOUD = "BUCKET_NAME_INVALID_GOVCLOUD".freeze + S3_LIST_PERMISSION_MISSING = "S3_LIST_PERMISSION_MISSING".freeze + S3_GET_PERMISSION_MISSING = "S3_GET_PERMISSION_MISSING".freeze + S3_BUCKET_REGION_MISMATCH = "S3_BUCKET_REGION_MISMATCH".freeze + S3_BUCKET_NOT_ACCESSIBLE = "S3_BUCKET_NOT_ACCESSIBLE".freeze + EXPORT_LIST_PERMISSION_MISSING = "EXPORT_LIST_PERMISSION_MISSING".freeze + EXPORT_GET_PERMISSION_MISSING = "EXPORT_GET_PERMISSION_MISSING".freeze + EXPORT_NOT_FOUND = "EXPORT_NOT_FOUND".freeze + EXPORT_STATUS_UNHEALTHY = "EXPORT_STATUS_UNHEALTHY".freeze + TIME_GRANULARITY_INVALID = "TIME_GRANULARITY_INVALID".freeze + FILE_FORMAT_INVALID = "FILE_FORMAT_INVALID".freeze + INCLUDE_RESOURCES_DISABLED = "INCLUDE_RESOURCES_DISABLED".freeze + REFRESH_CADENCE_INVALID = "REFRESH_CADENCE_INVALID".freeze + OVERWRITE_MODE_INVALID = "OVERWRITE_MODE_INVALID".freeze + QUERY_STATEMENT_INVALID = "QUERY_STATEMENT_INVALID".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/aws_ccm_config_validation_request.rb b/lib/datadog_api_client/v2/models/aws_ccm_config_validation_request.rb new file mode 100644 index 000000000000..ed53a1761221 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aws_ccm_config_validation_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # AWS CCM config validation request body. + class AWSCcmConfigValidationRequest + include BaseGenericModel + + # AWS CCM config validation request data. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'AWSCcmConfigValidationRequestData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AWSCcmConfigValidationRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aws_ccm_config_validation_request_attributes.rb b/lib/datadog_api_client/v2/models/aws_ccm_config_validation_request_attributes.rb new file mode 100644 index 000000000000..d78adf0c6a24 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aws_ccm_config_validation_request_attributes.rb @@ -0,0 +1,196 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for an AWS CCM config validation request. + class AWSCcmConfigValidationRequestAttributes + include BaseGenericModel + + # Your AWS Account ID without dashes. + attr_reader :account_id + + # Name of the S3 bucket where the Cost and Usage Report is stored. + attr_reader :bucket_name + + # AWS region of the S3 bucket. + attr_reader :bucket_region + + # Name of the Cost and Usage Report. + attr_reader :report_name + + # S3 prefix where the Cost and Usage Report is stored. + attr_accessor :report_prefix + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'account_id' => :'account_id', + :'bucket_name' => :'bucket_name', + :'bucket_region' => :'bucket_region', + :'report_name' => :'report_name', + :'report_prefix' => :'report_prefix' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'account_id' => :'String', + :'bucket_name' => :'String', + :'bucket_region' => :'String', + :'report_name' => :'String', + :'report_prefix' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AWSCcmConfigValidationRequestAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'account_id') + self.account_id = attributes[:'account_id'] + end + + if attributes.key?(:'bucket_name') + self.bucket_name = attributes[:'bucket_name'] + end + + if attributes.key?(:'bucket_region') + self.bucket_region = attributes[:'bucket_region'] + end + + if attributes.key?(:'report_name') + self.report_name = attributes[:'report_name'] + end + + if attributes.key?(:'report_prefix') + self.report_prefix = attributes[:'report_prefix'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @account_id.nil? + return false if @bucket_name.nil? + return false if @bucket_region.nil? + return false if @report_name.nil? + true + end + + # Custom attribute writer method with validation + # @param account_id [Object] Object to be assigned + # @!visibility private + def account_id=(account_id) + if account_id.nil? + fail ArgumentError, 'invalid value for "account_id", account_id cannot be nil.' + end + @account_id = account_id + end + + # Custom attribute writer method with validation + # @param bucket_name [Object] Object to be assigned + # @!visibility private + def bucket_name=(bucket_name) + if bucket_name.nil? + fail ArgumentError, 'invalid value for "bucket_name", bucket_name cannot be nil.' + end + @bucket_name = bucket_name + end + + # Custom attribute writer method with validation + # @param bucket_region [Object] Object to be assigned + # @!visibility private + def bucket_region=(bucket_region) + if bucket_region.nil? + fail ArgumentError, 'invalid value for "bucket_region", bucket_region cannot be nil.' + end + @bucket_region = bucket_region + end + + # Custom attribute writer method with validation + # @param report_name [Object] Object to be assigned + # @!visibility private + def report_name=(report_name) + if report_name.nil? + fail ArgumentError, 'invalid value for "report_name", report_name cannot be nil.' + end + @report_name = report_name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + account_id == o.account_id && + bucket_name == o.bucket_name && + bucket_region == o.bucket_region && + report_name == o.report_name && + report_prefix == o.report_prefix && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [account_id, bucket_name, bucket_region, report_name, report_prefix, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aws_ccm_config_validation_request_data.rb b/lib/datadog_api_client/v2/models/aws_ccm_config_validation_request_data.rb new file mode 100644 index 000000000000..1c8ecf90c63b --- /dev/null +++ b/lib/datadog_api_client/v2/models/aws_ccm_config_validation_request_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # AWS CCM config validation request data. + class AWSCcmConfigValidationRequestData + include BaseGenericModel + + # Attributes for an AWS CCM config validation request. + attr_reader :attributes + + # AWS CCM config validation resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'AWSCcmConfigValidationRequestAttributes', + :'type' => :'AWSCcmConfigValidationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AWSCcmConfigValidationRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aws_ccm_config_validation_response.rb b/lib/datadog_api_client/v2/models/aws_ccm_config_validation_response.rb new file mode 100644 index 000000000000..b2d24f810d2f --- /dev/null +++ b/lib/datadog_api_client/v2/models/aws_ccm_config_validation_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # AWS CCM config validation response body. + class AWSCcmConfigValidationResponse + include BaseGenericModel + + # AWS CCM config validation response data. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'AWSCcmConfigValidationResponseData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AWSCcmConfigValidationResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aws_ccm_config_validation_response_attributes.rb b/lib/datadog_api_client/v2/models/aws_ccm_config_validation_response_attributes.rb new file mode 100644 index 000000000000..954512a9e5f3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aws_ccm_config_validation_response_attributes.rb @@ -0,0 +1,146 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for an AWS CCM config validation response. + class AWSCcmConfigValidationResponseAttributes + include BaseGenericModel + + # Your AWS Account ID without dashes. + attr_reader :account_id + + # List of validation issues found for the Cost and Usage Report (CUR) 2.0 configuration. Empty when the configuration is valid. + attr_reader :issues + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'account_id' => :'account_id', + :'issues' => :'issues' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'account_id' => :'String', + :'issues' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AWSCcmConfigValidationResponseAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'account_id') + self.account_id = attributes[:'account_id'] + end + + if attributes.key?(:'issues') + if (value = attributes[:'issues']).is_a?(Array) + self.issues = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @account_id.nil? + return false if @issues.nil? + true + end + + # Custom attribute writer method with validation + # @param account_id [Object] Object to be assigned + # @!visibility private + def account_id=(account_id) + if account_id.nil? + fail ArgumentError, 'invalid value for "account_id", account_id cannot be nil.' + end + @account_id = account_id + end + + # Custom attribute writer method with validation + # @param issues [Object] Object to be assigned + # @!visibility private + def issues=(issues) + if issues.nil? + fail ArgumentError, 'invalid value for "issues", issues cannot be nil.' + end + @issues = issues + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + account_id == o.account_id && + issues == o.issues && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [account_id, issues, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aws_ccm_config_validation_response_data.rb b/lib/datadog_api_client/v2/models/aws_ccm_config_validation_response_data.rb new file mode 100644 index 000000000000..08f4c3b5fdeb --- /dev/null +++ b/lib/datadog_api_client/v2/models/aws_ccm_config_validation_response_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # AWS CCM config validation response data. + class AWSCcmConfigValidationResponseData + include BaseGenericModel + + # Attributes for an AWS CCM config validation response. + attr_reader :attributes + + # AWS CCM config validation resource identifier. + attr_reader :id + + # AWS CCM config validation resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'AWSCcmConfigValidationResponseAttributes', + :'id' => :'String', + :'type' => :'AWSCcmConfigValidationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AWSCcmConfigValidationResponseData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aws_ccm_config_validation_type.rb b/lib/datadog_api_client/v2/models/aws_ccm_config_validation_type.rb new file mode 100644 index 000000000000..3baf2e8bf844 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aws_ccm_config_validation_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # AWS CCM config validation resource type. + class AWSCcmConfigValidationType + include BaseEnumModel + + CCM_CONFIG_VALIDATION = "ccm_config_validation".freeze + end +end