From 170425739f46d0d0707e281dc873449090356583 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 28 May 2026 02:05:50 +0000 Subject: [PATCH] Regenerate client from commit 7f9bfc5 of spec repo --- .generator/schemas/v2/openapi.yaml | 298 +++++++++++++----- .../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 | 12 +- .../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 ++++++++++ ...e.rb => aws_ccm_config_validation_type.rb} | 6 +- ...bility_pipeline_config_destination_item.rb | 3 +- ...pipeline_splunk_hec_metrics_destination.rb | 259 --------------- ...unk_hec_metrics_destination_compression.rb | 27 -- 20 files changed, 1439 insertions(+), 370 deletions(-) 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 rename lib/datadog_api_client/v2/models/{observability_pipeline_splunk_hec_metrics_destination_type.rb => aws_ccm_config_validation_type.rb} (77%) delete mode 100644 lib/datadog_api_client/v2/models/observability_pipeline_splunk_hec_metrics_destination.rb delete mode 100644 lib/datadog_api_client/v2/models/observability_pipeline_splunk_hec_metrics_destination_compression.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 4afc8ca399d6..554173ef1da0 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -2437,6 +2437,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: @@ -55624,7 +55776,6 @@ components: - $ref: "#/components/schemas/ObservabilityPipelineSyslogNgDestination" - $ref: "#/components/schemas/ObservabilityPipelineDatabricksZerobusDestination" - $ref: "#/components/schemas/ObservabilityPipelineDatadogMetricsDestination" - - $ref: "#/components/schemas/ObservabilityPipelineSplunkHecMetricsDestination" ObservabilityPipelineConfigPipelineType: default: logs description: The type of data being ingested. Defaults to `logs` if not specified. @@ -59746,81 +59897,6 @@ components: type: string x-enum-varnames: - SPLUNK_HEC - ObservabilityPipelineSplunkHecMetricsDestination: - description: |- - The `splunk_hec_metrics` destination forwards metrics to Splunk using the HTTP Event Collector (HEC). - - **Supported pipeline types:** metrics - properties: - buffer: - $ref: "#/components/schemas/ObservabilityPipelineBufferOptions" - compression: - $ref: "#/components/schemas/ObservabilityPipelineSplunkHecMetricsDestinationCompression" - default_namespace: - description: Optional default namespace for metrics sent to Splunk HEC. - example: "custom_namespace" - type: string - endpoint_url_key: - description: Name of the environment variable or secret that holds the Splunk HEC endpoint URL. - example: SPLUNK_HEC_ENDPOINT_URL - type: string - id: - description: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` to downstream components). - example: splunk-hec-metrics-destination - type: string - index: - description: Optional name of the Splunk index where metrics are written. - example: "metrics" - type: string - inputs: - description: A list of component IDs whose output is used as the `input` for this component. - example: ["metrics-filter-processor"] - items: - description: The ID of a component whose output is used as input for this destination. - type: string - type: array - source: - description: The Splunk source field value for metric events. - example: "observability_pipelines" - type: string - sourcetype: - description: The Splunk sourcetype to assign to metric events. - example: "custom_sourcetype" - type: string - tls: - $ref: "#/components/schemas/ObservabilityPipelineTls" - token_key: - description: Name of the environment variable or secret that holds the Splunk HEC token. - example: SPLUNK_HEC_TOKEN - type: string - type: - $ref: "#/components/schemas/ObservabilityPipelineSplunkHecMetricsDestinationType" - required: - - id - - type - - inputs - type: object - x-pipeline-types: [metrics] - ObservabilityPipelineSplunkHecMetricsDestinationCompression: - default: none - description: Compression algorithm applied when sending metrics to Splunk HEC. - enum: - - none - - gzip - example: none - type: string - x-enum-varnames: - - NONE - - GZIP - ObservabilityPipelineSplunkHecMetricsDestinationType: - default: splunk_hec_metrics - description: The destination type. Always `splunk_hec_metrics`. - enum: - - splunk_hec_metrics - example: splunk_hec_metrics - type: string - x-enum-varnames: - - SPLUNK_HEC_METRICS ObservabilityPipelineSplunkHecSource: description: |- The `splunk_hec` source implements the Splunk HTTP Event Collector (HEC) API. @@ -121645,6 +121721,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 7ed0eaac9136..152b5b249cd7 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -3289,6 +3289,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 09d6acff288b..b3564f10b862 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -3126,6 +3126,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 112134511ef0..8708a8068e70 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -478,6 +478,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 abbf1654651c..d2186e4f9d21 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1513,6 +1513,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", @@ -4732,9 +4741,6 @@ def overrides "v2.observability_pipeline_splunk_hec_destination_encoding" => "ObservabilityPipelineSplunkHecDestinationEncoding", "v2.observability_pipeline_splunk_hec_destination_token_strategy" => "ObservabilityPipelineSplunkHecDestinationTokenStrategy", "v2.observability_pipeline_splunk_hec_destination_type" => "ObservabilityPipelineSplunkHecDestinationType", - "v2.observability_pipeline_splunk_hec_metrics_destination" => "ObservabilityPipelineSplunkHecMetricsDestination", - "v2.observability_pipeline_splunk_hec_metrics_destination_compression" => "ObservabilityPipelineSplunkHecMetricsDestinationCompression", - "v2.observability_pipeline_splunk_hec_metrics_destination_type" => "ObservabilityPipelineSplunkHecMetricsDestinationType", "v2.observability_pipeline_splunk_hec_source" => "ObservabilityPipelineSplunkHecSource", "v2.observability_pipeline_splunk_hec_source_type" => "ObservabilityPipelineSplunkHecSourceType", "v2.observability_pipeline_splunk_hec_source_valid_token" => "ObservabilityPipelineSplunkHecSourceValidToken", 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/observability_pipeline_splunk_hec_metrics_destination_type.rb b/lib/datadog_api_client/v2/models/aws_ccm_config_validation_type.rb similarity index 77% rename from lib/datadog_api_client/v2/models/observability_pipeline_splunk_hec_metrics_destination_type.rb rename to lib/datadog_api_client/v2/models/aws_ccm_config_validation_type.rb index 18ff7813e0e3..3baf2e8bf844 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_splunk_hec_metrics_destination_type.rb +++ b/lib/datadog_api_client/v2/models/aws_ccm_config_validation_type.rb @@ -17,10 +17,10 @@ require 'time' module DatadogAPIClient::V2 - # The destination type. Always `splunk_hec_metrics`. - class ObservabilityPipelineSplunkHecMetricsDestinationType + # AWS CCM config validation resource type. + class AWSCcmConfigValidationType include BaseEnumModel - SPLUNK_HEC_METRICS = "splunk_hec_metrics".freeze + CCM_CONFIG_VALIDATION = "ccm_config_validation".freeze end end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_config_destination_item.rb b/lib/datadog_api_client/v2/models/observability_pipeline_config_destination_item.rb index f12386e67e6f..2da684a6eb50 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_config_destination_item.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_config_destination_item.rb @@ -50,8 +50,7 @@ def openapi_one_of :'ObservabilityPipelineSumoLogicDestination', :'ObservabilityPipelineSyslogNgDestination', :'ObservabilityPipelineDatabricksZerobusDestination', - :'ObservabilityPipelineDatadogMetricsDestination', - :'ObservabilityPipelineSplunkHecMetricsDestination' + :'ObservabilityPipelineDatadogMetricsDestination' ] end # Builds the object diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_splunk_hec_metrics_destination.rb b/lib/datadog_api_client/v2/models/observability_pipeline_splunk_hec_metrics_destination.rb deleted file mode 100644 index 606eaeb0a502..000000000000 --- a/lib/datadog_api_client/v2/models/observability_pipeline_splunk_hec_metrics_destination.rb +++ /dev/null @@ -1,259 +0,0 @@ -=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 - # The `splunk_hec_metrics` destination forwards metrics to Splunk using the HTTP Event Collector (HEC). - # - # **Supported pipeline types:** metrics - class ObservabilityPipelineSplunkHecMetricsDestination - include BaseGenericModel - - # Configuration for buffer settings on destination components. - attr_accessor :buffer - - # Compression algorithm applied when sending metrics to Splunk HEC. - attr_accessor :compression - - # Optional default namespace for metrics sent to Splunk HEC. - attr_accessor :default_namespace - - # Name of the environment variable or secret that holds the Splunk HEC endpoint URL. - attr_accessor :endpoint_url_key - - # The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` to downstream components). - attr_reader :id - - # Optional name of the Splunk index where metrics are written. - attr_accessor :index - - # A list of component IDs whose output is used as the `input` for this component. - attr_reader :inputs - - # The Splunk source field value for metric events. - attr_accessor :source - - # The Splunk sourcetype to assign to metric events. - attr_accessor :sourcetype - - # Configuration for enabling TLS encryption between the pipeline component and external services. - attr_accessor :tls - - # Name of the environment variable or secret that holds the Splunk HEC token. - attr_accessor :token_key - - # The destination type. Always `splunk_hec_metrics`. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'buffer' => :'buffer', - :'compression' => :'compression', - :'default_namespace' => :'default_namespace', - :'endpoint_url_key' => :'endpoint_url_key', - :'id' => :'id', - :'index' => :'index', - :'inputs' => :'inputs', - :'source' => :'source', - :'sourcetype' => :'sourcetype', - :'tls' => :'tls', - :'token_key' => :'token_key', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'buffer' => :'ObservabilityPipelineBufferOptions', - :'compression' => :'ObservabilityPipelineSplunkHecMetricsDestinationCompression', - :'default_namespace' => :'String', - :'endpoint_url_key' => :'String', - :'id' => :'String', - :'index' => :'String', - :'inputs' => :'Array', - :'source' => :'String', - :'sourcetype' => :'String', - :'tls' => :'ObservabilityPipelineTls', - :'token_key' => :'String', - :'type' => :'ObservabilityPipelineSplunkHecMetricsDestinationType' - } - 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::ObservabilityPipelineSplunkHecMetricsDestination` 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?(:'buffer') - self.buffer = attributes[:'buffer'] - end - - if attributes.key?(:'compression') - self.compression = attributes[:'compression'] - end - - if attributes.key?(:'default_namespace') - self.default_namespace = attributes[:'default_namespace'] - end - - if attributes.key?(:'endpoint_url_key') - self.endpoint_url_key = attributes[:'endpoint_url_key'] - end - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'index') - self.index = attributes[:'index'] - end - - if attributes.key?(:'inputs') - if (value = attributes[:'inputs']).is_a?(Array) - self.inputs = value - end - end - - if attributes.key?(:'source') - self.source = attributes[:'source'] - end - - if attributes.key?(:'sourcetype') - self.sourcetype = attributes[:'sourcetype'] - end - - if attributes.key?(:'tls') - self.tls = attributes[:'tls'] - end - - if attributes.key?(:'token_key') - self.token_key = attributes[:'token_key'] - 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 @id.nil? - return false if @inputs.nil? - return false if @type.nil? - true - 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 inputs [Object] Object to be assigned - # @!visibility private - def inputs=(inputs) - if inputs.nil? - fail ArgumentError, 'invalid value for "inputs", inputs cannot be nil.' - end - @inputs = inputs - 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 && - buffer == o.buffer && - compression == o.compression && - default_namespace == o.default_namespace && - endpoint_url_key == o.endpoint_url_key && - id == o.id && - index == o.index && - inputs == o.inputs && - source == o.source && - sourcetype == o.sourcetype && - tls == o.tls && - token_key == o.token_key && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [buffer, compression, default_namespace, endpoint_url_key, id, index, inputs, source, sourcetype, tls, token_key, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_splunk_hec_metrics_destination_compression.rb b/lib/datadog_api_client/v2/models/observability_pipeline_splunk_hec_metrics_destination_compression.rb deleted file mode 100644 index dbbdfeae9f4a..000000000000 --- a/lib/datadog_api_client/v2/models/observability_pipeline_splunk_hec_metrics_destination_compression.rb +++ /dev/null @@ -1,27 +0,0 @@ -=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 - # Compression algorithm applied when sending metrics to Splunk HEC. - class ObservabilityPipelineSplunkHecMetricsDestinationCompression - include BaseEnumModel - - NONE = "none".freeze - GZIP = "gzip".freeze - end -end