diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 440627d7e6b3..ec3132be2835 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1454,6 +1454,14 @@ components: schema: example: "my-service" type: string + SettingType: + description: The type of cost setting. + example: preferred_tags + in: path + name: setting_type + required: true + schema: + type: string SignalID: description: The ID of the signal. in: path @@ -15439,6 +15447,64 @@ components: data: $ref: "#/components/schemas/ConvertJobResultsToSignalsData" type: object + CostAIPreferredTagsAttributes: + description: Attributes for the preferred tags response. + properties: + message: + description: A contextual message about the preferred tags configuration. + example: No preferred tags are configured. + type: string + preferred_tags: + description: The list of preferred cost allocation tags. + example: + - "" + items: + description: A preferred tag key. + type: string + type: array + required: + - message + - preferred_tags + type: object + CostAIPreferredTagsData: + description: Preferred tags data object. + properties: + attributes: + $ref: "#/components/schemas/CostAIPreferredTagsAttributes" + id: + description: The unique identifier. + example: preferred_tags + type: string + type: + $ref: "#/components/schemas/CostAIPreferredTagsType" + required: + - id + - type + - attributes + type: object + CostAIPreferredTagsResponse: + description: Response containing preferred cost allocation tags for AI agents. + example: + data: + attributes: + message: No preferred tags are configured. + preferred_tags: [] + id: preferred_tags + type: preferred_tags + properties: + data: + $ref: "#/components/schemas/CostAIPreferredTagsData" + required: + - data + type: object + CostAIPreferredTagsType: + description: Preferred tags resource type. + enum: + - preferred_tags + example: preferred_tags + type: string + x-enum-varnames: + - PREFERRED_TAGS CostAggregationType: description: "Controls how costs are aggregated when using `start_date`. The `cumulative` option returns month-to-date running totals." enum: @@ -15556,6 +15622,148 @@ components: type: string x-enum-varnames: - COST_BY_ORG + CostSettingData: + description: Cost setting data object. + properties: + attributes: + $ref: "#/components/schemas/CostSettingDataAttributes" + id: + description: The unique identifier of the setting. + example: preferred_tags + type: string + type: + $ref: "#/components/schemas/CostSettingType" + required: + - id + - type + - attributes + type: object + CostSettingDataAttributes: + description: Attributes for a cost setting. + properties: + created_at: + description: The timestamp when the setting was created. + example: "" + type: string + created_by: + description: The UUID of the user who created the setting. + example: user-uuid + type: string + data: + additionalProperties: {} + description: The setting data as a flexible key-value map. + nullable: true + type: object + description: + description: A human-readable description of the setting. + example: User's preferred cost allocation tags. + type: string + last_modified_by: + description: The UUID of the user who last modified the setting. + example: user-uuid + type: string + setting_name: + description: The name of the setting. + example: preferred_tags + type: string + updated_at: + description: The timestamp when the setting was last updated. + example: "" + type: string + version: + description: The version of the setting. + example: "1" + type: string + required: + - created_at + - created_by + - description + - last_modified_by + - setting_name + - updated_at + - version + type: object + CostSettingResponse: + description: Response for a cost setting. + example: + data: + attributes: + created_at: "" + created_by: user-uuid + data: + description: User's preferred cost allocation tags. + last_modified_by: user-uuid + setting_name: preferred_tags + updated_at: "" + version: "1" + id: preferred_tags + type: setting + properties: + data: + $ref: "#/components/schemas/CostSettingData" + required: + - data + type: object + CostSettingType: + description: Cost setting resource type. + enum: + - setting + example: setting + type: string + x-enum-varnames: + - SETTING + CostTagPipelineActiveKeyAttributes: + description: Attributes for an active tag pipeline key. + properties: + rule_count: + description: The number of tag pipeline rules that set this tag key. + example: 3 + format: int64 + type: integer + required: + - rule_count + type: object + CostTagPipelineActiveKeyData: + description: Active tag key data object. + properties: + attributes: + $ref: "#/components/schemas/CostTagPipelineActiveKeyAttributes" + id: + description: The tag key name. + example: cost_center + type: string + type: + $ref: "#/components/schemas/CostTagPipelineActiveKeyType" + required: + - id + - type + - attributes + type: object + CostTagPipelineActiveKeyResponse: + description: List of tag keys actively set by tag pipeline rules. + example: + data: + - attributes: + rule_count: 3 + id: cost_center + type: active_tag_key + properties: + data: + description: List of active tag keys. + items: + $ref: "#/components/schemas/CostTagPipelineActiveKeyData" + type: array + required: + - data + type: object + CostTagPipelineActiveKeyType: + description: Active tag key resource type. + enum: + - active_tag_key + example: active_tag_key + type: string + x-enum-varnames: + - ACTIVE_TAG_KEY CoverageSummaryAttributes: description: Attributes object for code coverage summary response. properties: @@ -18348,6 +18556,57 @@ components: data: $ref: "#/components/schemas/CsmServerlessCoverageAnalysisData" type: object + CustomAllocationRuleStatusAttributes: + description: Attributes for a custom allocation rule status. + properties: + processing_status: + description: The processing status of the custom allocation rule. + example: done + type: string + required: + - processing_status + type: object + CustomAllocationRuleStatusData: + description: Custom allocation rule status data. + properties: + attributes: + $ref: "#/components/schemas/CustomAllocationRuleStatusAttributes" + id: + description: The unique identifier of the custom allocation rule. + example: "123" + type: string + type: + $ref: "#/components/schemas/CustomAllocationRuleStatusType" + required: + - id + - type + - attributes + type: object + CustomAllocationRuleStatusResponse: + description: List of custom allocation rule statuses. + example: + data: + - attributes: + processing_status: done + id: "123" + type: arbitrary_rule_status + properties: + data: + description: List of custom allocation rule statuses. + items: + $ref: "#/components/schemas/CustomAllocationRuleStatusData" + type: array + required: + - data + type: object + CustomAllocationRuleStatusType: + description: Custom allocation rule status resource type. + enum: + - arbitrary_rule_status + example: arbitrary_rule_status + type: string + x-enum-varnames: + - ARBITRARY_RULE_STATUS CustomAttributeConfig: description: The definition of `CustomAttributeConfig` object. properties: @@ -76454,6 +76713,57 @@ components: - type - id type: object + TagPipelinesRulesetStatusAttributes: + description: Attributes for a tag pipeline ruleset status. + properties: + processing_status: + description: The processing status of the ruleset. + example: pending + type: string + required: + - processing_status + type: object + TagPipelinesRulesetStatusData: + description: Tag pipeline ruleset status data. + properties: + attributes: + $ref: "#/components/schemas/TagPipelinesRulesetStatusAttributes" + id: + description: The unique identifier of the ruleset. + example: 55ef2385-9ae1-4410-90c4-5ac1b60fec10 + type: string + type: + $ref: "#/components/schemas/TagPipelinesRulesetStatusType" + required: + - id + - type + - attributes + type: object + TagPipelinesRulesetStatusResponse: + description: List of tag pipeline ruleset statuses. + example: + data: + - attributes: + processing_status: pending + id: blahblah + type: ruleset_status + properties: + data: + description: List of ruleset statuses. + items: + $ref: "#/components/schemas/TagPipelinesRulesetStatusData" + type: array + required: + - data + type: object + TagPipelinesRulesetStatusType: + description: Tag pipeline ruleset status resource type. + enum: + - ruleset_status + example: ruleset_status + type: string + x-enum-varnames: + - RULESET_STATUS TagsEventAttribute: description: Array of tags associated with your event. example: ["team:A"] @@ -94321,6 +94631,71 @@ paths: "x-permission": operator: OPEN permissions: [] + /api/v2/cost/ai/preferred_tags: + get: + description: Get the preferred cost allocation tags for AI agent use. Returns a simplified response with contextual messaging based on configuration status. + operationId: GetCostAIPreferredTags + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + message: No preferred tags are configured. + preferred_tags: [] + id: preferred_tags + type: preferred_tags + schema: + $ref: "#/components/schemas/CostAIPreferredTagsResponse" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: Get preferred cost allocation tags + tags: + - Cloud Cost Management + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/cost/ai/tag_pipelines/active_keys: + get: + description: List the tag keys that are actively set by tag pipeline rules, sorted by rule count in descending order. + operationId: ListCostTagPipelineActiveKeys + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + rule_count: 3 + id: cost_center + type: active_tag_key + schema: + $ref: "#/components/schemas/CostTagPipelineActiveKeyResponse" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: List active tag pipeline keys + tags: + - Cloud Cost Management + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/cost/arbitrary_rule: get: description: List all custom allocation rules - Retrieve a list of all custom allocation rules for the organization @@ -94513,6 +94888,38 @@ paths: summary: Reorder custom allocation rules tags: - Cloud Cost Management + /api/v2/cost/arbitrary_rule/status: + get: + description: List the processing status of all custom allocation rules. + operationId: ListCustomAllocationRulesStatus + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + processing_status: done + id: "123" + type: arbitrary_rule_status + schema: + $ref: "#/components/schemas/CustomAllocationRuleStatusResponse" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: List custom allocation rule statuses + tags: + - Cloud Cost Management + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/cost/arbitrary_rule/{rule_id}: delete: description: Delete a custom allocation rule - Delete an existing custom allocation rule by its ID @@ -96133,6 +96540,59 @@ paths: operator: OR permissions: - cloud_cost_management_read + /api/v2/cost/settings/{setting_type}: + get: + description: Get a specific cost management setting by type. + operationId: GetCostSetting + parameters: + - $ref: "#/components/parameters/SettingType" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "" + created_by: user-uuid + data: + description: User's preferred cost allocation tags. + last_modified_by: user-uuid + setting_name: preferred_tags + updated_at: "" + version: "1" + id: preferred_tags + type: setting + schema: + $ref: "#/components/schemas/CostSettingResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: Get cost setting + tags: + - Cloud Cost Management + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/cost_by_tag/active_billing_dimensions: get: description: |- @@ -140518,6 +140978,38 @@ paths: summary: Reorder tag pipeline rulesets tags: - Cloud Cost Management + /api/v2/tags/enrichment/status: + get: + description: List the processing status of all tag pipeline rulesets. + operationId: ListTagPipelinesRulesetsStatus + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + processing_status: pending + id: blahblah + type: ruleset_status + schema: + $ref: "#/components/schemas/TagPipelinesRulesetStatusResponse" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: List tag pipeline ruleset statuses + tags: + - Cloud Cost Management + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/tags/enrichment/validate-query: post: description: Validate a tag pipeline query - Validate the syntax and structure of a tag pipeline query diff --git a/examples/v2/cloud-cost-management/GetCostAIPreferredTags.rb b/examples/v2/cloud-cost-management/GetCostAIPreferredTags.rb new file mode 100644 index 000000000000..63943c4c265e --- /dev/null +++ b/examples/v2/cloud-cost-management/GetCostAIPreferredTags.rb @@ -0,0 +1,8 @@ +# Get preferred cost allocation tags returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_cost_ai_preferred_tags".to_sym] = true +end +api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new +p api_instance.get_cost_ai_preferred_tags() diff --git a/examples/v2/cloud-cost-management/GetCostSetting.rb b/examples/v2/cloud-cost-management/GetCostSetting.rb new file mode 100644 index 000000000000..997282f90b4a --- /dev/null +++ b/examples/v2/cloud-cost-management/GetCostSetting.rb @@ -0,0 +1,8 @@ +# Get cost setting returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_cost_setting".to_sym] = true +end +api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new +p api_instance.get_cost_setting("setting_type") diff --git a/examples/v2/cloud-cost-management/ListCostTagPipelineActiveKeys.rb b/examples/v2/cloud-cost-management/ListCostTagPipelineActiveKeys.rb new file mode 100644 index 000000000000..1a3851418560 --- /dev/null +++ b/examples/v2/cloud-cost-management/ListCostTagPipelineActiveKeys.rb @@ -0,0 +1,8 @@ +# List active tag pipeline keys returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_cost_tag_pipeline_active_keys".to_sym] = true +end +api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new +p api_instance.list_cost_tag_pipeline_active_keys() diff --git a/examples/v2/cloud-cost-management/ListCustomAllocationRulesStatus.rb b/examples/v2/cloud-cost-management/ListCustomAllocationRulesStatus.rb new file mode 100644 index 000000000000..64bb9776258f --- /dev/null +++ b/examples/v2/cloud-cost-management/ListCustomAllocationRulesStatus.rb @@ -0,0 +1,8 @@ +# List custom allocation rule statuses returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_custom_allocation_rules_status".to_sym] = true +end +api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new +p api_instance.list_custom_allocation_rules_status() diff --git a/examples/v2/cloud-cost-management/ListTagPipelinesRulesetsStatus.rb b/examples/v2/cloud-cost-management/ListTagPipelinesRulesetsStatus.rb new file mode 100644 index 000000000000..61321c22efd0 --- /dev/null +++ b/examples/v2/cloud-cost-management/ListTagPipelinesRulesetsStatus.rb @@ -0,0 +1,8 @@ +# List tag pipeline ruleset statuses returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_tag_pipelines_rulesets_status".to_sym] = true +end +api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new +p api_instance.list_tag_pipelines_rulesets_status() diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index f88a3c3f133f..23e3e8bfbfee 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -2182,6 +2182,9 @@ "cloud_account_id" => "Integer", "body" => "GCPUsageCostConfigPatchRequest", }, + "v2.GetCostSetting" => { + "setting_type" => "String", + }, "v2.CreateTagPipelinesRuleset" => { "body" => "CreateRulesetRequest", }, diff --git a/features/v2/cloud_cost_management.feature b/features/v2/cloud_cost_management.feature index c5fc0adc05de..49cde4dfa22b 100644 --- a/features/v2/cloud_cost_management.feature +++ b/features/v2/cloud_cost_management.feature @@ -292,6 +292,30 @@ Feature: Cloud Cost Management And the response "data.attributes.configs[0].dataset_type" is equal to "amortized" And the response "data.attributes.configs[1].dataset_type" is equal to "actual" + @generated @skip @team:DataDog/cloud-cost-management + Scenario: Get cost setting returns "Bad Request" response + Given operation "GetCostSetting" enabled + And new "GetCostSetting" request + And request contains "setting_type" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/cloud-cost-management + Scenario: Get cost setting returns "Not Found" response + Given operation "GetCostSetting" enabled + And new "GetCostSetting" request + And request contains "setting_type" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/cloud-cost-management + Scenario: Get cost setting returns "OK" response + Given operation "GetCostSetting" enabled + And new "GetCostSetting" request + And request contains "setting_type" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @replay-only @team:DataDog/cloud-cost-management Scenario: Get custom allocation rule returns "OK" response Given new "GetCustomAllocationRule" request @@ -299,6 +323,13 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/cloud-cost-management + Scenario: Get preferred cost allocation tags returns "OK" response + Given operation "GetCostAIPreferredTags" enabled + And new "GetCostAIPreferredTags" request + When the request is sent + Then the response status is 200 OK + @replay-only @team:DataDog/cloud-cost-management Scenario: List Cloud Cost Management AWS CUR configs returns "OK" response Given new "ListCostAWSCURConfigs" request @@ -345,12 +376,26 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/cloud-cost-management + Scenario: List active tag pipeline keys returns "OK" response + Given operation "ListCostTagPipelineActiveKeys" enabled + And new "ListCostTagPipelineActiveKeys" request + When the request is sent + Then the response status is 200 OK + @team:DataDog/cloud-cost-management Scenario: List budgets returns "OK" response Given new "ListBudgets" request When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/cloud-cost-management + Scenario: List custom allocation rule statuses returns "OK" response + Given operation "ListCustomAllocationRulesStatus" enabled + And new "ListCustomAllocationRulesStatus" request + When the request is sent + Then the response status is 200 OK + @replay-only @team:DataDog/cloud-cost-management Scenario: List custom allocation rules returns "OK" response Given new "ListCustomAllocationRules" request @@ -358,6 +403,13 @@ Feature: Cloud Cost Management Then the response status is 200 OK And the response "data[0].attributes.rule_name" is equal to "example-arbitrary-cost-rule" + @generated @skip @team:DataDog/cloud-cost-management + Scenario: List tag pipeline ruleset statuses returns "OK" response + Given operation "ListTagPipelinesRulesetsStatus" enabled + And new "ListTagPipelinesRulesetsStatus" request + When the request is sent + Then the response status is 200 OK + @replay-only @team:DataDog/cloud-cost-management Scenario: List tag pipeline rulesets returns "OK" response Given new "ListTagPipelinesRulesets" request diff --git a/features/v2/undo.json b/features/v2/undo.json index d5a8323e2702..b1a5715ec679 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -1265,6 +1265,18 @@ "type": "safe" } }, + "GetCostAIPreferredTags": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, + "ListCostTagPipelineActiveKeys": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, "ListCustomAllocationRules": { "tag": "Cloud Cost Management", "undo": { @@ -1283,6 +1295,12 @@ "type": "idempotent" } }, + "ListCustomAllocationRulesStatus": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, "DeleteCustomAllocationRule": { "tag": "Cloud Cost Management", "undo": { @@ -1464,6 +1482,12 @@ "type": "safe" } }, + "GetCostSetting": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, "GetActiveBillingDimensions": { "tag": "Usage Metering", "undo": { @@ -6697,6 +6721,12 @@ "type": "idempotent" } }, + "ListTagPipelinesRulesetsStatus": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, "ValidateQuery": { "tag": "Cloud Cost Management", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index eb82106f5652..f1aa5a03a113 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -293,6 +293,11 @@ def initialize "v2.upsert_sync_config": false, "v2.get_code_coverage_branch_summary": false, "v2.get_code_coverage_commit_summary": false, + "v2.get_cost_ai_preferred_tags": false, + "v2.get_cost_setting": false, + "v2.list_cost_tag_pipeline_active_keys": false, + "v2.list_custom_allocation_rules_status": false, + "v2.list_tag_pipelines_rulesets_status": false, "v2.create_dashboard_secure_embed": false, "v2.delete_dashboard_secure_embed": false, "v2.get_dashboard_secure_embed": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 3ba1b16d4765..eb11e68086bc 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1967,12 +1967,24 @@ def overrides "v2.convert_job_results_to_signals_data_type" => "ConvertJobResultsToSignalsDataType", "v2.convert_job_results_to_signals_request" => "ConvertJobResultsToSignalsRequest", "v2.cost_aggregation_type" => "CostAggregationType", + "v2.cost_ai_preferred_tags_attributes" => "CostAIPreferredTagsAttributes", + "v2.cost_ai_preferred_tags_data" => "CostAIPreferredTagsData", + "v2.cost_ai_preferred_tags_response" => "CostAIPreferredTagsResponse", + "v2.cost_ai_preferred_tags_type" => "CostAIPreferredTagsType", "v2.cost_attribution_aggregates_body" => "CostAttributionAggregatesBody", "v2.cost_attribution_type" => "CostAttributionType", "v2.cost_by_org" => "CostByOrg", "v2.cost_by_org_attributes" => "CostByOrgAttributes", "v2.cost_by_org_response" => "CostByOrgResponse", "v2.cost_by_org_type" => "CostByOrgType", + "v2.cost_setting_data" => "CostSettingData", + "v2.cost_setting_data_attributes" => "CostSettingDataAttributes", + "v2.cost_setting_response" => "CostSettingResponse", + "v2.cost_setting_type" => "CostSettingType", + "v2.cost_tag_pipeline_active_key_attributes" => "CostTagPipelineActiveKeyAttributes", + "v2.cost_tag_pipeline_active_key_data" => "CostTagPipelineActiveKeyData", + "v2.cost_tag_pipeline_active_key_response" => "CostTagPipelineActiveKeyResponse", + "v2.cost_tag_pipeline_active_key_type" => "CostTagPipelineActiveKeyType", "v2.coverage_summary_attributes" => "CoverageSummaryAttributes", "v2.coverage_summary_codeowner_stats" => "CoverageSummaryCodeownerStats", "v2.coverage_summary_data" => "CoverageSummaryData", @@ -2145,6 +2157,10 @@ def overrides "v2.csm_serverless_coverage_analysis_attributes" => "CsmServerlessCoverageAnalysisAttributes", "v2.csm_serverless_coverage_analysis_data" => "CsmServerlessCoverageAnalysisData", "v2.csm_serverless_coverage_analysis_response" => "CsmServerlessCoverageAnalysisResponse", + "v2.custom_allocation_rule_status_attributes" => "CustomAllocationRuleStatusAttributes", + "v2.custom_allocation_rule_status_data" => "CustomAllocationRuleStatusData", + "v2.custom_allocation_rule_status_response" => "CustomAllocationRuleStatusResponse", + "v2.custom_allocation_rule_status_type" => "CustomAllocationRuleStatusType", "v2.custom_attribute_config" => "CustomAttributeConfig", "v2.custom_attribute_config_attributes_create" => "CustomAttributeConfigAttributesCreate", "v2.custom_attribute_config_create" => "CustomAttributeConfigCreate", @@ -5873,6 +5889,10 @@ def overrides "v2.table_row_resource_data_attributes" => "TableRowResourceDataAttributes", "v2.table_row_resource_data_type" => "TableRowResourceDataType", "v2.table_row_resource_identifier" => "TableRowResourceIdentifier", + "v2.tag_pipelines_ruleset_status_attributes" => "TagPipelinesRulesetStatusAttributes", + "v2.tag_pipelines_ruleset_status_data" => "TagPipelinesRulesetStatusData", + "v2.tag_pipelines_ruleset_status_response" => "TagPipelinesRulesetStatusResponse", + "v2.tag_pipelines_ruleset_status_type" => "TagPipelinesRulesetStatusType", "v2.targeting_rule" => "TargetingRule", "v2.targeting_rule_request" => "TargetingRuleRequest", "v2.team" => "Team", diff --git a/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb b/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb index 8aa3e1002f88..63dabfe1abb3 100644 --- a/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb +++ b/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb @@ -890,6 +890,72 @@ def get_budget_with_http_info(budget_id, opts = {}) return data, status_code, headers end + # Get preferred cost allocation tags. + # + # @see #get_cost_ai_preferred_tags_with_http_info + def get_cost_ai_preferred_tags(opts = {}) + data, _status_code, _headers = get_cost_ai_preferred_tags_with_http_info(opts) + data + end + + # Get preferred cost allocation tags. + # + # Get the preferred cost allocation tags for AI agent use. Returns a simplified response with contextual messaging based on configuration status. + # + # @param opts [Hash] the optional parameters + # @return [Array<(CostAIPreferredTagsResponse, Integer, Hash)>] CostAIPreferredTagsResponse data, response status code and response headers + def get_cost_ai_preferred_tags_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_cost_ai_preferred_tags".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_cost_ai_preferred_tags") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_cost_ai_preferred_tags")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.get_cost_ai_preferred_tags ...' + end + # resource path + local_var_path = '/api/v2/cost/ai/preferred_tags' + + # 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']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'CostAIPreferredTagsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_cost_ai_preferred_tags, + :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::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudCostManagementAPI#get_cost_ai_preferred_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get cost AWS CUR config. # # @see #get_cost_awscur_config_with_http_info @@ -1085,6 +1151,77 @@ def get_cost_gcp_usage_cost_config_with_http_info(cloud_account_id, opts = {}) return data, status_code, headers end + # Get cost setting. + # + # @see #get_cost_setting_with_http_info + def get_cost_setting(setting_type, opts = {}) + data, _status_code, _headers = get_cost_setting_with_http_info(setting_type, opts) + data + end + + # Get cost setting. + # + # Get a specific cost management setting by type. + # + # @param setting_type [String] The type of cost setting. + # @param opts [Hash] the optional parameters + # @return [Array<(CostSettingResponse, Integer, Hash)>] CostSettingResponse data, response status code and response headers + def get_cost_setting_with_http_info(setting_type, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_cost_setting".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_cost_setting") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_cost_setting")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.get_cost_setting ...' + end + # verify the required parameter 'setting_type' is set + if @api_client.config.client_side_validation && setting_type.nil? + fail ArgumentError, "Missing the required parameter 'setting_type' when calling CloudCostManagementAPI.get_cost_setting" + end + # resource path + local_var_path = '/api/v2/cost/settings/{setting_type}'.sub('{setting_type}', CGI.escape(setting_type.to_s).gsub('%2F', '/')) + + # 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']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'CostSettingResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_cost_setting, + :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::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudCostManagementAPI#get_cost_setting\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get custom allocation rule. # # @see #get_custom_allocation_rule_with_http_info @@ -1580,6 +1717,72 @@ def list_cost_oci_configs_with_http_info(opts = {}) return data, status_code, headers end + # List active tag pipeline keys. + # + # @see #list_cost_tag_pipeline_active_keys_with_http_info + def list_cost_tag_pipeline_active_keys(opts = {}) + data, _status_code, _headers = list_cost_tag_pipeline_active_keys_with_http_info(opts) + data + end + + # List active tag pipeline keys. + # + # List the tag keys that are actively set by tag pipeline rules, sorted by rule count in descending order. + # + # @param opts [Hash] the optional parameters + # @return [Array<(CostTagPipelineActiveKeyResponse, Integer, Hash)>] CostTagPipelineActiveKeyResponse data, response status code and response headers + def list_cost_tag_pipeline_active_keys_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_cost_tag_pipeline_active_keys".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_cost_tag_pipeline_active_keys") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_cost_tag_pipeline_active_keys")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_cost_tag_pipeline_active_keys ...' + end + # resource path + local_var_path = '/api/v2/cost/ai/tag_pipelines/active_keys' + + # 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']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'CostTagPipelineActiveKeyResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_cost_tag_pipeline_active_keys, + :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::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudCostManagementAPI#list_cost_tag_pipeline_active_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # List custom allocation rules. # # @see #list_custom_allocation_rules_with_http_info @@ -1640,6 +1843,72 @@ def list_custom_allocation_rules_with_http_info(opts = {}) return data, status_code, headers end + # List custom allocation rule statuses. + # + # @see #list_custom_allocation_rules_status_with_http_info + def list_custom_allocation_rules_status(opts = {}) + data, _status_code, _headers = list_custom_allocation_rules_status_with_http_info(opts) + data + end + + # List custom allocation rule statuses. + # + # List the processing status of all custom allocation rules. + # + # @param opts [Hash] the optional parameters + # @return [Array<(CustomAllocationRuleStatusResponse, Integer, Hash)>] CustomAllocationRuleStatusResponse data, response status code and response headers + def list_custom_allocation_rules_status_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_custom_allocation_rules_status".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_custom_allocation_rules_status") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_custom_allocation_rules_status")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_custom_allocation_rules_status ...' + end + # resource path + local_var_path = '/api/v2/cost/arbitrary_rule/status' + + # 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']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'CustomAllocationRuleStatusResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_custom_allocation_rules_status, + :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::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudCostManagementAPI#list_custom_allocation_rules_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # List Custom Costs files. # # @see #list_custom_costs_files_with_http_info @@ -1773,6 +2042,72 @@ def list_tag_pipelines_rulesets_with_http_info(opts = {}) return data, status_code, headers end + # List tag pipeline ruleset statuses. + # + # @see #list_tag_pipelines_rulesets_status_with_http_info + def list_tag_pipelines_rulesets_status(opts = {}) + data, _status_code, _headers = list_tag_pipelines_rulesets_status_with_http_info(opts) + data + end + + # List tag pipeline ruleset statuses. + # + # List the processing status of all tag pipeline rulesets. + # + # @param opts [Hash] the optional parameters + # @return [Array<(TagPipelinesRulesetStatusResponse, Integer, Hash)>] TagPipelinesRulesetStatusResponse data, response status code and response headers + def list_tag_pipelines_rulesets_status_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_tag_pipelines_rulesets_status".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_tag_pipelines_rulesets_status") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_tag_pipelines_rulesets_status")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_tag_pipelines_rulesets_status ...' + end + # resource path + local_var_path = '/api/v2/tags/enrichment/status' + + # 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']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'TagPipelinesRulesetStatusResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_tag_pipelines_rulesets_status, + :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::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudCostManagementAPI#list_tag_pipelines_rulesets_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Reorder custom allocation rules. # # @see #reorder_custom_allocation_rules_with_http_info diff --git a/lib/datadog_api_client/v2/models/cost_ai_preferred_tags_attributes.rb b/lib/datadog_api_client/v2/models/cost_ai_preferred_tags_attributes.rb new file mode 100644 index 000000000000..51233c0020bc --- /dev/null +++ b/lib/datadog_api_client/v2/models/cost_ai_preferred_tags_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 the preferred tags response. + class CostAIPreferredTagsAttributes + include BaseGenericModel + + # A contextual message about the preferred tags configuration. + attr_reader :message + + # The list of preferred cost allocation tags. + attr_reader :preferred_tags + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'message' => :'message', + :'preferred_tags' => :'preferred_tags' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'message' => :'String', + :'preferred_tags' => :'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::CostAIPreferredTagsAttributes` 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?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'preferred_tags') + if (value = attributes[:'preferred_tags']).is_a?(Array) + self.preferred_tags = 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 @message.nil? + return false if @preferred_tags.nil? + true + end + + # Custom attribute writer method with validation + # @param message [Object] Object to be assigned + # @!visibility private + def message=(message) + if message.nil? + fail ArgumentError, 'invalid value for "message", message cannot be nil.' + end + @message = message + end + + # Custom attribute writer method with validation + # @param preferred_tags [Object] Object to be assigned + # @!visibility private + def preferred_tags=(preferred_tags) + if preferred_tags.nil? + fail ArgumentError, 'invalid value for "preferred_tags", preferred_tags cannot be nil.' + end + @preferred_tags = preferred_tags + 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 && + message == o.message && + preferred_tags == o.preferred_tags && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [message, preferred_tags, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/cost_ai_preferred_tags_data.rb b/lib/datadog_api_client/v2/models/cost_ai_preferred_tags_data.rb new file mode 100644 index 000000000000..2672fbdfa428 --- /dev/null +++ b/lib/datadog_api_client/v2/models/cost_ai_preferred_tags_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 + # Preferred tags data object. + class CostAIPreferredTagsData + include BaseGenericModel + + # Attributes for the preferred tags response. + attr_reader :attributes + + # The unique identifier. + attr_reader :id + + # Preferred tags 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' => :'CostAIPreferredTagsAttributes', + :'id' => :'String', + :'type' => :'CostAIPreferredTagsType' + } + 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::CostAIPreferredTagsData` 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/cost_ai_preferred_tags_response.rb b/lib/datadog_api_client/v2/models/cost_ai_preferred_tags_response.rb new file mode 100644 index 000000000000..afd20ab2054f --- /dev/null +++ b/lib/datadog_api_client/v2/models/cost_ai_preferred_tags_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 + # Response containing preferred cost allocation tags for AI agents. + class CostAIPreferredTagsResponse + include BaseGenericModel + + # Preferred tags data object. + 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' => :'CostAIPreferredTagsData' + } + 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::CostAIPreferredTagsResponse` 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/cost_ai_preferred_tags_type.rb b/lib/datadog_api_client/v2/models/cost_ai_preferred_tags_type.rb new file mode 100644 index 000000000000..5a1ba7f65982 --- /dev/null +++ b/lib/datadog_api_client/v2/models/cost_ai_preferred_tags_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 + # Preferred tags resource type. + class CostAIPreferredTagsType + include BaseEnumModel + + PREFERRED_TAGS = "preferred_tags".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/cost_setting_data.rb b/lib/datadog_api_client/v2/models/cost_setting_data.rb new file mode 100644 index 000000000000..84ab58b2d63f --- /dev/null +++ b/lib/datadog_api_client/v2/models/cost_setting_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 + # Cost setting data object. + class CostSettingData + include BaseGenericModel + + # Attributes for a cost setting. + attr_reader :attributes + + # The unique identifier of the setting. + attr_reader :id + + # Cost setting 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' => :'CostSettingDataAttributes', + :'id' => :'String', + :'type' => :'CostSettingType' + } + 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::CostSettingData` 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/cost_setting_data_attributes.rb b/lib/datadog_api_client/v2/models/cost_setting_data_attributes.rb new file mode 100644 index 000000000000..2d5c3d370ece --- /dev/null +++ b/lib/datadog_api_client/v2/models/cost_setting_data_attributes.rb @@ -0,0 +1,267 @@ +=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 a cost setting. + class CostSettingDataAttributes + include BaseGenericModel + + # The timestamp when the setting was created. + attr_reader :created_at + + # The UUID of the user who created the setting. + attr_reader :created_by + + # The setting data as a flexible key-value map. + attr_accessor :data + + # A human-readable description of the setting. + attr_reader :description + + # The UUID of the user who last modified the setting. + attr_reader :last_modified_by + + # The name of the setting. + attr_reader :setting_name + + # The timestamp when the setting was last updated. + attr_reader :updated_at + + # The version of the setting. + attr_reader :version + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created_at' => :'created_at', + :'created_by' => :'created_by', + :'data' => :'data', + :'description' => :'description', + :'last_modified_by' => :'last_modified_by', + :'setting_name' => :'setting_name', + :'updated_at' => :'updated_at', + :'version' => :'version' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created_at' => :'String', + :'created_by' => :'String', + :'data' => :'Hash', + :'description' => :'String', + :'last_modified_by' => :'String', + :'setting_name' => :'String', + :'updated_at' => :'String', + :'version' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'data', + ]) + 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::CostSettingDataAttributes` 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?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'created_by') + self.created_by = attributes[:'created_by'] + end + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'last_modified_by') + self.last_modified_by = attributes[:'last_modified_by'] + end + + if attributes.key?(:'setting_name') + self.setting_name = attributes[:'setting_name'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + 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 @created_at.nil? + return false if @created_by.nil? + return false if @description.nil? + return false if @last_modified_by.nil? + return false if @setting_name.nil? + return false if @updated_at.nil? + return false if @version.nil? + true + end + + # Custom attribute writer method with validation + # @param created_at [Object] Object to be assigned + # @!visibility private + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'invalid value for "created_at", created_at cannot be nil.' + end + @created_at = created_at + end + + # Custom attribute writer method with validation + # @param created_by [Object] Object to be assigned + # @!visibility private + def created_by=(created_by) + if created_by.nil? + fail ArgumentError, 'invalid value for "created_by", created_by cannot be nil.' + end + @created_by = created_by + 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 + + # Custom attribute writer method with validation + # @param last_modified_by [Object] Object to be assigned + # @!visibility private + def last_modified_by=(last_modified_by) + if last_modified_by.nil? + fail ArgumentError, 'invalid value for "last_modified_by", last_modified_by cannot be nil.' + end + @last_modified_by = last_modified_by + end + + # Custom attribute writer method with validation + # @param setting_name [Object] Object to be assigned + # @!visibility private + def setting_name=(setting_name) + if setting_name.nil? + fail ArgumentError, 'invalid value for "setting_name", setting_name cannot be nil.' + end + @setting_name = setting_name + end + + # Custom attribute writer method with validation + # @param updated_at [Object] Object to be assigned + # @!visibility private + def updated_at=(updated_at) + if updated_at.nil? + fail ArgumentError, 'invalid value for "updated_at", updated_at cannot be nil.' + end + @updated_at = updated_at + end + + # Custom attribute writer method with validation + # @param version [Object] Object to be assigned + # @!visibility private + def version=(version) + if version.nil? + fail ArgumentError, 'invalid value for "version", version cannot be nil.' + end + @version = version + 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 && + created_at == o.created_at && + created_by == o.created_by && + data == o.data && + description == o.description && + last_modified_by == o.last_modified_by && + setting_name == o.setting_name && + updated_at == o.updated_at && + version == o.version && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created_at, created_by, data, description, last_modified_by, setting_name, updated_at, version, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/cost_setting_response.rb b/lib/datadog_api_client/v2/models/cost_setting_response.rb new file mode 100644 index 000000000000..850f86e3d0ef --- /dev/null +++ b/lib/datadog_api_client/v2/models/cost_setting_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 + # Response for a cost setting. + class CostSettingResponse + include BaseGenericModel + + # Cost setting data object. + 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' => :'CostSettingData' + } + 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::CostSettingResponse` 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/cost_setting_type.rb b/lib/datadog_api_client/v2/models/cost_setting_type.rb new file mode 100644 index 000000000000..09eab2749dc0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/cost_setting_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 + # Cost setting resource type. + class CostSettingType + include BaseEnumModel + + SETTING = "setting".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/cost_tag_pipeline_active_key_attributes.rb b/lib/datadog_api_client/v2/models/cost_tag_pipeline_active_key_attributes.rb new file mode 100644 index 000000000000..517ffe62fdd7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/cost_tag_pipeline_active_key_attributes.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 + # Attributes for an active tag pipeline key. + class CostTagPipelineActiveKeyAttributes + include BaseGenericModel + + # The number of tag pipeline rules that set this tag key. + attr_reader :rule_count + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'rule_count' => :'rule_count' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'rule_count' => :'Integer' + } + 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::CostTagPipelineActiveKeyAttributes` 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?(:'rule_count') + self.rule_count = attributes[:'rule_count'] + 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 @rule_count.nil? + true + end + + # Custom attribute writer method with validation + # @param rule_count [Object] Object to be assigned + # @!visibility private + def rule_count=(rule_count) + if rule_count.nil? + fail ArgumentError, 'invalid value for "rule_count", rule_count cannot be nil.' + end + @rule_count = rule_count + 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 && + rule_count == o.rule_count && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [rule_count, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/cost_tag_pipeline_active_key_data.rb b/lib/datadog_api_client/v2/models/cost_tag_pipeline_active_key_data.rb new file mode 100644 index 000000000000..acfc904af1ac --- /dev/null +++ b/lib/datadog_api_client/v2/models/cost_tag_pipeline_active_key_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 + # Active tag key data object. + class CostTagPipelineActiveKeyData + include BaseGenericModel + + # Attributes for an active tag pipeline key. + attr_reader :attributes + + # The tag key name. + attr_reader :id + + # Active tag key 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' => :'CostTagPipelineActiveKeyAttributes', + :'id' => :'String', + :'type' => :'CostTagPipelineActiveKeyType' + } + 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::CostTagPipelineActiveKeyData` 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/cost_tag_pipeline_active_key_response.rb b/lib/datadog_api_client/v2/models/cost_tag_pipeline_active_key_response.rb new file mode 100644 index 000000000000..40d8d8a79473 --- /dev/null +++ b/lib/datadog_api_client/v2/models/cost_tag_pipeline_active_key_response.rb @@ -0,0 +1,125 @@ +=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 + # List of tag keys actively set by tag pipeline rules. + class CostTagPipelineActiveKeyResponse + include BaseGenericModel + + # List of active tag keys. + 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' => :'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::CostTagPipelineActiveKeyResponse` 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') + if (value = attributes[:'data']).is_a?(Array) + self.data = 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 @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/cost_tag_pipeline_active_key_type.rb b/lib/datadog_api_client/v2/models/cost_tag_pipeline_active_key_type.rb new file mode 100644 index 000000000000..4d561730ec00 --- /dev/null +++ b/lib/datadog_api_client/v2/models/cost_tag_pipeline_active_key_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 + # Active tag key resource type. + class CostTagPipelineActiveKeyType + include BaseEnumModel + + ACTIVE_TAG_KEY = "active_tag_key".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/custom_allocation_rule_status_attributes.rb b/lib/datadog_api_client/v2/models/custom_allocation_rule_status_attributes.rb new file mode 100644 index 000000000000..8841d8ef2b04 --- /dev/null +++ b/lib/datadog_api_client/v2/models/custom_allocation_rule_status_attributes.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 + # Attributes for a custom allocation rule status. + class CustomAllocationRuleStatusAttributes + include BaseGenericModel + + # The processing status of the custom allocation rule. + attr_reader :processing_status + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'processing_status' => :'processing_status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'processing_status' => :'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::CustomAllocationRuleStatusAttributes` 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?(:'processing_status') + self.processing_status = attributes[:'processing_status'] + 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 @processing_status.nil? + true + end + + # Custom attribute writer method with validation + # @param processing_status [Object] Object to be assigned + # @!visibility private + def processing_status=(processing_status) + if processing_status.nil? + fail ArgumentError, 'invalid value for "processing_status", processing_status cannot be nil.' + end + @processing_status = processing_status + 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 && + processing_status == o.processing_status && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [processing_status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/custom_allocation_rule_status_data.rb b/lib/datadog_api_client/v2/models/custom_allocation_rule_status_data.rb new file mode 100644 index 000000000000..36893346f643 --- /dev/null +++ b/lib/datadog_api_client/v2/models/custom_allocation_rule_status_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 + # Custom allocation rule status data. + class CustomAllocationRuleStatusData + include BaseGenericModel + + # Attributes for a custom allocation rule status. + attr_reader :attributes + + # The unique identifier of the custom allocation rule. + attr_reader :id + + # Custom allocation rule status 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' => :'CustomAllocationRuleStatusAttributes', + :'id' => :'String', + :'type' => :'CustomAllocationRuleStatusType' + } + 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::CustomAllocationRuleStatusData` 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/custom_allocation_rule_status_response.rb b/lib/datadog_api_client/v2/models/custom_allocation_rule_status_response.rb new file mode 100644 index 000000000000..62e1a5f05808 --- /dev/null +++ b/lib/datadog_api_client/v2/models/custom_allocation_rule_status_response.rb @@ -0,0 +1,125 @@ +=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 + # List of custom allocation rule statuses. + class CustomAllocationRuleStatusResponse + include BaseGenericModel + + # List of custom allocation rule statuses. + 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' => :'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::CustomAllocationRuleStatusResponse` 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') + if (value = attributes[:'data']).is_a?(Array) + self.data = 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 @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/custom_allocation_rule_status_type.rb b/lib/datadog_api_client/v2/models/custom_allocation_rule_status_type.rb new file mode 100644 index 000000000000..56465488af62 --- /dev/null +++ b/lib/datadog_api_client/v2/models/custom_allocation_rule_status_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 + # Custom allocation rule status resource type. + class CustomAllocationRuleStatusType + include BaseEnumModel + + ARBITRARY_RULE_STATUS = "arbitrary_rule_status".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/tag_pipelines_ruleset_status_attributes.rb b/lib/datadog_api_client/v2/models/tag_pipelines_ruleset_status_attributes.rb new file mode 100644 index 000000000000..0de012ee9e4d --- /dev/null +++ b/lib/datadog_api_client/v2/models/tag_pipelines_ruleset_status_attributes.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 + # Attributes for a tag pipeline ruleset status. + class TagPipelinesRulesetStatusAttributes + include BaseGenericModel + + # The processing status of the ruleset. + attr_reader :processing_status + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'processing_status' => :'processing_status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'processing_status' => :'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::TagPipelinesRulesetStatusAttributes` 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?(:'processing_status') + self.processing_status = attributes[:'processing_status'] + 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 @processing_status.nil? + true + end + + # Custom attribute writer method with validation + # @param processing_status [Object] Object to be assigned + # @!visibility private + def processing_status=(processing_status) + if processing_status.nil? + fail ArgumentError, 'invalid value for "processing_status", processing_status cannot be nil.' + end + @processing_status = processing_status + 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 && + processing_status == o.processing_status && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [processing_status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/tag_pipelines_ruleset_status_data.rb b/lib/datadog_api_client/v2/models/tag_pipelines_ruleset_status_data.rb new file mode 100644 index 000000000000..89e81c3a6c66 --- /dev/null +++ b/lib/datadog_api_client/v2/models/tag_pipelines_ruleset_status_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 + # Tag pipeline ruleset status data. + class TagPipelinesRulesetStatusData + include BaseGenericModel + + # Attributes for a tag pipeline ruleset status. + attr_reader :attributes + + # The unique identifier of the ruleset. + attr_reader :id + + # Tag pipeline ruleset status 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' => :'TagPipelinesRulesetStatusAttributes', + :'id' => :'String', + :'type' => :'TagPipelinesRulesetStatusType' + } + 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::TagPipelinesRulesetStatusData` 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/tag_pipelines_ruleset_status_response.rb b/lib/datadog_api_client/v2/models/tag_pipelines_ruleset_status_response.rb new file mode 100644 index 000000000000..d8d71b7c0467 --- /dev/null +++ b/lib/datadog_api_client/v2/models/tag_pipelines_ruleset_status_response.rb @@ -0,0 +1,125 @@ +=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 + # List of tag pipeline ruleset statuses. + class TagPipelinesRulesetStatusResponse + include BaseGenericModel + + # List of ruleset statuses. + 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' => :'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::TagPipelinesRulesetStatusResponse` 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') + if (value = attributes[:'data']).is_a?(Array) + self.data = 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 @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/tag_pipelines_ruleset_status_type.rb b/lib/datadog_api_client/v2/models/tag_pipelines_ruleset_status_type.rb new file mode 100644 index 000000000000..4e77f960702b --- /dev/null +++ b/lib/datadog_api_client/v2/models/tag_pipelines_ruleset_status_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 + # Tag pipeline ruleset status resource type. + class TagPipelinesRulesetStatusType + include BaseEnumModel + + RULESET_STATUS = "ruleset_status".freeze + end +end