From 69ec7ebcf0ffbeffdec4541e8e11adb4bde4abb3 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 18 Sep 2025 12:34:26 +0000 Subject: [PATCH] Regenerate client from commit 716beda of spec repo --- .generator/schemas/v2/openapi.yaml | 2702 +++++++++++++++-- ...ment-Azure-configs-returns-OK-response.yml | 9 +- ...onfig-returns-Bad-Request-response.frozen} | 0 ...t-config-returns-Bad-Request-response.yml} | 0 ...ge-Cost-config-returns-OK-response.frozen} | 0 ...Usage-Cost-config-returns-OK-response.yml} | 0 ...trary-cost-rule-returns-OK-response.frozen | 1 + ...rbitrary-cost-rule-returns-OK-response.yml | 26 + .../Create-ruleset-returns-OK-response.frozen | 1 + .../Create-ruleset-returns-OK-response.yml | 28 + ...config-returns-Bad-Request-response.frozen | 1 - ...st-config-returns-Bad-Request-response.yml | 21 - ...config-returns-No-Content-response.frozen} | 0 ...st-config-returns-No-Content-response.yml} | 0 ...-config-returns-Not-Found-response.frozen} | 0 ...ost-config-returns-Not-Found-response.yml} | 0 ...st-rule-returns-No-Content-response.frozen | 1 + ...-cost-rule-returns-No-Content-response.yml | 18 + ...ruleset-returns-No-Content-response.frozen | 1 + ...te-ruleset-returns-No-Content-response.yml | 18 + ...age-Cost-config-returns-OK-response.frozen | 1 + ...-Usage-Cost-config-returns-OK-response.yml | 20 + ...trary-cost-rule-returns-OK-response.frozen | 1 + ...rbitrary-cost-rule-returns-OK-response.yml | 21 + ...-AWS-CUR-config-returns-OK-response.frozen | 1 + ...ost-AWS-CUR-config-returns-OK-response.yml | 20 + ...Azure-UC-config-returns-OK-response.frozen | 1 + ...st-Azure-UC-config-returns-OK-response.yml | 20 + .../Get-ruleset-returns-OK-response.frozen | 1 + .../Get-ruleset-returns-OK-response.yml | 22 + ...e-Cost-configs-returns-OK-response.frozen} | 0 ...sage-Cost-configs-returns-OK-response.yml} | 0 ...rary-cost-rules-returns-OK-response.frozen | 1 + ...bitrary-cost-rules-returns-OK-response.yml | 21 + .../List-rulesets-returns-OK-response.frozen | 1 + .../List-rulesets-returns-OK-response.yml | 22 + ...-CUR-config-returns-Not-Found-response.yml | 4 +- ...zure-config-returns-Not-Found-response.yml | 4 +- ...-config-returns-Not-Found-response.frozen} | 0 ...ost-config-returns-Not-Found-response.yml} | 2 +- ...ge-Cost-config-returns-OK-response.frozen} | 0 ...Usage-Cost-config-returns-OK-response.yml} | 0 ...trary-cost-rule-returns-OK-response.frozen | 1 + ...rbitrary-cost-rule-returns-OK-response.yml | 26 + .../Update-ruleset-returns-OK-response.frozen | 1 + .../Update-ruleset-returns-OK-response.yml | 26 + .../Validate-query-returns-OK-response.frozen | 1 + .../Validate-query-returns-OK-response.yml | 25 + .../CreateArbitraryCostRule.rb | 63 + .../CreateCostAzureUCConfigs.rb | 1 - .../CreateCostGCPUsageCostConfig.rb | 2 +- .../v2/cloud-cost-management/CreateRuleset.rb | 32 + .../DeleteArbitraryCostRule.rb | 5 + .../DeleteCostGCPUsageCostConfig.rb | 2 +- .../v2/cloud-cost-management/DeleteRuleset.rb | 5 + .../GetArbitraryCostRule.rb | 5 + .../GetCostAWSCURConfig.rb | 5 + .../GetCostAzureUCConfig.rb | 5 + .../GetCostGCPUsageCostConfig.rb | 5 + .../v2/cloud-cost-management/GetRuleset.rb | 5 + .../ListArbitraryCostRules.rb | 5 + .../ListCostGCPUsageCostConfigs.rb | 2 +- .../v2/cloud-cost-management/ListRulesets.rb | 5 + .../ReorderArbitraryCostRules.rb | 22 + .../cloud-cost-management/ReorderRulesets.rb | 13 + .../UpdateArbitraryCostRule.rb | 63 + .../UpdateCostGCPUsageCostConfig.rb | 2 +- .../v2/cloud-cost-management/UpdateRuleset.rb | 31 + .../v2/cloud-cost-management/ValidateQuery.rb | 14 + features/scenarios_model_mapping.rb | 44 + features/v2/cloud_cost_management.feature | 203 +- features/v2/undo.json | 96 + lib/datadog_api_client/inflector.rb | 85 +- .../v2/api/cloud_cost_management_api.rb | 1337 +++++++- .../v2/models/account_filtering_config.rb | 8 + .../models/arbitrary_cost_upsert_request.rb | 105 + .../arbitrary_cost_upsert_request_data.rb | 143 + ...ary_cost_upsert_request_data_attributes.rb | 241 ++ ...data_attributes_costs_to_allocate_items.rb | 174 ++ ...upsert_request_data_attributes_strategy.rb | 215 ++ ...tes_strategy_allocated_by_filters_items.rb | 174 ++ ..._attributes_strategy_allocated_by_items.rb | 146 + ...allocated_by_items_allocated_tags_items.rb | 144 + ...ttributes_strategy_based_on_costs_items.rb | 174 ++ ...ategy_evaluate_grouped_by_filters_items.rb | 174 ++ ...arbitrary_cost_upsert_request_data_type.rb | 26 + .../v2/models/arbitrary_rule_response.rb | 105 + .../models/arbitrary_rule_response_array.rb | 125 + .../v2/models/arbitrary_rule_response_data.rb | 143 + ...arbitrary_rule_response_data_attributes.rb | 351 +++ ...data_attributes_costs_to_allocate_items.rb | 174 ++ ..._rule_response_data_attributes_strategy.rb | 215 ++ ...tes_strategy_allocated_by_filters_items.rb | 174 ++ ..._attributes_strategy_allocated_by_items.rb | 146 + ...allocated_by_items_allocated_tags_items.rb | 144 + ...ttributes_strategy_based_on_costs_items.rb | 174 ++ ...ategy_evaluate_grouped_by_filters_items.rb | 174 ++ .../arbitrary_rule_response_data_type.rb | 26 + .../v2/models/aws_cur_config_attributes.rb | 8 + .../v2/models/aws_cur_config_post_data.rb | 13 +- .../v2/models/aws_cur_config_response.rb | 10 +- .../v2/models/aws_cur_config_response_data.rb | 143 + ...aws_cur_config_response_data_attributes.rb | 225 ++ ...esponse_data_attributes_account_filters.rb | 137 + .../aws_cur_config_response_data_type.rb | 26 + .../v2/models/aws_cur_configs_response.rb | 20 +- .../v2/models/azure_uc_config.rb | 10 +- .../v2/models/azure_uc_config_patch_data.rb | 13 +- .../v2/models/azure_uc_config_post_data.rb | 13 +- ...azure_uc_config_post_request_attributes.rb | 16 +- .../v2/models/azure_uc_configs_response.rb | 20 +- .../v2/models/create_ruleset_request.rb | 105 + .../v2/models/create_ruleset_request_data.rb | 143 + .../create_ruleset_request_data_attributes.rb | 135 + ...set_request_data_attributes_rules_items.rb | 195 ++ ...est_data_attributes_rules_items_mapping.rb | 167 + ...quest_data_attributes_rules_items_query.rb | 172 ++ ...a_attributes_rules_items_query_addition.rb | 144 + ..._attributes_rules_items_reference_table.rb | 189 ++ ...items_reference_table_field_pairs_items.rb | 144 + .../create_ruleset_request_data_type.rb | 26 + .../v2/models/gcp_uc_config_response.rb | 105 + .../v2/models/gcp_uc_config_response_data.rb | 143 + .../gcp_uc_config_response_data_attributes.rb | 235 ++ .../gcp_uc_config_response_data_type.rb | 26 + .../v2/models/gcp_usage_cost_config.rb | 8 +- .../gcp_usage_cost_config_attributes.rb | 26 +- .../gcp_usage_cost_config_patch_data.rb | 6 +- .../gcp_usage_cost_config_patch_request.rb | 4 +- ...ge_cost_config_patch_request_attributes.rb | 2 +- ...cp_usage_cost_config_patch_request_type.rb | 2 +- .../models/gcp_usage_cost_config_post_data.rb | 19 +- .../gcp_usage_cost_config_post_request.rb | 4 +- ...age_cost_config_post_request_attributes.rb | 14 +- ...gcp_usage_cost_config_post_request_type.rb | 2 +- .../models/gcp_usage_cost_config_response.rb | 4 +- .../v2/models/gcp_usage_cost_config_type.rb | 2 +- .../models/gcp_usage_cost_configs_response.rb | 24 +- .../v2/models/reorder_rule_resource_array.rb | 125 + .../v2/models/reorder_rule_resource_data.rb | 133 + .../models/reorder_rule_resource_data_type.rb | 26 + .../models/reorder_ruleset_resource_array.rb | 125 + .../models/reorder_ruleset_resource_data.rb | 133 + .../reorder_ruleset_resource_data_type.rb | 26 + .../v2/models/rules_validate_query_request.rb | 105 + .../rules_validate_query_request_data.rb | 143 + ..._validate_query_request_data_attributes.rb | 123 + .../rules_validate_query_request_data_type.rb | 26 + .../models/rules_validate_query_response.rb | 105 + .../rules_validate_query_response_data.rb | 143 + ...validate_query_response_data_attributes.rb | 123 + ...rules_validate_query_response_data_type.rb | 26 + .../v2/models/ruleset_resp.rb | 105 + .../v2/models/ruleset_resp_array.rb | 125 + .../v2/models/ruleset_resp_data.rb | 143 + .../v2/models/ruleset_resp_data_attributes.rb | 276 ++ .../ruleset_resp_data_attributes_created.rb | 133 + .../ruleset_resp_data_attributes_modified.rb | 133 + ...uleset_resp_data_attributes_rules_items.rb | 195 ++ ...esp_data_attributes_rules_items_mapping.rb | 167 + ..._resp_data_attributes_rules_items_query.rb | 172 ++ ...a_attributes_rules_items_query_addition.rb | 144 + ..._attributes_rules_items_reference_table.rb | 189 ++ ...items_reference_table_field_pairs_items.rb | 144 + .../v2/models/ruleset_resp_data_type.rb | 26 + .../v2/models/uc_config_pair.rb | 105 + .../v2/models/uc_config_pair_data.rb | 143 + .../models/uc_config_pair_data_attributes.rb | 107 + ...nfig_pair_data_attributes_configs_items.rb | 255 ++ .../v2/models/uc_config_pair_data_type.rb | 26 + .../v2/models/update_ruleset_request.rb | 105 + .../v2/models/update_ruleset_request_data.rb | 143 + .../update_ruleset_request_data_attributes.rb | 156 + ...set_request_data_attributes_rules_items.rb | 195 ++ ...est_data_attributes_rules_items_mapping.rb | 167 + ...quest_data_attributes_rules_items_query.rb | 172 ++ ...a_attributes_rules_items_query_addition.rb | 144 + ..._attributes_rules_items_reference_table.rb | 189 ++ ...items_reference_table_field_pairs_items.rb | 144 + .../update_ruleset_request_data_type.rb | 26 + 180 files changed, 16380 insertions(+), 513 deletions(-) rename cassettes/features/v2/cloud_cost_management/{Create-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-Bad-Request-response.frozen => Create-Google-Cloud-Usage-Cost-config-returns-Bad-Request-response.frozen} (100%) rename cassettes/features/v2/cloud_cost_management/{Create-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-Bad-Request-response.yml => Create-Google-Cloud-Usage-Cost-config-returns-Bad-Request-response.yml} (100%) rename cassettes/features/v2/cloud_cost_management/{Create-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-OK-response.frozen => Create-Google-Cloud-Usage-Cost-config-returns-OK-response.frozen} (100%) rename cassettes/features/v2/cloud_cost_management/{Create-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-OK-response.yml => Create-Google-Cloud-Usage-Cost-config-returns-OK-response.yml} (100%) create mode 100644 cassettes/features/v2/cloud_cost_management/Create-arbitrary-cost-rule-returns-OK-response.frozen create mode 100644 cassettes/features/v2/cloud_cost_management/Create-arbitrary-cost-rule-returns-OK-response.yml create mode 100644 cassettes/features/v2/cloud_cost_management/Create-ruleset-returns-OK-response.frozen create mode 100644 cassettes/features/v2/cloud_cost_management/Create-ruleset-returns-OK-response.yml delete mode 100644 cassettes/features/v2/cloud_cost_management/Delete-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-Bad-Request-response.frozen delete mode 100644 cassettes/features/v2/cloud_cost_management/Delete-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-Bad-Request-response.yml rename cassettes/features/v2/cloud_cost_management/{Delete-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-No-Content-response.frozen => Delete-Google-Cloud-Usage-Cost-config-returns-No-Content-response.frozen} (100%) rename cassettes/features/v2/cloud_cost_management/{Delete-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-No-Content-response.yml => Delete-Google-Cloud-Usage-Cost-config-returns-No-Content-response.yml} (100%) rename cassettes/features/v2/cloud_cost_management/{Delete-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-Not-Found-response.frozen => Delete-Google-Cloud-Usage-Cost-config-returns-Not-Found-response.frozen} (100%) rename cassettes/features/v2/cloud_cost_management/{Delete-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-Not-Found-response.yml => Delete-Google-Cloud-Usage-Cost-config-returns-Not-Found-response.yml} (100%) create mode 100644 cassettes/features/v2/cloud_cost_management/Delete-arbitrary-cost-rule-returns-No-Content-response.frozen create mode 100644 cassettes/features/v2/cloud_cost_management/Delete-arbitrary-cost-rule-returns-No-Content-response.yml create mode 100644 cassettes/features/v2/cloud_cost_management/Delete-ruleset-returns-No-Content-response.frozen create mode 100644 cassettes/features/v2/cloud_cost_management/Delete-ruleset-returns-No-Content-response.yml create mode 100644 cassettes/features/v2/cloud_cost_management/Get-Google-Cloud-Usage-Cost-config-returns-OK-response.frozen create mode 100644 cassettes/features/v2/cloud_cost_management/Get-Google-Cloud-Usage-Cost-config-returns-OK-response.yml create mode 100644 cassettes/features/v2/cloud_cost_management/Get-arbitrary-cost-rule-returns-OK-response.frozen create mode 100644 cassettes/features/v2/cloud_cost_management/Get-arbitrary-cost-rule-returns-OK-response.yml create mode 100644 cassettes/features/v2/cloud_cost_management/Get-cost-AWS-CUR-config-returns-OK-response.frozen create mode 100644 cassettes/features/v2/cloud_cost_management/Get-cost-AWS-CUR-config-returns-OK-response.yml create mode 100644 cassettes/features/v2/cloud_cost_management/Get-cost-Azure-UC-config-returns-OK-response.frozen create mode 100644 cassettes/features/v2/cloud_cost_management/Get-cost-Azure-UC-config-returns-OK-response.yml create mode 100644 cassettes/features/v2/cloud_cost_management/Get-ruleset-returns-OK-response.frozen create mode 100644 cassettes/features/v2/cloud_cost_management/Get-ruleset-returns-OK-response.yml rename cassettes/features/v2/cloud_cost_management/{List-Cloud-Cost-Management-GCP-Usage-Cost-configs-returns-OK-response.frozen => List-Google-Cloud-Usage-Cost-configs-returns-OK-response.frozen} (100%) rename cassettes/features/v2/cloud_cost_management/{List-Cloud-Cost-Management-GCP-Usage-Cost-configs-returns-OK-response.yml => List-Google-Cloud-Usage-Cost-configs-returns-OK-response.yml} (100%) create mode 100644 cassettes/features/v2/cloud_cost_management/List-arbitrary-cost-rules-returns-OK-response.frozen create mode 100644 cassettes/features/v2/cloud_cost_management/List-arbitrary-cost-rules-returns-OK-response.yml create mode 100644 cassettes/features/v2/cloud_cost_management/List-rulesets-returns-OK-response.frozen create mode 100644 cassettes/features/v2/cloud_cost_management/List-rulesets-returns-OK-response.yml rename cassettes/features/v2/cloud_cost_management/{Update-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-Not-Found-response.frozen => Update-Google-Cloud-Usage-Cost-config-returns-Not-Found-response.frozen} (100%) rename cassettes/features/v2/cloud_cost_management/{Update-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-Not-Found-response.yml => Update-Google-Cloud-Usage-Cost-config-returns-Not-Found-response.yml} (99%) rename cassettes/features/v2/cloud_cost_management/{Update-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-OK-response.frozen => Update-Google-Cloud-Usage-Cost-config-returns-OK-response.frozen} (100%) rename cassettes/features/v2/cloud_cost_management/{Update-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-OK-response.yml => Update-Google-Cloud-Usage-Cost-config-returns-OK-response.yml} (100%) create mode 100644 cassettes/features/v2/cloud_cost_management/Update-arbitrary-cost-rule-returns-OK-response.frozen create mode 100644 cassettes/features/v2/cloud_cost_management/Update-arbitrary-cost-rule-returns-OK-response.yml create mode 100644 cassettes/features/v2/cloud_cost_management/Update-ruleset-returns-OK-response.frozen create mode 100644 cassettes/features/v2/cloud_cost_management/Update-ruleset-returns-OK-response.yml create mode 100644 cassettes/features/v2/cloud_cost_management/Validate-query-returns-OK-response.frozen create mode 100644 cassettes/features/v2/cloud_cost_management/Validate-query-returns-OK-response.yml create mode 100644 examples/v2/cloud-cost-management/CreateArbitraryCostRule.rb create mode 100644 examples/v2/cloud-cost-management/CreateRuleset.rb create mode 100644 examples/v2/cloud-cost-management/DeleteArbitraryCostRule.rb create mode 100644 examples/v2/cloud-cost-management/DeleteRuleset.rb create mode 100644 examples/v2/cloud-cost-management/GetArbitraryCostRule.rb create mode 100644 examples/v2/cloud-cost-management/GetCostAWSCURConfig.rb create mode 100644 examples/v2/cloud-cost-management/GetCostAzureUCConfig.rb create mode 100644 examples/v2/cloud-cost-management/GetCostGCPUsageCostConfig.rb create mode 100644 examples/v2/cloud-cost-management/GetRuleset.rb create mode 100644 examples/v2/cloud-cost-management/ListArbitraryCostRules.rb create mode 100644 examples/v2/cloud-cost-management/ListRulesets.rb create mode 100644 examples/v2/cloud-cost-management/ReorderArbitraryCostRules.rb create mode 100644 examples/v2/cloud-cost-management/ReorderRulesets.rb create mode 100644 examples/v2/cloud-cost-management/UpdateArbitraryCostRule.rb create mode 100644 examples/v2/cloud-cost-management/UpdateRuleset.rb create mode 100644 examples/v2/cloud-cost-management/ValidateQuery.rb create mode 100644 lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request.rb create mode 100644 lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data.rb create mode 100644 lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_costs_to_allocate_items.rb create mode 100644 lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy.rb create mode 100644 lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_allocated_by_filters_items.rb create mode 100644 lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_allocated_by_items.rb create mode 100644 lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_allocated_by_items_allocated_tags_items.rb create mode 100644 lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_based_on_costs_items.rb create mode 100644 lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_evaluate_grouped_by_filters_items.rb create mode 100644 lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/arbitrary_rule_response.rb create mode 100644 lib/datadog_api_client/v2/models/arbitrary_rule_response_array.rb create mode 100644 lib/datadog_api_client/v2/models/arbitrary_rule_response_data.rb create mode 100644 lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_costs_to_allocate_items.rb create mode 100644 lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy.rb create mode 100644 lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_allocated_by_filters_items.rb create mode 100644 lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_allocated_by_items.rb create mode 100644 lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_allocated_by_items_allocated_tags_items.rb create mode 100644 lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_based_on_costs_items.rb create mode 100644 lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_evaluate_grouped_by_filters_items.rb create mode 100644 lib/datadog_api_client/v2/models/arbitrary_rule_response_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/aws_cur_config_response_data.rb create mode 100644 lib/datadog_api_client/v2/models/aws_cur_config_response_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/aws_cur_config_response_data_attributes_account_filters.rb create mode 100644 lib/datadog_api_client/v2/models/aws_cur_config_response_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/create_ruleset_request.rb create mode 100644 lib/datadog_api_client/v2/models/create_ruleset_request_data.rb create mode 100644 lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items.rb create mode 100644 lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_mapping.rb create mode 100644 lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_query.rb create mode 100644 lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_query_addition.rb create mode 100644 lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_reference_table.rb create mode 100644 lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_reference_table_field_pairs_items.rb create mode 100644 lib/datadog_api_client/v2/models/create_ruleset_request_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/gcp_uc_config_response.rb create mode 100644 lib/datadog_api_client/v2/models/gcp_uc_config_response_data.rb create mode 100644 lib/datadog_api_client/v2/models/gcp_uc_config_response_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/gcp_uc_config_response_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/reorder_rule_resource_array.rb create mode 100644 lib/datadog_api_client/v2/models/reorder_rule_resource_data.rb create mode 100644 lib/datadog_api_client/v2/models/reorder_rule_resource_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/reorder_ruleset_resource_array.rb create mode 100644 lib/datadog_api_client/v2/models/reorder_ruleset_resource_data.rb create mode 100644 lib/datadog_api_client/v2/models/reorder_ruleset_resource_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/rules_validate_query_request.rb create mode 100644 lib/datadog_api_client/v2/models/rules_validate_query_request_data.rb create mode 100644 lib/datadog_api_client/v2/models/rules_validate_query_request_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/rules_validate_query_request_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/rules_validate_query_response.rb create mode 100644 lib/datadog_api_client/v2/models/rules_validate_query_response_data.rb create mode 100644 lib/datadog_api_client/v2/models/rules_validate_query_response_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/rules_validate_query_response_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/ruleset_resp.rb create mode 100644 lib/datadog_api_client/v2/models/ruleset_resp_array.rb create mode 100644 lib/datadog_api_client/v2/models/ruleset_resp_data.rb create mode 100644 lib/datadog_api_client/v2/models/ruleset_resp_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_created.rb create mode 100644 lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_modified.rb create mode 100644 lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items.rb create mode 100644 lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_mapping.rb create mode 100644 lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_query.rb create mode 100644 lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_query_addition.rb create mode 100644 lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_reference_table.rb create mode 100644 lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_reference_table_field_pairs_items.rb create mode 100644 lib/datadog_api_client/v2/models/ruleset_resp_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/uc_config_pair.rb create mode 100644 lib/datadog_api_client/v2/models/uc_config_pair_data.rb create mode 100644 lib/datadog_api_client/v2/models/uc_config_pair_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/uc_config_pair_data_attributes_configs_items.rb create mode 100644 lib/datadog_api_client/v2/models/uc_config_pair_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/update_ruleset_request.rb create mode 100644 lib/datadog_api_client/v2/models/update_ruleset_request_data.rb create mode 100644 lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items.rb create mode 100644 lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_mapping.rb create mode 100644 lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_query.rb create mode 100644 lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_query_addition.rb create mode 100644 lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_reference_table.rb create mode 100644 lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_reference_table_field_pairs_items.rb create mode 100644 lib/datadog_api_client/v2/models/update_ruleset_request_data_type.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 4ed0b352040f..35ff674a3007 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -2153,6 +2153,7 @@ components: description: Whether or not to automatically include new member accounts by default in your billing dataset. example: true + nullable: true type: boolean included_accounts: description: The AWS account IDs to be included in your billing dataset. @@ -3948,6 +3949,634 @@ components: - CREATED_AT_DESC - UPDATED_AT_DESC - USER_NAME_DESC + ArbitraryCostUpsertRequest: + description: The definition of `ArbitraryCostUpsertRequest` object. + example: + data: + attributes: + costs_to_allocate: + - condition: is + tag: account_id + value: '123456789' + values: null + - condition: in + tag: environment + value: '' + values: + - production + - staging + enabled: true + order_id: 1 + provider: + - aws + - gcp + rule_name: example-arbitrary-cost-rule + strategy: + allocated_by_tag_keys: + - team + - environment + based_on_costs: + - condition: is + tag: service + value: web-api + values: null + - condition: not in + tag: team + value: '' + values: + - legacy + - deprecated + granularity: daily + method: proportional + type: shared + type: upsert_arbitrary_rule + properties: + data: + $ref: '#/components/schemas/ArbitraryCostUpsertRequestData' + type: object + ArbitraryCostUpsertRequestData: + description: The definition of `ArbitraryCostUpsertRequestData` object. + properties: + attributes: + $ref: '#/components/schemas/ArbitraryCostUpsertRequestDataAttributes' + id: + description: The `ArbitraryCostUpsertRequestData` `id`. + type: string + type: + $ref: '#/components/schemas/ArbitraryCostUpsertRequestDataType' + required: + - type + type: object + ArbitraryCostUpsertRequestDataAttributes: + description: The definition of `ArbitraryCostUpsertRequestDataAttributes` object. + properties: + costs_to_allocate: + description: The `attributes` `costs_to_allocate`. + items: + $ref: '#/components/schemas/ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems' + type: array + enabled: + description: The `attributes` `enabled`. + type: boolean + order_id: + description: The `attributes` `order_id`. + format: int64 + type: integer + provider: + description: The `attributes` `provider`. + example: + - '' + items: + type: string + type: array + rejected: + description: The `attributes` `rejected`. + type: boolean + rule_name: + description: The `attributes` `rule_name`. + example: '' + type: string + strategy: + $ref: '#/components/schemas/ArbitraryCostUpsertRequestDataAttributesStrategy' + type: + description: The `attributes` `type`. + example: '' + type: string + required: + - costs_to_allocate + - provider + - rule_name + - strategy + - type + type: object + ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems: + description: The definition of `ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems` + object. + properties: + condition: + description: The `items` `condition`. + example: '' + type: string + tag: + description: The `items` `tag`. + example: '' + type: string + value: + description: The `items` `value`. + type: string + values: + description: The `items` `values`. + items: + type: string + nullable: true + type: array + required: + - condition + - tag + type: object + ArbitraryCostUpsertRequestDataAttributesStrategy: + description: The definition of `ArbitraryCostUpsertRequestDataAttributesStrategy` + object. + properties: + allocated_by: + description: The `strategy` `allocated_by`. + items: + $ref: '#/components/schemas/ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems' + type: array + allocated_by_filters: + description: The `strategy` `allocated_by_filters`. + items: + $ref: '#/components/schemas/ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems' + type: array + allocated_by_tag_keys: + description: The `strategy` `allocated_by_tag_keys`. + items: + type: string + type: array + based_on_costs: + description: The `strategy` `based_on_costs`. + items: + $ref: '#/components/schemas/ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems' + type: array + based_on_timeseries: + additionalProperties: {} + description: The `strategy` `based_on_timeseries`. + type: object + evaluate_grouped_by_filters: + description: The `strategy` `evaluate_grouped_by_filters`. + items: + $ref: '#/components/schemas/ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems' + type: array + evaluate_grouped_by_tag_keys: + description: The `strategy` `evaluate_grouped_by_tag_keys`. + items: + type: string + type: array + granularity: + description: The `strategy` `granularity`. + type: string + method: + description: The `strategy` `method`. + example: '' + type: string + required: + - method + type: object + ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems: + description: The definition of `ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems` + object. + properties: + condition: + description: The `items` `condition`. + example: '' + type: string + tag: + description: The `items` `tag`. + example: '' + type: string + value: + description: The `items` `value`. + type: string + values: + description: The `items` `values`. + items: + type: string + nullable: true + type: array + required: + - condition + - tag + type: object + ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems: + description: The definition of `ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems` + object. + properties: + allocated_tags: + description: The `items` `allocated_tags`. + items: + $ref: '#/components/schemas/ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems' + type: array + percentage: + description: The `items` `percentage`. The numeric value format should be + a 32bit float value. + example: 0.0 + format: double + type: number + required: + - allocated_tags + - percentage + type: object + ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems: + description: The definition of `ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems` + object. + properties: + key: + description: The `items` `key`. + example: '' + type: string + value: + description: The `items` `value`. + example: '' + type: string + required: + - key + - value + type: object + ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems: + description: The definition of `ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems` + object. + properties: + condition: + description: The `items` `condition`. + example: '' + type: string + tag: + description: The `items` `tag`. + example: '' + type: string + value: + description: The `items` `value`. + type: string + values: + description: The `items` `values`. + items: + type: string + nullable: true + type: array + required: + - condition + - tag + type: object + ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems: + description: The definition of `ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems` + object. + properties: + condition: + description: The `items` `condition`. + example: '' + type: string + tag: + description: The `items` `tag`. + example: '' + type: string + value: + description: The `items` `value`. + type: string + values: + description: The `items` `values`. + items: + type: string + nullable: true + type: array + required: + - condition + - tag + type: object + ArbitraryCostUpsertRequestDataType: + default: upsert_arbitrary_rule + description: Upsert arbitrary rule resource type. + enum: + - upsert_arbitrary_rule + example: upsert_arbitrary_rule + type: string + x-enum-varnames: + - UPSERT_ARBITRARY_RULE + ArbitraryRuleResponse: + description: The definition of `ArbitraryRuleResponse` object. + example: + data: + attributes: + costs_to_allocate: + - condition: is + tag: account_id + value: '123456789' + values: null + - condition: in + tag: environment + value: '' + values: + - production + - staging + created: '2023-01-01T12:00:00Z' + enabled: true + last_modified_user_uuid: user-123-uuid + order_id: 1 + provider: + - aws + - gcp + rule_name: Example Arbitrary Cost Rule + strategy: + allocated_by_tag_keys: + - team + - environment + based_on_costs: + - condition: is + tag: service + value: web-api + values: null + - condition: not in + tag: team + value: '' + values: + - legacy + - deprecated + granularity: daily + method: proportional + type: shared + updated: '2023-01-01T12:00:00Z' + version: 1 + id: '123' + type: arbitrary_rule + properties: + data: + $ref: '#/components/schemas/ArbitraryRuleResponseData' + type: object + ArbitraryRuleResponseArray: + description: The definition of `ArbitraryRuleResponseArray` object. + properties: + data: + description: The `ArbitraryRuleResponseArray` `data`. + items: + $ref: '#/components/schemas/ArbitraryRuleResponseData' + type: array + required: + - data + type: object + ArbitraryRuleResponseData: + description: The definition of `ArbitraryRuleResponseData` object. + properties: + attributes: + $ref: '#/components/schemas/ArbitraryRuleResponseDataAttributes' + id: + description: The `ArbitraryRuleResponseData` `id`. + type: string + type: + $ref: '#/components/schemas/ArbitraryRuleResponseDataType' + required: + - type + type: object + ArbitraryRuleResponseDataAttributes: + description: The definition of `ArbitraryRuleResponseDataAttributes` object. + properties: + costs_to_allocate: + description: The `attributes` `costs_to_allocate`. + items: + $ref: '#/components/schemas/ArbitraryRuleResponseDataAttributesCostsToAllocateItems' + type: array + created: + description: The `attributes` `created`. + example: '' + format: date-time + type: string + enabled: + description: The `attributes` `enabled`. + example: false + type: boolean + last_modified_user_uuid: + description: The `attributes` `last_modified_user_uuid`. + example: '' + type: string + order_id: + description: The `attributes` `order_id`. + example: 0 + format: int64 + type: integer + provider: + description: The `attributes` `provider`. + example: + - '' + items: + type: string + type: array + rejected: + description: The `attributes` `rejected`. + type: boolean + rule_name: + description: The `attributes` `rule_name`. + example: '' + type: string + strategy: + $ref: '#/components/schemas/ArbitraryRuleResponseDataAttributesStrategy' + type: + description: The `attributes` `type`. + example: '' + type: string + updated: + description: The `attributes` `updated`. + example: '' + format: date-time + type: string + version: + description: The `attributes` `version`. + example: 0 + format: int32 + maximum: 2147483647 + type: integer + required: + - costs_to_allocate + - created + - enabled + - last_modified_user_uuid + - order_id + - provider + - rule_name + - strategy + - type + - updated + - version + type: object + ArbitraryRuleResponseDataAttributesCostsToAllocateItems: + description: The definition of `ArbitraryRuleResponseDataAttributesCostsToAllocateItems` + object. + properties: + condition: + description: The `items` `condition`. + example: '' + type: string + tag: + description: The `items` `tag`. + example: '' + type: string + value: + description: The `items` `value`. + type: string + values: + description: The `items` `values`. + items: + type: string + nullable: true + type: array + required: + - condition + - tag + type: object + ArbitraryRuleResponseDataAttributesStrategy: + description: The definition of `ArbitraryRuleResponseDataAttributesStrategy` + object. + properties: + allocated_by: + description: The `strategy` `allocated_by`. + items: + $ref: '#/components/schemas/ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems' + type: array + allocated_by_filters: + description: The `strategy` `allocated_by_filters`. + items: + $ref: '#/components/schemas/ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems' + type: array + allocated_by_tag_keys: + description: The `strategy` `allocated_by_tag_keys`. + items: + type: string + type: array + based_on_costs: + description: The `strategy` `based_on_costs`. + items: + $ref: '#/components/schemas/ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems' + type: array + based_on_timeseries: + additionalProperties: {} + description: The rule `strategy` `based_on_timeseries`. + type: object + evaluate_grouped_by_filters: + description: The `strategy` `evaluate_grouped_by_filters`. + items: + $ref: '#/components/schemas/ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems' + type: array + evaluate_grouped_by_tag_keys: + description: The `strategy` `evaluate_grouped_by_tag_keys`. + items: + type: string + type: array + granularity: + description: The `strategy` `granularity`. + type: string + method: + description: The `strategy` `method`. + example: '' + type: string + required: + - method + type: object + ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems: + description: The definition of `ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems` + object. + properties: + condition: + description: The `items` `condition`. + example: '' + type: string + tag: + description: The `items` `tag`. + example: '' + type: string + value: + description: The `items` `value`. + type: string + values: + description: The `items` `values`. + items: + type: string + nullable: true + type: array + required: + - condition + - tag + type: object + ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems: + description: The definition of `ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems` + object. + properties: + allocated_tags: + description: The `items` `allocated_tags`. + items: + $ref: '#/components/schemas/ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems' + type: array + percentage: + description: The `items` `percentage`. The numeric value format should be + a 32bit float value. + example: 0.0 + format: double + type: number + required: + - allocated_tags + - percentage + type: object + ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems: + description: The definition of `ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems` + object. + properties: + key: + description: The `items` `key`. + example: '' + type: string + value: + description: The `items` `value`. + example: '' + type: string + required: + - key + - value + type: object + ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems: + description: The definition of `ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems` + object. + properties: + condition: + description: The `items` `condition`. + example: '' + type: string + tag: + description: The `items` `tag`. + example: '' + type: string + value: + description: The `items` `value`. + type: string + values: + description: The `items` `values`. + items: + type: string + nullable: true + type: array + required: + - condition + - tag + type: object + ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems: + description: The definition of `ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems` + object. + properties: + condition: + description: The `items` `condition`. + example: '' + type: string + tag: + description: The `items` `tag`. + example: '' + type: string + value: + description: The `items` `value`. + type: string + values: + description: The `items` `values`. + items: + type: string + nullable: true + type: array + required: + - condition + - tag + type: object + ArbitraryRuleResponseDataType: + default: arbitrary_rule + description: Arbitrary rule resource type. + enum: + - arbitrary_rule + example: arbitrary_rule + type: string + x-enum-varnames: + - ARBITRARY_RULE AsanaAccessToken: description: The definition of the `AsanaAccessToken` object. properties: @@ -4701,6 +5330,7 @@ components: description: The error messages for the AWS CUR config. items: type: string + nullable: true type: array months: deprecated: true @@ -4782,7 +5412,6 @@ components: type: $ref: '#/components/schemas/AwsCURConfigPostRequestType' required: - - attributes - type type: object AwsCURConfigPostRequest: @@ -4838,12 +5467,6 @@ components: type: string x-enum-varnames: - AWS_CUR_CONFIG_POST_REQUEST - AwsCURConfigResponse: - description: Response of AWS CUR config. - properties: - data: - $ref: '#/components/schemas/AwsCURConfig' - type: object AwsCURConfigType: default: aws_cur_config description: Type of AWS CUR config. @@ -4861,7 +5484,120 @@ components: items: $ref: '#/components/schemas/AwsCURConfig' type: array + required: + - data + type: object + AwsCurConfigResponse: + description: The definition of `AwsCurConfigResponse` object. + example: + data: + attributes: + account_filters: + excluded_accounts: + - '123456789124' + - '123456789125' + include_new_accounts: true + account_id: '123456789123' + bucket_name: dd-cost-bucket + bucket_region: us-east-1 + created_at: 2023-01-01 12:00:00 + error_messages: [] + months: 36 + report_name: dd-report-name + report_prefix: dd-report-prefix + status: active + status_updated_at: 2023-01-01 12:00:00 + updated_at: 2023-01-01 12:00:00 + id: '123456789123' + type: aws_cur_config + properties: + data: + $ref: '#/components/schemas/AwsCurConfigResponseData' + type: object + AwsCurConfigResponseData: + description: The definition of `AwsCurConfigResponseData` object. + properties: + attributes: + $ref: '#/components/schemas/AwsCurConfigResponseDataAttributes' + id: + description: The `AwsCurConfigResponseData` `id`. + type: string + type: + $ref: '#/components/schemas/AwsCurConfigResponseDataType' + required: + - type + type: object + AwsCurConfigResponseDataAttributes: + description: The definition of `AwsCurConfigResponseDataAttributes` object. + properties: + account_filters: + $ref: '#/components/schemas/AwsCurConfigResponseDataAttributesAccountFilters' + account_id: + description: The `attributes` `account_id`. + type: string + bucket_name: + description: The `attributes` `bucket_name`. + type: string + bucket_region: + description: The `attributes` `bucket_region`. + type: string + created_at: + description: The `attributes` `created_at`. + type: string + error_messages: + description: The `attributes` `error_messages`. + items: + type: string + nullable: true + type: array + months: + description: The `attributes` `months`. + format: int64 + type: integer + report_name: + description: The `attributes` `report_name`. + type: string + report_prefix: + description: The `attributes` `report_prefix`. + type: string + status: + description: The `attributes` `status`. + type: string + status_updated_at: + description: The `attributes` `status_updated_at`. + type: string + updated_at: + description: The `attributes` `updated_at`. + type: string type: object + AwsCurConfigResponseDataAttributesAccountFilters: + description: The definition of `AwsCurConfigResponseDataAttributesAccountFilters` + object. + properties: + excluded_accounts: + description: The `account_filters` `excluded_accounts`. + items: + type: string + type: array + include_new_accounts: + description: The `account_filters` `include_new_accounts`. + nullable: true + type: boolean + included_accounts: + description: The `account_filters` `included_accounts`. + items: + type: string + type: array + type: object + AwsCurConfigResponseDataType: + default: aws_cur_config + description: AWS CUR config resource type. + enum: + - aws_cur_config + example: aws_cur_config + type: string + x-enum-varnames: + - AWS_CUR_CONFIG AwsOnDemandAttributes: description: Attributes for the AWS on demand task. properties: @@ -5271,7 +6007,7 @@ components: description: Azure config. properties: account_id: - description: The tenant ID of the azure account. + description: The tenant ID of the Azure account. example: 1234abcd-1234-abcd-1234-1234abcd1234 type: string client_id: @@ -5290,6 +6026,7 @@ components: description: The error messages for the Azure config. items: type: string + nullable: true type: array export_name: description: The name of the configured Azure Export. @@ -5395,7 +6132,6 @@ components: type: $ref: '#/components/schemas/AzureUCConfigPatchRequestType' required: - - attributes - type type: object AzureUCConfigPatchRequest: @@ -5433,7 +6169,6 @@ components: type: $ref: '#/components/schemas/AzureUCConfigPostRequestType' required: - - attributes - type type: object AzureUCConfigPostRequest: @@ -5448,7 +6183,7 @@ components: description: Attributes for Azure config Post Request. properties: account_id: - description: The tenant ID of the azure account. + description: The tenant ID of the Azure account. example: 1234abcd-1234-abcd-1234-1234abcd1234 type: string actual_bill_config: @@ -5456,12 +6191,9 @@ components: amortized_bill_config: $ref: '#/components/schemas/BillConfig' client_id: - description: The client ID of the azure account. + description: The client ID of the Azure account. example: 1234abcd-1234-abcd-1234-1234abcd1234 type: string - is_enabled: - description: Whether or not the Cloud Cost Management account is enabled. - type: boolean scope: description: The scope of your observed subscription. example: /subscriptions/1234abcd-1234-abcd-1234-1234abcd1234 @@ -5490,6 +6222,8 @@ components: items: $ref: '#/components/schemas/AzureUCConfigPair' type: array + required: + - data type: object BillConfig: description: Bill config. @@ -11205,6 +11939,204 @@ components: type: $ref: '#/components/schemas/RuleType' type: object + CreateRulesetRequest: + description: The definition of `CreateRulesetRequest` object. + example: + data: + attributes: + enabled: true + rules: + - enabled: true + mapping: null + metadata: null + name: Add Cost Center Tag + query: + addition: + key: cost_center + value: engineering + case_insensitivity: false + if_not_exists: true + query: account_id:"123456789" AND service:"web-api" + reference_table: null + id: New Ruleset + type: create_ruleset + properties: + data: + $ref: '#/components/schemas/CreateRulesetRequestData' + type: object + CreateRulesetRequestData: + description: The definition of `CreateRulesetRequestData` object. + properties: + attributes: + $ref: '#/components/schemas/CreateRulesetRequestDataAttributes' + id: + description: The `CreateRulesetRequestData` `id`. + type: string + type: + $ref: '#/components/schemas/CreateRulesetRequestDataType' + required: + - type + type: object + CreateRulesetRequestDataAttributes: + description: The definition of `CreateRulesetRequestDataAttributes` object. + properties: + enabled: + description: The `attributes` `enabled`. + type: boolean + rules: + description: The `attributes` `rules`. + items: + $ref: '#/components/schemas/CreateRulesetRequestDataAttributesRulesItems' + type: array + required: + - rules + type: object + CreateRulesetRequestDataAttributesRulesItems: + description: The definition of `CreateRulesetRequestDataAttributesRulesItems` + object. + properties: + enabled: + description: The `items` `enabled`. + example: false + type: boolean + mapping: + $ref: '#/components/schemas/CreateRulesetRequestDataAttributesRulesItemsMapping' + metadata: + $ref: '#/components/schemas/RulesetItemMetadata' + name: + description: The `items` `name`. + example: '' + type: string + query: + $ref: '#/components/schemas/CreateRulesetRequestDataAttributesRulesItemsQuery' + reference_table: + $ref: '#/components/schemas/CreateRulesetRequestDataAttributesRulesItemsReferenceTable' + required: + - enabled + - name + type: object + CreateRulesetRequestDataAttributesRulesItemsMapping: + description: The definition of `CreateRulesetRequestDataAttributesRulesItemsMapping` + object. + nullable: true + properties: + destination_key: + description: The `mapping` `destination_key`. + example: '' + type: string + if_not_exists: + description: The `mapping` `if_not_exists`. + example: false + type: boolean + source_keys: + description: The `mapping` `source_keys`. + example: + - '' + items: + type: string + type: array + required: + - destination_key + - if_not_exists + - source_keys + type: object + CreateRulesetRequestDataAttributesRulesItemsQuery: + description: The definition of `CreateRulesetRequestDataAttributesRulesItemsQuery` + object. + nullable: true + properties: + addition: + $ref: '#/components/schemas/CreateRulesetRequestDataAttributesRulesItemsQueryAddition' + case_insensitivity: + description: The `query` `case_insensitivity`. + type: boolean + if_not_exists: + description: The `query` `if_not_exists`. + example: false + type: boolean + query: + description: The `query` `query`. + example: '' + type: string + required: + - addition + - if_not_exists + - query + type: object + CreateRulesetRequestDataAttributesRulesItemsQueryAddition: + description: The definition of `CreateRulesetRequestDataAttributesRulesItemsQueryAddition` + object. + nullable: true + properties: + key: + description: The `addition` `key`. + example: '' + type: string + value: + description: The `addition` `value`. + example: '' + type: string + required: + - key + - value + type: object + CreateRulesetRequestDataAttributesRulesItemsReferenceTable: + description: The definition of `CreateRulesetRequestDataAttributesRulesItemsReferenceTable` + object. + nullable: true + properties: + case_insensitivity: + description: The `reference_table` `case_insensitivity`. + type: boolean + field_pairs: + description: The `reference_table` `field_pairs`. + items: + $ref: '#/components/schemas/CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems' + type: array + if_not_exists: + description: The `reference_table` `if_not_exists`. + type: boolean + source_keys: + description: The `reference_table` `source_keys`. + example: + - '' + items: + type: string + type: array + table_name: + description: The `reference_table` `table_name`. + example: '' + type: string + required: + - field_pairs + - source_keys + - table_name + type: object + CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems: + description: The definition of `CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems` + object. + properties: + input_column: + description: The `items` `input_column`. + example: '' + type: string + output_key: + description: The `items` `output_key`. + example: '' + type: string + required: + - input_column + - output_key + type: object + CreateRulesetRequestDataType: + default: create_ruleset + description: Create ruleset resource type. + enum: + - create_ruleset + example: create_ruleset + type: string + x-enum-varnames: + - CREATE_RULESET CreateWorkflowRequest: description: A request object for creating a new workflow. example: @@ -18282,12 +19214,12 @@ components: - type type: object GCPUsageCostConfig: - description: GCP Usage Cost config. + description: Google Cloud Usage Cost config. properties: attributes: $ref: '#/components/schemas/GCPUsageCostConfigAttributes' id: - description: The ID of the GCP Usage Cost config. + description: The ID of the Google Cloud Usage Cost config. type: string type: $ref: '#/components/schemas/GCPUsageCostConfigType' @@ -18296,36 +19228,37 @@ components: - type type: object GCPUsageCostConfigAttributes: - description: Attributes for a GCP Usage Cost config. + description: Attributes for a Google Cloud Usage Cost config. properties: account_id: - description: The GCP account ID. + description: The Google Cloud account ID. example: 123456_A123BC_12AB34 type: string bucket_name: - description: The GCP bucket name used to store the Usage Cost export. + description: The Google Cloud bucket name used to store the Usage Cost export. example: dd-cost-bucket type: string created_at: - description: The timestamp when the GCP Usage Cost config was created. + description: The timestamp when the Google Cloud Usage Cost config was created. pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}$ type: string dataset: - description: The export dataset name used for the GCP Usage Cost Report. + description: The export dataset name used for the Google Cloud Usage Cost + Report. example: billing type: string error_messages: - description: The error messages for the GCP Usage Cost config. + description: The error messages for the Google Cloud Usage Cost config. items: type: string nullable: true type: array export_prefix: - description: The export prefix used for the GCP Usage Cost Report. + description: The export prefix used for the Google Cloud Usage Cost Report. example: datadog_cloud_cost_usage_export type: string export_project_name: - description: The name of the GCP Usage Cost Report. + description: The name of the Google Cloud Usage Cost Report. example: dd-cloud-cost-report type: string months: @@ -18335,23 +19268,25 @@ components: maximum: 36 type: integer project_id: - description: The `project_id` of the GCP Usage Cost report. + description: The `project_id` of the Google Cloud Usage Cost report. example: my-project-123 type: string service_account: - description: The unique GCP service account email. + description: The unique Google Cloud service account email. example: dd-ccm-gcp-integration@my-environment.iam.gserviceaccount.com type: string status: - description: The status of the GCP Usage Cost config. + description: The status of the Google Cloud Usage Cost config. example: active type: string status_updated_at: - description: The timestamp when the GCP Usage Cost config status was updated. + description: The timestamp when the Google Cloud Usage Cost config status + was updated. pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}$ type: string updated_at: - description: The timestamp when the GCP Usage Cost config status was updated. + description: The timestamp when the Google Cloud Usage Cost config status + was updated. pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}$ type: string required: @@ -18364,7 +19299,7 @@ components: - status type: object GCPUsageCostConfigPatchData: - description: GCP Usage Cost config patch data. + description: Google Cloud Usage Cost config patch data. properties: attributes: $ref: '#/components/schemas/GCPUsageCostConfigPatchRequestAttributes' @@ -18375,7 +19310,7 @@ components: - type type: object GCPUsageCostConfigPatchRequest: - description: GCP Usage Cost config patch request. + description: Google Cloud Usage Cost config patch request. properties: data: $ref: '#/components/schemas/GCPUsageCostConfigPatchData' @@ -18383,7 +19318,7 @@ components: - data type: object GCPUsageCostConfigPatchRequestAttributes: - description: Attributes for GCP Usage Cost config patch request. + description: Attributes for Google Cloud Usage Cost config patch request. properties: is_enabled: description: Whether or not the Cloud Cost Management account is enabled. @@ -18394,7 +19329,7 @@ components: type: object GCPUsageCostConfigPatchRequestType: default: gcp_uc_config_patch_request - description: Type of GCP Usage Cost config patch request. + description: Type of Google Cloud Usage Cost config patch request. enum: - gcp_uc_config_patch_request example: gcp_uc_config_patch_request @@ -18402,18 +19337,17 @@ components: x-enum-varnames: - GCP_USAGE_COST_CONFIG_PATCH_REQUEST GCPUsageCostConfigPostData: - description: GCP Usage Cost config post data. + description: Google Cloud Usage Cost config post data. properties: attributes: $ref: '#/components/schemas/GCPUsageCostConfigPostRequestAttributes' type: $ref: '#/components/schemas/GCPUsageCostConfigPostRequestType' required: - - attributes - type type: object GCPUsageCostConfigPostRequest: - description: GCP Usage Cost config post request. + description: Google Cloud Usage Cost config post request. properties: data: $ref: '#/components/schemas/GCPUsageCostConfigPostData' @@ -18421,30 +19355,31 @@ components: - data type: object GCPUsageCostConfigPostRequestAttributes: - description: Attributes for GCP Usage Cost config post request. + description: Attributes for Google Cloud Usage Cost config post request. properties: billing_account_id: - description: The GCP account ID. + description: The Google Cloud account ID. example: 123456_A123BC_12AB34 type: string bucket_name: - description: The GCP bucket name used to store the Usage Cost export. + description: The Google Cloud bucket name used to store the Usage Cost export. example: dd-cost-bucket type: string export_dataset_name: - description: The export dataset name used for the GCP Usage Cost report. + description: The export dataset name used for the Google Cloud Usage Cost + report. example: billing type: string export_prefix: - description: The export prefix used for the GCP Usage Cost report. + description: The export prefix used for the Google Cloud Usage Cost report. example: datadog_cloud_cost_usage_export type: string export_project_name: - description: The name of the GCP Usage Cost report. + description: The name of the Google Cloud Usage Cost report. example: dd-cloud-cost-report type: string service_account: - description: The unique GCP service account email. + description: The unique Google Cloud service account email. example: dd-ccm-gcp-integration@my-environment.iam.gserviceaccount.com type: string required: @@ -18456,7 +19391,7 @@ components: type: object GCPUsageCostConfigPostRequestType: default: gcp_uc_config_post_request - description: Type of GCP Usage Cost config post request. + description: Type of Google Cloud Usage Cost config post request. enum: - gcp_uc_config_post_request example: gcp_usage_cost_config_post_request @@ -18464,14 +19399,14 @@ components: x-enum-varnames: - GCP_USAGE_COST_CONFIG_POST_REQUEST GCPUsageCostConfigResponse: - description: Response of GCP Usage Cost config. + description: Response of Google Cloud Usage Cost config. properties: data: $ref: '#/components/schemas/GCPUsageCostConfig' type: object GCPUsageCostConfigType: default: gcp_uc_config - description: Type of GCP Usage Cost config. + description: Type of Google Cloud Usage Cost config. enum: - gcp_uc_config example: gcp_uc_config @@ -18479,14 +19414,109 @@ components: x-enum-varnames: - GCP_UC_CONFIG GCPUsageCostConfigsResponse: - description: List of GCP Usage Cost configs. + description: List of Google Cloud Usage Cost configs. properties: data: - description: A GCP Usage Cost config. + description: A Google Cloud Usage Cost config. items: $ref: '#/components/schemas/GCPUsageCostConfig' type: array + required: + - data + type: object + GcpUcConfigResponse: + description: The definition of `GcpUcConfigResponse` object. + example: + data: + attributes: + account_id: 123456_A123BC_12AB34 + bucket_name: dd-cost-bucket + created_at: 2023-01-01 12:00:00 + dataset: billing + error_messages: [] + export_prefix: datadog_cloud_cost_usage_export + export_project_name: dd-cloud-cost-report + months: 36 + project_id: my-project-123 + service_account: dd-ccm-gcp-integration@my-environment.iam.gserviceaccount.com + status: active + status_updated_at: 2023-01-01 12:00:00 + updated_at: 2023-01-01 12:00:00 + id: '123456789123' + type: gcp_uc_config + properties: + data: + $ref: '#/components/schemas/GcpUcConfigResponseData' + type: object + GcpUcConfigResponseData: + description: The definition of `GcpUcConfigResponseData` object. + properties: + attributes: + $ref: '#/components/schemas/GcpUcConfigResponseDataAttributes' + id: + description: The `GcpUcConfigResponseData` `id`. + type: string + type: + $ref: '#/components/schemas/GcpUcConfigResponseDataType' + required: + - type + type: object + GcpUcConfigResponseDataAttributes: + description: The definition of `GcpUcConfigResponseDataAttributes` object. + properties: + account_id: + description: The `attributes` `account_id`. + type: string + bucket_name: + description: The `attributes` `bucket_name`. + type: string + created_at: + description: The `attributes` `created_at`. + type: string + dataset: + description: The `attributes` `dataset`. + type: string + error_messages: + description: The `attributes` `error_messages`. + items: + type: string + nullable: true + type: array + export_prefix: + description: The `attributes` `export_prefix`. + type: string + export_project_name: + description: The `attributes` `export_project_name`. + type: string + months: + description: The `attributes` `months`. + format: int64 + type: integer + project_id: + description: The `attributes` `project_id`. + type: string + service_account: + description: The `attributes` `service_account`. + type: string + status: + description: The `attributes` `status`. + type: string + status_updated_at: + description: The `attributes` `status_updated_at`. + type: string + updated_at: + description: The `attributes` `updated_at`. + type: string type: object + GcpUcConfigResponseDataType: + default: gcp_uc_config + description: Google Cloud Usage Cost config resource type. + enum: + - gcp_uc_config + example: gcp_uc_config + type: string + x-enum-varnames: + - GCP_UC_CONFIG GeminiAPIKey: description: The definition of the `GeminiAPIKey` object. properties: @@ -36173,6 +37203,76 @@ components: required: - data type: object + ReorderRuleResourceArray: + description: The definition of `ReorderRuleResourceArray` object. + example: + data: + - id: '456' + type: arbitrary_rule + - id: '123' + type: arbitrary_rule + - id: '789' + type: arbitrary_rule + properties: + data: + description: The `ReorderRuleResourceArray` `data`. + items: + $ref: '#/components/schemas/ReorderRuleResourceData' + type: array + required: + - data + type: object + ReorderRuleResourceData: + description: The definition of `ReorderRuleResourceData` object. + properties: + id: + description: The `ReorderRuleResourceData` `id`. + type: string + type: + $ref: '#/components/schemas/ReorderRuleResourceDataType' + required: + - type + type: object + ReorderRuleResourceDataType: + default: arbitrary_rule + description: Arbitrary rule resource type. + enum: + - arbitrary_rule + example: arbitrary_rule + type: string + x-enum-varnames: + - ARBITRARY_RULE + ReorderRulesetResourceArray: + description: The definition of `ReorderRulesetResourceArray` object. + properties: + data: + description: The `ReorderRulesetResourceArray` `data`. + items: + $ref: '#/components/schemas/ReorderRulesetResourceData' + type: array + required: + - data + type: object + ReorderRulesetResourceData: + description: The definition of `ReorderRulesetResourceData` object. + properties: + id: + description: The `ReorderRulesetResourceData` `id`. + type: string + type: + $ref: '#/components/schemas/ReorderRulesetResourceDataType' + required: + - type + type: object + ReorderRulesetResourceDataType: + default: ruleset + description: Ruleset resource type. + enum: + - ruleset + example: ruleset + type: string + x-enum-varnames: + - RULESET ResourceFilterAttributes: description: Attributes of a resource filter. example: @@ -37207,6 +38307,396 @@ components: rule: $ref: '#/components/schemas/SecurityMonitoringRuleResponse' type: object + RulesValidateQueryRequest: + description: The definition of `RulesValidateQueryRequest` object. + example: + data: + attributes: + Query: example:query AND test:true + type: validate_query + properties: + data: + $ref: '#/components/schemas/RulesValidateQueryRequestData' + type: object + RulesValidateQueryRequestData: + description: The definition of `RulesValidateQueryRequestData` object. + properties: + attributes: + $ref: '#/components/schemas/RulesValidateQueryRequestDataAttributes' + id: + description: The `RulesValidateQueryRequestData` `id`. + type: string + type: + $ref: '#/components/schemas/RulesValidateQueryRequestDataType' + required: + - type + type: object + RulesValidateQueryRequestDataAttributes: + description: The definition of `RulesValidateQueryRequestDataAttributes` object. + properties: + Query: + description: The `attributes` `Query`. + example: '' + type: string + required: + - Query + type: object + RulesValidateQueryRequestDataType: + default: validate_query + description: Validate query resource type. + enum: + - validate_query + example: validate_query + type: string + x-enum-varnames: + - VALIDATE_QUERY + RulesValidateQueryResponse: + description: The definition of `RulesValidateQueryResponse` object. + example: + data: + attributes: + Canonical: canonical query representation + type: validate_response + properties: + data: + $ref: '#/components/schemas/RulesValidateQueryResponseData' + type: object + RulesValidateQueryResponseData: + description: The definition of `RulesValidateQueryResponseData` object. + properties: + attributes: + $ref: '#/components/schemas/RulesValidateQueryResponseDataAttributes' + id: + description: The `RulesValidateQueryResponseData` `id`. + type: string + type: + $ref: '#/components/schemas/RulesValidateQueryResponseDataType' + required: + - type + type: object + RulesValidateQueryResponseDataAttributes: + description: The definition of `RulesValidateQueryResponseDataAttributes` object. + properties: + Canonical: + description: The `attributes` `Canonical`. + example: '' + type: string + required: + - Canonical + type: object + RulesValidateQueryResponseDataType: + default: validate_response + description: Validate response resource type. + enum: + - validate_response + example: validate_response + type: string + x-enum-varnames: + - VALIDATE_RESPONSE + RulesetItemMetadata: + additionalProperties: + type: string + description: The `items` `metadata`. + nullable: true + type: object + RulesetResp: + description: The definition of `RulesetResp` object. + example: + data: + attributes: + created: null + enabled: true + last_modified_user_uuid: '' + modified: null + name: Example Ruleset + position: 0 + rules: + - enabled: false + mapping: null + metadata: null + name: RC test rule edited1 + query: + addition: + key: abc + value: ww + case_insensitivity: false + if_not_exists: true + query: billingcurrency:"USD" AND account_name:"SZA96462" AND billingcurrency:"USD" + reference_table: null + - enabled: true + mapping: + destination_key: h + if_not_exists: true + source_keys: + - accountname + - accountownerid + metadata: null + name: rule with empty source key + query: null + reference_table: null + - enabled: true + mapping: null + metadata: null + name: New table rule with new UI + query: null + reference_table: + case_insensitivity: true + field_pairs: + - input_column: status_type + output_key: status + - input_column: status_description + output_key: dess + if_not_exists: false + source_keys: + - http_status + - status_description + table_name: http_status_codes + version: 1 + id: '12345' + type: ruleset + properties: + data: + $ref: '#/components/schemas/RulesetRespData' + type: object + RulesetRespArray: + description: The definition of `RulesetRespArray` object. + properties: + data: + description: The `RulesetRespArray` `data`. + items: + $ref: '#/components/schemas/RulesetRespData' + type: array + required: + - data + type: object + RulesetRespData: + description: The definition of `RulesetRespData` object. + properties: + attributes: + $ref: '#/components/schemas/RulesetRespDataAttributes' + id: + description: The `RulesetRespData` `id`. + type: string + type: + $ref: '#/components/schemas/RulesetRespDataType' + required: + - type + type: object + RulesetRespDataAttributes: + description: The definition of `RulesetRespDataAttributes` object. + properties: + created: + $ref: '#/components/schemas/RulesetRespDataAttributesCreated' + enabled: + description: The `attributes` `enabled`. + example: false + type: boolean + last_modified_user_uuid: + description: The `attributes` `last_modified_user_uuid`. + example: '' + type: string + modified: + $ref: '#/components/schemas/RulesetRespDataAttributesModified' + name: + description: The `attributes` `name`. + example: '' + type: string + position: + description: The `attributes` `position`. + example: 0 + format: int32 + maximum: 2147483647 + type: integer + rules: + description: The `attributes` `rules`. + items: + $ref: '#/components/schemas/RulesetRespDataAttributesRulesItems' + type: array + version: + description: The `attributes` `version`. + example: 0 + format: int64 + type: integer + required: + - created + - enabled + - last_modified_user_uuid + - modified + - name + - position + - rules + - version + type: object + RulesetRespDataAttributesCreated: + description: The definition of `RulesetRespDataAttributesCreated` object. + properties: + nanos: + description: The `created` `nanos`. + format: int32 + maximum: 2147483647 + type: integer + seconds: + description: The `created` `seconds`. + format: int64 + type: integer + type: object + RulesetRespDataAttributesModified: + description: The definition of `RulesetRespDataAttributesModified` object. + properties: + nanos: + description: The `modified` `nanos`. + format: int32 + maximum: 2147483647 + type: integer + seconds: + description: The `modified` `seconds`. + format: int64 + type: integer + type: object + RulesetRespDataAttributesRulesItems: + description: The definition of `RulesetRespDataAttributesRulesItems` object. + properties: + enabled: + description: The `items` `enabled`. + example: false + type: boolean + mapping: + $ref: '#/components/schemas/RulesetRespDataAttributesRulesItemsMapping' + metadata: + $ref: '#/components/schemas/RulesetItemMetadata' + name: + description: The `items` `name`. + example: '' + type: string + query: + $ref: '#/components/schemas/RulesetRespDataAttributesRulesItemsQuery' + reference_table: + $ref: '#/components/schemas/RulesetRespDataAttributesRulesItemsReferenceTable' + required: + - enabled + - name + type: object + RulesetRespDataAttributesRulesItemsMapping: + description: The definition of `RulesetRespDataAttributesRulesItemsMapping` + object. + nullable: true + properties: + destination_key: + description: The `mapping` `destination_key`. + example: '' + type: string + if_not_exists: + description: The `mapping` `if_not_exists`. + example: false + type: boolean + source_keys: + description: The `mapping` `source_keys`. + example: + - '' + items: + type: string + type: array + required: + - destination_key + - if_not_exists + - source_keys + type: object + RulesetRespDataAttributesRulesItemsQuery: + description: The definition of `RulesetRespDataAttributesRulesItemsQuery` object. + nullable: true + properties: + addition: + $ref: '#/components/schemas/RulesetRespDataAttributesRulesItemsQueryAddition' + case_insensitivity: + description: The `query` `case_insensitivity`. + type: boolean + if_not_exists: + description: The `query` `if_not_exists`. + example: false + type: boolean + query: + description: The `query` `query`. + example: '' + type: string + required: + - addition + - if_not_exists + - query + type: object + RulesetRespDataAttributesRulesItemsQueryAddition: + description: The definition of `RulesetRespDataAttributesRulesItemsQueryAddition` + object. + nullable: true + properties: + key: + description: The `addition` `key`. + example: '' + type: string + value: + description: The `addition` `value`. + example: '' + type: string + required: + - key + - value + type: object + RulesetRespDataAttributesRulesItemsReferenceTable: + description: The definition of `RulesetRespDataAttributesRulesItemsReferenceTable` + object. + nullable: true + properties: + case_insensitivity: + description: The `reference_table` `case_insensitivity`. + type: boolean + field_pairs: + description: The `reference_table` `field_pairs`. + items: + $ref: '#/components/schemas/RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems' + type: array + if_not_exists: + description: The `reference_table` `if_not_exists`. + type: boolean + source_keys: + description: The `reference_table` `source_keys`. + example: + - '' + items: + type: string + type: array + table_name: + description: The `reference_table` `table_name`. + example: '' + type: string + required: + - field_pairs + - source_keys + - table_name + type: object + RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems: + description: The definition of `RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems` + object. + properties: + input_column: + description: The `items` `input_column`. + example: '' + type: string + output_key: + description: The `items` `output_key`. + example: '' + type: string + required: + - input_column + - output_key + type: object + RulesetRespDataType: + default: ruleset + description: Ruleset resource type. + enum: + - ruleset + example: ruleset + type: string + x-enum-varnames: + - RULESET RumMetricCompute: description: The compute rule to compute the rum-based metric. properties: @@ -46182,6 +47672,117 @@ components: x-enum-varnames: - SECURITY_FINDINGS - SECURITY_SIGNALS + UCConfigPair: + description: The definition of `UCConfigPair` object. + example: + data: + attributes: + configs: + - account_id: 1234abcd-1234-abcd-1234-1234abcd1234 + client_id: 1234abcd-1234-abcd-1234-1234abcd1234 + created_at: 2023-01-01 12:00:00 + dataset_type: actual + error_messages: [] + export_name: dd-actual-export + export_path: dd-export-path + id: '123456789123' + months: 36 + scope: /subscriptions/1234abcd-1234-abcd-1234-1234abcd1234 + status: active + status_updated_at: 2023-01-01 12:00:00 + storage_account: dd-storage-account + storage_container: dd-storage-container + updated_at: 2023-01-01 12:00:00 + id: '123456789123' + type: azure_uc_configs + properties: + data: + $ref: '#/components/schemas/UCConfigPairData' + type: object + UCConfigPairData: + description: The definition of `UCConfigPairData` object. + properties: + attributes: + $ref: '#/components/schemas/UCConfigPairDataAttributes' + id: + description: The `UCConfigPairData` `id`. + type: string + type: + $ref: '#/components/schemas/UCConfigPairDataType' + required: + - type + type: object + UCConfigPairDataAttributes: + description: The definition of `UCConfigPairDataAttributes` object. + properties: + configs: + description: The `attributes` `configs`. + items: + $ref: '#/components/schemas/UCConfigPairDataAttributesConfigsItems' + type: array + type: object + UCConfigPairDataAttributesConfigsItems: + description: The definition of `UCConfigPairDataAttributesConfigsItems` object. + properties: + account_id: + description: The `items` `account_id`. + type: string + client_id: + description: The `items` `client_id`. + type: string + created_at: + description: The `items` `created_at`. + type: string + dataset_type: + description: The `items` `dataset_type`. + type: string + error_messages: + description: The `items` `error_messages`. + items: + type: string + nullable: true + type: array + export_name: + description: The `items` `export_name`. + type: string + export_path: + description: The `items` `export_path`. + type: string + id: + description: The `items` `id`. + type: string + months: + description: The `items` `months`. + format: int64 + type: integer + scope: + description: The `items` `scope`. + type: string + status: + description: The `items` `status`. + type: string + status_updated_at: + description: The `items` `status_updated_at`. + type: string + storage_account: + description: The `items` `storage_account`. + type: string + storage_container: + description: The `items` `storage_container`. + type: string + updated_at: + description: The `items` `updated_at`. + type: string + type: object + UCConfigPairDataType: + default: azure_uc_configs + description: Azure UC configs resource type. + enum: + - azure_uc_configs + example: azure_uc_configs + type: string + x-enum-varnames: + - AZURE_UC_CONFIGS Unit: description: Object containing the metric unit family, scale factor, name, and short name. @@ -46658,6 +48259,209 @@ components: type: $ref: '#/components/schemas/RuleType' type: object + UpdateRulesetRequest: + description: The definition of `UpdateRulesetRequest` object. + example: + data: + attributes: + enabled: true + last_version: 1 + rules: + - enabled: true + mapping: + destination_key: team_owner + if_not_exists: true + source_keys: + - account_name + - account_id + metadata: null + name: Account Name Mapping + query: null + reference_table: null + type: update_ruleset + properties: + data: + $ref: '#/components/schemas/UpdateRulesetRequestData' + type: object + UpdateRulesetRequestData: + description: The definition of `UpdateRulesetRequestData` object. + properties: + attributes: + $ref: '#/components/schemas/UpdateRulesetRequestDataAttributes' + id: + description: The `UpdateRulesetRequestData` `id`. + type: string + type: + $ref: '#/components/schemas/UpdateRulesetRequestDataType' + required: + - type + type: object + UpdateRulesetRequestDataAttributes: + description: The definition of `UpdateRulesetRequestDataAttributes` object. + properties: + enabled: + description: The `attributes` `enabled`. + example: false + type: boolean + last_version: + description: The `attributes` `last_version`. + format: int64 + type: integer + rules: + description: The `attributes` `rules`. + items: + $ref: '#/components/schemas/UpdateRulesetRequestDataAttributesRulesItems' + type: array + required: + - enabled + - rules + type: object + UpdateRulesetRequestDataAttributesRulesItems: + description: The definition of `UpdateRulesetRequestDataAttributesRulesItems` + object. + properties: + enabled: + description: The `items` `enabled`. + example: false + type: boolean + mapping: + $ref: '#/components/schemas/UpdateRulesetRequestDataAttributesRulesItemsMapping' + metadata: + $ref: '#/components/schemas/RulesetItemMetadata' + name: + description: The `items` `name`. + example: '' + type: string + query: + $ref: '#/components/schemas/UpdateRulesetRequestDataAttributesRulesItemsQuery' + reference_table: + $ref: '#/components/schemas/UpdateRulesetRequestDataAttributesRulesItemsReferenceTable' + required: + - enabled + - name + type: object + UpdateRulesetRequestDataAttributesRulesItemsMapping: + description: The definition of `UpdateRulesetRequestDataAttributesRulesItemsMapping` + object. + nullable: true + properties: + destination_key: + description: The `mapping` `destination_key`. + example: '' + type: string + if_not_exists: + description: The `mapping` `if_not_exists`. + example: false + type: boolean + source_keys: + description: The `mapping` `source_keys`. + example: + - '' + items: + type: string + type: array + required: + - destination_key + - if_not_exists + - source_keys + type: object + UpdateRulesetRequestDataAttributesRulesItemsQuery: + description: The definition of `UpdateRulesetRequestDataAttributesRulesItemsQuery` + object. + nullable: true + properties: + addition: + $ref: '#/components/schemas/UpdateRulesetRequestDataAttributesRulesItemsQueryAddition' + case_insensitivity: + description: The `query` `case_insensitivity`. + type: boolean + if_not_exists: + description: The `query` `if_not_exists`. + example: false + type: boolean + query: + description: The `query` `query`. + example: '' + type: string + required: + - addition + - if_not_exists + - query + type: object + UpdateRulesetRequestDataAttributesRulesItemsQueryAddition: + description: The definition of `UpdateRulesetRequestDataAttributesRulesItemsQueryAddition` + object. + nullable: true + properties: + key: + description: The `addition` `key`. + example: '' + type: string + value: + description: The `addition` `value`. + example: '' + type: string + required: + - key + - value + type: object + UpdateRulesetRequestDataAttributesRulesItemsReferenceTable: + description: The definition of `UpdateRulesetRequestDataAttributesRulesItemsReferenceTable` + object. + nullable: true + properties: + case_insensitivity: + description: The `reference_table` `case_insensitivity`. + type: boolean + field_pairs: + description: The `reference_table` `field_pairs`. + items: + $ref: '#/components/schemas/UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems' + type: array + if_not_exists: + description: The `reference_table` `if_not_exists`. + type: boolean + source_keys: + description: The `reference_table` `source_keys`. + example: + - '' + items: + type: string + type: array + table_name: + description: The `reference_table` `table_name`. + example: '' + type: string + required: + - field_pairs + - source_keys + - table_name + type: object + UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems: + description: The definition of `UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems` + object. + properties: + input_column: + description: The `items` `input_column`. + example: '' + type: string + output_key: + description: The `items` `output_key`. + example: '' + type: string + required: + - input_column + - output_key + type: object + UpdateRulesetRequestDataType: + default: update_ruleset + description: Update ruleset resource type. + enum: + - update_ruleset + example: update_ruleset + type: string + x-enum-varnames: + - UPDATE_RULESET UpdateWorkflowRequest: description: A request object for updating an existing workflow. example: @@ -52755,6 +54559,231 @@ paths: x-permission: operator: OPEN permissions: [] + /api/v2/cost/arbitrary_rule: + get: + description: List all arbitrary cost rules - Retrieve a list of all arbitrary + cost rules for the organization + operationId: ListArbitraryCostRules + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ArbitraryRuleResponseArray' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: List arbitrary cost rules + tags: + - Cloud Cost Management + post: + description: 'Create a new arbitrary cost rule with the specified filters and + allocation strategy. + + + **Strategy Methods:** + + - **PROPORTIONAL/EVEN**: Allocates costs proportionally/evenly based on existing + costs. Requires: granularity, allocated_by_tag_keys. Optional: based_on_costs, + allocated_by_filters, evaluate_grouped_by_tag_keys, evaluate_grouped_by_filters. + + - **PROPORTIONAL_TIMESERIES/EVEN_TIMESERIES**: Allocates based on timeseries + data. Requires: granularity, based_on_timeseries. Optional: evaluate_grouped_by_tag_keys. + + - **PERCENT**: Allocates fixed percentages to specific tags. Requires: allocated_by + (array of percentage allocations). + + + **Filter Conditions:** + + - Use **value** for single-value conditions: "is", "is not", "contains", "does + not contain", "=", "!=", "like", "not like", "is all values", "is untagged" + + - Use **values** for multi-value conditions: "in", "not in" + + - Cannot use both value and values simultaneously. + + + **Supported operators**: is, is not, is all values, is untagged, contains, + does not contain, in, not in, =, !=, like, not like' + operationId: CreateArbitraryCostRule + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ArbitraryCostUpsertRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ArbitraryRuleResponse' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_write + summary: Create arbitrary cost rule + tags: + - Cloud Cost Management + /api/v2/cost/arbitrary_rule/reorder: + post: + description: "Reorder arbitrary cost rules - Change the execution order of arbitrary + cost rules.\n\n**Important**: You must provide the **complete list** of all + rule IDs in the desired execution order. The API will reorder ALL rules according + to the provided sequence.\n\nRules are executed in the order specified, with + lower indices (earlier in the array) having higher priority.\n\n**Example**: + If you have rules with IDs [123, 456, 789] and want to change order from 123\u2192456\u2192789 + to 456\u2192123\u2192789, send: [{\"id\": \"456\"}, {\"id\": \"123\"}, {\"id\": + \"789\"}]" + operationId: ReorderArbitraryCostRules + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ReorderRuleResourceArray' + required: true + responses: + '204': + description: Successfully reordered rules + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_write + summary: Reorder arbitrary cost rules + tags: + - Cloud Cost Management + /api/v2/cost/arbitrary_rule/{rule_id}: + delete: + description: Delete an arbitrary cost rule - Delete an existing arbitrary cost + rule by its ID + operationId: DeleteArbitraryCostRule + parameters: + - description: The unique identifier of the arbitrary cost rule + in: path + name: rule_id + required: true + schema: + format: int64 + type: integer + responses: + '204': + description: No Content + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_write + summary: Delete arbitrary cost rule + tags: + - Cloud Cost Management + get: + description: Get a specific arbitrary cost rule - Retrieve a specific arbitrary + cost rule by its ID + operationId: GetArbitraryCostRule + parameters: + - description: The unique identifier of the arbitrary cost rule + in: path + name: rule_id + required: true + schema: + format: int64 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ArbitraryRuleResponse' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: Get arbitrary cost rule + tags: + - Cloud Cost Management + patch: + description: 'Update an existing arbitrary cost rule with new filters and allocation + strategy. + + + **Strategy Methods:** + + - **PROPORTIONAL/EVEN**: Allocates costs proportionally/evenly based on existing + costs. Requires: granularity, allocated_by_tag_keys. Optional: based_on_costs, + allocated_by_filters, evaluate_grouped_by_tag_keys, evaluate_grouped_by_filters. + + - **PROPORTIONAL_TIMESERIES/EVEN_TIMESERIES**: Allocates based on timeseries + data. Requires: granularity, based_on_timeseries. Optional: evaluate_grouped_by_tag_keys. + + - **PERCENT**: Allocates fixed percentages to specific tags. Requires: allocated_by + (array of percentage allocations). + + - **USAGE_METRIC**: Allocates based on usage metrics (implementation varies). + + + **Filter Conditions:** + + - Use **value** for single-value conditions: "is", "is not", "contains", "does + not contain", "=", "!=", "like", "not like", "is all values", "is untagged" + + - Use **values** for multi-value conditions: "in", "not in" + + - Cannot use both value and values simultaneously. + + + **Supported operators**: is, is not, is all values, is untagged, contains, + does not contain, in, not in, =, !=, like, not like' + operationId: UpdateArbitraryCostRule + parameters: + - description: The unique identifier of the arbitrary cost rule + in: path + name: rule_id + required: true + schema: + format: int64 + type: integer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ArbitraryCostUpsertRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ArbitraryRuleResponse' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_write + summary: Update arbitrary cost rule + tags: + - Cloud Cost Management /api/v2/cost/aws_cur_config: get: description: List the AWS CUR configs. @@ -52800,7 +54829,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AwsCURConfigResponse' + $ref: '#/components/schemas/AwsCurConfigResponse' description: OK '400': content: @@ -52856,75 +54885,212 @@ paths: appKeyAuth: [] - AuthZ: - cloud_cost_management_write - summary: Delete Cloud Cost Management AWS CUR config + summary: Delete Cloud Cost Management AWS CUR config + tags: + - Cloud Cost Management + x-permission: + operator: OR + permissions: + - cloud_cost_management_write + get: + description: Get a specific AWS CUR config. + operationId: GetCostAWSCURConfig + parameters: + - description: The unique identifier of the cloud account + in: path + name: cloud_account_id + required: true + schema: + format: int64 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AwsCurConfigResponse' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: Get cost AWS CUR config + tags: + - Cloud Cost Management + patch: + description: Update the status (active/archived) and/or account filtering configuration + of an AWS CUR config. + operationId: UpdateCostAWSCURConfig + parameters: + - $ref: '#/components/parameters/CloudAccountID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AwsCURConfigPatchRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AwsCURConfigsResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_write + summary: Update Cloud Cost Management AWS CUR config + tags: + - Cloud Cost Management + x-permission: + operator: OR + permissions: + - cloud_cost_management_write + /api/v2/cost/azure_uc_config: + get: + description: List the Azure configs. + operationId: ListCostAzureUCConfigs + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AzureUCConfigsResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: List Cloud Cost Management Azure configs + tags: + - Cloud Cost Management + x-permission: + operator: OR + permissions: + - cloud_cost_management_read + post: + description: Create a Cloud Cost Management account for an Azure config. + operationId: CreateCostAzureUCConfigs + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AzureUCConfigPostRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AzureUCConfigPairsResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_write + summary: Create Cloud Cost Management Azure configs + tags: + - Cloud Cost Management + x-permission: + operator: OR + permissions: + - cloud_cost_management_write + /api/v2/cost/azure_uc_config/{cloud_account_id}: + delete: + description: Archive a Cloud Cost Management Account. + operationId: DeleteCostAzureUCConfig + parameters: + - $ref: '#/components/parameters/CloudAccountID' + responses: + '204': + description: No Content + '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_write + summary: Delete Cloud Cost Management Azure config tags: - Cloud Cost Management x-permission: operator: OR permissions: - cloud_cost_management_write - patch: - description: Update the status (active/archived) and/or account filtering configuration - of an AWS CUR config. - operationId: UpdateCostAWSCURConfig + get: + description: Get a specific Azure config. + operationId: GetCostAzureUCConfig parameters: - - $ref: '#/components/parameters/CloudAccountID' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AwsCURConfigPatchRequest' + - description: The unique identifier of the cloud account + in: path + name: cloud_account_id required: true + schema: + format: int64 + type: integer responses: '200': content: application/json: schema: - $ref: '#/components/schemas/AwsCURConfigsResponse' - description: OK - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Not Found - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cloud_cost_management_write - summary: Update Cloud Cost Management AWS CUR config - tags: - - Cloud Cost Management - x-permission: - operator: OR - permissions: - - cloud_cost_management_write - /api/v2/cost/azure_uc_config: - get: - description: List the Azure configs. - operationId: ListCostAzureUCConfigs - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AzureUCConfigsResponse' + $ref: '#/components/schemas/UCConfigPair' description: OK - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' security: @@ -52932,90 +55098,9 @@ paths: appKeyAuth: [] - AuthZ: - cloud_cost_management_read - summary: List Cloud Cost Management Azure configs + summary: Get cost Azure UC config tags: - Cloud Cost Management - x-permission: - operator: OR - permissions: - - cloud_cost_management_read - post: - description: Create a Cloud Cost Management account for an Azure config. - operationId: CreateCostAzureUCConfigs - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AzureUCConfigPostRequest' - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AzureUCConfigPairsResponse' - description: OK - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cloud_cost_management_write - summary: Create Cloud Cost Management Azure configs - tags: - - Cloud Cost Management - x-permission: - operator: OR - permissions: - - cloud_cost_management_write - /api/v2/cost/azure_uc_config/{cloud_account_id}: - delete: - description: Archive a Cloud Cost Management Account. - operationId: DeleteCostAzureUCConfig - parameters: - - $ref: '#/components/parameters/CloudAccountID' - responses: - '204': - description: No Content - '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_write - summary: Delete Cloud Cost Management Azure config - tags: - - Cloud Cost Management - x-permission: - operator: OR - permissions: - - cloud_cost_management_write patch: description: Update the status of an Azure config (active/archived). operationId: UpdateCostAzureUCConfigs @@ -53223,6 +55308,10 @@ paths: summary: List Custom Costs files tags: - Cloud Cost Management + x-permission: + operator: OR + permissions: + - cloud_cost_management_read put: description: Upload a Custom Costs file. operationId: UploadCustomCostsFile @@ -53261,6 +55350,10 @@ paths: summary: Upload Custom Costs file tags: - Cloud Cost Management + x-permission: + operator: OR + permissions: + - cloud_cost_management_write /api/v2/cost/custom_costs/{file_id}: delete: description: Delete the specified Custom Costs file. @@ -53328,7 +55421,7 @@ paths: - Cloud Cost Management /api/v2/cost/gcp_uc_config: get: - description: List the GCP Usage Cost configs. + description: List the Google Cloud Usage Cost configs. operationId: ListCostGCPUsageCostConfigs responses: '200': @@ -53350,7 +55443,7 @@ paths: appKeyAuth: [] - AuthZ: - cloud_cost_management_read - summary: List Cloud Cost Management GCP Usage Cost configs + summary: List Google Cloud Usage Cost configs tags: - Cloud Cost Management x-permission: @@ -53358,7 +55451,8 @@ paths: permissions: - cloud_cost_management_read post: - description: Create a Cloud Cost Management account for an GCP Usage Cost config. + description: Create a Cloud Cost Management account for an Google Cloud Usage + Cost config. operationId: CreateCostGCPUsageCostConfig requestBody: content: @@ -53392,7 +55486,7 @@ paths: appKeyAuth: [] - AuthZ: - cloud_cost_management_write - summary: Create Cloud Cost Management GCP Usage Cost config + summary: Create Google Cloud Usage Cost config tags: - Cloud Cost Management x-permission: @@ -53427,15 +55521,43 @@ paths: appKeyAuth: [] - AuthZ: - cloud_cost_management_write - summary: Delete Cloud Cost Management GCP Usage Cost config + summary: Delete Google Cloud Usage Cost config tags: - Cloud Cost Management x-permission: operator: OR permissions: - cloud_cost_management_write + get: + description: Get a specific Google Cloud Usage Cost config. + operationId: GetCostGCPUsageCostConfig + parameters: + - description: The unique identifier of the cloud account + in: path + name: cloud_account_id + required: true + schema: + format: int64 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GcpUcConfigResponse' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: Get Google Cloud Usage Cost config + tags: + - Cloud Cost Management patch: - description: Update the status of an GCP Usage Cost config (active/archived). + description: Update the status of an Google Cloud Usage Cost config (active/archived). operationId: UpdateCostGCPUsageCostConfig parameters: - $ref: '#/components/parameters/CloudAccountID' @@ -53477,7 +55599,7 @@ paths: appKeyAuth: [] - AuthZ: - cloud_cost_management_write - summary: Update Cloud Cost Management GCP Usage Cost config + summary: Update Google Cloud Usage Cost config tags: - Cloud Cost Management x-permission: @@ -70418,6 +72540,194 @@ paths: operator: OR permissions: - billing_edit + /api/v2/tags/enrichment: + get: + description: List all tag pipeline rulesets - Retrieve a list of all tag pipeline + rulesets for the organization + operationId: ListRulesets + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RulesetRespArray' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: List rulesets + tags: + - Cloud Cost Management + post: + description: Create a new tag pipeline ruleset with the specified rules and + configuration + operationId: CreateRuleset + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateRulesetRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RulesetResp' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_write + summary: Create ruleset + tags: + - Cloud Cost Management + /api/v2/tags/enrichment/reorder: + post: + description: Reorder tag pipeline rulesets - Change the execution order of tag + pipeline rulesets + operationId: ReorderRulesets + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ReorderRulesetResourceArray' + required: true + responses: + '204': + description: Successfully reordered rulesets + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_write + summary: Reorder rulesets + tags: + - Cloud Cost Management + /api/v2/tags/enrichment/validate-query: + post: + description: Validate a tag pipeline query - Validate the syntax and structure + of a tag pipeline query + operationId: ValidateQuery + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RulesValidateQueryRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RulesValidateQueryResponse' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: Validate query + tags: + - Cloud Cost Management + /api/v2/tags/enrichment/{ruleset_id}: + delete: + description: Delete a tag pipeline ruleset - Delete an existing tag pipeline + ruleset by its ID + operationId: DeleteRuleset + parameters: + - description: The unique identifier of the ruleset + in: path + name: ruleset_id + required: true + schema: + type: string + responses: + '204': + description: No Content + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_write + summary: Delete ruleset + tags: + - Cloud Cost Management + get: + description: Get a specific tag pipeline ruleset - Retrieve a specific tag pipeline + ruleset by its ID + operationId: GetRuleset + parameters: + - description: The unique identifier of the ruleset + in: path + name: ruleset_id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RulesetResp' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: Get ruleset + tags: + - Cloud Cost Management + patch: + description: Update a tag pipeline ruleset - Update an existing tag pipeline + ruleset with new rules and configuration + operationId: UpdateRuleset + parameters: + - description: The unique identifier of the ruleset + in: path + name: ruleset_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateRulesetRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RulesetResp' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_write + summary: Update ruleset + tags: + - Cloud Cost Management /api/v2/team: get: description: 'Get all teams. @@ -73291,8 +75601,8 @@ tags: for more information. name: Case Management - description: The Cloud Cost Management API allows you to set up, edit, and delete - Cloud Cost Management accounts for AWS, Azure, and GCP. You can query your cost - data by using the [Metrics endpoint](https://docs.datadoghq.com/api/latest/metrics/#query-timeseries-data-across-multiple-products) + Cloud Cost Management accounts for AWS, Azure, and Google Cloud. You can query + your cost data by using the [Metrics endpoint](https://docs.datadoghq.com/api/latest/metrics/#query-timeseries-data-across-multiple-products) and the `cloud_cost` data source. For more information, see the [Cloud Cost Management documentation](https://docs.datadoghq.com/cloud_cost_management/). name: Cloud Cost Management diff --git a/cassettes/features/v2/cloud_cost_management/Create-Cloud-Cost-Management-Azure-configs-returns-OK-response.yml b/cassettes/features/v2/cloud_cost_management/Create-Cloud-Cost-Management-Azure-configs-returns-OK-response.yml index 90bdfc519344..c250488bb9e1 100644 --- a/cassettes/features/v2/cloud_cost_management/Create-Cloud-Cost-Management-Azure-configs-returns-OK-response.yml +++ b/cassettes/features/v2/cloud_cost_management/Create-Cloud-Cost-Management-Azure-configs-returns-OK-response.yml @@ -3,14 +3,7 @@ http_interactions: request: body: encoding: UTF-8 - string: '{"data": {"attributes": {"account_id": "1234abcd-1234-abcd-1234-1234abcd1234", - "actual_bill_config": {"export_name": "dd-actual-export", "export_path": "dd-export-path", - "storage_account": "dd-storage-account", "storage_container": "dd-storage-container"}, - "amortized_bill_config": {"export_name": "dd-actual-export", "export_path": - "dd-export-path", "storage_account": "dd-storage-account", "storage_container": - "dd-storage-container"}, "client_id": "1234abcd-1234-abcd-1234-1234abcd1234", - "is_enabled": true, "scope": "subscriptions/1234abcd-1234-abcd-1234-1234abcd1234"}, - "type": "azure_uc_config_post_request"}}' + string: '{"data":{"attributes":{"account_id":"1234abcd-1234-abcd-1234-1234abcd1234","actual_bill_config":{"export_name":"dd-actual-export","export_path":"dd-export-path","storage_account":"dd-storage-account","storage_container":"dd-storage-container"},"amortized_bill_config":{"export_name":"dd-actual-export","export_path":"dd-export-path","storage_account":"dd-storage-account","storage_container":"dd-storage-container"},"client_id":"1234abcd-1234-abcd-1234-1234abcd1234","scope":"subscriptions/1234abcd-1234-abcd-1234-1234abcd1234"},"type":"azure_uc_config_post_request"}}' headers: Accept: - application/json diff --git a/cassettes/features/v2/cloud_cost_management/Create-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-Bad-Request-response.frozen b/cassettes/features/v2/cloud_cost_management/Create-Google-Cloud-Usage-Cost-config-returns-Bad-Request-response.frozen similarity index 100% rename from cassettes/features/v2/cloud_cost_management/Create-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-Bad-Request-response.frozen rename to cassettes/features/v2/cloud_cost_management/Create-Google-Cloud-Usage-Cost-config-returns-Bad-Request-response.frozen diff --git a/cassettes/features/v2/cloud_cost_management/Create-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-Bad-Request-response.yml b/cassettes/features/v2/cloud_cost_management/Create-Google-Cloud-Usage-Cost-config-returns-Bad-Request-response.yml similarity index 100% rename from cassettes/features/v2/cloud_cost_management/Create-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-Bad-Request-response.yml rename to cassettes/features/v2/cloud_cost_management/Create-Google-Cloud-Usage-Cost-config-returns-Bad-Request-response.yml diff --git a/cassettes/features/v2/cloud_cost_management/Create-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-OK-response.frozen b/cassettes/features/v2/cloud_cost_management/Create-Google-Cloud-Usage-Cost-config-returns-OK-response.frozen similarity index 100% rename from cassettes/features/v2/cloud_cost_management/Create-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-OK-response.frozen rename to cassettes/features/v2/cloud_cost_management/Create-Google-Cloud-Usage-Cost-config-returns-OK-response.frozen diff --git a/cassettes/features/v2/cloud_cost_management/Create-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-OK-response.yml b/cassettes/features/v2/cloud_cost_management/Create-Google-Cloud-Usage-Cost-config-returns-OK-response.yml similarity index 100% rename from cassettes/features/v2/cloud_cost_management/Create-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-OK-response.yml rename to cassettes/features/v2/cloud_cost_management/Create-Google-Cloud-Usage-Cost-config-returns-OK-response.yml diff --git a/cassettes/features/v2/cloud_cost_management/Create-arbitrary-cost-rule-returns-OK-response.frozen b/cassettes/features/v2/cloud_cost_management/Create-arbitrary-cost-rule-returns-OK-response.frozen new file mode 100644 index 000000000000..694e0deed848 --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/Create-arbitrary-cost-rule-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-09-15T20:24:10.628Z \ No newline at end of file diff --git a/cassettes/features/v2/cloud_cost_management/Create-arbitrary-cost-rule-returns-OK-response.yml b/cassettes/features/v2/cloud_cost_management/Create-arbitrary-cost-rule-returns-OK-response.yml new file mode 100644 index 000000000000..f8d4f48aad7f --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/Create-arbitrary-cost-rule-returns-OK-response.yml @@ -0,0 +1,26 @@ +http_interactions: +- recorded_at: Mon, 15 Sep 2025 20:24:10 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"costs_to_allocate":[{"condition":"is","tag":"account_id","value":"123456789","values":[]},{"condition":"in","tag":"environment","value":"","values":["production","staging"]}],"enabled":true,"order_id":1,"provider":["aws","gcp"],"rule_name":"example-arbitrary-cost-rule","strategy":{"allocated_by_tag_keys":["team","environment"],"based_on_costs":[{"condition":"is","tag":"service","value":"web-api","values":[]},{"condition":"not + in","tag":"team","value":"","values":["legacy","deprecated"]}],"granularity":"daily","method":"proportional"},"type":"shared"},"type":"upsert_arbitrary_rule"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/cost/arbitrary_rule + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"435","type":"arbitrary_rule","attributes":{"costs_to_allocate":[{"tag":"account_id","condition":"is","value":"123456789","values":null},{"tag":"environment","condition":"in","value":"","values":["production","staging"]}],"created":"2025-09-15T20:23:11.705977625Z","enabled":true,"last_modified_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","order_id":1,"provider":["aws","gcp"],"rule_name":"example-arbitrary-cost-rule","strategy":{"method":"proportional","granularity":"daily","based_on_costs":[{"tag":"service","condition":"is","value":"web-api","values":null},{"tag":"team","condition":"not + in","value":"","values":["legacy","deprecated"]}],"allocated_by_tag_keys":["team","environment"]},"type":"shared","updated":"2025-09-15T20:23:11.705977625Z","version":1}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/cloud_cost_management/Create-ruleset-returns-OK-response.frozen b/cassettes/features/v2/cloud_cost_management/Create-ruleset-returns-OK-response.frozen new file mode 100644 index 000000000000..8be30f84af40 --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/Create-ruleset-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-09-16T16:51:02.186Z \ No newline at end of file diff --git a/cassettes/features/v2/cloud_cost_management/Create-ruleset-returns-OK-response.yml b/cassettes/features/v2/cloud_cost_management/Create-ruleset-returns-OK-response.yml new file mode 100644 index 000000000000..32acbefb4212 --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/Create-ruleset-returns-OK-response.yml @@ -0,0 +1,28 @@ +http_interactions: +- recorded_at: Tue, 16 Sep 2025 16:51:02 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"enabled":true,"rules":[{"enabled":true,"mapping":null,"name":"Add + Cost Center Tag","query":{"addition":{"key":"cost_center","value":"engineering"},"case_insensitivity":false,"if_not_exists":true,"query":"account_id:\"123456789\" + AND service:\"web-api\""},"reference_table":null}]},"id":"New Ruleset","type":"create_ruleset"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/tags/enrichment + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"1b680ec0-8e29-4b79-bb01-45f0c645a789","type":"ruleset","attributes":{"created":{"seconds":1758041403,"nanos":117388000},"enabled":true,"last_modified_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","modified":{"seconds":1758041403,"nanos":117388000},"name":"New + Ruleset","position":1,"rules":[{"name":"Add Cost Center Tag","enabled":true,"query":{"query":"account_id:\"123456789\" + AND service:\"web-api\"","addition":{"key":"cost_center","value":"engineering"},"if_not_exists":true,"case_insensitivity":false},"mapping":null,"reference_table":null,"metadata":null}],"version":3603412}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/cloud_cost_management/Delete-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-Bad-Request-response.frozen b/cassettes/features/v2/cloud_cost_management/Delete-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-Bad-Request-response.frozen deleted file mode 100644 index b32e1196f0df..000000000000 --- a/cassettes/features/v2/cloud_cost_management/Delete-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-Bad-Request-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2025-06-23T12:26:40.200Z \ No newline at end of file diff --git a/cassettes/features/v2/cloud_cost_management/Delete-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-Bad-Request-response.yml b/cassettes/features/v2/cloud_cost_management/Delete-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-Bad-Request-response.yml deleted file mode 100644 index 506911b759bb..000000000000 --- a/cassettes/features/v2/cloud_cost_management/Delete-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-Bad-Request-response.yml +++ /dev/null @@ -1,21 +0,0 @@ -http_interactions: -- recorded_at: Mon, 23 Jun 2025 12:26:40 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/cost/gcp_uc_config/Invalid - response: - body: - encoding: UTF-8 - string: '{"errors":[{"status":"400","title":"Invalid Parameter","detail":"invalid - parameter \"cloudAccountId\" in \"path\"; expected type \"int64\""}]}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 400 - message: Bad Request -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/cloud_cost_management/Delete-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-No-Content-response.frozen b/cassettes/features/v2/cloud_cost_management/Delete-Google-Cloud-Usage-Cost-config-returns-No-Content-response.frozen similarity index 100% rename from cassettes/features/v2/cloud_cost_management/Delete-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-No-Content-response.frozen rename to cassettes/features/v2/cloud_cost_management/Delete-Google-Cloud-Usage-Cost-config-returns-No-Content-response.frozen diff --git a/cassettes/features/v2/cloud_cost_management/Delete-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-No-Content-response.yml b/cassettes/features/v2/cloud_cost_management/Delete-Google-Cloud-Usage-Cost-config-returns-No-Content-response.yml similarity index 100% rename from cassettes/features/v2/cloud_cost_management/Delete-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-No-Content-response.yml rename to cassettes/features/v2/cloud_cost_management/Delete-Google-Cloud-Usage-Cost-config-returns-No-Content-response.yml diff --git a/cassettes/features/v2/cloud_cost_management/Delete-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-Not-Found-response.frozen b/cassettes/features/v2/cloud_cost_management/Delete-Google-Cloud-Usage-Cost-config-returns-Not-Found-response.frozen similarity index 100% rename from cassettes/features/v2/cloud_cost_management/Delete-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-Not-Found-response.frozen rename to cassettes/features/v2/cloud_cost_management/Delete-Google-Cloud-Usage-Cost-config-returns-Not-Found-response.frozen diff --git a/cassettes/features/v2/cloud_cost_management/Delete-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-Not-Found-response.yml b/cassettes/features/v2/cloud_cost_management/Delete-Google-Cloud-Usage-Cost-config-returns-Not-Found-response.yml similarity index 100% rename from cassettes/features/v2/cloud_cost_management/Delete-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-Not-Found-response.yml rename to cassettes/features/v2/cloud_cost_management/Delete-Google-Cloud-Usage-Cost-config-returns-Not-Found-response.yml diff --git a/cassettes/features/v2/cloud_cost_management/Delete-arbitrary-cost-rule-returns-No-Content-response.frozen b/cassettes/features/v2/cloud_cost_management/Delete-arbitrary-cost-rule-returns-No-Content-response.frozen new file mode 100644 index 000000000000..5bba6c73e72b --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/Delete-arbitrary-cost-rule-returns-No-Content-response.frozen @@ -0,0 +1 @@ +2025-09-11T21:01:36.419Z \ No newline at end of file diff --git a/cassettes/features/v2/cloud_cost_management/Delete-arbitrary-cost-rule-returns-No-Content-response.yml b/cassettes/features/v2/cloud_cost_management/Delete-arbitrary-cost-rule-returns-No-Content-response.yml new file mode 100644 index 000000000000..081f0590b87b --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/Delete-arbitrary-cost-rule-returns-No-Content-response.yml @@ -0,0 +1,18 @@ +http_interactions: +- recorded_at: Thu, 11 Sep 2025 21:01:36 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/cost/arbitrary_rule/123456 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/cloud_cost_management/Delete-ruleset-returns-No-Content-response.frozen b/cassettes/features/v2/cloud_cost_management/Delete-ruleset-returns-No-Content-response.frozen new file mode 100644 index 000000000000..9ddc2f58a49b --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/Delete-ruleset-returns-No-Content-response.frozen @@ -0,0 +1 @@ +2025-09-11T20:43:38.898Z \ No newline at end of file diff --git a/cassettes/features/v2/cloud_cost_management/Delete-ruleset-returns-No-Content-response.yml b/cassettes/features/v2/cloud_cost_management/Delete-ruleset-returns-No-Content-response.yml new file mode 100644 index 000000000000..b7aa0993fe9b --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/Delete-ruleset-returns-No-Content-response.yml @@ -0,0 +1,18 @@ +http_interactions: +- recorded_at: Thu, 11 Sep 2025 20:43:38 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/tags/enrichment/1c5dae14-237d-4b9a-a515-aa55b3939142 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/cloud_cost_management/Get-Google-Cloud-Usage-Cost-config-returns-OK-response.frozen b/cassettes/features/v2/cloud_cost_management/Get-Google-Cloud-Usage-Cost-config-returns-OK-response.frozen new file mode 100644 index 000000000000..80d0a8884f82 --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/Get-Google-Cloud-Usage-Cost-config-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-09-11T20:19:23.847Z \ No newline at end of file diff --git a/cassettes/features/v2/cloud_cost_management/Get-Google-Cloud-Usage-Cost-config-returns-OK-response.yml b/cassettes/features/v2/cloud_cost_management/Get-Google-Cloud-Usage-Cost-config-returns-OK-response.yml new file mode 100644 index 000000000000..6ad67aa69d02 --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/Get-Google-Cloud-Usage-Cost-config-returns-OK-response.yml @@ -0,0 +1,20 @@ +http_interactions: +- recorded_at: Thu, 11 Sep 2025 20:19:23 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/cost/gcp_uc_config/123456 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"123456","type":"gcp_uc_config","attributes":{"account_id":"123456_ABCDEF_123ABC","bucket_name":"test-bucket-name","created_at":"2024-04-29T13:10:37.516579","dataset":"test-dataset","error_messages":null,"export_prefix":"datadog_cloud_cost_detailed_usage_export","export_project_name":"test-export-project-name","months":15,"project_id":"","service_account":"dd-ccm-gcp-test-integration@some-test-project.iam.gserviceaccount.com","status":"active","status_updated_at":"2025-08-02T14:23:19.542138","updated_at":"2024-04-29T13:10:37.516579"}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/cloud_cost_management/Get-arbitrary-cost-rule-returns-OK-response.frozen b/cassettes/features/v2/cloud_cost_management/Get-arbitrary-cost-rule-returns-OK-response.frozen new file mode 100644 index 000000000000..19ddeadc1428 --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/Get-arbitrary-cost-rule-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-09-11T18:25:21.818Z \ No newline at end of file diff --git a/cassettes/features/v2/cloud_cost_management/Get-arbitrary-cost-rule-returns-OK-response.yml b/cassettes/features/v2/cloud_cost_management/Get-arbitrary-cost-rule-returns-OK-response.yml new file mode 100644 index 000000000000..74f013d0fa51 --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/Get-arbitrary-cost-rule-returns-OK-response.yml @@ -0,0 +1,21 @@ +http_interactions: +- recorded_at: Thu, 11 Sep 2025 18:25:21 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/cost/arbitrary_rule/123456 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"123456","type":"arbitrary_rule","attributes":{"costs_to_allocate":[{"tag":"account_id","condition":"is","value":"123456789","values":null},{"tag":"environment","condition":"in","value":"","values":["production","staging"]}],"created":"2025-09-11T18:23:20.518112Z","enabled":true,"last_modified_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","order_id":1,"provider":["aws","gcp"],"rule_name":"example-arbitrary-cost-rule","strategy":{"method":"proportional","granularity":"daily","based_on_costs":[{"tag":"service","condition":"is","value":"web-api","values":null},{"tag":"team","condition":"not + in","value":"","values":["legacy","deprecated"]}],"allocated_by_tag_keys":["team","environment"]},"type":"shared","updated":"2025-09-11T18:23:20.518112Z","version":1}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/cloud_cost_management/Get-cost-AWS-CUR-config-returns-OK-response.frozen b/cassettes/features/v2/cloud_cost_management/Get-cost-AWS-CUR-config-returns-OK-response.frozen new file mode 100644 index 000000000000..238742d79041 --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/Get-cost-AWS-CUR-config-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-09-11T19:58:54.699Z \ No newline at end of file diff --git a/cassettes/features/v2/cloud_cost_management/Get-cost-AWS-CUR-config-returns-OK-response.yml b/cassettes/features/v2/cloud_cost_management/Get-cost-AWS-CUR-config-returns-OK-response.yml new file mode 100644 index 000000000000..79e2cb86ae6d --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/Get-cost-AWS-CUR-config-returns-OK-response.yml @@ -0,0 +1,20 @@ +http_interactions: +- recorded_at: Thu, 11 Sep 2025 19:58:54 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/cost/aws_cur_config/123456 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"123456","type":"aws_cur_config","attributes":{"account_filters":{"include_new_accounts":null},"account_id":"123456123456","bucket_name":"dd-bucket-name","bucket_region":"us-east-1","created_at":"2023-05-01T20:05:41.849823","error_messages":null,"months":15,"report_name":"report-name-test","report_prefix":"report-prefix-test","status":"active","status_updated_at":"2025-01-15T14:57:27.799558","updated_at":"2023-05-01T20:05:41.849823"}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/cloud_cost_management/Get-cost-Azure-UC-config-returns-OK-response.frozen b/cassettes/features/v2/cloud_cost_management/Get-cost-Azure-UC-config-returns-OK-response.frozen new file mode 100644 index 000000000000..d291ba04f478 --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/Get-cost-Azure-UC-config-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-09-11T20:06:45.013Z \ No newline at end of file diff --git a/cassettes/features/v2/cloud_cost_management/Get-cost-Azure-UC-config-returns-OK-response.yml b/cassettes/features/v2/cloud_cost_management/Get-cost-Azure-UC-config-returns-OK-response.yml new file mode 100644 index 000000000000..db0f89851126 --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/Get-cost-Azure-UC-config-returns-OK-response.yml @@ -0,0 +1,20 @@ +http_interactions: +- recorded_at: Thu, 11 Sep 2025 20:06:45 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/cost/azure_uc_config/123456 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"123456","type":"azure_uc_configs","attributes":{"configs":[{"account_id":"1234abcd-1234-abcd-1234-abcd1234abcd","client_id":"12345678-1234-5678-1234-567812345678","status":"active","status_updated_at":"2024-09-06T11:49:10.544706","error_messages":null,"id":"123","dataset_type":"amortized","storage_account":"teststorageaccount","storage_container":"teststoragecontainer","export_name":"test-export-name","export_path":"/test-export-path-amortized","scope":"/subscriptions/abcdefgh-abcd-efgh-abcd-efghabcdefgh","months":15,"created_at":"2023-06-14T20:42:08.792050","updated_at":"2023-06-14T20:42:08.792050"},{"account_id":"87654321-8765-4321-8765-432187654321","client_id":"aaaabbbb-cccc-dddd-eeee-ffffgggghhhh","status":"active","status_updated_at":"2024-09-06T11:49:10.544706","error_messages":null,"id":"456","dataset_type":"actual","storage_account":"teststorageaccount","storage_container":"teststoragecontainer","export_name":"test-export-name","export_path":"/test-export-path-actual","scope":"/subscriptions/abcdefgh-abcd-efgh-abcd-efghabcdefgh","months":15,"created_at":"2023-06-14T20:42:08.792050","updated_at":"2023-06-14T20:42:08.792050"}]}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/cloud_cost_management/Get-ruleset-returns-OK-response.frozen b/cassettes/features/v2/cloud_cost_management/Get-ruleset-returns-OK-response.frozen new file mode 100644 index 000000000000..bd05b8d6aa12 --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/Get-ruleset-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-09-11T18:54:36.821Z \ No newline at end of file diff --git a/cassettes/features/v2/cloud_cost_management/Get-ruleset-returns-OK-response.yml b/cassettes/features/v2/cloud_cost_management/Get-ruleset-returns-OK-response.yml new file mode 100644 index 000000000000..70cf765a3e70 --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/Get-ruleset-returns-OK-response.yml @@ -0,0 +1,22 @@ +http_interactions: +- recorded_at: Thu, 11 Sep 2025 18:54:36 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/tags/enrichment/da0e30e2-615d-4dae-9a22-38cf86a87dde + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"da0e30e2-615d-4dae-9a22-38cf86a87dde","type":"ruleset","attributes":{"created":{"seconds":1757616255,"nanos":64603000},"enabled":true,"last_modified_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","modified":{"seconds":1757616255,"nanos":64603000},"name":"New + Ruleset","position":1,"rules":[{"name":"Add Cost Center Tag","enabled":true,"query":{"query":"account_id:\"123456789\" + AND service:\"web-api\"","addition":{"key":"cost_center","value":"engineering"},"if_not_exists":true,"case_insensitivity":false},"mapping":null,"reference_table":null,"metadata":null}],"version":3601897}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/cloud_cost_management/List-Cloud-Cost-Management-GCP-Usage-Cost-configs-returns-OK-response.frozen b/cassettes/features/v2/cloud_cost_management/List-Google-Cloud-Usage-Cost-configs-returns-OK-response.frozen similarity index 100% rename from cassettes/features/v2/cloud_cost_management/List-Cloud-Cost-Management-GCP-Usage-Cost-configs-returns-OK-response.frozen rename to cassettes/features/v2/cloud_cost_management/List-Google-Cloud-Usage-Cost-configs-returns-OK-response.frozen diff --git a/cassettes/features/v2/cloud_cost_management/List-Cloud-Cost-Management-GCP-Usage-Cost-configs-returns-OK-response.yml b/cassettes/features/v2/cloud_cost_management/List-Google-Cloud-Usage-Cost-configs-returns-OK-response.yml similarity index 100% rename from cassettes/features/v2/cloud_cost_management/List-Cloud-Cost-Management-GCP-Usage-Cost-configs-returns-OK-response.yml rename to cassettes/features/v2/cloud_cost_management/List-Google-Cloud-Usage-Cost-configs-returns-OK-response.yml diff --git a/cassettes/features/v2/cloud_cost_management/List-arbitrary-cost-rules-returns-OK-response.frozen b/cassettes/features/v2/cloud_cost_management/List-arbitrary-cost-rules-returns-OK-response.frozen new file mode 100644 index 000000000000..ee4c66fe2ff0 --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/List-arbitrary-cost-rules-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-09-11T18:24:00.228Z \ No newline at end of file diff --git a/cassettes/features/v2/cloud_cost_management/List-arbitrary-cost-rules-returns-OK-response.yml b/cassettes/features/v2/cloud_cost_management/List-arbitrary-cost-rules-returns-OK-response.yml new file mode 100644 index 000000000000..3e90dd7ff257 --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/List-arbitrary-cost-rules-returns-OK-response.yml @@ -0,0 +1,21 @@ +http_interactions: +- recorded_at: Thu, 11 Sep 2025 18:24:00 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/cost/arbitrary_rule + response: + body: + encoding: UTF-8 + string: '{"data":[{"id":"123456","type":"arbitrary_rule","attributes":{"costs_to_allocate":[{"tag":"account_id","condition":"is","value":"123456789","values":null},{"tag":"environment","condition":"in","value":"","values":["production","staging"]}],"created":"2025-09-11T18:23:20.518112Z","enabled":true,"last_modified_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","order_id":1,"provider":["aws","gcp"],"rule_name":"example-arbitrary-cost-rule","strategy":{"method":"proportional","granularity":"daily","based_on_costs":[{"tag":"service","condition":"is","value":"web-api","values":null},{"tag":"team","condition":"not + in","value":"","values":["legacy","deprecated"]}],"allocated_by_tag_keys":["team","environment"]},"type":"shared","updated":"2025-09-11T18:23:20.518112Z","version":1}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/cloud_cost_management/List-rulesets-returns-OK-response.frozen b/cassettes/features/v2/cloud_cost_management/List-rulesets-returns-OK-response.frozen new file mode 100644 index 000000000000..8bf4b1854aa6 --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/List-rulesets-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-09-11T20:35:14.784Z \ No newline at end of file diff --git a/cassettes/features/v2/cloud_cost_management/List-rulesets-returns-OK-response.yml b/cassettes/features/v2/cloud_cost_management/List-rulesets-returns-OK-response.yml new file mode 100644 index 000000000000..e7a92931d74a --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/List-rulesets-returns-OK-response.yml @@ -0,0 +1,22 @@ +http_interactions: +- recorded_at: Thu, 11 Sep 2025 20:35:14 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/tags/enrichment + response: + body: + encoding: UTF-8 + string: '{"data":[{"id":"1c5dae14-237d-4b9a-a515-aa55b3939142","type":"ruleset","attributes":{"created":{"seconds":1757622359,"nanos":552132000},"enabled":true,"last_modified_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","modified":{"seconds":1757622359,"nanos":552132000},"name":"New + Ruleset","position":1,"rules":[{"name":"Add Cost Center Tag","enabled":true,"query":{"query":"account_id:\"123456789\" + AND service:\"web-api\"","addition":{"key":"cost_center","value":"engineering"},"if_not_exists":true,"case_insensitivity":false},"mapping":null,"reference_table":null,"metadata":null}],"version":3601919}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-AWS-CUR-config-returns-Not-Found-response.yml b/cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-AWS-CUR-config-returns-Not-Found-response.yml index aab5c15b8b30..0536d9f2ce9c 100644 --- a/cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-AWS-CUR-config-returns-Not-Found-response.yml +++ b/cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-AWS-CUR-config-returns-Not-Found-response.yml @@ -10,12 +10,12 @@ http_interactions: Content-Type: - application/json method: PATCH - uri: https://api.datadoghq.com/api/v2/cost/aws_cur_config/12345678 + uri: https://api.datadoghq.com/api/v2/cost/aws_cur_config/123456 response: body: encoding: UTF-8 string: '{"errors":[{"status":"404","title":"Cloud account not found","detail":"Cloud - account with ID 12345678 was not found"}]}' + account with ID 123456 was not found"}]}' headers: Content-Type: - application/vnd.api+json diff --git a/cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-Azure-config-returns-Not-Found-response.yml b/cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-Azure-config-returns-Not-Found-response.yml index b7122e65aa19..a14761974b11 100644 --- a/cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-Azure-config-returns-Not-Found-response.yml +++ b/cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-Azure-config-returns-Not-Found-response.yml @@ -10,12 +10,12 @@ http_interactions: Content-Type: - application/json method: PATCH - uri: https://api.datadoghq.com/api/v2/cost/azure_uc_config/12345678 + uri: https://api.datadoghq.com/api/v2/cost/azure_uc_config/123456 response: body: encoding: UTF-8 string: '{"errors":[{"status":"404","title":"Cloud account not found","detail":"Cloud - account with ID 12345678 was not found"}]}' + account with ID 123456 was not found"}]}' headers: Content-Type: - application/vnd.api+json diff --git a/cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-Not-Found-response.frozen b/cassettes/features/v2/cloud_cost_management/Update-Google-Cloud-Usage-Cost-config-returns-Not-Found-response.frozen similarity index 100% rename from cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-Not-Found-response.frozen rename to cassettes/features/v2/cloud_cost_management/Update-Google-Cloud-Usage-Cost-config-returns-Not-Found-response.frozen diff --git a/cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-Not-Found-response.yml b/cassettes/features/v2/cloud_cost_management/Update-Google-Cloud-Usage-Cost-config-returns-Not-Found-response.yml similarity index 99% rename from cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-Not-Found-response.yml rename to cassettes/features/v2/cloud_cost_management/Update-Google-Cloud-Usage-Cost-config-returns-Not-Found-response.yml index a3f9fd6b0902..661710a7b010 100644 --- a/cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-Not-Found-response.yml +++ b/cassettes/features/v2/cloud_cost_management/Update-Google-Cloud-Usage-Cost-config-returns-Not-Found-response.yml @@ -10,7 +10,7 @@ http_interactions: Content-Type: - application/json method: PATCH - uri: https://api.datadoghq.com/api/v2/cost/gcp_uc_config/12345678 + uri: https://api.datadoghq.com/api/v2/cost/gcp_uc_config/123456 response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-OK-response.frozen b/cassettes/features/v2/cloud_cost_management/Update-Google-Cloud-Usage-Cost-config-returns-OK-response.frozen similarity index 100% rename from cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-OK-response.frozen rename to cassettes/features/v2/cloud_cost_management/Update-Google-Cloud-Usage-Cost-config-returns-OK-response.frozen diff --git a/cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-OK-response.yml b/cassettes/features/v2/cloud_cost_management/Update-Google-Cloud-Usage-Cost-config-returns-OK-response.yml similarity index 100% rename from cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-GCP-Usage-Cost-config-returns-OK-response.yml rename to cassettes/features/v2/cloud_cost_management/Update-Google-Cloud-Usage-Cost-config-returns-OK-response.yml diff --git a/cassettes/features/v2/cloud_cost_management/Update-arbitrary-cost-rule-returns-OK-response.frozen b/cassettes/features/v2/cloud_cost_management/Update-arbitrary-cost-rule-returns-OK-response.frozen new file mode 100644 index 000000000000..ecb5b7648d82 --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/Update-arbitrary-cost-rule-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-09-11T21:00:21.176Z \ No newline at end of file diff --git a/cassettes/features/v2/cloud_cost_management/Update-arbitrary-cost-rule-returns-OK-response.yml b/cassettes/features/v2/cloud_cost_management/Update-arbitrary-cost-rule-returns-OK-response.yml new file mode 100644 index 000000000000..8158bffbad09 --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/Update-arbitrary-cost-rule-returns-OK-response.yml @@ -0,0 +1,26 @@ +http_interactions: +- recorded_at: Thu, 11 Sep 2025 21:00:21 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"costs_to_allocate":[{"condition":"is","tag":"account_id","value":"123456789","values":[]},{"condition":"in","tag":"environment","value":"","values":["production","staging"]}],"enabled":true,"order_id":1,"provider":["aws","gcp"],"rule_name":"example-arbitrary-cost-rule","strategy":{"allocated_by_tag_keys":["team","environment"],"based_on_costs":[{"condition":"is","tag":"service","value":"web-api","values":[]},{"condition":"not + in","tag":"team","value":"","values":["legacy","deprecated"]}],"granularity":"daily","method":"proportional"},"type":"shared"},"type":"upsert_arbitrary_rule"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/cost/arbitrary_rule/123456 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"123456","type":"arbitrary_rule","attributes":{"costs_to_allocate":[{"tag":"account_id","condition":"is","value":"123456789","values":null},{"tag":"environment","condition":"in","value":"","values":["production","staging"]}],"created":"2025-09-11T20:59:19.952563Z","enabled":true,"last_modified_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","order_id":1,"provider":["aws","gcp"],"rule_name":"example-arbitrary-cost-rule","strategy":{"method":"proportional","granularity":"daily","based_on_costs":[{"tag":"service","condition":"is","value":"web-api","values":null},{"tag":"team","condition":"not + in","value":"","values":["legacy","deprecated"]}],"allocated_by_tag_keys":["team","environment"]},"type":"shared","updated":"2025-09-11T21:00:21.353162Z","version":1}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/cloud_cost_management/Update-ruleset-returns-OK-response.frozen b/cassettes/features/v2/cloud_cost_management/Update-ruleset-returns-OK-response.frozen new file mode 100644 index 000000000000..1d97407de7a8 --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/Update-ruleset-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-09-11T20:42:36.765Z \ No newline at end of file diff --git a/cassettes/features/v2/cloud_cost_management/Update-ruleset-returns-OK-response.yml b/cassettes/features/v2/cloud_cost_management/Update-ruleset-returns-OK-response.yml new file mode 100644 index 000000000000..ebf528de15de --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/Update-ruleset-returns-OK-response.yml @@ -0,0 +1,26 @@ +http_interactions: +- recorded_at: Thu, 11 Sep 2025 20:42:36 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"enabled":true,"last_version":3601919,"rules":[{"enabled":true,"mapping":{"destination_key":"team_owner","if_not_exists":true,"source_keys":["account_name","account_id"]},"name":"Account + Name Mapping","query":null,"reference_table":null}]},"type":"update_ruleset"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/tags/enrichment/1c5dae14-237d-4b9a-a515-aa55b3939142 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"1c5dae14-237d-4b9a-a515-aa55b3939142","type":"ruleset","attributes":{"created":{"seconds":1757623356,"nanos":940863000},"enabled":true,"last_modified_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","modified":{"seconds":1757623356,"nanos":940863000},"name":"New + Ruleset","position":1,"rules":[{"name":"Account Name Mapping","enabled":true,"query":null,"mapping":{"source_keys":["account_name","account_id"],"destination_key":"team_owner","if_not_exists":true},"reference_table":null,"metadata":null}],"version":3601923}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/cloud_cost_management/Validate-query-returns-OK-response.frozen b/cassettes/features/v2/cloud_cost_management/Validate-query-returns-OK-response.frozen new file mode 100644 index 000000000000..2d8bb5e63fb1 --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/Validate-query-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-09-11T19:06:38.613Z \ No newline at end of file diff --git a/cassettes/features/v2/cloud_cost_management/Validate-query-returns-OK-response.yml b/cassettes/features/v2/cloud_cost_management/Validate-query-returns-OK-response.yml new file mode 100644 index 000000000000..e584b22bc494 --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/Validate-query-returns-OK-response.yml @@ -0,0 +1,25 @@ +http_interactions: +- recorded_at: Thu, 11 Sep 2025 19:06:38 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"Query":"example:query AND test:true"},"type":"validate_query"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/tags/enrichment/validate-query + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"6a2cddcf-8498-469f-8da1-7b8fb597868d","type":"validate_response","attributes":{"Canonical":"example:query + AND test:true"}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/examples/v2/cloud-cost-management/CreateArbitraryCostRule.rb b/examples/v2/cloud-cost-management/CreateArbitraryCostRule.rb new file mode 100644 index 000000000000..ee6009f8c155 --- /dev/null +++ b/examples/v2/cloud-cost-management/CreateArbitraryCostRule.rb @@ -0,0 +1,63 @@ +# Create arbitrary cost rule returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new + +body = DatadogAPIClient::V2::ArbitraryCostUpsertRequest.new({ + data: DatadogAPIClient::V2::ArbitraryCostUpsertRequestData.new({ + attributes: DatadogAPIClient::V2::ArbitraryCostUpsertRequestDataAttributes.new({ + costs_to_allocate: [ + DatadogAPIClient::V2::ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems.new({ + condition: "is", + tag: "account_id", + value: "123456789", + values: [], + }), + DatadogAPIClient::V2::ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems.new({ + condition: "in", + tag: "environment", + value: "", + values: [ + "production", + "staging", + ], + }), + ], + enabled: true, + order_id: 1, + provider: [ + "aws", + "gcp", + ], + rule_name: "example-arbitrary-cost-rule", + strategy: DatadogAPIClient::V2::ArbitraryCostUpsertRequestDataAttributesStrategy.new({ + allocated_by_tag_keys: [ + "team", + "environment", + ], + based_on_costs: [ + DatadogAPIClient::V2::ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems.new({ + condition: "is", + tag: "service", + value: "web-api", + values: [], + }), + DatadogAPIClient::V2::ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems.new({ + condition: "not in", + tag: "team", + value: "", + values: [ + "legacy", + "deprecated", + ], + }), + ], + granularity: "daily", + method: "proportional", + }), + type: "shared", + }), + type: DatadogAPIClient::V2::ArbitraryCostUpsertRequestDataType::UPSERT_ARBITRARY_RULE, + }), +}) +p api_instance.create_arbitrary_cost_rule(body) diff --git a/examples/v2/cloud-cost-management/CreateCostAzureUCConfigs.rb b/examples/v2/cloud-cost-management/CreateCostAzureUCConfigs.rb index 422dd714b3fe..b3525aa7c8f7 100644 --- a/examples/v2/cloud-cost-management/CreateCostAzureUCConfigs.rb +++ b/examples/v2/cloud-cost-management/CreateCostAzureUCConfigs.rb @@ -20,7 +20,6 @@ storage_container: "dd-storage-container", }), client_id: "1234abcd-1234-abcd-1234-1234abcd1234", - is_enabled: true, scope: "subscriptions/1234abcd-1234-abcd-1234-1234abcd1234", }), type: DatadogAPIClient::V2::AzureUCConfigPostRequestType::AZURE_UC_CONFIG_POST_REQUEST, diff --git a/examples/v2/cloud-cost-management/CreateCostGCPUsageCostConfig.rb b/examples/v2/cloud-cost-management/CreateCostGCPUsageCostConfig.rb index 519b590f092b..d96be82c81f3 100644 --- a/examples/v2/cloud-cost-management/CreateCostGCPUsageCostConfig.rb +++ b/examples/v2/cloud-cost-management/CreateCostGCPUsageCostConfig.rb @@ -1,4 +1,4 @@ -# Create Cloud Cost Management GCP Usage Cost config returns "OK" response +# Create Google Cloud Usage Cost config returns "OK" response require "datadog_api_client" api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new diff --git a/examples/v2/cloud-cost-management/CreateRuleset.rb b/examples/v2/cloud-cost-management/CreateRuleset.rb new file mode 100644 index 000000000000..e484a52ac11f --- /dev/null +++ b/examples/v2/cloud-cost-management/CreateRuleset.rb @@ -0,0 +1,32 @@ +# Create ruleset returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new + +body = DatadogAPIClient::V2::CreateRulesetRequest.new({ + data: DatadogAPIClient::V2::CreateRulesetRequestData.new({ + attributes: DatadogAPIClient::V2::CreateRulesetRequestDataAttributes.new({ + enabled: true, + rules: [ + DatadogAPIClient::V2::CreateRulesetRequestDataAttributesRulesItems.new({ + enabled: true, + mapping: nil, + name: "Add Cost Center Tag", + query: DatadogAPIClient::V2::CreateRulesetRequestDataAttributesRulesItemsQuery.new({ + addition: DatadogAPIClient::V2::CreateRulesetRequestDataAttributesRulesItemsQueryAddition.new({ + key: "cost_center", + value: "engineering", + }), + case_insensitivity: false, + if_not_exists: true, + query: 'account_id:"123456789" AND service:"web-api"', + }), + reference_table: nil, + }), + ], + }), + id: "New Ruleset", + type: DatadogAPIClient::V2::CreateRulesetRequestDataType::CREATE_RULESET, + }), +}) +p api_instance.create_ruleset(body) diff --git a/examples/v2/cloud-cost-management/DeleteArbitraryCostRule.rb b/examples/v2/cloud-cost-management/DeleteArbitraryCostRule.rb new file mode 100644 index 000000000000..9a448f9256de --- /dev/null +++ b/examples/v2/cloud-cost-management/DeleteArbitraryCostRule.rb @@ -0,0 +1,5 @@ +# Delete arbitrary cost rule returns "No Content" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new +api_instance.delete_arbitrary_cost_rule(123456) diff --git a/examples/v2/cloud-cost-management/DeleteCostGCPUsageCostConfig.rb b/examples/v2/cloud-cost-management/DeleteCostGCPUsageCostConfig.rb index a240f5b7bbbd..6507018f1ff4 100644 --- a/examples/v2/cloud-cost-management/DeleteCostGCPUsageCostConfig.rb +++ b/examples/v2/cloud-cost-management/DeleteCostGCPUsageCostConfig.rb @@ -1,4 +1,4 @@ -# Delete Cloud Cost Management GCP Usage Cost config returns "No Content" response +# Delete Google Cloud Usage Cost config returns "No Content" response require "datadog_api_client" api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new diff --git a/examples/v2/cloud-cost-management/DeleteRuleset.rb b/examples/v2/cloud-cost-management/DeleteRuleset.rb new file mode 100644 index 000000000000..b5495ea0ff41 --- /dev/null +++ b/examples/v2/cloud-cost-management/DeleteRuleset.rb @@ -0,0 +1,5 @@ +# Delete ruleset returns "No Content" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new +api_instance.delete_ruleset("1c5dae14-237d-4b9a-a515-aa55b3939142") diff --git a/examples/v2/cloud-cost-management/GetArbitraryCostRule.rb b/examples/v2/cloud-cost-management/GetArbitraryCostRule.rb new file mode 100644 index 000000000000..b4990ee817bb --- /dev/null +++ b/examples/v2/cloud-cost-management/GetArbitraryCostRule.rb @@ -0,0 +1,5 @@ +# Get arbitrary cost rule returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new +p api_instance.get_arbitrary_cost_rule(123456) diff --git a/examples/v2/cloud-cost-management/GetCostAWSCURConfig.rb b/examples/v2/cloud-cost-management/GetCostAWSCURConfig.rb new file mode 100644 index 000000000000..1189609ab64d --- /dev/null +++ b/examples/v2/cloud-cost-management/GetCostAWSCURConfig.rb @@ -0,0 +1,5 @@ +# Get cost AWS CUR config returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new +p api_instance.get_cost_awscur_config(123456) diff --git a/examples/v2/cloud-cost-management/GetCostAzureUCConfig.rb b/examples/v2/cloud-cost-management/GetCostAzureUCConfig.rb new file mode 100644 index 000000000000..2ec8cdc2441f --- /dev/null +++ b/examples/v2/cloud-cost-management/GetCostAzureUCConfig.rb @@ -0,0 +1,5 @@ +# Get cost Azure UC config returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new +p api_instance.get_cost_azure_uc_config(123456) diff --git a/examples/v2/cloud-cost-management/GetCostGCPUsageCostConfig.rb b/examples/v2/cloud-cost-management/GetCostGCPUsageCostConfig.rb new file mode 100644 index 000000000000..a42ebc32ffa0 --- /dev/null +++ b/examples/v2/cloud-cost-management/GetCostGCPUsageCostConfig.rb @@ -0,0 +1,5 @@ +# Get Google Cloud Usage Cost config returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new +p api_instance.get_cost_gcp_usage_cost_config(123456) diff --git a/examples/v2/cloud-cost-management/GetRuleset.rb b/examples/v2/cloud-cost-management/GetRuleset.rb new file mode 100644 index 000000000000..65cee15181a1 --- /dev/null +++ b/examples/v2/cloud-cost-management/GetRuleset.rb @@ -0,0 +1,5 @@ +# Get ruleset returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new +p api_instance.get_ruleset("da0e30e2-615d-4dae-9a22-38cf86a87dde") diff --git a/examples/v2/cloud-cost-management/ListArbitraryCostRules.rb b/examples/v2/cloud-cost-management/ListArbitraryCostRules.rb new file mode 100644 index 000000000000..5392d73d0ea3 --- /dev/null +++ b/examples/v2/cloud-cost-management/ListArbitraryCostRules.rb @@ -0,0 +1,5 @@ +# List arbitrary cost rules returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new +p api_instance.list_arbitrary_cost_rules() diff --git a/examples/v2/cloud-cost-management/ListCostGCPUsageCostConfigs.rb b/examples/v2/cloud-cost-management/ListCostGCPUsageCostConfigs.rb index 6f08040f8f43..d97b67055ad9 100644 --- a/examples/v2/cloud-cost-management/ListCostGCPUsageCostConfigs.rb +++ b/examples/v2/cloud-cost-management/ListCostGCPUsageCostConfigs.rb @@ -1,4 +1,4 @@ -# List Cloud Cost Management GCP Usage Cost configs returns "OK" response +# List Google Cloud Usage Cost configs returns "OK" response require "datadog_api_client" api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new diff --git a/examples/v2/cloud-cost-management/ListRulesets.rb b/examples/v2/cloud-cost-management/ListRulesets.rb new file mode 100644 index 000000000000..61e0a0aaa2da --- /dev/null +++ b/examples/v2/cloud-cost-management/ListRulesets.rb @@ -0,0 +1,5 @@ +# List rulesets returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new +p api_instance.list_rulesets() diff --git a/examples/v2/cloud-cost-management/ReorderArbitraryCostRules.rb b/examples/v2/cloud-cost-management/ReorderArbitraryCostRules.rb new file mode 100644 index 000000000000..2bc45dd25b69 --- /dev/null +++ b/examples/v2/cloud-cost-management/ReorderArbitraryCostRules.rb @@ -0,0 +1,22 @@ +# Reorder arbitrary cost rules returns "Successfully reordered rules" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new + +body = DatadogAPIClient::V2::ReorderRuleResourceArray.new({ + data: [ + DatadogAPIClient::V2::ReorderRuleResourceData.new({ + id: "456", + type: DatadogAPIClient::V2::ReorderRuleResourceDataType::ARBITRARY_RULE, + }), + DatadogAPIClient::V2::ReorderRuleResourceData.new({ + id: "123", + type: DatadogAPIClient::V2::ReorderRuleResourceDataType::ARBITRARY_RULE, + }), + DatadogAPIClient::V2::ReorderRuleResourceData.new({ + id: "789", + type: DatadogAPIClient::V2::ReorderRuleResourceDataType::ARBITRARY_RULE, + }), + ], +}) +api_instance.reorder_arbitrary_cost_rules(body) diff --git a/examples/v2/cloud-cost-management/ReorderRulesets.rb b/examples/v2/cloud-cost-management/ReorderRulesets.rb new file mode 100644 index 000000000000..84fa8908f77d --- /dev/null +++ b/examples/v2/cloud-cost-management/ReorderRulesets.rb @@ -0,0 +1,13 @@ +# Reorder rulesets returns "Successfully reordered rulesets" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new + +body = DatadogAPIClient::V2::ReorderRulesetResourceArray.new({ + data: [ + DatadogAPIClient::V2::ReorderRulesetResourceData.new({ + type: DatadogAPIClient::V2::ReorderRulesetResourceDataType::RULESET, + }), + ], +}) +api_instance.reorder_rulesets(body) diff --git a/examples/v2/cloud-cost-management/UpdateArbitraryCostRule.rb b/examples/v2/cloud-cost-management/UpdateArbitraryCostRule.rb new file mode 100644 index 000000000000..83cb109d4beb --- /dev/null +++ b/examples/v2/cloud-cost-management/UpdateArbitraryCostRule.rb @@ -0,0 +1,63 @@ +# Update arbitrary cost rule returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new + +body = DatadogAPIClient::V2::ArbitraryCostUpsertRequest.new({ + data: DatadogAPIClient::V2::ArbitraryCostUpsertRequestData.new({ + attributes: DatadogAPIClient::V2::ArbitraryCostUpsertRequestDataAttributes.new({ + costs_to_allocate: [ + DatadogAPIClient::V2::ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems.new({ + condition: "is", + tag: "account_id", + value: "123456789", + values: [], + }), + DatadogAPIClient::V2::ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems.new({ + condition: "in", + tag: "environment", + value: "", + values: [ + "production", + "staging", + ], + }), + ], + enabled: true, + order_id: 1, + provider: [ + "aws", + "gcp", + ], + rule_name: "example-arbitrary-cost-rule", + strategy: DatadogAPIClient::V2::ArbitraryCostUpsertRequestDataAttributesStrategy.new({ + allocated_by_tag_keys: [ + "team", + "environment", + ], + based_on_costs: [ + DatadogAPIClient::V2::ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems.new({ + condition: "is", + tag: "service", + value: "web-api", + values: [], + }), + DatadogAPIClient::V2::ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems.new({ + condition: "not in", + tag: "team", + value: "", + values: [ + "legacy", + "deprecated", + ], + }), + ], + granularity: "daily", + method: "proportional", + }), + type: "shared", + }), + type: DatadogAPIClient::V2::ArbitraryCostUpsertRequestDataType::UPSERT_ARBITRARY_RULE, + }), +}) +p api_instance.update_arbitrary_cost_rule(123456, body) diff --git a/examples/v2/cloud-cost-management/UpdateCostGCPUsageCostConfig.rb b/examples/v2/cloud-cost-management/UpdateCostGCPUsageCostConfig.rb index f8b8e3e8a9fb..fec71916458f 100644 --- a/examples/v2/cloud-cost-management/UpdateCostGCPUsageCostConfig.rb +++ b/examples/v2/cloud-cost-management/UpdateCostGCPUsageCostConfig.rb @@ -1,4 +1,4 @@ -# Update Cloud Cost Management GCP Usage Cost config returns "OK" response +# Update Google Cloud Usage Cost config returns "OK" response require "datadog_api_client" api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new diff --git a/examples/v2/cloud-cost-management/UpdateRuleset.rb b/examples/v2/cloud-cost-management/UpdateRuleset.rb new file mode 100644 index 000000000000..16e0f7a7d506 --- /dev/null +++ b/examples/v2/cloud-cost-management/UpdateRuleset.rb @@ -0,0 +1,31 @@ +# Update ruleset returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new + +body = DatadogAPIClient::V2::UpdateRulesetRequest.new({ + data: DatadogAPIClient::V2::UpdateRulesetRequestData.new({ + attributes: DatadogAPIClient::V2::UpdateRulesetRequestDataAttributes.new({ + enabled: true, + last_version: 3601919, + rules: [ + DatadogAPIClient::V2::UpdateRulesetRequestDataAttributesRulesItems.new({ + enabled: true, + mapping: DatadogAPIClient::V2::UpdateRulesetRequestDataAttributesRulesItemsMapping.new({ + destination_key: "team_owner", + if_not_exists: true, + source_keys: [ + "account_name", + "account_id", + ], + }), + name: "Account Name Mapping", + query: nil, + reference_table: nil, + }), + ], + }), + type: DatadogAPIClient::V2::UpdateRulesetRequestDataType::UPDATE_RULESET, + }), +}) +p api_instance.update_ruleset("1c5dae14-237d-4b9a-a515-aa55b3939142", body) diff --git a/examples/v2/cloud-cost-management/ValidateQuery.rb b/examples/v2/cloud-cost-management/ValidateQuery.rb new file mode 100644 index 000000000000..099dcb8dad4b --- /dev/null +++ b/examples/v2/cloud-cost-management/ValidateQuery.rb @@ -0,0 +1,14 @@ +# Validate query returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new + +body = DatadogAPIClient::V2::RulesValidateQueryRequest.new({ + data: DatadogAPIClient::V2::RulesValidateQueryRequestData.new({ + attributes: DatadogAPIClient::V2::RulesValidateQueryRequestDataAttributes.new({ + query: "example:query AND test:true", + }), + type: DatadogAPIClient::V2::RulesValidateQueryRequestDataType::VALIDATE_QUERY, + }), +}) +p api_instance.validate_query(body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index e91830c2e666..fa53ec24c1e2 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -1528,12 +1528,31 @@ "page_size" => "Integer", "page_cursor" => "String", }, + "v2.CreateArbitraryCostRule" => { + "body" => "ArbitraryCostUpsertRequest", + }, + "v2.ReorderArbitraryCostRules" => { + "body" => "ReorderRuleResourceArray", + }, + "v2.DeleteArbitraryCostRule" => { + "rule_id" => "Integer", + }, + "v2.GetArbitraryCostRule" => { + "rule_id" => "Integer", + }, + "v2.UpdateArbitraryCostRule" => { + "rule_id" => "Integer", + "body" => "ArbitraryCostUpsertRequest", + }, "v2.CreateCostAWSCURConfig" => { "body" => "AwsCURConfigPostRequest", }, "v2.DeleteCostAWSCURConfig" => { "cloud_account_id" => "Integer", }, + "v2.GetCostAWSCURConfig" => { + "cloud_account_id" => "Integer", + }, "v2.UpdateCostAWSCURConfig" => { "cloud_account_id" => "Integer", "body" => "AwsCURConfigPatchRequest", @@ -1544,6 +1563,9 @@ "v2.DeleteCostAzureUCConfig" => { "cloud_account_id" => "Integer", }, + "v2.GetCostAzureUCConfig" => { + "cloud_account_id" => "Integer", + }, "v2.UpdateCostAzureUCConfigs" => { "cloud_account_id" => "Integer", "body" => "AzureUCConfigPatchRequest", @@ -1578,10 +1600,32 @@ "v2.DeleteCostGCPUsageCostConfig" => { "cloud_account_id" => "Integer", }, + "v2.GetCostGCPUsageCostConfig" => { + "cloud_account_id" => "Integer", + }, "v2.UpdateCostGCPUsageCostConfig" => { "cloud_account_id" => "Integer", "body" => "GCPUsageCostConfigPatchRequest", }, + "v2.CreateRuleset" => { + "body" => "CreateRulesetRequest", + }, + "v2.ReorderRulesets" => { + "body" => "ReorderRulesetResourceArray", + }, + "v2.ValidateQuery" => { + "body" => "RulesValidateQueryRequest", + }, + "v2.DeleteRuleset" => { + "ruleset_id" => "String", + }, + "v2.GetRuleset" => { + "ruleset_id" => "String", + }, + "v2.UpdateRuleset" => { + "ruleset_id" => "String", + "body" => "UpdateRulesetRequest", + }, "v2.GetMonthlyCostAttribution" => { "start_month" => "Time", "end_month" => "Time", diff --git a/features/v2/cloud_cost_management.feature b/features/v2/cloud_cost_management.feature index eed19e63a9be..78309ae90bc4 100644 --- a/features/v2/cloud_cost_management.feature +++ b/features/v2/cloud_cost_management.feature @@ -1,8 +1,8 @@ @endpoint(cloud-cost-management) @endpoint(cloud-cost-management-v2) Feature: Cloud Cost Management The Cloud Cost Management API allows you to set up, edit, and delete Cloud - Cost Management accounts for AWS, Azure, and GCP. You can query your cost - data by using the [Metrics + Cost Management accounts for AWS, Azure, and Google Cloud. You can query + your cost data by using the [Metrics endpoint](https://docs.datadoghq.com/api/latest/metrics/#query-timeseries- data-across-multiple-products) and the `cloud_cost` data source. For more information, see the [Cloud Cost Management @@ -38,26 +38,35 @@ Feature: Cloud Cost Management @replay-only @team:Datadog/cloud-cost-management Scenario: Create Cloud Cost Management Azure configs returns "OK" response Given new "CreateCostAzureUCConfigs" request - And body with value {"data": {"attributes": {"account_id": "1234abcd-1234-abcd-1234-1234abcd1234", "actual_bill_config": {"export_name": "dd-actual-export", "export_path": "dd-export-path", "storage_account": "dd-storage-account", "storage_container": "dd-storage-container"}, "amortized_bill_config": {"export_name": "dd-actual-export", "export_path": "dd-export-path", "storage_account": "dd-storage-account", "storage_container": "dd-storage-container"}, "client_id": "1234abcd-1234-abcd-1234-1234abcd1234", "is_enabled": true, "scope": "subscriptions/1234abcd-1234-abcd-1234-1234abcd1234"}, "type": "azure_uc_config_post_request"}} + And body with value {"data": {"attributes": {"account_id": "1234abcd-1234-abcd-1234-1234abcd1234", "actual_bill_config": {"export_name": "dd-actual-export", "export_path": "dd-export-path", "storage_account": "dd-storage-account", "storage_container": "dd-storage-container"}, "amortized_bill_config": {"export_name": "dd-actual-export", "export_path": "dd-export-path", "storage_account": "dd-storage-account", "storage_container": "dd-storage-container"}, "client_id": "1234abcd-1234-abcd-1234-1234abcd1234", "scope": "subscriptions/1234abcd-1234-abcd-1234-1234abcd1234"}, "type": "azure_uc_config_post_request"}} When the request is sent Then the response status is 200 OK And the response "data.attributes.configs[0].account_id" is equal to "1234abcd-1234-abcd-1234-1234abcd1234" @team:Datadog/cloud-cost-management - Scenario: Create Cloud Cost Management GCP Usage Cost config returns "Bad Request" response + Scenario: Create Google Cloud Usage Cost config returns "Bad Request" response Given new "CreateCostGCPUsageCostConfig" request And body with value {"data": {"attributes": {"billing_account_id": "123456_A123BC_12AB34", "bucket_name": "dd-cost-bucket", "export_dataset_name": "billing", "export_prefix": "datadog_cloud_cost_usage_export", "export_project_name": "dd-cloud-cost-report", "service_account": "InvalidServiceAccount"}, "type": "gcp_uc_config_post_request"}} When the request is sent Then the response status is 400 Bad Request @replay-only @team:Datadog/cloud-cost-management - Scenario: Create Cloud Cost Management GCP Usage Cost config returns "OK" response + Scenario: Create Google Cloud Usage Cost config returns "OK" response Given new "CreateCostGCPUsageCostConfig" request And body with value {"data": {"attributes": {"billing_account_id": "123456_A123BC_12AB34", "bucket_name": "dd-cost-bucket", "export_dataset_name": "billing", "export_prefix": "datadog_cloud_cost_usage_export", "export_project_name": "dd-cloud-cost-report", "service_account": "dd-ccm-gcp-integration@my-environment.iam.gserviceaccount.com"}, "type": "gcp_uc_config_post_request"}} When the request is sent Then the response status is 200 OK And the response "data.attributes.account_id" is equal to "123456_A123BC_12AB34" + @replay-only @team:Datadog/cloud-cost-management + Scenario: Create arbitrary cost rule returns "OK" response + Given new "CreateArbitraryCostRule" request + And body with value {"data": {"attributes": {"costs_to_allocate": [{"condition": "is", "tag": "account_id", "value": "123456789", "values":[]}, {"condition": "in", "tag": "environment", "value": "", "values": ["production", "staging"]}], "enabled": true, "order_id": 1, "provider": ["aws", "gcp"], "rule_name": "example-arbitrary-cost-rule", "strategy": {"allocated_by_tag_keys": ["team", "environment"], "based_on_costs": [{"condition": "is", "tag": "service", "value": "web-api", "values":[]}, {"condition": "not in", "tag": "team", "value": "", "values": ["legacy", "deprecated"]}], "granularity": "daily", "method": "proportional"}, "type": "shared"}, "type": "upsert_arbitrary_rule"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "arbitrary_rule" + And the response "data.attributes.rule_name" is equal to "example-arbitrary-cost-rule" + @generated @skip @team:Datadog/cloud-cost-management Scenario: Create or update a budget returns "Bad Request" response Given new "UpsertBudget" request @@ -79,6 +88,15 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 200 OK + @replay-only @team:Datadog/cloud-cost-management + Scenario: Create ruleset returns "OK" response + Given new "CreateRuleset" request + And body with value {"data": {"attributes": {"enabled": true, "rules": [{"enabled": true, "mapping": null, "name": "Add Cost Center Tag", "query": {"addition": {"key": "cost_center", "value": "engineering"}, "case_insensitivity": false, "if_not_exists": true, "query": "account_id:\"123456789\" AND service:\"web-api\""}, "reference_table": null}]}, "id": "New Ruleset", "type": "create_ruleset"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "ruleset" + And the response "data.attributes.name" is equal to "New Ruleset" + @generated @skip @team:Datadog/cloud-cost-management Scenario: Delete Cloud Cost Management AWS CUR config returns "Bad Request" response Given new "DeleteCostAWSCURConfig" request @@ -121,27 +139,6 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 404 Not Found - @generated @skip @team:Datadog/cloud-cost-management - Scenario: Delete Cloud Cost Management GCP Usage Cost config returns "Bad Request" response - Given new "DeleteCostGCPUsageCostConfig" request - And request contains "cloud_account_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @replay-only @team:Datadog/cloud-cost-management - Scenario: Delete Cloud Cost Management GCP Usage Cost config returns "No Content" response - Given new "DeleteCostGCPUsageCostConfig" request - And request contains "cloud_account_id" parameter with value 100 - When the request is sent - Then the response status is 204 No Content - - @team:Datadog/cloud-cost-management - Scenario: Delete Cloud Cost Management GCP Usage Cost config returns "Not Found" response - Given new "DeleteCostGCPUsageCostConfig" request - And request contains "cloud_account_id" parameter with value 123456 - When the request is sent - Then the response status is 404 Not Found - @replay-only @team:Datadog/cloud-cost-management Scenario: Delete Custom Costs File returns "No Content" response Given new "DeleteCustomCostsFile" request @@ -163,6 +160,27 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 404 Not Found + @generated @skip @team:Datadog/cloud-cost-management + Scenario: Delete Google Cloud Usage Cost config returns "Bad Request" response + Given new "DeleteCostGCPUsageCostConfig" request + And request contains "cloud_account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @replay-only @team:Datadog/cloud-cost-management + Scenario: Delete Google Cloud Usage Cost config returns "No Content" response + Given new "DeleteCostGCPUsageCostConfig" request + And request contains "cloud_account_id" parameter with value 100 + When the request is sent + Then the response status is 204 No Content + + @team:Datadog/cloud-cost-management + Scenario: Delete Google Cloud Usage Cost config returns "Not Found" response + Given new "DeleteCostGCPUsageCostConfig" request + And request contains "cloud_account_id" parameter with value 123456 + When the request is sent + Then the response status is 404 Not Found + @team:Datadog/cloud-cost-management Scenario: Delete a budget returns "Bad Request" response Given new "DeleteBudget" request @@ -177,6 +195,20 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 204 No Content + @replay-only @team:Datadog/cloud-cost-management + Scenario: Delete arbitrary cost rule returns "No Content" response + Given new "DeleteArbitraryCostRule" request + And request contains "rule_id" parameter with value 123456 + When the request is sent + Then the response status is 204 No Content + + @replay-only @team:Datadog/cloud-cost-management + Scenario: Delete ruleset returns "No Content" response + Given new "DeleteRuleset" request + And request contains "ruleset_id" parameter with value "1c5dae14-237d-4b9a-a515-aa55b3939142" + When the request is sent + Then the response status is 204 No Content + @replay-only @team:Datadog/cloud-cost-management Scenario: Get Custom Costs File returns "OK" response Given new "GetCustomCostsFile" request @@ -200,6 +232,15 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 200 OK + @replay-only @team:Datadog/cloud-cost-management + Scenario: Get Google Cloud Usage Cost config returns "OK" response + Given new "GetCostGCPUsageCostConfig" request + And request contains "cloud_account_id" parameter with value 123456 + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "gcp_uc_config" + And the response "data.attributes.account_id" is equal to "123456_ABCDEF_123ABC" + @generated @skip @team:Datadog/cloud-cost-management Scenario: Get a budget returns "Bad Request" response Given new "GetBudget" request @@ -221,6 +262,41 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 200 OK + @replay-only @team:Datadog/cloud-cost-management + Scenario: Get arbitrary cost rule returns "OK" response + Given new "GetArbitraryCostRule" request + And request contains "rule_id" parameter with value 123456 + When the request is sent + Then the response status is 200 OK + + @replay-only @team:Datadog/cloud-cost-management + Scenario: Get cost AWS CUR config returns "OK" response + Given new "GetCostAWSCURConfig" request + And request contains "cloud_account_id" parameter with value 123456 + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "aws_cur_config" + And the response "data.attributes.account_id" is equal to "123456123456" + + @replay-only @team:Datadog/cloud-cost-management + Scenario: Get cost Azure UC config returns "OK" response + Given new "GetCostAzureUCConfig" request + And request contains "cloud_account_id" parameter with value 123456 + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "azure_uc_configs" + 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" + + @replay-only @team:Datadog/cloud-cost-management + Scenario: Get ruleset returns "OK" response + Given new "GetRuleset" request + And request contains "ruleset_id" parameter with value "da0e30e2-615d-4dae-9a22-38cf86a87dde" + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "ruleset" + And the response "data.attributes.name" is equal to "New Ruleset" + @replay-only @team:Datadog/cloud-cost-management Scenario: List Cloud Cost Management AWS CUR configs returns "OK" response Given new "ListCostAWSCURConfigs" request @@ -235,12 +311,6 @@ Feature: Cloud Cost Management Then the response status is 200 OK And the response "data[0].attributes.configs[0].export_name" is equal to "test_export_name" - @team:Datadog/cloud-cost-management - Scenario: List Cloud Cost Management GCP Usage Cost configs returns "OK" response - Given new "ListCostGCPUsageCostConfigs" request - When the request is sent - Then the response status is 200 OK - @replay-only @team:Datadog/cloud-cost-management Scenario: List Custom Costs Files returns "OK" response Given new "ListCustomCostsFiles" request @@ -261,16 +331,50 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 200 OK + @team:Datadog/cloud-cost-management + Scenario: List Google Cloud Usage Cost configs returns "OK" response + Given new "ListCostGCPUsageCostConfigs" request + When the request is sent + Then the response status is 200 OK + + @replay-only @team:Datadog/cloud-cost-management + Scenario: List arbitrary cost rules returns "OK" response + Given new "ListArbitraryCostRules" request + When the request is sent + Then the response status is 200 OK + And the response "data[0].attributes.rule_name" is equal to "example-arbitrary-cost-rule" + @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 + @replay-only @team:Datadog/cloud-cost-management + Scenario: List rulesets returns "OK" response + Given new "ListRulesets" request + When the request is sent + Then the response status is 200 OK + And the response "data[0].attributes.name" is equal to "New Ruleset" + + @generated @skip @team:Datadog/cloud-cost-management + Scenario: Reorder arbitrary cost rules returns "Successfully reordered rules" response + Given new "ReorderArbitraryCostRules" request + And body with value {"data": [{"id": "456", "type": "arbitrary_rule"}, {"id": "123", "type": "arbitrary_rule"}, {"id": "789", "type": "arbitrary_rule"}]} + When the request is sent + Then the response status is 204 Successfully reordered rules + + @generated @skip @team:Datadog/cloud-cost-management + Scenario: Reorder rulesets returns "Successfully reordered rulesets" response + Given new "ReorderRulesets" request + And body with value {"data": [{"type": "ruleset"}]} + When the request is sent + Then the response status is 204 Successfully reordered rulesets + @team:Datadog/cloud-cost-management Scenario: Update Cloud Cost Management AWS CUR config returns "Not Found" response Given new "UpdateCostAWSCURConfig" request - And request contains "cloud_account_id" parameter with value 12345678 + And request contains "cloud_account_id" parameter with value 123456 And body with value {"data": {"attributes": {"is_enabled": true}, "type": "aws_cur_config_patch_request"}} When the request is sent Then the response status is 404 Not Found @@ -295,7 +399,7 @@ Feature: Cloud Cost Management @team:Datadog/cloud-cost-management Scenario: Update Cloud Cost Management Azure config returns "Not Found" response Given new "UpdateCostAzureUCConfigs" request - And request contains "cloud_account_id" parameter with value 12345678 + And request contains "cloud_account_id" parameter with value 123456 And body with value {"data": {"attributes": {"is_enabled": true}, "type": "azure_uc_config_patch_request"}} When the request is sent Then the response status is 404 Not Found @@ -310,7 +414,7 @@ Feature: Cloud Cost Management And the response "data.type" is equal to "azure_uc_configs" @generated @skip @team:Datadog/cloud-cost-management - Scenario: Update Cloud Cost Management GCP Usage Cost config returns "Bad Request" response + Scenario: Update Google Cloud Usage Cost config returns "Bad Request" response Given new "UpdateCostGCPUsageCostConfig" request And request contains "cloud_account_id" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"is_enabled": true}, "type": "gcp_uc_config_patch_request"}} @@ -318,15 +422,15 @@ Feature: Cloud Cost Management Then the response status is 400 Bad Request @team:Datadog/cloud-cost-management - Scenario: Update Cloud Cost Management GCP Usage Cost config returns "Not Found" response + Scenario: Update Google Cloud Usage Cost config returns "Not Found" response Given new "UpdateCostGCPUsageCostConfig" request - And request contains "cloud_account_id" parameter with value 12345678 + And request contains "cloud_account_id" parameter with value 123456 And body with value {"data": {"attributes": {"is_enabled": true}, "type": "gcp_uc_config_patch_request"}} When the request is sent Then the response status is 404 Not Found @replay-only @team:Datadog/cloud-cost-management - Scenario: Update Cloud Cost Management GCP Usage Cost config returns "OK" response + Scenario: Update Google Cloud Usage Cost config returns "OK" response Given new "UpdateCostGCPUsageCostConfig" request And request contains "cloud_account_id" parameter with value 100 And body with value {"data": {"attributes": {"is_enabled": true}, "type": "gcp_uc_config_patch_request"}} @@ -334,6 +438,22 @@ Feature: Cloud Cost Management Then the response status is 200 OK And the response "data.attributes.account_id" is equal to "123456_A123BC_12AB34" + @replay-only @team:Datadog/cloud-cost-management + Scenario: Update arbitrary cost rule returns "OK" response + Given new "UpdateArbitraryCostRule" request + And request contains "rule_id" parameter with value 123456 + And body with value {"data": {"attributes": {"costs_to_allocate": [{"condition": "is", "tag": "account_id", "value": "123456789", "values":[]}, {"condition": "in", "tag": "environment", "value": "", "values": ["production", "staging"]}], "enabled": true, "order_id": 1, "provider": ["aws", "gcp"], "rule_name": "example-arbitrary-cost-rule", "strategy": {"allocated_by_tag_keys": ["team", "environment"], "based_on_costs": [{"condition": "is", "tag": "service", "value": "web-api", "values":[]}, {"condition": "not in", "tag": "team", "value": "", "values": ["legacy", "deprecated"]}], "granularity": "daily", "method": "proportional"}, "type": "shared"}, "type": "upsert_arbitrary_rule"}} + When the request is sent + Then the response status is 200 OK + + @replay-only @team:Datadog/cloud-cost-management + Scenario: Update ruleset returns "OK" response + Given new "UpdateRuleset" request + And request contains "ruleset_id" parameter with value "1c5dae14-237d-4b9a-a515-aa55b3939142" + And body with value {"data": {"attributes": {"enabled": true, "last_version": 3601919, "rules": [{"enabled": true, "mapping": {"destination_key": "team_owner", "if_not_exists": true, "source_keys": ["account_name", "account_id"]}, "name": "Account Name Mapping", "query": null, "reference_table": null}]}, "type": "update_ruleset"}} + When the request is sent + Then the response status is 200 OK + @replay-only @team:Datadog/cloud-cost-management Scenario: Upload Custom Costs File returns "Accepted" response Given new "UploadCustomCostsFile" request @@ -355,3 +475,10 @@ Feature: Cloud Cost Management And body with value [{"BilledCost": 100.5, "BillingCurrency": "USD", "ChargeDescription": "Monthly usage charge for my service", "ChargePeriodEnd": "2023-02-28", "ChargePeriodStart": "2023-02-01"}] When the request is sent Then the response status is 400 Bad Request + + @replay-only @team:Datadog/cloud-cost-management + Scenario: Validate query returns "OK" response + Given new "ValidateQuery" request + And body with value {"data": {"attributes": {"Query": "example:query AND test:true"}, "type": "validate_query"}} + When the request is sent + Then the response status is 200 OK diff --git a/features/v2/undo.json b/features/v2/undo.json index b2fe236d0042..7f8336d494c4 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -700,6 +700,42 @@ "type": "safe" } }, + "ListArbitraryCostRules": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, + "CreateArbitraryCostRule": { + "tag": "Cloud Cost Management", + "undo": { + "type": "idempotent" + } + }, + "ReorderArbitraryCostRules": { + "tag": "Cloud Cost Management", + "undo": { + "type": "idempotent" + } + }, + "DeleteArbitraryCostRule": { + "tag": "Cloud Cost Management", + "undo": { + "type": "idempotent" + } + }, + "GetArbitraryCostRule": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, + "UpdateArbitraryCostRule": { + "tag": "Cloud Cost Management", + "undo": { + "type": "idempotent" + } + }, "ListCostAWSCURConfigs": { "tag": "Cloud Cost Management", "undo": { @@ -718,6 +754,12 @@ "type": "idempotent" } }, + "GetCostAWSCURConfig": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, "UpdateCostAWSCURConfig": { "tag": "Cloud Cost Management", "undo": { @@ -742,6 +784,12 @@ "type": "idempotent" } }, + "GetCostAzureUCConfig": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, "UpdateCostAzureUCConfigs": { "tag": "Cloud Cost Management", "undo": { @@ -821,6 +869,12 @@ "type": "idempotent" } }, + "GetCostGCPUsageCostConfig": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, "UpdateCostGCPUsageCostConfig": { "tag": "Cloud Cost Management", "undo": { @@ -3671,6 +3725,48 @@ "type": "safe" } }, + "ListRulesets": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, + "CreateRuleset": { + "tag": "Cloud Cost Management", + "undo": { + "type": "idempotent" + } + }, + "ReorderRulesets": { + "tag": "Cloud Cost Management", + "undo": { + "type": "idempotent" + } + }, + "ValidateQuery": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, + "DeleteRuleset": { + "tag": "Cloud Cost Management", + "undo": { + "type": "idempotent" + } + }, + "GetRuleset": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, + "UpdateRuleset": { + "tag": "Cloud Cost Management", + "undo": { + "type": "idempotent" + } + }, "ListTeams": { "tag": "Teams", "undo": { diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index f0a2f2a1c1f6..0dce647766ff 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1078,6 +1078,29 @@ def overrides "v2.app_relationship" => "AppRelationship", "v2.apps_sort_field" => "AppsSortField", "v2.app_trigger_wrapper" => "AppTriggerWrapper", + "v2.arbitrary_cost_upsert_request" => "ArbitraryCostUpsertRequest", + "v2.arbitrary_cost_upsert_request_data" => "ArbitraryCostUpsertRequestData", + "v2.arbitrary_cost_upsert_request_data_attributes" => "ArbitraryCostUpsertRequestDataAttributes", + "v2.arbitrary_cost_upsert_request_data_attributes_costs_to_allocate_items" => "ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems", + "v2.arbitrary_cost_upsert_request_data_attributes_strategy" => "ArbitraryCostUpsertRequestDataAttributesStrategy", + "v2.arbitrary_cost_upsert_request_data_attributes_strategy_allocated_by_filters_items" => "ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems", + "v2.arbitrary_cost_upsert_request_data_attributes_strategy_allocated_by_items" => "ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems", + "v2.arbitrary_cost_upsert_request_data_attributes_strategy_allocated_by_items_allocated_tags_items" => "ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems", + "v2.arbitrary_cost_upsert_request_data_attributes_strategy_based_on_costs_items" => "ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems", + "v2.arbitrary_cost_upsert_request_data_attributes_strategy_evaluate_grouped_by_filters_items" => "ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems", + "v2.arbitrary_cost_upsert_request_data_type" => "ArbitraryCostUpsertRequestDataType", + "v2.arbitrary_rule_response" => "ArbitraryRuleResponse", + "v2.arbitrary_rule_response_array" => "ArbitraryRuleResponseArray", + "v2.arbitrary_rule_response_data" => "ArbitraryRuleResponseData", + "v2.arbitrary_rule_response_data_attributes" => "ArbitraryRuleResponseDataAttributes", + "v2.arbitrary_rule_response_data_attributes_costs_to_allocate_items" => "ArbitraryRuleResponseDataAttributesCostsToAllocateItems", + "v2.arbitrary_rule_response_data_attributes_strategy" => "ArbitraryRuleResponseDataAttributesStrategy", + "v2.arbitrary_rule_response_data_attributes_strategy_allocated_by_filters_items" => "ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems", + "v2.arbitrary_rule_response_data_attributes_strategy_allocated_by_items" => "ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems", + "v2.arbitrary_rule_response_data_attributes_strategy_allocated_by_items_allocated_tags_items" => "ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems", + "v2.arbitrary_rule_response_data_attributes_strategy_based_on_costs_items" => "ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems", + "v2.arbitrary_rule_response_data_attributes_strategy_evaluate_grouped_by_filters_items" => "ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems", + "v2.arbitrary_rule_response_data_type" => "ArbitraryRuleResponseDataType", "v2.asana_access_token" => "AsanaAccessToken", "v2.asana_access_token_type" => "AsanaAccessTokenType", "v2.asana_access_token_update" => "AsanaAccessTokenUpdate", @@ -1158,7 +1181,11 @@ def overrides "v2.aws_cur_config_post_request" => "AwsCURConfigPostRequest", "v2.aws_cur_config_post_request_attributes" => "AwsCURConfigPostRequestAttributes", "v2.aws_cur_config_post_request_type" => "AwsCURConfigPostRequestType", - "v2.aws_cur_config_response" => "AwsCURConfigResponse", + "v2.aws_cur_config_response" => "AwsCurConfigResponse", + "v2.aws_cur_config_response_data" => "AwsCurConfigResponseData", + "v2.aws_cur_config_response_data_attributes" => "AwsCurConfigResponseDataAttributes", + "v2.aws_cur_config_response_data_attributes_account_filters" => "AwsCurConfigResponseDataAttributesAccountFilters", + "v2.aws_cur_config_response_data_type" => "AwsCurConfigResponseDataType", "v2.aws_cur_configs_response" => "AwsCURConfigsResponse", "v2.aws_cur_config_type" => "AwsCURConfigType", "v2.aws_integration" => "AWSIntegration", @@ -1586,6 +1613,16 @@ def overrides "v2.create_rule_request_data" => "CreateRuleRequestData", "v2.create_rule_response" => "CreateRuleResponse", "v2.create_rule_response_data" => "CreateRuleResponseData", + "v2.create_ruleset_request" => "CreateRulesetRequest", + "v2.create_ruleset_request_data" => "CreateRulesetRequestData", + "v2.create_ruleset_request_data_attributes" => "CreateRulesetRequestDataAttributes", + "v2.create_ruleset_request_data_attributes_rules_items" => "CreateRulesetRequestDataAttributesRulesItems", + "v2.create_ruleset_request_data_attributes_rules_items_mapping" => "CreateRulesetRequestDataAttributesRulesItemsMapping", + "v2.create_ruleset_request_data_attributes_rules_items_query" => "CreateRulesetRequestDataAttributesRulesItemsQuery", + "v2.create_ruleset_request_data_attributes_rules_items_query_addition" => "CreateRulesetRequestDataAttributesRulesItemsQueryAddition", + "v2.create_ruleset_request_data_attributes_rules_items_reference_table" => "CreateRulesetRequestDataAttributesRulesItemsReferenceTable", + "v2.create_ruleset_request_data_attributes_rules_items_reference_table_field_pairs_items" => "CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems", + "v2.create_ruleset_request_data_type" => "CreateRulesetRequestDataType", "v2.create_workflow_request" => "CreateWorkflowRequest", "v2.create_workflow_response" => "CreateWorkflowResponse", "v2.creator" => "Creator", @@ -2037,6 +2074,10 @@ def overrides "v2.gcpsts_service_accounts_response" => "GCPSTSServiceAccountsResponse", "v2.gcpsts_service_account_update_request" => "GCPSTSServiceAccountUpdateRequest", "v2.gcpsts_service_account_update_request_data" => "GCPSTSServiceAccountUpdateRequestData", + "v2.gcp_uc_config_response" => "GcpUcConfigResponse", + "v2.gcp_uc_config_response_data" => "GcpUcConfigResponseData", + "v2.gcp_uc_config_response_data_attributes" => "GcpUcConfigResponseDataAttributes", + "v2.gcp_uc_config_response_data_type" => "GcpUcConfigResponseDataType", "v2.gcp_usage_cost_config" => "GCPUsageCostConfig", "v2.gcp_usage_cost_config_attributes" => "GCPUsageCostConfigAttributes", "v2.gcp_usage_cost_config_patch_data" => "GCPUsageCostConfigPatchData", @@ -3180,6 +3221,12 @@ def overrides "v2.relation_type" => "RelationType", "v2.remediation" => "Remediation", "v2.reorder_retention_filters_request" => "ReorderRetentionFiltersRequest", + "v2.reorder_rule_resource_array" => "ReorderRuleResourceArray", + "v2.reorder_rule_resource_data" => "ReorderRuleResourceData", + "v2.reorder_rule_resource_data_type" => "ReorderRuleResourceDataType", + "v2.reorder_ruleset_resource_array" => "ReorderRulesetResourceArray", + "v2.reorder_ruleset_resource_data" => "ReorderRulesetResourceData", + "v2.reorder_ruleset_resource_data_type" => "ReorderRulesetResourceDataType", "v2.resource_filter_attributes" => "ResourceFilterAttributes", "v2.resource_filter_request_type" => "ResourceFilterRequestType", "v2.response_meta_attributes" => "ResponseMetaAttributes", @@ -3239,7 +3286,28 @@ def overrides "v2.routing_rule_type" => "RoutingRuleType", "v2.rule_attributes" => "RuleAttributes", "v2.rule_outcome_relationships" => "RuleOutcomeRelationships", + "v2.ruleset_resp" => "RulesetResp", + "v2.ruleset_resp_array" => "RulesetRespArray", + "v2.ruleset_resp_data" => "RulesetRespData", + "v2.ruleset_resp_data_attributes" => "RulesetRespDataAttributes", + "v2.ruleset_resp_data_attributes_created" => "RulesetRespDataAttributesCreated", + "v2.ruleset_resp_data_attributes_modified" => "RulesetRespDataAttributesModified", + "v2.ruleset_resp_data_attributes_rules_items" => "RulesetRespDataAttributesRulesItems", + "v2.ruleset_resp_data_attributes_rules_items_mapping" => "RulesetRespDataAttributesRulesItemsMapping", + "v2.ruleset_resp_data_attributes_rules_items_query" => "RulesetRespDataAttributesRulesItemsQuery", + "v2.ruleset_resp_data_attributes_rules_items_query_addition" => "RulesetRespDataAttributesRulesItemsQueryAddition", + "v2.ruleset_resp_data_attributes_rules_items_reference_table" => "RulesetRespDataAttributesRulesItemsReferenceTable", + "v2.ruleset_resp_data_attributes_rules_items_reference_table_field_pairs_items" => "RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems", + "v2.ruleset_resp_data_type" => "RulesetRespDataType", "v2.rule_severity" => "RuleSeverity", + "v2.rules_validate_query_request" => "RulesValidateQueryRequest", + "v2.rules_validate_query_request_data" => "RulesValidateQueryRequestData", + "v2.rules_validate_query_request_data_attributes" => "RulesValidateQueryRequestDataAttributes", + "v2.rules_validate_query_request_data_type" => "RulesValidateQueryRequestDataType", + "v2.rules_validate_query_response" => "RulesValidateQueryResponse", + "v2.rules_validate_query_response_data" => "RulesValidateQueryResponseData", + "v2.rules_validate_query_response_data_attributes" => "RulesValidateQueryResponseDataAttributes", + "v2.rules_validate_query_response_data_type" => "RulesValidateQueryResponseDataType", "v2.rule_type" => "RuleType", "v2.rule_types_items" => "RuleTypesItems", "v2.rule_user" => "RuleUser", @@ -3861,6 +3929,11 @@ def overrides "v2.trigger" => "Trigger", "v2.trigger_rate_limit" => "TriggerRateLimit", "v2.trigger_source" => "TriggerSource", + "v2.uc_config_pair" => "UCConfigPair", + "v2.uc_config_pair_data" => "UCConfigPairData", + "v2.uc_config_pair_data_attributes" => "UCConfigPairDataAttributes", + "v2.uc_config_pair_data_attributes_configs_items" => "UCConfigPairDataAttributesConfigsItems", + "v2.uc_config_pair_data_type" => "UCConfigPairDataType", "v2.unit" => "Unit", "v2.unpublish_app_response" => "UnpublishAppResponse", "v2.update_action_connection_request" => "UpdateActionConnectionRequest", @@ -3897,6 +3970,16 @@ def overrides "v2.update_rule_request_data" => "UpdateRuleRequestData", "v2.update_rule_response" => "UpdateRuleResponse", "v2.update_rule_response_data" => "UpdateRuleResponseData", + "v2.update_ruleset_request" => "UpdateRulesetRequest", + "v2.update_ruleset_request_data" => "UpdateRulesetRequestData", + "v2.update_ruleset_request_data_attributes" => "UpdateRulesetRequestDataAttributes", + "v2.update_ruleset_request_data_attributes_rules_items" => "UpdateRulesetRequestDataAttributesRulesItems", + "v2.update_ruleset_request_data_attributes_rules_items_mapping" => "UpdateRulesetRequestDataAttributesRulesItemsMapping", + "v2.update_ruleset_request_data_attributes_rules_items_query" => "UpdateRulesetRequestDataAttributesRulesItemsQuery", + "v2.update_ruleset_request_data_attributes_rules_items_query_addition" => "UpdateRulesetRequestDataAttributesRulesItemsQueryAddition", + "v2.update_ruleset_request_data_attributes_rules_items_reference_table" => "UpdateRulesetRequestDataAttributesRulesItemsReferenceTable", + "v2.update_ruleset_request_data_attributes_rules_items_reference_table_field_pairs_items" => "UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems", + "v2.update_ruleset_request_data_type" => "UpdateRulesetRequestDataType", "v2.update_workflow_request" => "UpdateWorkflowRequest", "v2.update_workflow_response" => "UpdateWorkflowResponse", "v2.upsert_catalog_entity_request" => "UpsertCatalogEntityRequest", 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 361e89804d38..2e920a042b76 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 @@ -23,6 +23,85 @@ def initialize(api_client = DatadogAPIClient::APIClient.default) @api_client = api_client end + # Create arbitrary cost rule. + # + # @see #create_arbitrary_cost_rule_with_http_info + def create_arbitrary_cost_rule(body, opts = {}) + data, _status_code, _headers = create_arbitrary_cost_rule_with_http_info(body, opts) + data + end + + # Create arbitrary cost rule. + # + # Create a new arbitrary cost rule with the specified filters and allocation strategy. + # + # **Strategy Methods:** + # - **PROPORTIONAL/EVEN**: Allocates costs proportionally/evenly based on existing costs. Requires: granularity, allocated_by_tag_keys. Optional: based_on_costs, allocated_by_filters, evaluate_grouped_by_tag_keys, evaluate_grouped_by_filters. + # - **PROPORTIONAL_TIMESERIES/EVEN_TIMESERIES**: Allocates based on timeseries data. Requires: granularity, based_on_timeseries. Optional: evaluate_grouped_by_tag_keys. + # - **PERCENT**: Allocates fixed percentages to specific tags. Requires: allocated_by (array of percentage allocations). + # + # **Filter Conditions:** + # - Use **value** for single-value conditions: "is", "is not", "contains", "does not contain", "=", "!=", "like", "not like", "is all values", "is untagged" + # - Use **values** for multi-value conditions: "in", "not in" + # - Cannot use both value and values simultaneously. + # + # **Supported operators**: is, is not, is all values, is untagged, contains, does not contain, in, not in, =, !=, like, not like + # + # @param body [ArbitraryCostUpsertRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(ArbitraryRuleResponse, Integer, Hash)>] ArbitraryRuleResponse data, response status code and response headers + def create_arbitrary_cost_rule_with_http_info(body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.create_arbitrary_cost_rule ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling CloudCostManagementAPI.create_arbitrary_cost_rule" + end + # resource path + local_var_path = '/api/v2/cost/arbitrary_rule' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'ArbitraryRuleResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :create_arbitrary_cost_rule, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudCostManagementAPI#create_arbitrary_cost_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Create Cloud Cost Management AWS CUR config. # # @see #create_cost_awscur_config_with_http_info @@ -37,7 +116,7 @@ def create_cost_awscur_config(body, opts = {}) # # @param body [AwsCURConfigPostRequest] # @param opts [Hash] the optional parameters - # @return [Array<(AwsCURConfigResponse, Integer, Hash)>] AwsCURConfigResponse data, response status code and response headers + # @return [Array<(AwsCurConfigResponse, Integer, Hash)>] AwsCurConfigResponse data, response status code and response headers def create_cost_awscur_config_with_http_info(body, opts = {}) if @api_client.config.debugging @@ -67,7 +146,7 @@ def create_cost_awscur_config_with_http_info(body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'AwsCURConfigResponse' + return_type = opts[:debug_return_type] || 'AwsCurConfigResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] @@ -157,7 +236,7 @@ def create_cost_azure_uc_configs_with_http_info(body, opts = {}) return data, status_code, headers end - # Create Cloud Cost Management GCP Usage Cost config. + # Create Google Cloud Usage Cost config. # # @see #create_cost_gcp_usage_cost_config_with_http_info def create_cost_gcp_usage_cost_config(body, opts = {}) @@ -165,9 +244,9 @@ def create_cost_gcp_usage_cost_config(body, opts = {}) data end - # Create Cloud Cost Management GCP Usage Cost config. + # Create Google Cloud Usage Cost config. # - # Create a Cloud Cost Management account for an GCP Usage Cost config. + # Create a Cloud Cost Management account for an Google Cloud Usage Cost config. # # @param body [GCPUsageCostConfigPostRequest] # @param opts [Hash] the optional parameters @@ -224,6 +303,138 @@ def create_cost_gcp_usage_cost_config_with_http_info(body, opts = {}) return data, status_code, headers end + # Create ruleset. + # + # @see #create_ruleset_with_http_info + def create_ruleset(body, opts = {}) + data, _status_code, _headers = create_ruleset_with_http_info(body, opts) + data + end + + # Create ruleset. + # + # Create a new tag pipeline ruleset with the specified rules and configuration + # + # @param body [CreateRulesetRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(RulesetResp, Integer, Hash)>] RulesetResp data, response status code and response headers + def create_ruleset_with_http_info(body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.create_ruleset ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling CloudCostManagementAPI.create_ruleset" + end + # resource path + local_var_path = '/api/v2/tags/enrichment' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'RulesetResp' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :create_ruleset, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudCostManagementAPI#create_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete arbitrary cost rule. + # + # @see #delete_arbitrary_cost_rule_with_http_info + def delete_arbitrary_cost_rule(rule_id, opts = {}) + delete_arbitrary_cost_rule_with_http_info(rule_id, opts) + nil + end + + # Delete arbitrary cost rule. + # + # Delete an arbitrary cost rule - Delete an existing arbitrary cost rule by its ID + # + # @param rule_id [Integer] The unique identifier of the arbitrary cost rule + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_arbitrary_cost_rule_with_http_info(rule_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.delete_arbitrary_cost_rule ...' + end + # verify the required parameter 'rule_id' is set + if @api_client.config.client_side_validation && rule_id.nil? + fail ArgumentError, "Missing the required parameter 'rule_id' when calling CloudCostManagementAPI.delete_arbitrary_cost_rule" + end + # resource path + local_var_path = '/api/v2/cost/arbitrary_rule/{rule_id}'.sub('{rule_id}', CGI.escape(rule_id.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(['*/*']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :delete_arbitrary_cost_rule, + :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::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudCostManagementAPI#delete_arbitrary_cost_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Delete a budget. # # @see #delete_budget_with_http_info @@ -419,7 +630,7 @@ def delete_cost_azure_uc_config_with_http_info(cloud_account_id, opts = {}) return data, status_code, headers end - # Delete Cloud Cost Management GCP Usage Cost config. + # Delete Google Cloud Usage Cost config. # # @see #delete_cost_gcp_usage_cost_config_with_http_info def delete_cost_gcp_usage_cost_config(cloud_account_id, opts = {}) @@ -427,7 +638,7 @@ def delete_cost_gcp_usage_cost_config(cloud_account_id, opts = {}) nil end - # Delete Cloud Cost Management GCP Usage Cost config. + # Delete Google Cloud Usage Cost config. # # Archive a Cloud Cost Management account. # @@ -549,32 +760,32 @@ def delete_custom_costs_file_with_http_info(file_id, opts = {}) return data, status_code, headers end - # Get a budget. + # Delete ruleset. # - # @see #get_budget_with_http_info - def get_budget(budget_id, opts = {}) - data, _status_code, _headers = get_budget_with_http_info(budget_id, opts) - data + # @see #delete_ruleset_with_http_info + def delete_ruleset(ruleset_id, opts = {}) + delete_ruleset_with_http_info(ruleset_id, opts) + nil end - # Get a budget. + # Delete ruleset. # - # Get a budget. + # Delete a tag pipeline ruleset - Delete an existing tag pipeline ruleset by its ID # - # @param budget_id [String] Budget id. + # @param ruleset_id [String] The unique identifier of the ruleset # @param opts [Hash] the optional parameters - # @return [Array<(BudgetWithEntries, Integer, Hash)>] BudgetWithEntries data, response status code and response headers - def get_budget_with_http_info(budget_id, opts = {}) + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_ruleset_with_http_info(ruleset_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.get_budget ...' + @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.delete_ruleset ...' end - # verify the required parameter 'budget_id' is set - if @api_client.config.client_side_validation && budget_id.nil? - fail ArgumentError, "Missing the required parameter 'budget_id' when calling CloudCostManagementAPI.get_budget" + # verify the required parameter 'ruleset_id' is set + if @api_client.config.client_side_validation && ruleset_id.nil? + fail ArgumentError, "Missing the required parameter 'ruleset_id' when calling CloudCostManagementAPI.delete_ruleset" end # resource path - local_var_path = '/api/v2/cost/budget/{budget_id}'.sub('{budget_id}', CGI.escape(budget_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/tags/enrichment/{ruleset_id}'.sub('{ruleset_id}', CGI.escape(ruleset_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -582,7 +793,7 @@ def get_budget_with_http_info(budget_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} @@ -591,13 +802,13 @@ def get_budget_with_http_info(budget_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'BudgetWithEntries' + return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :get_budget, + :operation => :delete_ruleset, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -607,39 +818,39 @@ def get_budget_with_http_info(budget_id, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CloudCostManagementAPI#get_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CloudCostManagementAPI#delete_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get Custom Costs file. + # Get arbitrary cost rule. # - # @see #get_custom_costs_file_with_http_info - def get_custom_costs_file(file_id, opts = {}) - data, _status_code, _headers = get_custom_costs_file_with_http_info(file_id, opts) + # @see #get_arbitrary_cost_rule_with_http_info + def get_arbitrary_cost_rule(rule_id, opts = {}) + data, _status_code, _headers = get_arbitrary_cost_rule_with_http_info(rule_id, opts) data end - # Get Custom Costs file. + # Get arbitrary cost rule. # - # Fetch the specified Custom Costs file. + # Get a specific arbitrary cost rule - Retrieve a specific arbitrary cost rule by its ID # - # @param file_id [String] File ID. + # @param rule_id [Integer] The unique identifier of the arbitrary cost rule # @param opts [Hash] the optional parameters - # @return [Array<(CustomCostsFileGetResponse, Integer, Hash)>] CustomCostsFileGetResponse data, response status code and response headers - def get_custom_costs_file_with_http_info(file_id, opts = {}) + # @return [Array<(ArbitraryRuleResponse, Integer, Hash)>] ArbitraryRuleResponse data, response status code and response headers + def get_arbitrary_cost_rule_with_http_info(rule_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.get_custom_costs_file ...' + @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.get_arbitrary_cost_rule ...' end - # verify the required parameter 'file_id' is set - if @api_client.config.client_side_validation && file_id.nil? - fail ArgumentError, "Missing the required parameter 'file_id' when calling CloudCostManagementAPI.get_custom_costs_file" + # verify the required parameter 'rule_id' is set + if @api_client.config.client_side_validation && rule_id.nil? + fail ArgumentError, "Missing the required parameter 'rule_id' when calling CloudCostManagementAPI.get_arbitrary_cost_rule" end # resource path - local_var_path = '/api/v2/cost/custom_costs/{file_id}'.sub('{file_id}', CGI.escape(file_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cost/arbitrary_rule/{rule_id}'.sub('{rule_id}', CGI.escape(rule_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -656,13 +867,13 @@ def get_custom_costs_file_with_http_info(file_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'CustomCostsFileGetResponse' + return_type = opts[:debug_return_type] || 'ArbitraryRuleResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :get_custom_costs_file, + :operation => :get_arbitrary_cost_rule, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -674,32 +885,37 @@ def get_custom_costs_file_with_http_info(file_id, opts = {}) 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_custom_costs_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CloudCostManagementAPI#get_arbitrary_cost_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List budgets. + # Get a budget. # - # @see #list_budgets_with_http_info - def list_budgets(opts = {}) - data, _status_code, _headers = list_budgets_with_http_info(opts) + # @see #get_budget_with_http_info + def get_budget(budget_id, opts = {}) + data, _status_code, _headers = get_budget_with_http_info(budget_id, opts) data end - # List budgets. + # Get a budget. # - # List budgets. + # Get a budget. # + # @param budget_id [String] Budget id. # @param opts [Hash] the optional parameters - # @return [Array<(BudgetArray, Integer, Hash)>] BudgetArray data, response status code and response headers - def list_budgets_with_http_info(opts = {}) + # @return [Array<(BudgetWithEntries, Integer, Hash)>] BudgetWithEntries data, response status code and response headers + def get_budget_with_http_info(budget_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_budgets ...' + @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.get_budget ...' + end + # verify the required parameter 'budget_id' is set + if @api_client.config.client_side_validation && budget_id.nil? + fail ArgumentError, "Missing the required parameter 'budget_id' when calling CloudCostManagementAPI.get_budget" end # resource path - local_var_path = '/api/v2/cost/budgets' + local_var_path = '/api/v2/cost/budget/{budget_id}'.sub('{budget_id}', CGI.escape(budget_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -716,13 +932,13 @@ def list_budgets_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'BudgetArray' + return_type = opts[:debug_return_type] || 'BudgetWithEntries' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :list_budgets, + :operation => :get_budget, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -734,32 +950,37 @@ def list_budgets_with_http_info(opts = {}) 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_budgets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CloudCostManagementAPI#get_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List Cloud Cost Management AWS CUR configs. + # Get cost AWS CUR config. # - # @see #list_cost_awscur_configs_with_http_info - def list_cost_awscur_configs(opts = {}) - data, _status_code, _headers = list_cost_awscur_configs_with_http_info(opts) + # @see #get_cost_awscur_config_with_http_info + def get_cost_awscur_config(cloud_account_id, opts = {}) + data, _status_code, _headers = get_cost_awscur_config_with_http_info(cloud_account_id, opts) data end - # List Cloud Cost Management AWS CUR configs. + # Get cost AWS CUR config. # - # List the AWS CUR configs. + # Get a specific AWS CUR config. # + # @param cloud_account_id [Integer] The unique identifier of the cloud account # @param opts [Hash] the optional parameters - # @return [Array<(AwsCURConfigsResponse, Integer, Hash)>] AwsCURConfigsResponse data, response status code and response headers - def list_cost_awscur_configs_with_http_info(opts = {}) + # @return [Array<(AwsCurConfigResponse, Integer, Hash)>] AwsCurConfigResponse data, response status code and response headers + def get_cost_awscur_config_with_http_info(cloud_account_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_cost_awscur_configs ...' + @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.get_cost_awscur_config ...' + end + # verify the required parameter 'cloud_account_id' is set + if @api_client.config.client_side_validation && cloud_account_id.nil? + fail ArgumentError, "Missing the required parameter 'cloud_account_id' when calling CloudCostManagementAPI.get_cost_awscur_config" end # resource path - local_var_path = '/api/v2/cost/aws_cur_config' + local_var_path = '/api/v2/cost/aws_cur_config/{cloud_account_id}'.sub('{cloud_account_id}', CGI.escape(cloud_account_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -776,13 +997,13 @@ def list_cost_awscur_configs_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'AwsCURConfigsResponse' + return_type = opts[:debug_return_type] || 'AwsCurConfigResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :list_cost_awscur_configs, + :operation => :get_cost_awscur_config, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -794,32 +1015,660 @@ def list_cost_awscur_configs_with_http_info(opts = {}) 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_awscur_configs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CloudCostManagementAPI#get_cost_awscur_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List Cloud Cost Management Azure configs. + # Get cost Azure UC config. # - # @see #list_cost_azure_uc_configs_with_http_info - def list_cost_azure_uc_configs(opts = {}) - data, _status_code, _headers = list_cost_azure_uc_configs_with_http_info(opts) + # @see #get_cost_azure_uc_config_with_http_info + def get_cost_azure_uc_config(cloud_account_id, opts = {}) + data, _status_code, _headers = get_cost_azure_uc_config_with_http_info(cloud_account_id, opts) data end - # List Cloud Cost Management Azure configs. + # Get cost Azure UC config. # - # List the Azure configs. + # Get a specific Azure config. # + # @param cloud_account_id [Integer] The unique identifier of the cloud account # @param opts [Hash] the optional parameters - # @return [Array<(AzureUCConfigsResponse, Integer, Hash)>] AzureUCConfigsResponse data, response status code and response headers - def list_cost_azure_uc_configs_with_http_info(opts = {}) + # @return [Array<(UCConfigPair, Integer, Hash)>] UCConfigPair data, response status code and response headers + def get_cost_azure_uc_config_with_http_info(cloud_account_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_cost_azure_uc_configs ...' + @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.get_cost_azure_uc_config ...' + end + # verify the required parameter 'cloud_account_id' is set + if @api_client.config.client_side_validation && cloud_account_id.nil? + fail ArgumentError, "Missing the required parameter 'cloud_account_id' when calling CloudCostManagementAPI.get_cost_azure_uc_config" + end + # resource path + local_var_path = '/api/v2/cost/azure_uc_config/{cloud_account_id}'.sub('{cloud_account_id}', CGI.escape(cloud_account_id.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] || 'UCConfigPair' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_cost_azure_uc_config, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudCostManagementAPI#get_cost_azure_uc_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get Google Cloud Usage Cost config. + # + # @see #get_cost_gcp_usage_cost_config_with_http_info + def get_cost_gcp_usage_cost_config(cloud_account_id, opts = {}) + data, _status_code, _headers = get_cost_gcp_usage_cost_config_with_http_info(cloud_account_id, opts) + data + end + + # Get Google Cloud Usage Cost config. + # + # Get a specific Google Cloud Usage Cost config. + # + # @param cloud_account_id [Integer] The unique identifier of the cloud account + # @param opts [Hash] the optional parameters + # @return [Array<(GcpUcConfigResponse, Integer, Hash)>] GcpUcConfigResponse data, response status code and response headers + def get_cost_gcp_usage_cost_config_with_http_info(cloud_account_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.get_cost_gcp_usage_cost_config ...' + end + # verify the required parameter 'cloud_account_id' is set + if @api_client.config.client_side_validation && cloud_account_id.nil? + fail ArgumentError, "Missing the required parameter 'cloud_account_id' when calling CloudCostManagementAPI.get_cost_gcp_usage_cost_config" + end + # resource path + local_var_path = '/api/v2/cost/gcp_uc_config/{cloud_account_id}'.sub('{cloud_account_id}', CGI.escape(cloud_account_id.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] || 'GcpUcConfigResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_cost_gcp_usage_cost_config, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudCostManagementAPI#get_cost_gcp_usage_cost_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get Custom Costs file. + # + # @see #get_custom_costs_file_with_http_info + def get_custom_costs_file(file_id, opts = {}) + data, _status_code, _headers = get_custom_costs_file_with_http_info(file_id, opts) + data + end + + # Get Custom Costs file. + # + # Fetch the specified Custom Costs file. + # + # @param file_id [String] File ID. + # @param opts [Hash] the optional parameters + # @return [Array<(CustomCostsFileGetResponse, Integer, Hash)>] CustomCostsFileGetResponse data, response status code and response headers + def get_custom_costs_file_with_http_info(file_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.get_custom_costs_file ...' + end + # verify the required parameter 'file_id' is set + if @api_client.config.client_side_validation && file_id.nil? + fail ArgumentError, "Missing the required parameter 'file_id' when calling CloudCostManagementAPI.get_custom_costs_file" + end + # resource path + local_var_path = '/api/v2/cost/custom_costs/{file_id}'.sub('{file_id}', CGI.escape(file_id.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] || 'CustomCostsFileGetResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_custom_costs_file, + :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_custom_costs_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get ruleset. + # + # @see #get_ruleset_with_http_info + def get_ruleset(ruleset_id, opts = {}) + data, _status_code, _headers = get_ruleset_with_http_info(ruleset_id, opts) + data + end + + # Get ruleset. + # + # Get a specific tag pipeline ruleset - Retrieve a specific tag pipeline ruleset by its ID + # + # @param ruleset_id [String] The unique identifier of the ruleset + # @param opts [Hash] the optional parameters + # @return [Array<(RulesetResp, Integer, Hash)>] RulesetResp data, response status code and response headers + def get_ruleset_with_http_info(ruleset_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.get_ruleset ...' + end + # verify the required parameter 'ruleset_id' is set + if @api_client.config.client_side_validation && ruleset_id.nil? + fail ArgumentError, "Missing the required parameter 'ruleset_id' when calling CloudCostManagementAPI.get_ruleset" + end + # resource path + local_var_path = '/api/v2/tags/enrichment/{ruleset_id}'.sub('{ruleset_id}', CGI.escape(ruleset_id.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] || 'RulesetResp' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_ruleset, + :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_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List arbitrary cost rules. + # + # @see #list_arbitrary_cost_rules_with_http_info + def list_arbitrary_cost_rules(opts = {}) + data, _status_code, _headers = list_arbitrary_cost_rules_with_http_info(opts) + data + end + + # List arbitrary cost rules. + # + # List all arbitrary cost rules - Retrieve a list of all arbitrary cost rules for the organization + # + # @param opts [Hash] the optional parameters + # @return [Array<(ArbitraryRuleResponseArray, Integer, Hash)>] ArbitraryRuleResponseArray data, response status code and response headers + def list_arbitrary_cost_rules_with_http_info(opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_arbitrary_cost_rules ...' + end + # resource path + local_var_path = '/api/v2/cost/arbitrary_rule' + + # 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] || 'ArbitraryRuleResponseArray' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_arbitrary_cost_rules, + :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_arbitrary_cost_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List budgets. + # + # @see #list_budgets_with_http_info + def list_budgets(opts = {}) + data, _status_code, _headers = list_budgets_with_http_info(opts) + data + end + + # List budgets. + # + # List budgets. + # + # @param opts [Hash] the optional parameters + # @return [Array<(BudgetArray, Integer, Hash)>] BudgetArray data, response status code and response headers + def list_budgets_with_http_info(opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_budgets ...' + end + # resource path + local_var_path = '/api/v2/cost/budgets' + + # 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] || 'BudgetArray' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_budgets, + :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_budgets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List Cloud Cost Management AWS CUR configs. + # + # @see #list_cost_awscur_configs_with_http_info + def list_cost_awscur_configs(opts = {}) + data, _status_code, _headers = list_cost_awscur_configs_with_http_info(opts) + data + end + + # List Cloud Cost Management AWS CUR configs. + # + # List the AWS CUR configs. + # + # @param opts [Hash] the optional parameters + # @return [Array<(AwsCURConfigsResponse, Integer, Hash)>] AwsCURConfigsResponse data, response status code and response headers + def list_cost_awscur_configs_with_http_info(opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_cost_awscur_configs ...' + end + # resource path + local_var_path = '/api/v2/cost/aws_cur_config' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'AwsCURConfigsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_cost_awscur_configs, + :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_awscur_configs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List Cloud Cost Management Azure configs. + # + # @see #list_cost_azure_uc_configs_with_http_info + def list_cost_azure_uc_configs(opts = {}) + data, _status_code, _headers = list_cost_azure_uc_configs_with_http_info(opts) + data + end + + # List Cloud Cost Management Azure configs. + # + # List the Azure configs. + # + # @param opts [Hash] the optional parameters + # @return [Array<(AzureUCConfigsResponse, Integer, Hash)>] AzureUCConfigsResponse data, response status code and response headers + def list_cost_azure_uc_configs_with_http_info(opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_cost_azure_uc_configs ...' + end + # resource path + local_var_path = '/api/v2/cost/azure_uc_config' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'AzureUCConfigsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_cost_azure_uc_configs, + :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_azure_uc_configs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List Google Cloud Usage Cost configs. + # + # @see #list_cost_gcp_usage_cost_configs_with_http_info + def list_cost_gcp_usage_cost_configs(opts = {}) + data, _status_code, _headers = list_cost_gcp_usage_cost_configs_with_http_info(opts) + data + end + + # List Google Cloud Usage Cost configs. + # + # List the Google Cloud Usage Cost configs. + # + # @param opts [Hash] the optional parameters + # @return [Array<(GCPUsageCostConfigsResponse, Integer, Hash)>] GCPUsageCostConfigsResponse data, response status code and response headers + def list_cost_gcp_usage_cost_configs_with_http_info(opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_cost_gcp_usage_cost_configs ...' + end + # resource path + local_var_path = '/api/v2/cost/gcp_uc_config' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GCPUsageCostConfigsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_cost_gcp_usage_cost_configs, + :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_gcp_usage_cost_configs\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 + def list_custom_costs_files(opts = {}) + data, _status_code, _headers = list_custom_costs_files_with_http_info(opts) + data + end + + # List Custom Costs files. + # + # List the Custom Costs files. + # + # @param opts [Hash] the optional parameters + # @option opts [Integer] :page_number Page number for pagination + # @option opts [Integer] :page_size Page size for pagination + # @option opts [String] :filter_status Filter by file status + # @option opts [String] :sort Sort key with optional descending prefix + # @return [Array<(CustomCostsFileListResponse, Integer, Hash)>] CustomCostsFileListResponse data, response status code and response headers + def list_custom_costs_files_with_http_info(opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_custom_costs_files ...' + end + # resource path + local_var_path = '/api/v2/cost/custom_costs' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? + query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? + query_params[:'filter[status]'] = opts[:'filter_status'] if !opts[:'filter_status'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? + + # 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] || 'CustomCostsFileListResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_custom_costs_files, + :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_costs_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List rulesets. + # + # @see #list_rulesets_with_http_info + def list_rulesets(opts = {}) + data, _status_code, _headers = list_rulesets_with_http_info(opts) + data + end + + # List rulesets. + # + # List all tag pipeline rulesets - Retrieve a list of all tag pipeline rulesets for the organization + # + # @param opts [Hash] the optional parameters + # @return [Array<(RulesetRespArray, Integer, Hash)>] RulesetRespArray data, response status code and response headers + def list_rulesets_with_http_info(opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_rulesets ...' end # resource path - local_var_path = '/api/v2/cost/azure_uc_config' + local_var_path = '/api/v2/tags/enrichment' # query parameters query_params = opts[:query_params] || {} @@ -836,13 +1685,13 @@ def list_cost_azure_uc_configs_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'AzureUCConfigsResponse' + return_type = opts[:debug_return_type] || 'RulesetRespArray' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :list_cost_azure_uc_configs, + :operation => :list_rulesets, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -854,32 +1703,43 @@ def list_cost_azure_uc_configs_with_http_info(opts = {}) 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_azure_uc_configs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CloudCostManagementAPI#list_rulesets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List Cloud Cost Management GCP Usage Cost configs. + # Reorder arbitrary cost rules. # - # @see #list_cost_gcp_usage_cost_configs_with_http_info - def list_cost_gcp_usage_cost_configs(opts = {}) - data, _status_code, _headers = list_cost_gcp_usage_cost_configs_with_http_info(opts) - data + # @see #reorder_arbitrary_cost_rules_with_http_info + def reorder_arbitrary_cost_rules(body, opts = {}) + reorder_arbitrary_cost_rules_with_http_info(body, opts) + nil end - # List Cloud Cost Management GCP Usage Cost configs. + # Reorder arbitrary cost rules. # - # List the GCP Usage Cost configs. + # Reorder arbitrary cost rules - Change the execution order of arbitrary cost rules. # + # **Important**: You must provide the **complete list** of all rule IDs in the desired execution order. The API will reorder ALL rules according to the provided sequence. + # + # Rules are executed in the order specified, with lower indices (earlier in the array) having higher priority. + # + # **Example**: If you have rules with IDs [123, 456, 789] and want to change order from 123→456→789 to 456→123→789, send: [{"id": "456"}, {"id": "123"}, {"id": "789"}] + # + # @param body [ReorderRuleResourceArray] # @param opts [Hash] the optional parameters - # @return [Array<(GCPUsageCostConfigsResponse, Integer, Hash)>] GCPUsageCostConfigsResponse data, response status code and response headers - def list_cost_gcp_usage_cost_configs_with_http_info(opts = {}) + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def reorder_arbitrary_cost_rules_with_http_info(body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_cost_gcp_usage_cost_configs ...' + @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.reorder_arbitrary_cost_rules ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling CloudCostManagementAPI.reorder_arbitrary_cost_rules" end # resource path - local_var_path = '/api/v2/cost/gcp_uc_config' + local_var_path = '/api/v2/cost/arbitrary_rule/reorder' # query parameters query_params = opts[:query_params] || {} @@ -887,22 +1747,24 @@ def list_cost_gcp_usage_cost_configs_with_http_info(opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'GCPUsageCostConfigsResponse' + return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :list_cost_gcp_usage_cost_configs, + :operation => :reorder_arbitrary_cost_rules, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -912,65 +1774,149 @@ def list_cost_gcp_usage_cost_configs_with_http_info(opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CloudCostManagementAPI#list_cost_gcp_usage_cost_configs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CloudCostManagementAPI#reorder_arbitrary_cost_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List Custom Costs files. + # Reorder rulesets. # - # @see #list_custom_costs_files_with_http_info - def list_custom_costs_files(opts = {}) - data, _status_code, _headers = list_custom_costs_files_with_http_info(opts) + # @see #reorder_rulesets_with_http_info + def reorder_rulesets(body, opts = {}) + reorder_rulesets_with_http_info(body, opts) + nil + end + + # Reorder rulesets. + # + # Reorder tag pipeline rulesets - Change the execution order of tag pipeline rulesets + # + # @param body [ReorderRulesetResourceArray] + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def reorder_rulesets_with_http_info(body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.reorder_rulesets ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling CloudCostManagementAPI.reorder_rulesets" + end + # resource path + local_var_path = '/api/v2/tags/enrichment/reorder' + + # 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(['*/*']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :reorder_rulesets, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudCostManagementAPI#reorder_rulesets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update arbitrary cost rule. + # + # @see #update_arbitrary_cost_rule_with_http_info + def update_arbitrary_cost_rule(rule_id, body, opts = {}) + data, _status_code, _headers = update_arbitrary_cost_rule_with_http_info(rule_id, body, opts) data end - # List Custom Costs files. + # Update arbitrary cost rule. # - # List the Custom Costs files. + # Update an existing arbitrary cost rule with new filters and allocation strategy. + # + # **Strategy Methods:** + # - **PROPORTIONAL/EVEN**: Allocates costs proportionally/evenly based on existing costs. Requires: granularity, allocated_by_tag_keys. Optional: based_on_costs, allocated_by_filters, evaluate_grouped_by_tag_keys, evaluate_grouped_by_filters. + # - **PROPORTIONAL_TIMESERIES/EVEN_TIMESERIES**: Allocates based on timeseries data. Requires: granularity, based_on_timeseries. Optional: evaluate_grouped_by_tag_keys. + # - **PERCENT**: Allocates fixed percentages to specific tags. Requires: allocated_by (array of percentage allocations). + # - **USAGE_METRIC**: Allocates based on usage metrics (implementation varies). # + # **Filter Conditions:** + # - Use **value** for single-value conditions: "is", "is not", "contains", "does not contain", "=", "!=", "like", "not like", "is all values", "is untagged" + # - Use **values** for multi-value conditions: "in", "not in" + # - Cannot use both value and values simultaneously. + # + # **Supported operators**: is, is not, is all values, is untagged, contains, does not contain, in, not in, =, !=, like, not like + # + # @param rule_id [Integer] The unique identifier of the arbitrary cost rule + # @param body [ArbitraryCostUpsertRequest] # @param opts [Hash] the optional parameters - # @option opts [Integer] :page_number Page number for pagination - # @option opts [Integer] :page_size Page size for pagination - # @option opts [String] :filter_status Filter by file status - # @option opts [String] :sort Sort key with optional descending prefix - # @return [Array<(CustomCostsFileListResponse, Integer, Hash)>] CustomCostsFileListResponse data, response status code and response headers - def list_custom_costs_files_with_http_info(opts = {}) + # @return [Array<(ArbitraryRuleResponse, Integer, Hash)>] ArbitraryRuleResponse data, response status code and response headers + def update_arbitrary_cost_rule_with_http_info(rule_id, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_custom_costs_files ...' + @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.update_arbitrary_cost_rule ...' + end + # verify the required parameter 'rule_id' is set + if @api_client.config.client_side_validation && rule_id.nil? + fail ArgumentError, "Missing the required parameter 'rule_id' when calling CloudCostManagementAPI.update_arbitrary_cost_rule" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling CloudCostManagementAPI.update_arbitrary_cost_rule" end # resource path - local_var_path = '/api/v2/cost/custom_costs' + local_var_path = '/api/v2/cost/arbitrary_rule/{rule_id}'.sub('{rule_id}', CGI.escape(rule_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} - query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? - query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? - query_params[:'filter[status]'] = opts[:'filter_status'] if !opts[:'filter_status'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'CustomCostsFileListResponse' + return_type = opts[:debug_return_type] || 'ArbitraryRuleResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :list_custom_costs_files, + :operation => :update_arbitrary_cost_rule, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -980,9 +1926,9 @@ def list_custom_costs_files_with_http_info(opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CloudCostManagementAPI#list_custom_costs_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CloudCostManagementAPI#update_arbitrary_cost_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -1131,7 +2077,7 @@ def update_cost_azure_uc_configs_with_http_info(cloud_account_id, body, opts = { return data, status_code, headers end - # Update Cloud Cost Management GCP Usage Cost config. + # Update Google Cloud Usage Cost config. # # @see #update_cost_gcp_usage_cost_config_with_http_info def update_cost_gcp_usage_cost_config(cloud_account_id, body, opts = {}) @@ -1139,9 +2085,9 @@ def update_cost_gcp_usage_cost_config(cloud_account_id, body, opts = {}) data end - # Update Cloud Cost Management GCP Usage Cost config. + # Update Google Cloud Usage Cost config. # - # Update the status of an GCP Usage Cost config (active/archived). + # Update the status of an Google Cloud Usage Cost config (active/archived). # # @param cloud_account_id [Integer] Cloud Account id. # @param body [GCPUsageCostConfigPatchRequest] @@ -1203,6 +2149,78 @@ def update_cost_gcp_usage_cost_config_with_http_info(cloud_account_id, body, opt return data, status_code, headers end + # Update ruleset. + # + # @see #update_ruleset_with_http_info + def update_ruleset(ruleset_id, body, opts = {}) + data, _status_code, _headers = update_ruleset_with_http_info(ruleset_id, body, opts) + data + end + + # Update ruleset. + # + # Update a tag pipeline ruleset - Update an existing tag pipeline ruleset with new rules and configuration + # + # @param ruleset_id [String] The unique identifier of the ruleset + # @param body [UpdateRulesetRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(RulesetResp, Integer, Hash)>] RulesetResp data, response status code and response headers + def update_ruleset_with_http_info(ruleset_id, body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.update_ruleset ...' + end + # verify the required parameter 'ruleset_id' is set + if @api_client.config.client_side_validation && ruleset_id.nil? + fail ArgumentError, "Missing the required parameter 'ruleset_id' when calling CloudCostManagementAPI.update_ruleset" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling CloudCostManagementAPI.update_ruleset" + end + # resource path + local_var_path = '/api/v2/tags/enrichment/{ruleset_id}'.sub('{ruleset_id}', CGI.escape(ruleset_id.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']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'RulesetResp' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :update_ruleset, + :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::Patch, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudCostManagementAPI#update_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Upload Custom Costs file. # # @see #upload_custom_costs_file_with_http_info @@ -1336,5 +2354,72 @@ def upsert_budget_with_http_info(body, opts = {}) end return data, status_code, headers end + + # Validate query. + # + # @see #validate_query_with_http_info + def validate_query(body, opts = {}) + data, _status_code, _headers = validate_query_with_http_info(body, opts) + data + end + + # Validate query. + # + # Validate a tag pipeline query - Validate the syntax and structure of a tag pipeline query + # + # @param body [RulesValidateQueryRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(RulesValidateQueryResponse, Integer, Hash)>] RulesValidateQueryResponse data, response status code and response headers + def validate_query_with_http_info(body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.validate_query ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling CloudCostManagementAPI.validate_query" + end + # resource path + local_var_path = '/api/v2/tags/enrichment/validate-query' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'RulesValidateQueryResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :validate_query, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudCostManagementAPI#validate_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end end end diff --git a/lib/datadog_api_client/v2/models/account_filtering_config.rb b/lib/datadog_api_client/v2/models/account_filtering_config.rb index b36ea0098e5f..1484a77bf9ff 100644 --- a/lib/datadog_api_client/v2/models/account_filtering_config.rb +++ b/lib/datadog_api_client/v2/models/account_filtering_config.rb @@ -52,6 +52,14 @@ def self.openapi_types } end + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'include_new_accounts', + ]) + end + # Initializes the object # @param attributes [Hash] Model attributes in the form of hash # @!visibility private diff --git a/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request.rb b/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request.rb new file mode 100644 index 000000000000..548b548254d9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `ArbitraryCostUpsertRequest` object. + class ArbitraryCostUpsertRequest + include BaseGenericModel + + # The definition of `ArbitraryCostUpsertRequestData` object. + attr_accessor :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' => :'ArbitraryCostUpsertRequestData' + } + 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::ArbitraryCostUpsertRequest` 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 + + # 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/arbitrary_cost_upsert_request_data.rb b/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data.rb new file mode 100644 index 000000000000..1863e8afd989 --- /dev/null +++ b/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `ArbitraryCostUpsertRequestData` object. + class ArbitraryCostUpsertRequestData + include BaseGenericModel + + # The definition of `ArbitraryCostUpsertRequestDataAttributes` object. + attr_accessor :attributes + + # The `ArbitraryCostUpsertRequestData` `id`. + attr_accessor :id + + # Upsert arbitrary rule 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' => :'ArbitraryCostUpsertRequestDataAttributes', + :'id' => :'String', + :'type' => :'ArbitraryCostUpsertRequestDataType' + } + 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::ArbitraryCostUpsertRequestData` 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 @type.nil? + true + 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/arbitrary_cost_upsert_request_data_attributes.rb b/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes.rb new file mode 100644 index 000000000000..f4c018747a83 --- /dev/null +++ b/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes.rb @@ -0,0 +1,241 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `ArbitraryCostUpsertRequestDataAttributes` object. + class ArbitraryCostUpsertRequestDataAttributes + include BaseGenericModel + + # The `attributes` `costs_to_allocate`. + attr_reader :costs_to_allocate + + # The `attributes` `enabled`. + attr_accessor :enabled + + # The `attributes` `order_id`. + attr_accessor :order_id + + # The `attributes` `provider`. + attr_reader :provider + + # The `attributes` `rejected`. + attr_accessor :rejected + + # The `attributes` `rule_name`. + attr_reader :rule_name + + # The definition of `ArbitraryCostUpsertRequestDataAttributesStrategy` object. + attr_reader :strategy + + # The `attributes` `type`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'costs_to_allocate' => :'costs_to_allocate', + :'enabled' => :'enabled', + :'order_id' => :'order_id', + :'provider' => :'provider', + :'rejected' => :'rejected', + :'rule_name' => :'rule_name', + :'strategy' => :'strategy', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'costs_to_allocate' => :'Array', + :'enabled' => :'Boolean', + :'order_id' => :'Integer', + :'provider' => :'Array', + :'rejected' => :'Boolean', + :'rule_name' => :'String', + :'strategy' => :'ArbitraryCostUpsertRequestDataAttributesStrategy', + :'type' => :'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::ArbitraryCostUpsertRequestDataAttributes` 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?(:'costs_to_allocate') + if (value = attributes[:'costs_to_allocate']).is_a?(Array) + self.costs_to_allocate = value + end + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'order_id') + self.order_id = attributes[:'order_id'] + end + + if attributes.key?(:'provider') + if (value = attributes[:'provider']).is_a?(Array) + self.provider = value + end + end + + if attributes.key?(:'rejected') + self.rejected = attributes[:'rejected'] + end + + if attributes.key?(:'rule_name') + self.rule_name = attributes[:'rule_name'] + end + + if attributes.key?(:'strategy') + self.strategy = attributes[:'strategy'] + 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 @costs_to_allocate.nil? + return false if @provider.nil? + return false if @rule_name.nil? + return false if @strategy.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param costs_to_allocate [Object] Object to be assigned + # @!visibility private + def costs_to_allocate=(costs_to_allocate) + if costs_to_allocate.nil? + fail ArgumentError, 'invalid value for "costs_to_allocate", costs_to_allocate cannot be nil.' + end + @costs_to_allocate = costs_to_allocate + end + + # Custom attribute writer method with validation + # @param provider [Object] Object to be assigned + # @!visibility private + def provider=(provider) + if provider.nil? + fail ArgumentError, 'invalid value for "provider", provider cannot be nil.' + end + @provider = provider + end + + # Custom attribute writer method with validation + # @param rule_name [Object] Object to be assigned + # @!visibility private + def rule_name=(rule_name) + if rule_name.nil? + fail ArgumentError, 'invalid value for "rule_name", rule_name cannot be nil.' + end + @rule_name = rule_name + end + + # Custom attribute writer method with validation + # @param strategy [Object] Object to be assigned + # @!visibility private + def strategy=(strategy) + if strategy.nil? + fail ArgumentError, 'invalid value for "strategy", strategy cannot be nil.' + end + @strategy = strategy + 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 && + costs_to_allocate == o.costs_to_allocate && + enabled == o.enabled && + order_id == o.order_id && + provider == o.provider && + rejected == o.rejected && + rule_name == o.rule_name && + strategy == o.strategy && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [costs_to_allocate, enabled, order_id, provider, rejected, rule_name, strategy, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_costs_to_allocate_items.rb b/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_costs_to_allocate_items.rb new file mode 100644 index 000000000000..784cd42af2a9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_costs_to_allocate_items.rb @@ -0,0 +1,174 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems` object. + class ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems + include BaseGenericModel + + # The `items` `condition`. + attr_reader :condition + + # The `items` `tag`. + attr_reader :tag + + # The `items` `value`. + attr_accessor :value + + # The `items` `values`. + attr_accessor :values + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'condition' => :'condition', + :'tag' => :'tag', + :'value' => :'value', + :'values' => :'values' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'condition' => :'String', + :'tag' => :'String', + :'value' => :'String', + :'values' => :'Array' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'values', + ]) + 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::ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems` 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?(:'condition') + self.condition = attributes[:'condition'] + end + + if attributes.key?(:'tag') + self.tag = attributes[:'tag'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'values') + if (value = attributes[:'values']).is_a?(Array) + self.values = 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 @condition.nil? + return false if @tag.nil? + true + end + + # Custom attribute writer method with validation + # @param condition [Object] Object to be assigned + # @!visibility private + def condition=(condition) + if condition.nil? + fail ArgumentError, 'invalid value for "condition", condition cannot be nil.' + end + @condition = condition + end + + # Custom attribute writer method with validation + # @param tag [Object] Object to be assigned + # @!visibility private + def tag=(tag) + if tag.nil? + fail ArgumentError, 'invalid value for "tag", tag cannot be nil.' + end + @tag = tag + 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 && + condition == o.condition && + tag == o.tag && + value == o.value && + values == o.values && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [condition, tag, value, values, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy.rb b/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy.rb new file mode 100644 index 000000000000..f20ee115bf0f --- /dev/null +++ b/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy.rb @@ -0,0 +1,215 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `ArbitraryCostUpsertRequestDataAttributesStrategy` object. + class ArbitraryCostUpsertRequestDataAttributesStrategy + include BaseGenericModel + + # The `strategy` `allocated_by`. + attr_accessor :allocated_by + + # The `strategy` `allocated_by_filters`. + attr_accessor :allocated_by_filters + + # The `strategy` `allocated_by_tag_keys`. + attr_accessor :allocated_by_tag_keys + + # The `strategy` `based_on_costs`. + attr_accessor :based_on_costs + + # The `strategy` `based_on_timeseries`. + attr_accessor :based_on_timeseries + + # The `strategy` `evaluate_grouped_by_filters`. + attr_accessor :evaluate_grouped_by_filters + + # The `strategy` `evaluate_grouped_by_tag_keys`. + attr_accessor :evaluate_grouped_by_tag_keys + + # The `strategy` `granularity`. + attr_accessor :granularity + + # The `strategy` `method`. + attr_reader :method + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'allocated_by' => :'allocated_by', + :'allocated_by_filters' => :'allocated_by_filters', + :'allocated_by_tag_keys' => :'allocated_by_tag_keys', + :'based_on_costs' => :'based_on_costs', + :'based_on_timeseries' => :'based_on_timeseries', + :'evaluate_grouped_by_filters' => :'evaluate_grouped_by_filters', + :'evaluate_grouped_by_tag_keys' => :'evaluate_grouped_by_tag_keys', + :'granularity' => :'granularity', + :'method' => :'method' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'allocated_by' => :'Array', + :'allocated_by_filters' => :'Array', + :'allocated_by_tag_keys' => :'Array', + :'based_on_costs' => :'Array', + :'based_on_timeseries' => :'Hash', + :'evaluate_grouped_by_filters' => :'Array', + :'evaluate_grouped_by_tag_keys' => :'Array', + :'granularity' => :'String', + :'method' => :'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::ArbitraryCostUpsertRequestDataAttributesStrategy` 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?(:'allocated_by') + if (value = attributes[:'allocated_by']).is_a?(Array) + self.allocated_by = value + end + end + + if attributes.key?(:'allocated_by_filters') + if (value = attributes[:'allocated_by_filters']).is_a?(Array) + self.allocated_by_filters = value + end + end + + if attributes.key?(:'allocated_by_tag_keys') + if (value = attributes[:'allocated_by_tag_keys']).is_a?(Array) + self.allocated_by_tag_keys = value + end + end + + if attributes.key?(:'based_on_costs') + if (value = attributes[:'based_on_costs']).is_a?(Array) + self.based_on_costs = value + end + end + + if attributes.key?(:'based_on_timeseries') + self.based_on_timeseries = attributes[:'based_on_timeseries'] + end + + if attributes.key?(:'evaluate_grouped_by_filters') + if (value = attributes[:'evaluate_grouped_by_filters']).is_a?(Array) + self.evaluate_grouped_by_filters = value + end + end + + if attributes.key?(:'evaluate_grouped_by_tag_keys') + if (value = attributes[:'evaluate_grouped_by_tag_keys']).is_a?(Array) + self.evaluate_grouped_by_tag_keys = value + end + end + + if attributes.key?(:'granularity') + self.granularity = attributes[:'granularity'] + end + + if attributes.key?(:'method') + self.method = attributes[:'method'] + 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 @method.nil? + true + end + + # Custom attribute writer method with validation + # @param method [Object] Object to be assigned + # @!visibility private + def method=(method) + if method.nil? + fail ArgumentError, 'invalid value for "method", method cannot be nil.' + end + @method = method + 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 && + allocated_by == o.allocated_by && + allocated_by_filters == o.allocated_by_filters && + allocated_by_tag_keys == o.allocated_by_tag_keys && + based_on_costs == o.based_on_costs && + based_on_timeseries == o.based_on_timeseries && + evaluate_grouped_by_filters == o.evaluate_grouped_by_filters && + evaluate_grouped_by_tag_keys == o.evaluate_grouped_by_tag_keys && + granularity == o.granularity && + method == o.method && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [allocated_by, allocated_by_filters, allocated_by_tag_keys, based_on_costs, based_on_timeseries, evaluate_grouped_by_filters, evaluate_grouped_by_tag_keys, granularity, method, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_allocated_by_filters_items.rb b/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_allocated_by_filters_items.rb new file mode 100644 index 000000000000..dbb55535c9e7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_allocated_by_filters_items.rb @@ -0,0 +1,174 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems` object. + class ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems + include BaseGenericModel + + # The `items` `condition`. + attr_reader :condition + + # The `items` `tag`. + attr_reader :tag + + # The `items` `value`. + attr_accessor :value + + # The `items` `values`. + attr_accessor :values + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'condition' => :'condition', + :'tag' => :'tag', + :'value' => :'value', + :'values' => :'values' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'condition' => :'String', + :'tag' => :'String', + :'value' => :'String', + :'values' => :'Array' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'values', + ]) + 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::ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems` 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?(:'condition') + self.condition = attributes[:'condition'] + end + + if attributes.key?(:'tag') + self.tag = attributes[:'tag'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'values') + if (value = attributes[:'values']).is_a?(Array) + self.values = 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 @condition.nil? + return false if @tag.nil? + true + end + + # Custom attribute writer method with validation + # @param condition [Object] Object to be assigned + # @!visibility private + def condition=(condition) + if condition.nil? + fail ArgumentError, 'invalid value for "condition", condition cannot be nil.' + end + @condition = condition + end + + # Custom attribute writer method with validation + # @param tag [Object] Object to be assigned + # @!visibility private + def tag=(tag) + if tag.nil? + fail ArgumentError, 'invalid value for "tag", tag cannot be nil.' + end + @tag = tag + 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 && + condition == o.condition && + tag == o.tag && + value == o.value && + values == o.values && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [condition, tag, value, values, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_allocated_by_items.rb b/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_allocated_by_items.rb new file mode 100644 index 000000000000..0735be53178b --- /dev/null +++ b/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_allocated_by_items.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 + # The definition of `ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems` object. + class ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems + include BaseGenericModel + + # The `items` `allocated_tags`. + attr_reader :allocated_tags + + # The `items` `percentage`. The numeric value format should be a 32bit float value. + attr_reader :percentage + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'allocated_tags' => :'allocated_tags', + :'percentage' => :'percentage' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'allocated_tags' => :'Array', + :'percentage' => :'Float' + } + 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::ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems` 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?(:'allocated_tags') + if (value = attributes[:'allocated_tags']).is_a?(Array) + self.allocated_tags = value + end + end + + if attributes.key?(:'percentage') + self.percentage = attributes[:'percentage'] + 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 @allocated_tags.nil? + return false if @percentage.nil? + true + end + + # Custom attribute writer method with validation + # @param allocated_tags [Object] Object to be assigned + # @!visibility private + def allocated_tags=(allocated_tags) + if allocated_tags.nil? + fail ArgumentError, 'invalid value for "allocated_tags", allocated_tags cannot be nil.' + end + @allocated_tags = allocated_tags + end + + # Custom attribute writer method with validation + # @param percentage [Object] Object to be assigned + # @!visibility private + def percentage=(percentage) + if percentage.nil? + fail ArgumentError, 'invalid value for "percentage", percentage cannot be nil.' + end + @percentage = percentage + 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 && + allocated_tags == o.allocated_tags && + percentage == o.percentage && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [allocated_tags, percentage, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_allocated_by_items_allocated_tags_items.rb b/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_allocated_by_items_allocated_tags_items.rb new file mode 100644 index 000000000000..16ec2fe1ac3d --- /dev/null +++ b/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_allocated_by_items_allocated_tags_items.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems` object. + class ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems + include BaseGenericModel + + # The `items` `key`. + attr_reader :key + + # The `items` `value`. + attr_reader :value + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'key' => :'key', + :'value' => :'value' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'key' => :'String', + :'value' => :'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::ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems` 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?(:'key') + self.key = attributes[:'key'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + 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 @key.nil? + return false if @value.nil? + true + end + + # Custom attribute writer method with validation + # @param key [Object] Object to be assigned + # @!visibility private + def key=(key) + if key.nil? + fail ArgumentError, 'invalid value for "key", key cannot be nil.' + end + @key = key + end + + # Custom attribute writer method with validation + # @param value [Object] Object to be assigned + # @!visibility private + def value=(value) + if value.nil? + fail ArgumentError, 'invalid value for "value", value cannot be nil.' + end + @value = value + 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 && + key == o.key && + value == o.value && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [key, value, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_based_on_costs_items.rb b/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_based_on_costs_items.rb new file mode 100644 index 000000000000..c487017b2945 --- /dev/null +++ b/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_based_on_costs_items.rb @@ -0,0 +1,174 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems` object. + class ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems + include BaseGenericModel + + # The `items` `condition`. + attr_reader :condition + + # The `items` `tag`. + attr_reader :tag + + # The `items` `value`. + attr_accessor :value + + # The `items` `values`. + attr_accessor :values + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'condition' => :'condition', + :'tag' => :'tag', + :'value' => :'value', + :'values' => :'values' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'condition' => :'String', + :'tag' => :'String', + :'value' => :'String', + :'values' => :'Array' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'values', + ]) + 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::ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems` 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?(:'condition') + self.condition = attributes[:'condition'] + end + + if attributes.key?(:'tag') + self.tag = attributes[:'tag'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'values') + if (value = attributes[:'values']).is_a?(Array) + self.values = 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 @condition.nil? + return false if @tag.nil? + true + end + + # Custom attribute writer method with validation + # @param condition [Object] Object to be assigned + # @!visibility private + def condition=(condition) + if condition.nil? + fail ArgumentError, 'invalid value for "condition", condition cannot be nil.' + end + @condition = condition + end + + # Custom attribute writer method with validation + # @param tag [Object] Object to be assigned + # @!visibility private + def tag=(tag) + if tag.nil? + fail ArgumentError, 'invalid value for "tag", tag cannot be nil.' + end + @tag = tag + 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 && + condition == o.condition && + tag == o.tag && + value == o.value && + values == o.values && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [condition, tag, value, values, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_evaluate_grouped_by_filters_items.rb b/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_evaluate_grouped_by_filters_items.rb new file mode 100644 index 000000000000..a8163ce64a65 --- /dev/null +++ b/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_evaluate_grouped_by_filters_items.rb @@ -0,0 +1,174 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems` object. + class ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems + include BaseGenericModel + + # The `items` `condition`. + attr_reader :condition + + # The `items` `tag`. + attr_reader :tag + + # The `items` `value`. + attr_accessor :value + + # The `items` `values`. + attr_accessor :values + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'condition' => :'condition', + :'tag' => :'tag', + :'value' => :'value', + :'values' => :'values' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'condition' => :'String', + :'tag' => :'String', + :'value' => :'String', + :'values' => :'Array' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'values', + ]) + 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::ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems` 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?(:'condition') + self.condition = attributes[:'condition'] + end + + if attributes.key?(:'tag') + self.tag = attributes[:'tag'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'values') + if (value = attributes[:'values']).is_a?(Array) + self.values = 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 @condition.nil? + return false if @tag.nil? + true + end + + # Custom attribute writer method with validation + # @param condition [Object] Object to be assigned + # @!visibility private + def condition=(condition) + if condition.nil? + fail ArgumentError, 'invalid value for "condition", condition cannot be nil.' + end + @condition = condition + end + + # Custom attribute writer method with validation + # @param tag [Object] Object to be assigned + # @!visibility private + def tag=(tag) + if tag.nil? + fail ArgumentError, 'invalid value for "tag", tag cannot be nil.' + end + @tag = tag + 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 && + condition == o.condition && + tag == o.tag && + value == o.value && + values == o.values && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [condition, tag, value, values, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_type.rb b/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_type.rb new file mode 100644 index 000000000000..5ee217b515cb --- /dev/null +++ b/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_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 + # Upsert arbitrary rule resource type. + class ArbitraryCostUpsertRequestDataType + include BaseEnumModel + + UPSERT_ARBITRARY_RULE = "upsert_arbitrary_rule".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/arbitrary_rule_response.rb b/lib/datadog_api_client/v2/models/arbitrary_rule_response.rb new file mode 100644 index 000000000000..a8f153e38cf9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/arbitrary_rule_response.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `ArbitraryRuleResponse` object. + class ArbitraryRuleResponse + include BaseGenericModel + + # The definition of `ArbitraryRuleResponseData` object. + attr_accessor :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' => :'ArbitraryRuleResponseData' + } + 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::ArbitraryRuleResponse` 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 + + # 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/arbitrary_rule_response_array.rb b/lib/datadog_api_client/v2/models/arbitrary_rule_response_array.rb new file mode 100644 index 000000000000..3ce1ec329d16 --- /dev/null +++ b/lib/datadog_api_client/v2/models/arbitrary_rule_response_array.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 + # The definition of `ArbitraryRuleResponseArray` object. + class ArbitraryRuleResponseArray + include BaseGenericModel + + # The `ArbitraryRuleResponseArray` `data`. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'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::ArbitraryRuleResponseArray` 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/arbitrary_rule_response_data.rb b/lib/datadog_api_client/v2/models/arbitrary_rule_response_data.rb new file mode 100644 index 000000000000..9cb2f21b0dcc --- /dev/null +++ b/lib/datadog_api_client/v2/models/arbitrary_rule_response_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `ArbitraryRuleResponseData` object. + class ArbitraryRuleResponseData + include BaseGenericModel + + # The definition of `ArbitraryRuleResponseDataAttributes` object. + attr_accessor :attributes + + # The `ArbitraryRuleResponseData` `id`. + attr_accessor :id + + # Arbitrary rule 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' => :'ArbitraryRuleResponseDataAttributes', + :'id' => :'String', + :'type' => :'ArbitraryRuleResponseDataType' + } + 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::ArbitraryRuleResponseData` 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 @type.nil? + true + 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/arbitrary_rule_response_data_attributes.rb b/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes.rb new file mode 100644 index 000000000000..a761d47165ac --- /dev/null +++ b/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes.rb @@ -0,0 +1,351 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `ArbitraryRuleResponseDataAttributes` object. + class ArbitraryRuleResponseDataAttributes + include BaseGenericModel + + # The `attributes` `costs_to_allocate`. + attr_reader :costs_to_allocate + + # The `attributes` `created`. + attr_reader :created + + # The `attributes` `enabled`. + attr_reader :enabled + + # The `attributes` `last_modified_user_uuid`. + attr_reader :last_modified_user_uuid + + # The `attributes` `order_id`. + attr_reader :order_id + + # The `attributes` `provider`. + attr_reader :provider + + # The `attributes` `rejected`. + attr_accessor :rejected + + # The `attributes` `rule_name`. + attr_reader :rule_name + + # The definition of `ArbitraryRuleResponseDataAttributesStrategy` object. + attr_reader :strategy + + # The `attributes` `type`. + attr_reader :type + + # The `attributes` `updated`. + attr_reader :updated + + # The `attributes` `version`. + attr_reader :version + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'costs_to_allocate' => :'costs_to_allocate', + :'created' => :'created', + :'enabled' => :'enabled', + :'last_modified_user_uuid' => :'last_modified_user_uuid', + :'order_id' => :'order_id', + :'provider' => :'provider', + :'rejected' => :'rejected', + :'rule_name' => :'rule_name', + :'strategy' => :'strategy', + :'type' => :'type', + :'updated' => :'updated', + :'version' => :'version' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'costs_to_allocate' => :'Array', + :'created' => :'Time', + :'enabled' => :'Boolean', + :'last_modified_user_uuid' => :'String', + :'order_id' => :'Integer', + :'provider' => :'Array', + :'rejected' => :'Boolean', + :'rule_name' => :'String', + :'strategy' => :'ArbitraryRuleResponseDataAttributesStrategy', + :'type' => :'String', + :'updated' => :'Time', + :'version' => :'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::ArbitraryRuleResponseDataAttributes` 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?(:'costs_to_allocate') + if (value = attributes[:'costs_to_allocate']).is_a?(Array) + self.costs_to_allocate = value + end + end + + if attributes.key?(:'created') + self.created = attributes[:'created'] + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'last_modified_user_uuid') + self.last_modified_user_uuid = attributes[:'last_modified_user_uuid'] + end + + if attributes.key?(:'order_id') + self.order_id = attributes[:'order_id'] + end + + if attributes.key?(:'provider') + if (value = attributes[:'provider']).is_a?(Array) + self.provider = value + end + end + + if attributes.key?(:'rejected') + self.rejected = attributes[:'rejected'] + end + + if attributes.key?(:'rule_name') + self.rule_name = attributes[:'rule_name'] + end + + if attributes.key?(:'strategy') + self.strategy = attributes[:'strategy'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'updated') + self.updated = attributes[:'updated'] + 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 @costs_to_allocate.nil? + return false if @created.nil? + return false if @enabled.nil? + return false if @last_modified_user_uuid.nil? + return false if @order_id.nil? + return false if @provider.nil? + return false if @rule_name.nil? + return false if @strategy.nil? + return false if @type.nil? + return false if @updated.nil? + return false if @version.nil? + return false if @version > 2147483647 + true + end + + # Custom attribute writer method with validation + # @param costs_to_allocate [Object] Object to be assigned + # @!visibility private + def costs_to_allocate=(costs_to_allocate) + if costs_to_allocate.nil? + fail ArgumentError, 'invalid value for "costs_to_allocate", costs_to_allocate cannot be nil.' + end + @costs_to_allocate = costs_to_allocate + end + + # Custom attribute writer method with validation + # @param created [Object] Object to be assigned + # @!visibility private + def created=(created) + if created.nil? + fail ArgumentError, 'invalid value for "created", created cannot be nil.' + end + @created = created + end + + # Custom attribute writer method with validation + # @param enabled [Object] Object to be assigned + # @!visibility private + def enabled=(enabled) + if enabled.nil? + fail ArgumentError, 'invalid value for "enabled", enabled cannot be nil.' + end + @enabled = enabled + end + + # Custom attribute writer method with validation + # @param last_modified_user_uuid [Object] Object to be assigned + # @!visibility private + def last_modified_user_uuid=(last_modified_user_uuid) + if last_modified_user_uuid.nil? + fail ArgumentError, 'invalid value for "last_modified_user_uuid", last_modified_user_uuid cannot be nil.' + end + @last_modified_user_uuid = last_modified_user_uuid + end + + # Custom attribute writer method with validation + # @param order_id [Object] Object to be assigned + # @!visibility private + def order_id=(order_id) + if order_id.nil? + fail ArgumentError, 'invalid value for "order_id", order_id cannot be nil.' + end + @order_id = order_id + end + + # Custom attribute writer method with validation + # @param provider [Object] Object to be assigned + # @!visibility private + def provider=(provider) + if provider.nil? + fail ArgumentError, 'invalid value for "provider", provider cannot be nil.' + end + @provider = provider + end + + # Custom attribute writer method with validation + # @param rule_name [Object] Object to be assigned + # @!visibility private + def rule_name=(rule_name) + if rule_name.nil? + fail ArgumentError, 'invalid value for "rule_name", rule_name cannot be nil.' + end + @rule_name = rule_name + end + + # Custom attribute writer method with validation + # @param strategy [Object] Object to be assigned + # @!visibility private + def strategy=(strategy) + if strategy.nil? + fail ArgumentError, 'invalid value for "strategy", strategy cannot be nil.' + end + @strategy = strategy + 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 + + # Custom attribute writer method with validation + # @param updated [Object] Object to be assigned + # @!visibility private + def updated=(updated) + if updated.nil? + fail ArgumentError, 'invalid value for "updated", updated cannot be nil.' + end + @updated = updated + 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 + if version > 2147483647 + fail ArgumentError, 'invalid value for "version", must be smaller than or equal to 2147483647.' + 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 && + costs_to_allocate == o.costs_to_allocate && + created == o.created && + enabled == o.enabled && + last_modified_user_uuid == o.last_modified_user_uuid && + order_id == o.order_id && + provider == o.provider && + rejected == o.rejected && + rule_name == o.rule_name && + strategy == o.strategy && + type == o.type && + updated == o.updated && + version == o.version && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [costs_to_allocate, created, enabled, last_modified_user_uuid, order_id, provider, rejected, rule_name, strategy, type, updated, version, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_costs_to_allocate_items.rb b/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_costs_to_allocate_items.rb new file mode 100644 index 000000000000..1a0f90151741 --- /dev/null +++ b/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_costs_to_allocate_items.rb @@ -0,0 +1,174 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `ArbitraryRuleResponseDataAttributesCostsToAllocateItems` object. + class ArbitraryRuleResponseDataAttributesCostsToAllocateItems + include BaseGenericModel + + # The `items` `condition`. + attr_reader :condition + + # The `items` `tag`. + attr_reader :tag + + # The `items` `value`. + attr_accessor :value + + # The `items` `values`. + attr_accessor :values + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'condition' => :'condition', + :'tag' => :'tag', + :'value' => :'value', + :'values' => :'values' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'condition' => :'String', + :'tag' => :'String', + :'value' => :'String', + :'values' => :'Array' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'values', + ]) + 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::ArbitraryRuleResponseDataAttributesCostsToAllocateItems` 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?(:'condition') + self.condition = attributes[:'condition'] + end + + if attributes.key?(:'tag') + self.tag = attributes[:'tag'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'values') + if (value = attributes[:'values']).is_a?(Array) + self.values = 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 @condition.nil? + return false if @tag.nil? + true + end + + # Custom attribute writer method with validation + # @param condition [Object] Object to be assigned + # @!visibility private + def condition=(condition) + if condition.nil? + fail ArgumentError, 'invalid value for "condition", condition cannot be nil.' + end + @condition = condition + end + + # Custom attribute writer method with validation + # @param tag [Object] Object to be assigned + # @!visibility private + def tag=(tag) + if tag.nil? + fail ArgumentError, 'invalid value for "tag", tag cannot be nil.' + end + @tag = tag + 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 && + condition == o.condition && + tag == o.tag && + value == o.value && + values == o.values && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [condition, tag, value, values, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy.rb b/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy.rb new file mode 100644 index 000000000000..d38600f8f065 --- /dev/null +++ b/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy.rb @@ -0,0 +1,215 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `ArbitraryRuleResponseDataAttributesStrategy` object. + class ArbitraryRuleResponseDataAttributesStrategy + include BaseGenericModel + + # The `strategy` `allocated_by`. + attr_accessor :allocated_by + + # The `strategy` `allocated_by_filters`. + attr_accessor :allocated_by_filters + + # The `strategy` `allocated_by_tag_keys`. + attr_accessor :allocated_by_tag_keys + + # The `strategy` `based_on_costs`. + attr_accessor :based_on_costs + + # The rule `strategy` `based_on_timeseries`. + attr_accessor :based_on_timeseries + + # The `strategy` `evaluate_grouped_by_filters`. + attr_accessor :evaluate_grouped_by_filters + + # The `strategy` `evaluate_grouped_by_tag_keys`. + attr_accessor :evaluate_grouped_by_tag_keys + + # The `strategy` `granularity`. + attr_accessor :granularity + + # The `strategy` `method`. + attr_reader :method + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'allocated_by' => :'allocated_by', + :'allocated_by_filters' => :'allocated_by_filters', + :'allocated_by_tag_keys' => :'allocated_by_tag_keys', + :'based_on_costs' => :'based_on_costs', + :'based_on_timeseries' => :'based_on_timeseries', + :'evaluate_grouped_by_filters' => :'evaluate_grouped_by_filters', + :'evaluate_grouped_by_tag_keys' => :'evaluate_grouped_by_tag_keys', + :'granularity' => :'granularity', + :'method' => :'method' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'allocated_by' => :'Array', + :'allocated_by_filters' => :'Array', + :'allocated_by_tag_keys' => :'Array', + :'based_on_costs' => :'Array', + :'based_on_timeseries' => :'Hash', + :'evaluate_grouped_by_filters' => :'Array', + :'evaluate_grouped_by_tag_keys' => :'Array', + :'granularity' => :'String', + :'method' => :'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::ArbitraryRuleResponseDataAttributesStrategy` 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?(:'allocated_by') + if (value = attributes[:'allocated_by']).is_a?(Array) + self.allocated_by = value + end + end + + if attributes.key?(:'allocated_by_filters') + if (value = attributes[:'allocated_by_filters']).is_a?(Array) + self.allocated_by_filters = value + end + end + + if attributes.key?(:'allocated_by_tag_keys') + if (value = attributes[:'allocated_by_tag_keys']).is_a?(Array) + self.allocated_by_tag_keys = value + end + end + + if attributes.key?(:'based_on_costs') + if (value = attributes[:'based_on_costs']).is_a?(Array) + self.based_on_costs = value + end + end + + if attributes.key?(:'based_on_timeseries') + self.based_on_timeseries = attributes[:'based_on_timeseries'] + end + + if attributes.key?(:'evaluate_grouped_by_filters') + if (value = attributes[:'evaluate_grouped_by_filters']).is_a?(Array) + self.evaluate_grouped_by_filters = value + end + end + + if attributes.key?(:'evaluate_grouped_by_tag_keys') + if (value = attributes[:'evaluate_grouped_by_tag_keys']).is_a?(Array) + self.evaluate_grouped_by_tag_keys = value + end + end + + if attributes.key?(:'granularity') + self.granularity = attributes[:'granularity'] + end + + if attributes.key?(:'method') + self.method = attributes[:'method'] + 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 @method.nil? + true + end + + # Custom attribute writer method with validation + # @param method [Object] Object to be assigned + # @!visibility private + def method=(method) + if method.nil? + fail ArgumentError, 'invalid value for "method", method cannot be nil.' + end + @method = method + 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 && + allocated_by == o.allocated_by && + allocated_by_filters == o.allocated_by_filters && + allocated_by_tag_keys == o.allocated_by_tag_keys && + based_on_costs == o.based_on_costs && + based_on_timeseries == o.based_on_timeseries && + evaluate_grouped_by_filters == o.evaluate_grouped_by_filters && + evaluate_grouped_by_tag_keys == o.evaluate_grouped_by_tag_keys && + granularity == o.granularity && + method == o.method && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [allocated_by, allocated_by_filters, allocated_by_tag_keys, based_on_costs, based_on_timeseries, evaluate_grouped_by_filters, evaluate_grouped_by_tag_keys, granularity, method, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_allocated_by_filters_items.rb b/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_allocated_by_filters_items.rb new file mode 100644 index 000000000000..fc5a6cf84624 --- /dev/null +++ b/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_allocated_by_filters_items.rb @@ -0,0 +1,174 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems` object. + class ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems + include BaseGenericModel + + # The `items` `condition`. + attr_reader :condition + + # The `items` `tag`. + attr_reader :tag + + # The `items` `value`. + attr_accessor :value + + # The `items` `values`. + attr_accessor :values + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'condition' => :'condition', + :'tag' => :'tag', + :'value' => :'value', + :'values' => :'values' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'condition' => :'String', + :'tag' => :'String', + :'value' => :'String', + :'values' => :'Array' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'values', + ]) + 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::ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems` 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?(:'condition') + self.condition = attributes[:'condition'] + end + + if attributes.key?(:'tag') + self.tag = attributes[:'tag'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'values') + if (value = attributes[:'values']).is_a?(Array) + self.values = 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 @condition.nil? + return false if @tag.nil? + true + end + + # Custom attribute writer method with validation + # @param condition [Object] Object to be assigned + # @!visibility private + def condition=(condition) + if condition.nil? + fail ArgumentError, 'invalid value for "condition", condition cannot be nil.' + end + @condition = condition + end + + # Custom attribute writer method with validation + # @param tag [Object] Object to be assigned + # @!visibility private + def tag=(tag) + if tag.nil? + fail ArgumentError, 'invalid value for "tag", tag cannot be nil.' + end + @tag = tag + 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 && + condition == o.condition && + tag == o.tag && + value == o.value && + values == o.values && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [condition, tag, value, values, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_allocated_by_items.rb b/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_allocated_by_items.rb new file mode 100644 index 000000000000..ec4da4fbdd76 --- /dev/null +++ b/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_allocated_by_items.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 + # The definition of `ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems` object. + class ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems + include BaseGenericModel + + # The `items` `allocated_tags`. + attr_reader :allocated_tags + + # The `items` `percentage`. The numeric value format should be a 32bit float value. + attr_reader :percentage + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'allocated_tags' => :'allocated_tags', + :'percentage' => :'percentage' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'allocated_tags' => :'Array', + :'percentage' => :'Float' + } + 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::ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems` 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?(:'allocated_tags') + if (value = attributes[:'allocated_tags']).is_a?(Array) + self.allocated_tags = value + end + end + + if attributes.key?(:'percentage') + self.percentage = attributes[:'percentage'] + 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 @allocated_tags.nil? + return false if @percentage.nil? + true + end + + # Custom attribute writer method with validation + # @param allocated_tags [Object] Object to be assigned + # @!visibility private + def allocated_tags=(allocated_tags) + if allocated_tags.nil? + fail ArgumentError, 'invalid value for "allocated_tags", allocated_tags cannot be nil.' + end + @allocated_tags = allocated_tags + end + + # Custom attribute writer method with validation + # @param percentage [Object] Object to be assigned + # @!visibility private + def percentage=(percentage) + if percentage.nil? + fail ArgumentError, 'invalid value for "percentage", percentage cannot be nil.' + end + @percentage = percentage + 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 && + allocated_tags == o.allocated_tags && + percentage == o.percentage && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [allocated_tags, percentage, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_allocated_by_items_allocated_tags_items.rb b/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_allocated_by_items_allocated_tags_items.rb new file mode 100644 index 000000000000..20b5c5b58a69 --- /dev/null +++ b/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_allocated_by_items_allocated_tags_items.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems` object. + class ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems + include BaseGenericModel + + # The `items` `key`. + attr_reader :key + + # The `items` `value`. + attr_reader :value + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'key' => :'key', + :'value' => :'value' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'key' => :'String', + :'value' => :'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::ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems` 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?(:'key') + self.key = attributes[:'key'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + 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 @key.nil? + return false if @value.nil? + true + end + + # Custom attribute writer method with validation + # @param key [Object] Object to be assigned + # @!visibility private + def key=(key) + if key.nil? + fail ArgumentError, 'invalid value for "key", key cannot be nil.' + end + @key = key + end + + # Custom attribute writer method with validation + # @param value [Object] Object to be assigned + # @!visibility private + def value=(value) + if value.nil? + fail ArgumentError, 'invalid value for "value", value cannot be nil.' + end + @value = value + 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 && + key == o.key && + value == o.value && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [key, value, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_based_on_costs_items.rb b/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_based_on_costs_items.rb new file mode 100644 index 000000000000..852b1bbdf3e8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_based_on_costs_items.rb @@ -0,0 +1,174 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems` object. + class ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems + include BaseGenericModel + + # The `items` `condition`. + attr_reader :condition + + # The `items` `tag`. + attr_reader :tag + + # The `items` `value`. + attr_accessor :value + + # The `items` `values`. + attr_accessor :values + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'condition' => :'condition', + :'tag' => :'tag', + :'value' => :'value', + :'values' => :'values' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'condition' => :'String', + :'tag' => :'String', + :'value' => :'String', + :'values' => :'Array' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'values', + ]) + 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::ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems` 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?(:'condition') + self.condition = attributes[:'condition'] + end + + if attributes.key?(:'tag') + self.tag = attributes[:'tag'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'values') + if (value = attributes[:'values']).is_a?(Array) + self.values = 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 @condition.nil? + return false if @tag.nil? + true + end + + # Custom attribute writer method with validation + # @param condition [Object] Object to be assigned + # @!visibility private + def condition=(condition) + if condition.nil? + fail ArgumentError, 'invalid value for "condition", condition cannot be nil.' + end + @condition = condition + end + + # Custom attribute writer method with validation + # @param tag [Object] Object to be assigned + # @!visibility private + def tag=(tag) + if tag.nil? + fail ArgumentError, 'invalid value for "tag", tag cannot be nil.' + end + @tag = tag + 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 && + condition == o.condition && + tag == o.tag && + value == o.value && + values == o.values && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [condition, tag, value, values, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_evaluate_grouped_by_filters_items.rb b/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_evaluate_grouped_by_filters_items.rb new file mode 100644 index 000000000000..37a0a8bdd10f --- /dev/null +++ b/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_evaluate_grouped_by_filters_items.rb @@ -0,0 +1,174 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems` object. + class ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems + include BaseGenericModel + + # The `items` `condition`. + attr_reader :condition + + # The `items` `tag`. + attr_reader :tag + + # The `items` `value`. + attr_accessor :value + + # The `items` `values`. + attr_accessor :values + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'condition' => :'condition', + :'tag' => :'tag', + :'value' => :'value', + :'values' => :'values' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'condition' => :'String', + :'tag' => :'String', + :'value' => :'String', + :'values' => :'Array' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'values', + ]) + 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::ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems` 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?(:'condition') + self.condition = attributes[:'condition'] + end + + if attributes.key?(:'tag') + self.tag = attributes[:'tag'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'values') + if (value = attributes[:'values']).is_a?(Array) + self.values = 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 @condition.nil? + return false if @tag.nil? + true + end + + # Custom attribute writer method with validation + # @param condition [Object] Object to be assigned + # @!visibility private + def condition=(condition) + if condition.nil? + fail ArgumentError, 'invalid value for "condition", condition cannot be nil.' + end + @condition = condition + end + + # Custom attribute writer method with validation + # @param tag [Object] Object to be assigned + # @!visibility private + def tag=(tag) + if tag.nil? + fail ArgumentError, 'invalid value for "tag", tag cannot be nil.' + end + @tag = tag + 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 && + condition == o.condition && + tag == o.tag && + value == o.value && + values == o.values && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [condition, tag, value, values, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_type.rb b/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_type.rb new file mode 100644 index 000000000000..2ab88ebf91bd --- /dev/null +++ b/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_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 + # Arbitrary rule resource type. + class ArbitraryRuleResponseDataType + include BaseEnumModel + + ARBITRARY_RULE = "arbitrary_rule".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/aws_cur_config_attributes.rb b/lib/datadog_api_client/v2/models/aws_cur_config_attributes.rb index 519ea9e70090..819d6a5bf264 100644 --- a/lib/datadog_api_client/v2/models/aws_cur_config_attributes.rb +++ b/lib/datadog_api_client/v2/models/aws_cur_config_attributes.rb @@ -97,6 +97,14 @@ def self.openapi_types } end + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'error_messages', + ]) + end + # Initializes the object # @param attributes [Hash] Model attributes in the form of hash # @!visibility private diff --git a/lib/datadog_api_client/v2/models/aws_cur_config_post_data.rb b/lib/datadog_api_client/v2/models/aws_cur_config_post_data.rb index a914849c4ede..1824d3e113e7 100644 --- a/lib/datadog_api_client/v2/models/aws_cur_config_post_data.rb +++ b/lib/datadog_api_client/v2/models/aws_cur_config_post_data.rb @@ -22,7 +22,7 @@ class AwsCURConfigPostData include BaseGenericModel # Attributes for AWS CUR config Post Request. - attr_reader :attributes + attr_accessor :attributes # Type of AWS CUR config Post Request. attr_reader :type @@ -78,21 +78,10 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? - return false if @attributes.nil? return false if @type.nil? true end - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - # Custom attribute writer method with validation # @param type [Object] Object to be assigned # @!visibility private diff --git a/lib/datadog_api_client/v2/models/aws_cur_config_response.rb b/lib/datadog_api_client/v2/models/aws_cur_config_response.rb index 6b450b3c6e93..b4139d182021 100644 --- a/lib/datadog_api_client/v2/models/aws_cur_config_response.rb +++ b/lib/datadog_api_client/v2/models/aws_cur_config_response.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # Response of AWS CUR config. - class AwsCURConfigResponse + # The definition of `AwsCurConfigResponse` object. + class AwsCurConfigResponse include BaseGenericModel - # AWS CUR config. + # The definition of `AwsCurConfigResponseData` object. attr_accessor :data attr_accessor :additional_properties @@ -38,7 +38,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'AwsCURConfig' + :'data' => :'AwsCurConfigResponseData' } end @@ -47,7 +47,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AwsCURConfigResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AwsCurConfigResponse` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/aws_cur_config_response_data.rb b/lib/datadog_api_client/v2/models/aws_cur_config_response_data.rb new file mode 100644 index 000000000000..cf785c2dfeca --- /dev/null +++ b/lib/datadog_api_client/v2/models/aws_cur_config_response_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `AwsCurConfigResponseData` object. + class AwsCurConfigResponseData + include BaseGenericModel + + # The definition of `AwsCurConfigResponseDataAttributes` object. + attr_accessor :attributes + + # The `AwsCurConfigResponseData` `id`. + attr_accessor :id + + # AWS CUR config 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' => :'AwsCurConfigResponseDataAttributes', + :'id' => :'String', + :'type' => :'AwsCurConfigResponseDataType' + } + 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::AwsCurConfigResponseData` 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 @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aws_cur_config_response_data_attributes.rb b/lib/datadog_api_client/v2/models/aws_cur_config_response_data_attributes.rb new file mode 100644 index 000000000000..ffe6ce345376 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aws_cur_config_response_data_attributes.rb @@ -0,0 +1,225 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `AwsCurConfigResponseDataAttributes` object. + class AwsCurConfigResponseDataAttributes + include BaseGenericModel + + # The definition of `AwsCurConfigResponseDataAttributesAccountFilters` object. + attr_accessor :account_filters + + # The `attributes` `account_id`. + attr_accessor :account_id + + # The `attributes` `bucket_name`. + attr_accessor :bucket_name + + # The `attributes` `bucket_region`. + attr_accessor :bucket_region + + # The `attributes` `created_at`. + attr_accessor :created_at + + # The `attributes` `error_messages`. + attr_accessor :error_messages + + # The `attributes` `months`. + attr_accessor :months + + # The `attributes` `report_name`. + attr_accessor :report_name + + # The `attributes` `report_prefix`. + attr_accessor :report_prefix + + # The `attributes` `status`. + attr_accessor :status + + # The `attributes` `status_updated_at`. + attr_accessor :status_updated_at + + # The `attributes` `updated_at`. + attr_accessor :updated_at + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'account_filters' => :'account_filters', + :'account_id' => :'account_id', + :'bucket_name' => :'bucket_name', + :'bucket_region' => :'bucket_region', + :'created_at' => :'created_at', + :'error_messages' => :'error_messages', + :'months' => :'months', + :'report_name' => :'report_name', + :'report_prefix' => :'report_prefix', + :'status' => :'status', + :'status_updated_at' => :'status_updated_at', + :'updated_at' => :'updated_at' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'account_filters' => :'AwsCurConfigResponseDataAttributesAccountFilters', + :'account_id' => :'String', + :'bucket_name' => :'String', + :'bucket_region' => :'String', + :'created_at' => :'String', + :'error_messages' => :'Array', + :'months' => :'Integer', + :'report_name' => :'String', + :'report_prefix' => :'String', + :'status' => :'String', + :'status_updated_at' => :'String', + :'updated_at' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'error_messages', + ]) + 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::AwsCurConfigResponseDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'account_filters') + self.account_filters = attributes[:'account_filters'] + end + + if attributes.key?(:'account_id') + self.account_id = attributes[:'account_id'] + end + + if attributes.key?(:'bucket_name') + self.bucket_name = attributes[:'bucket_name'] + end + + if attributes.key?(:'bucket_region') + self.bucket_region = attributes[:'bucket_region'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'error_messages') + if (value = attributes[:'error_messages']).is_a?(Array) + self.error_messages = value + end + end + + if attributes.key?(:'months') + self.months = attributes[:'months'] + end + + if attributes.key?(:'report_name') + self.report_name = attributes[:'report_name'] + end + + if attributes.key?(:'report_prefix') + self.report_prefix = attributes[:'report_prefix'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'status_updated_at') + self.status_updated_at = attributes[:'status_updated_at'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + account_filters == o.account_filters && + account_id == o.account_id && + bucket_name == o.bucket_name && + bucket_region == o.bucket_region && + created_at == o.created_at && + error_messages == o.error_messages && + months == o.months && + report_name == o.report_name && + report_prefix == o.report_prefix && + status == o.status && + status_updated_at == o.status_updated_at && + updated_at == o.updated_at && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [account_filters, account_id, bucket_name, bucket_region, created_at, error_messages, months, report_name, report_prefix, status, status_updated_at, updated_at, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aws_cur_config_response_data_attributes_account_filters.rb b/lib/datadog_api_client/v2/models/aws_cur_config_response_data_attributes_account_filters.rb new file mode 100644 index 000000000000..3d8617d18275 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aws_cur_config_response_data_attributes_account_filters.rb @@ -0,0 +1,137 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `AwsCurConfigResponseDataAttributesAccountFilters` object. + class AwsCurConfigResponseDataAttributesAccountFilters + include BaseGenericModel + + # The `account_filters` `excluded_accounts`. + attr_accessor :excluded_accounts + + # The `account_filters` `include_new_accounts`. + attr_accessor :include_new_accounts + + # The `account_filters` `included_accounts`. + attr_accessor :included_accounts + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'excluded_accounts' => :'excluded_accounts', + :'include_new_accounts' => :'include_new_accounts', + :'included_accounts' => :'included_accounts' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'excluded_accounts' => :'Array', + :'include_new_accounts' => :'Boolean', + :'included_accounts' => :'Array' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'include_new_accounts', + ]) + 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::AwsCurConfigResponseDataAttributesAccountFilters` 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?(:'excluded_accounts') + if (value = attributes[:'excluded_accounts']).is_a?(Array) + self.excluded_accounts = value + end + end + + if attributes.key?(:'include_new_accounts') + self.include_new_accounts = attributes[:'include_new_accounts'] + end + + if attributes.key?(:'included_accounts') + if (value = attributes[:'included_accounts']).is_a?(Array) + self.included_accounts = value + end + end + 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 && + excluded_accounts == o.excluded_accounts && + include_new_accounts == o.include_new_accounts && + included_accounts == o.included_accounts && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [excluded_accounts, include_new_accounts, included_accounts, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/aws_cur_config_response_data_type.rb b/lib/datadog_api_client/v2/models/aws_cur_config_response_data_type.rb new file mode 100644 index 000000000000..7fe69681db41 --- /dev/null +++ b/lib/datadog_api_client/v2/models/aws_cur_config_response_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # AWS CUR config resource type. + class AwsCurConfigResponseDataType + include BaseEnumModel + + AWS_CUR_CONFIG = "aws_cur_config".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/aws_cur_configs_response.rb b/lib/datadog_api_client/v2/models/aws_cur_configs_response.rb index b2e104d9149c..7b8de454493a 100644 --- a/lib/datadog_api_client/v2/models/aws_cur_configs_response.rb +++ b/lib/datadog_api_client/v2/models/aws_cur_configs_response.rb @@ -22,7 +22,7 @@ class AwsCURConfigsResponse include BaseGenericModel # An AWS CUR config. - attr_accessor :data + attr_reader :data attr_accessor :additional_properties @@ -67,6 +67,24 @@ def initialize(attributes = {}) 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 diff --git a/lib/datadog_api_client/v2/models/azure_uc_config.rb b/lib/datadog_api_client/v2/models/azure_uc_config.rb index a44deedc8822..872c3ad9f574 100644 --- a/lib/datadog_api_client/v2/models/azure_uc_config.rb +++ b/lib/datadog_api_client/v2/models/azure_uc_config.rb @@ -21,7 +21,7 @@ module DatadogAPIClient::V2 class AzureUCConfig include BaseGenericModel - # The tenant ID of the azure account. + # The tenant ID of the Azure account. attr_reader :account_id # The client ID of the Azure account. @@ -112,6 +112,14 @@ def self.openapi_types } end + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'error_messages', + ]) + end + # Initializes the object # @param attributes [Hash] Model attributes in the form of hash # @!visibility private diff --git a/lib/datadog_api_client/v2/models/azure_uc_config_patch_data.rb b/lib/datadog_api_client/v2/models/azure_uc_config_patch_data.rb index ddf611ed54fa..3c031c1d2603 100644 --- a/lib/datadog_api_client/v2/models/azure_uc_config_patch_data.rb +++ b/lib/datadog_api_client/v2/models/azure_uc_config_patch_data.rb @@ -22,7 +22,7 @@ class AzureUCConfigPatchData include BaseGenericModel # Attributes for Azure config Patch Request. - attr_reader :attributes + attr_accessor :attributes # Type of Azure config Patch Request. attr_reader :type @@ -78,21 +78,10 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? - return false if @attributes.nil? return false if @type.nil? true end - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - # Custom attribute writer method with validation # @param type [Object] Object to be assigned # @!visibility private diff --git a/lib/datadog_api_client/v2/models/azure_uc_config_post_data.rb b/lib/datadog_api_client/v2/models/azure_uc_config_post_data.rb index 0cb7c8c1bc1b..e3f19a332a57 100644 --- a/lib/datadog_api_client/v2/models/azure_uc_config_post_data.rb +++ b/lib/datadog_api_client/v2/models/azure_uc_config_post_data.rb @@ -22,7 +22,7 @@ class AzureUCConfigPostData include BaseGenericModel # Attributes for Azure config Post Request. - attr_reader :attributes + attr_accessor :attributes # Type of Azure config Post Request. attr_reader :type @@ -78,21 +78,10 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? - return false if @attributes.nil? return false if @type.nil? true end - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - # Custom attribute writer method with validation # @param type [Object] Object to be assigned # @!visibility private diff --git a/lib/datadog_api_client/v2/models/azure_uc_config_post_request_attributes.rb b/lib/datadog_api_client/v2/models/azure_uc_config_post_request_attributes.rb index f943c5b122d2..703849977bfa 100644 --- a/lib/datadog_api_client/v2/models/azure_uc_config_post_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/azure_uc_config_post_request_attributes.rb @@ -21,7 +21,7 @@ module DatadogAPIClient::V2 class AzureUCConfigPostRequestAttributes include BaseGenericModel - # The tenant ID of the azure account. + # The tenant ID of the Azure account. attr_reader :account_id # Bill config. @@ -30,12 +30,9 @@ class AzureUCConfigPostRequestAttributes # Bill config. attr_reader :amortized_bill_config - # The client ID of the azure account. + # The client ID of the Azure account. attr_reader :client_id - # Whether or not the Cloud Cost Management account is enabled. - attr_accessor :is_enabled - # The scope of your observed subscription. attr_reader :scope @@ -49,7 +46,6 @@ def self.attribute_map :'actual_bill_config' => :'actual_bill_config', :'amortized_bill_config' => :'amortized_bill_config', :'client_id' => :'client_id', - :'is_enabled' => :'is_enabled', :'scope' => :'scope' } end @@ -62,7 +58,6 @@ def self.openapi_types :'actual_bill_config' => :'BillConfig', :'amortized_bill_config' => :'BillConfig', :'client_id' => :'String', - :'is_enabled' => :'Boolean', :'scope' => :'String' } end @@ -101,10 +96,6 @@ def initialize(attributes = {}) self.client_id = attributes[:'client_id'] end - if attributes.key?(:'is_enabled') - self.is_enabled = attributes[:'is_enabled'] - end - if attributes.key?(:'scope') self.scope = attributes[:'scope'] end @@ -202,7 +193,6 @@ def ==(o) actual_bill_config == o.actual_bill_config && amortized_bill_config == o.amortized_bill_config && client_id == o.client_id && - is_enabled == o.is_enabled && scope == o.scope && additional_properties == o.additional_properties end @@ -211,7 +201,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [account_id, actual_bill_config, amortized_bill_config, client_id, is_enabled, scope, additional_properties].hash + [account_id, actual_bill_config, amortized_bill_config, client_id, scope, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/azure_uc_configs_response.rb b/lib/datadog_api_client/v2/models/azure_uc_configs_response.rb index 67379651ab39..c46a6685dd89 100644 --- a/lib/datadog_api_client/v2/models/azure_uc_configs_response.rb +++ b/lib/datadog_api_client/v2/models/azure_uc_configs_response.rb @@ -22,7 +22,7 @@ class AzureUCConfigsResponse include BaseGenericModel # An Azure config pair. - attr_accessor :data + attr_reader :data attr_accessor :additional_properties @@ -67,6 +67,24 @@ def initialize(attributes = {}) 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 diff --git a/lib/datadog_api_client/v2/models/create_ruleset_request.rb b/lib/datadog_api_client/v2/models/create_ruleset_request.rb new file mode 100644 index 000000000000..42393de553e5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_ruleset_request.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `CreateRulesetRequest` object. + class CreateRulesetRequest + include BaseGenericModel + + # The definition of `CreateRulesetRequestData` object. + attr_accessor :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' => :'CreateRulesetRequestData' + } + 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::CreateRulesetRequest` 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 + + # 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/create_ruleset_request_data.rb b/lib/datadog_api_client/v2/models/create_ruleset_request_data.rb new file mode 100644 index 000000000000..99441e32a854 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_ruleset_request_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `CreateRulesetRequestData` object. + class CreateRulesetRequestData + include BaseGenericModel + + # The definition of `CreateRulesetRequestDataAttributes` object. + attr_accessor :attributes + + # The `CreateRulesetRequestData` `id`. + attr_accessor :id + + # Create ruleset 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' => :'CreateRulesetRequestDataAttributes', + :'id' => :'String', + :'type' => :'CreateRulesetRequestDataType' + } + 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::CreateRulesetRequestData` 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 @type.nil? + true + 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/create_ruleset_request_data_attributes.rb b/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes.rb new file mode 100644 index 000000000000..bccc80f828ae --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `CreateRulesetRequestDataAttributes` object. + class CreateRulesetRequestDataAttributes + include BaseGenericModel + + # The `attributes` `enabled`. + attr_accessor :enabled + + # The `attributes` `rules`. + attr_reader :rules + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled', + :'rules' => :'rules' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'rules' => :'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::CreateRulesetRequestDataAttributes` 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?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'rules') + if (value = attributes[:'rules']).is_a?(Array) + self.rules = 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 @rules.nil? + true + end + + # Custom attribute writer method with validation + # @param rules [Object] Object to be assigned + # @!visibility private + def rules=(rules) + if rules.nil? + fail ArgumentError, 'invalid value for "rules", rules cannot be nil.' + end + @rules = rules + 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 && + enabled == o.enabled && + rules == o.rules && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, rules, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items.rb b/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items.rb new file mode 100644 index 000000000000..66ff2ef9784d --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items.rb @@ -0,0 +1,195 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `CreateRulesetRequestDataAttributesRulesItems` object. + class CreateRulesetRequestDataAttributesRulesItems + include BaseGenericModel + + # The `items` `enabled`. + attr_reader :enabled + + # The definition of `CreateRulesetRequestDataAttributesRulesItemsMapping` object. + attr_accessor :mapping + + # The `items` `metadata`. + attr_accessor :metadata + + # The `items` `name`. + attr_reader :name + + # The definition of `CreateRulesetRequestDataAttributesRulesItemsQuery` object. + attr_accessor :query + + # The definition of `CreateRulesetRequestDataAttributesRulesItemsReferenceTable` object. + attr_accessor :reference_table + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled', + :'mapping' => :'mapping', + :'metadata' => :'metadata', + :'name' => :'name', + :'query' => :'query', + :'reference_table' => :'reference_table' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'mapping' => :'CreateRulesetRequestDataAttributesRulesItemsMapping', + :'metadata' => :'Hash', + :'name' => :'String', + :'query' => :'CreateRulesetRequestDataAttributesRulesItemsQuery', + :'reference_table' => :'CreateRulesetRequestDataAttributesRulesItemsReferenceTable' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'mapping', + :'metadata', + :'query', + :'reference_table', + ]) + 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::CreateRulesetRequestDataAttributesRulesItems` 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?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'mapping') + self.mapping = attributes[:'mapping'] + end + + if attributes.key?(:'metadata') + self.metadata = attributes[:'metadata'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + + if attributes.key?(:'reference_table') + self.reference_table = attributes[:'reference_table'] + 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 @enabled.nil? + return false if @name.nil? + true + end + + # Custom attribute writer method with validation + # @param enabled [Object] Object to be assigned + # @!visibility private + def enabled=(enabled) + if enabled.nil? + fail ArgumentError, 'invalid value for "enabled", enabled cannot be nil.' + end + @enabled = enabled + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + enabled == o.enabled && + mapping == o.mapping && + metadata == o.metadata && + name == o.name && + query == o.query && + reference_table == o.reference_table && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, mapping, metadata, name, query, reference_table, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_mapping.rb b/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_mapping.rb new file mode 100644 index 000000000000..324c9dd611b2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_mapping.rb @@ -0,0 +1,167 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `CreateRulesetRequestDataAttributesRulesItemsMapping` object. + class CreateRulesetRequestDataAttributesRulesItemsMapping + include BaseGenericModel + + # The `mapping` `destination_key`. + attr_reader :destination_key + + # The `mapping` `if_not_exists`. + attr_reader :if_not_exists + + # The `mapping` `source_keys`. + attr_reader :source_keys + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'destination_key' => :'destination_key', + :'if_not_exists' => :'if_not_exists', + :'source_keys' => :'source_keys' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'destination_key' => :'String', + :'if_not_exists' => :'Boolean', + :'source_keys' => :'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::CreateRulesetRequestDataAttributesRulesItemsMapping` 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?(:'destination_key') + self.destination_key = attributes[:'destination_key'] + end + + if attributes.key?(:'if_not_exists') + self.if_not_exists = attributes[:'if_not_exists'] + end + + if attributes.key?(:'source_keys') + if (value = attributes[:'source_keys']).is_a?(Array) + self.source_keys = 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 @destination_key.nil? + return false if @if_not_exists.nil? + return false if @source_keys.nil? + true + end + + # Custom attribute writer method with validation + # @param destination_key [Object] Object to be assigned + # @!visibility private + def destination_key=(destination_key) + if destination_key.nil? + fail ArgumentError, 'invalid value for "destination_key", destination_key cannot be nil.' + end + @destination_key = destination_key + end + + # Custom attribute writer method with validation + # @param if_not_exists [Object] Object to be assigned + # @!visibility private + def if_not_exists=(if_not_exists) + if if_not_exists.nil? + fail ArgumentError, 'invalid value for "if_not_exists", if_not_exists cannot be nil.' + end + @if_not_exists = if_not_exists + end + + # Custom attribute writer method with validation + # @param source_keys [Object] Object to be assigned + # @!visibility private + def source_keys=(source_keys) + if source_keys.nil? + fail ArgumentError, 'invalid value for "source_keys", source_keys cannot be nil.' + end + @source_keys = source_keys + 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 && + destination_key == o.destination_key && + if_not_exists == o.if_not_exists && + source_keys == o.source_keys && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [destination_key, if_not_exists, source_keys, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_query.rb b/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_query.rb new file mode 100644 index 000000000000..26ce1a32631e --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_query.rb @@ -0,0 +1,172 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `CreateRulesetRequestDataAttributesRulesItemsQuery` object. + class CreateRulesetRequestDataAttributesRulesItemsQuery + include BaseGenericModel + + # The definition of `CreateRulesetRequestDataAttributesRulesItemsQueryAddition` object. + attr_accessor :addition + + # The `query` `case_insensitivity`. + attr_accessor :case_insensitivity + + # The `query` `if_not_exists`. + attr_reader :if_not_exists + + # The `query` `query`. + attr_reader :query + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'addition' => :'addition', + :'case_insensitivity' => :'case_insensitivity', + :'if_not_exists' => :'if_not_exists', + :'query' => :'query' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'addition' => :'CreateRulesetRequestDataAttributesRulesItemsQueryAddition', + :'case_insensitivity' => :'Boolean', + :'if_not_exists' => :'Boolean', + :'query' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'addition', + ]) + 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::CreateRulesetRequestDataAttributesRulesItemsQuery` 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?(:'addition') + self.addition = attributes[:'addition'] + end + + if attributes.key?(:'case_insensitivity') + self.case_insensitivity = attributes[:'case_insensitivity'] + end + + if attributes.key?(:'if_not_exists') + self.if_not_exists = attributes[:'if_not_exists'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + 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 @if_not_exists.nil? + return false if @query.nil? + true + end + + # Custom attribute writer method with validation + # @param if_not_exists [Object] Object to be assigned + # @!visibility private + def if_not_exists=(if_not_exists) + if if_not_exists.nil? + fail ArgumentError, 'invalid value for "if_not_exists", if_not_exists cannot be nil.' + end + @if_not_exists = if_not_exists + end + + # Custom attribute writer method with validation + # @param query [Object] Object to be assigned + # @!visibility private + def query=(query) + if query.nil? + fail ArgumentError, 'invalid value for "query", query cannot be nil.' + end + @query = query + 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 && + addition == o.addition && + case_insensitivity == o.case_insensitivity && + if_not_exists == o.if_not_exists && + query == o.query && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [addition, case_insensitivity, if_not_exists, query, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_query_addition.rb b/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_query_addition.rb new file mode 100644 index 000000000000..48bd4634354e --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_query_addition.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `CreateRulesetRequestDataAttributesRulesItemsQueryAddition` object. + class CreateRulesetRequestDataAttributesRulesItemsQueryAddition + include BaseGenericModel + + # The `addition` `key`. + attr_reader :key + + # The `addition` `value`. + attr_reader :value + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'key' => :'key', + :'value' => :'value' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'key' => :'String', + :'value' => :'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::CreateRulesetRequestDataAttributesRulesItemsQueryAddition` 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?(:'key') + self.key = attributes[:'key'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + 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 @key.nil? + return false if @value.nil? + true + end + + # Custom attribute writer method with validation + # @param key [Object] Object to be assigned + # @!visibility private + def key=(key) + if key.nil? + fail ArgumentError, 'invalid value for "key", key cannot be nil.' + end + @key = key + end + + # Custom attribute writer method with validation + # @param value [Object] Object to be assigned + # @!visibility private + def value=(value) + if value.nil? + fail ArgumentError, 'invalid value for "value", value cannot be nil.' + end + @value = value + 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 && + key == o.key && + value == o.value && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [key, value, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_reference_table.rb b/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_reference_table.rb new file mode 100644 index 000000000000..5dd736b6b0a3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_reference_table.rb @@ -0,0 +1,189 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `CreateRulesetRequestDataAttributesRulesItemsReferenceTable` object. + class CreateRulesetRequestDataAttributesRulesItemsReferenceTable + include BaseGenericModel + + # The `reference_table` `case_insensitivity`. + attr_accessor :case_insensitivity + + # The `reference_table` `field_pairs`. + attr_reader :field_pairs + + # The `reference_table` `if_not_exists`. + attr_accessor :if_not_exists + + # The `reference_table` `source_keys`. + attr_reader :source_keys + + # The `reference_table` `table_name`. + attr_reader :table_name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'case_insensitivity' => :'case_insensitivity', + :'field_pairs' => :'field_pairs', + :'if_not_exists' => :'if_not_exists', + :'source_keys' => :'source_keys', + :'table_name' => :'table_name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'case_insensitivity' => :'Boolean', + :'field_pairs' => :'Array', + :'if_not_exists' => :'Boolean', + :'source_keys' => :'Array', + :'table_name' => :'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::CreateRulesetRequestDataAttributesRulesItemsReferenceTable` 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?(:'case_insensitivity') + self.case_insensitivity = attributes[:'case_insensitivity'] + end + + if attributes.key?(:'field_pairs') + if (value = attributes[:'field_pairs']).is_a?(Array) + self.field_pairs = value + end + end + + if attributes.key?(:'if_not_exists') + self.if_not_exists = attributes[:'if_not_exists'] + end + + if attributes.key?(:'source_keys') + if (value = attributes[:'source_keys']).is_a?(Array) + self.source_keys = value + end + end + + if attributes.key?(:'table_name') + self.table_name = attributes[:'table_name'] + 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 @field_pairs.nil? + return false if @source_keys.nil? + return false if @table_name.nil? + true + end + + # Custom attribute writer method with validation + # @param field_pairs [Object] Object to be assigned + # @!visibility private + def field_pairs=(field_pairs) + if field_pairs.nil? + fail ArgumentError, 'invalid value for "field_pairs", field_pairs cannot be nil.' + end + @field_pairs = field_pairs + end + + # Custom attribute writer method with validation + # @param source_keys [Object] Object to be assigned + # @!visibility private + def source_keys=(source_keys) + if source_keys.nil? + fail ArgumentError, 'invalid value for "source_keys", source_keys cannot be nil.' + end + @source_keys = source_keys + end + + # Custom attribute writer method with validation + # @param table_name [Object] Object to be assigned + # @!visibility private + def table_name=(table_name) + if table_name.nil? + fail ArgumentError, 'invalid value for "table_name", table_name cannot be nil.' + end + @table_name = table_name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + case_insensitivity == o.case_insensitivity && + field_pairs == o.field_pairs && + if_not_exists == o.if_not_exists && + source_keys == o.source_keys && + table_name == o.table_name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [case_insensitivity, field_pairs, if_not_exists, source_keys, table_name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_reference_table_field_pairs_items.rb b/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_reference_table_field_pairs_items.rb new file mode 100644 index 000000000000..8dcb8a514d74 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_reference_table_field_pairs_items.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems` object. + class CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems + include BaseGenericModel + + # The `items` `input_column`. + attr_reader :input_column + + # The `items` `output_key`. + attr_reader :output_key + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'input_column' => :'input_column', + :'output_key' => :'output_key' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'input_column' => :'String', + :'output_key' => :'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::CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems` 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?(:'input_column') + self.input_column = attributes[:'input_column'] + end + + if attributes.key?(:'output_key') + self.output_key = attributes[:'output_key'] + 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 @input_column.nil? + return false if @output_key.nil? + true + end + + # Custom attribute writer method with validation + # @param input_column [Object] Object to be assigned + # @!visibility private + def input_column=(input_column) + if input_column.nil? + fail ArgumentError, 'invalid value for "input_column", input_column cannot be nil.' + end + @input_column = input_column + end + + # Custom attribute writer method with validation + # @param output_key [Object] Object to be assigned + # @!visibility private + def output_key=(output_key) + if output_key.nil? + fail ArgumentError, 'invalid value for "output_key", output_key cannot be nil.' + end + @output_key = output_key + 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 && + input_column == o.input_column && + output_key == o.output_key && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [input_column, output_key, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_ruleset_request_data_type.rb b/lib/datadog_api_client/v2/models/create_ruleset_request_data_type.rb new file mode 100644 index 000000000000..061c965beae7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_ruleset_request_data_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 + # Create ruleset resource type. + class CreateRulesetRequestDataType + include BaseEnumModel + + CREATE_RULESET = "create_ruleset".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/gcp_uc_config_response.rb b/lib/datadog_api_client/v2/models/gcp_uc_config_response.rb new file mode 100644 index 000000000000..f79443ea45e8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/gcp_uc_config_response.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `GcpUcConfigResponse` object. + class GcpUcConfigResponse + include BaseGenericModel + + # The definition of `GcpUcConfigResponseData` object. + attr_accessor :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' => :'GcpUcConfigResponseData' + } + 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::GcpUcConfigResponse` 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 + + # 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/gcp_uc_config_response_data.rb b/lib/datadog_api_client/v2/models/gcp_uc_config_response_data.rb new file mode 100644 index 000000000000..634c134764a1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/gcp_uc_config_response_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `GcpUcConfigResponseData` object. + class GcpUcConfigResponseData + include BaseGenericModel + + # The definition of `GcpUcConfigResponseDataAttributes` object. + attr_accessor :attributes + + # The `GcpUcConfigResponseData` `id`. + attr_accessor :id + + # Google Cloud Usage Cost config 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' => :'GcpUcConfigResponseDataAttributes', + :'id' => :'String', + :'type' => :'GcpUcConfigResponseDataType' + } + 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::GcpUcConfigResponseData` 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 @type.nil? + true + 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/gcp_uc_config_response_data_attributes.rb b/lib/datadog_api_client/v2/models/gcp_uc_config_response_data_attributes.rb new file mode 100644 index 000000000000..19b101d6a175 --- /dev/null +++ b/lib/datadog_api_client/v2/models/gcp_uc_config_response_data_attributes.rb @@ -0,0 +1,235 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `GcpUcConfigResponseDataAttributes` object. + class GcpUcConfigResponseDataAttributes + include BaseGenericModel + + # The `attributes` `account_id`. + attr_accessor :account_id + + # The `attributes` `bucket_name`. + attr_accessor :bucket_name + + # The `attributes` `created_at`. + attr_accessor :created_at + + # The `attributes` `dataset`. + attr_accessor :dataset + + # The `attributes` `error_messages`. + attr_accessor :error_messages + + # The `attributes` `export_prefix`. + attr_accessor :export_prefix + + # The `attributes` `export_project_name`. + attr_accessor :export_project_name + + # The `attributes` `months`. + attr_accessor :months + + # The `attributes` `project_id`. + attr_accessor :project_id + + # The `attributes` `service_account`. + attr_accessor :service_account + + # The `attributes` `status`. + attr_accessor :status + + # The `attributes` `status_updated_at`. + attr_accessor :status_updated_at + + # The `attributes` `updated_at`. + attr_accessor :updated_at + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'account_id' => :'account_id', + :'bucket_name' => :'bucket_name', + :'created_at' => :'created_at', + :'dataset' => :'dataset', + :'error_messages' => :'error_messages', + :'export_prefix' => :'export_prefix', + :'export_project_name' => :'export_project_name', + :'months' => :'months', + :'project_id' => :'project_id', + :'service_account' => :'service_account', + :'status' => :'status', + :'status_updated_at' => :'status_updated_at', + :'updated_at' => :'updated_at' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'account_id' => :'String', + :'bucket_name' => :'String', + :'created_at' => :'String', + :'dataset' => :'String', + :'error_messages' => :'Array', + :'export_prefix' => :'String', + :'export_project_name' => :'String', + :'months' => :'Integer', + :'project_id' => :'String', + :'service_account' => :'String', + :'status' => :'String', + :'status_updated_at' => :'String', + :'updated_at' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'error_messages', + ]) + 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::GcpUcConfigResponseDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'account_id') + self.account_id = attributes[:'account_id'] + end + + if attributes.key?(:'bucket_name') + self.bucket_name = attributes[:'bucket_name'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'dataset') + self.dataset = attributes[:'dataset'] + end + + if attributes.key?(:'error_messages') + if (value = attributes[:'error_messages']).is_a?(Array) + self.error_messages = value + end + end + + if attributes.key?(:'export_prefix') + self.export_prefix = attributes[:'export_prefix'] + end + + if attributes.key?(:'export_project_name') + self.export_project_name = attributes[:'export_project_name'] + end + + if attributes.key?(:'months') + self.months = attributes[:'months'] + end + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + end + + if attributes.key?(:'service_account') + self.service_account = attributes[:'service_account'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'status_updated_at') + self.status_updated_at = attributes[:'status_updated_at'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + account_id == o.account_id && + bucket_name == o.bucket_name && + created_at == o.created_at && + dataset == o.dataset && + error_messages == o.error_messages && + export_prefix == o.export_prefix && + export_project_name == o.export_project_name && + months == o.months && + project_id == o.project_id && + service_account == o.service_account && + status == o.status && + status_updated_at == o.status_updated_at && + updated_at == o.updated_at && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [account_id, bucket_name, created_at, dataset, error_messages, export_prefix, export_project_name, months, project_id, service_account, status, status_updated_at, updated_at, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/gcp_uc_config_response_data_type.rb b/lib/datadog_api_client/v2/models/gcp_uc_config_response_data_type.rb new file mode 100644 index 000000000000..a8b6681456e5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/gcp_uc_config_response_data_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 + # Google Cloud Usage Cost config resource type. + class GcpUcConfigResponseDataType + include BaseEnumModel + + GCP_UC_CONFIG = "gcp_uc_config".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/gcp_usage_cost_config.rb b/lib/datadog_api_client/v2/models/gcp_usage_cost_config.rb index 77b5a916a606..fe55672f4c5b 100644 --- a/lib/datadog_api_client/v2/models/gcp_usage_cost_config.rb +++ b/lib/datadog_api_client/v2/models/gcp_usage_cost_config.rb @@ -17,17 +17,17 @@ require 'time' module DatadogAPIClient::V2 - # GCP Usage Cost config. + # Google Cloud Usage Cost config. class GCPUsageCostConfig include BaseGenericModel - # Attributes for a GCP Usage Cost config. + # Attributes for a Google Cloud Usage Cost config. attr_reader :attributes - # The ID of the GCP Usage Cost config. + # The ID of the Google Cloud Usage Cost config. attr_accessor :id - # Type of GCP Usage Cost config. + # Type of Google Cloud Usage Cost config. attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/gcp_usage_cost_config_attributes.rb b/lib/datadog_api_client/v2/models/gcp_usage_cost_config_attributes.rb index 6f7e6fc7072f..24ffadcf2a76 100644 --- a/lib/datadog_api_client/v2/models/gcp_usage_cost_config_attributes.rb +++ b/lib/datadog_api_client/v2/models/gcp_usage_cost_config_attributes.rb @@ -17,47 +17,47 @@ require 'time' module DatadogAPIClient::V2 - # Attributes for a GCP Usage Cost config. + # Attributes for a Google Cloud Usage Cost config. class GCPUsageCostConfigAttributes include BaseGenericModel - # The GCP account ID. + # The Google Cloud account ID. attr_reader :account_id - # The GCP bucket name used to store the Usage Cost export. + # The Google Cloud bucket name used to store the Usage Cost export. attr_reader :bucket_name - # The timestamp when the GCP Usage Cost config was created. + # The timestamp when the Google Cloud Usage Cost config was created. attr_reader :created_at - # The export dataset name used for the GCP Usage Cost Report. + # The export dataset name used for the Google Cloud Usage Cost Report. attr_reader :dataset - # The error messages for the GCP Usage Cost config. + # The error messages for the Google Cloud Usage Cost config. attr_accessor :error_messages - # The export prefix used for the GCP Usage Cost Report. + # The export prefix used for the Google Cloud Usage Cost Report. attr_reader :export_prefix - # The name of the GCP Usage Cost Report. + # The name of the Google Cloud Usage Cost Report. attr_reader :export_project_name # The number of months the report has been backfilled. attr_reader :months - # The `project_id` of the GCP Usage Cost report. + # The `project_id` of the Google Cloud Usage Cost report. attr_accessor :project_id - # The unique GCP service account email. + # The unique Google Cloud service account email. attr_reader :service_account - # The status of the GCP Usage Cost config. + # The status of the Google Cloud Usage Cost config. attr_reader :status - # The timestamp when the GCP Usage Cost config status was updated. + # The timestamp when the Google Cloud Usage Cost config status was updated. attr_reader :status_updated_at - # The timestamp when the GCP Usage Cost config status was updated. + # The timestamp when the Google Cloud Usage Cost config status was updated. attr_reader :updated_at attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_data.rb b/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_data.rb index 1d6a56b62754..086a115aa33c 100644 --- a/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_data.rb +++ b/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_data.rb @@ -17,14 +17,14 @@ require 'time' module DatadogAPIClient::V2 - # GCP Usage Cost config patch data. + # Google Cloud Usage Cost config patch data. class GCPUsageCostConfigPatchData include BaseGenericModel - # Attributes for GCP Usage Cost config patch request. + # Attributes for Google Cloud Usage Cost config patch request. attr_reader :attributes - # Type of GCP Usage Cost config patch request. + # Type of Google Cloud Usage Cost config patch request. attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request.rb b/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request.rb index c92bcd9fd4ba..58c282db73d1 100644 --- a/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request.rb +++ b/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # GCP Usage Cost config patch request. + # Google Cloud Usage Cost config patch request. class GCPUsageCostConfigPatchRequest include BaseGenericModel - # GCP Usage Cost config patch data. + # Google Cloud Usage Cost config patch data. attr_reader :data attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request_attributes.rb b/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request_attributes.rb index fe217a625a37..517da0bfc45b 100644 --- a/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request_attributes.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Attributes for GCP Usage Cost config patch request. + # Attributes for Google Cloud Usage Cost config patch request. class GCPUsageCostConfigPatchRequestAttributes include BaseGenericModel diff --git a/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request_type.rb b/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request_type.rb index fe77b318e6bd..0423d4fce82b 100644 --- a/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request_type.rb +++ b/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Type of GCP Usage Cost config patch request. + # Type of Google Cloud Usage Cost config patch request. class GCPUsageCostConfigPatchRequestType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_data.rb b/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_data.rb index 750196c3e9ea..1306f5bce094 100644 --- a/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_data.rb +++ b/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_data.rb @@ -17,14 +17,14 @@ require 'time' module DatadogAPIClient::V2 - # GCP Usage Cost config post data. + # Google Cloud Usage Cost config post data. class GCPUsageCostConfigPostData include BaseGenericModel - # Attributes for GCP Usage Cost config post request. - attr_reader :attributes + # Attributes for Google Cloud Usage Cost config post request. + attr_accessor :attributes - # Type of GCP Usage Cost config post request. + # Type of Google Cloud Usage Cost config post request. attr_reader :type attr_accessor :additional_properties @@ -78,21 +78,10 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? - return false if @attributes.nil? return false if @type.nil? true end - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - # Custom attribute writer method with validation # @param type [Object] Object to be assigned # @!visibility private diff --git a/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request.rb b/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request.rb index 60d4f81e3d42..c408ed97535c 100644 --- a/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request.rb +++ b/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # GCP Usage Cost config post request. + # Google Cloud Usage Cost config post request. class GCPUsageCostConfigPostRequest include BaseGenericModel - # GCP Usage Cost config post data. + # Google Cloud Usage Cost config post data. attr_reader :data attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request_attributes.rb b/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request_attributes.rb index 74437102f8c1..78880b3c3562 100644 --- a/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request_attributes.rb @@ -17,26 +17,26 @@ require 'time' module DatadogAPIClient::V2 - # Attributes for GCP Usage Cost config post request. + # Attributes for Google Cloud Usage Cost config post request. class GCPUsageCostConfigPostRequestAttributes include BaseGenericModel - # The GCP account ID. + # The Google Cloud account ID. attr_reader :billing_account_id - # The GCP bucket name used to store the Usage Cost export. + # The Google Cloud bucket name used to store the Usage Cost export. attr_reader :bucket_name - # The export dataset name used for the GCP Usage Cost report. + # The export dataset name used for the Google Cloud Usage Cost report. attr_reader :export_dataset_name - # The export prefix used for the GCP Usage Cost report. + # The export prefix used for the Google Cloud Usage Cost report. attr_accessor :export_prefix - # The name of the GCP Usage Cost report. + # The name of the Google Cloud Usage Cost report. attr_reader :export_project_name - # The unique GCP service account email. + # The unique Google Cloud service account email. attr_reader :service_account attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request_type.rb b/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request_type.rb index 4ec5fae812e0..8176b586f6b7 100644 --- a/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request_type.rb +++ b/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Type of GCP Usage Cost config post request. + # Type of Google Cloud Usage Cost config post request. class GCPUsageCostConfigPostRequestType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/gcp_usage_cost_config_response.rb b/lib/datadog_api_client/v2/models/gcp_usage_cost_config_response.rb index 943876e5987a..d1c4fbaf1c81 100644 --- a/lib/datadog_api_client/v2/models/gcp_usage_cost_config_response.rb +++ b/lib/datadog_api_client/v2/models/gcp_usage_cost_config_response.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # Response of GCP Usage Cost config. + # Response of Google Cloud Usage Cost config. class GCPUsageCostConfigResponse include BaseGenericModel - # GCP Usage Cost config. + # Google Cloud Usage Cost config. attr_accessor :data attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/gcp_usage_cost_config_type.rb b/lib/datadog_api_client/v2/models/gcp_usage_cost_config_type.rb index 57fb327460e5..708253d1fe1a 100644 --- a/lib/datadog_api_client/v2/models/gcp_usage_cost_config_type.rb +++ b/lib/datadog_api_client/v2/models/gcp_usage_cost_config_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Type of GCP Usage Cost config. + # Type of Google Cloud Usage Cost config. class GCPUsageCostConfigType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/gcp_usage_cost_configs_response.rb b/lib/datadog_api_client/v2/models/gcp_usage_cost_configs_response.rb index abba9ac62b7c..fab7855681e8 100644 --- a/lib/datadog_api_client/v2/models/gcp_usage_cost_configs_response.rb +++ b/lib/datadog_api_client/v2/models/gcp_usage_cost_configs_response.rb @@ -17,12 +17,12 @@ require 'time' module DatadogAPIClient::V2 - # List of GCP Usage Cost configs. + # List of Google Cloud Usage Cost configs. class GCPUsageCostConfigsResponse include BaseGenericModel - # A GCP Usage Cost config. - attr_accessor :data + # A Google Cloud Usage Cost config. + attr_reader :data attr_accessor :additional_properties @@ -67,6 +67,24 @@ def initialize(attributes = {}) 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 diff --git a/lib/datadog_api_client/v2/models/reorder_rule_resource_array.rb b/lib/datadog_api_client/v2/models/reorder_rule_resource_array.rb new file mode 100644 index 000000000000..eba33ba0a137 --- /dev/null +++ b/lib/datadog_api_client/v2/models/reorder_rule_resource_array.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 + # The definition of `ReorderRuleResourceArray` object. + class ReorderRuleResourceArray + include BaseGenericModel + + # The `ReorderRuleResourceArray` `data`. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'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::ReorderRuleResourceArray` 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/reorder_rule_resource_data.rb b/lib/datadog_api_client/v2/models/reorder_rule_resource_data.rb new file mode 100644 index 000000000000..a4a9dc7bd816 --- /dev/null +++ b/lib/datadog_api_client/v2/models/reorder_rule_resource_data.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `ReorderRuleResourceData` object. + class ReorderRuleResourceData + include BaseGenericModel + + # The `ReorderRuleResourceData` `id`. + attr_accessor :id + + # Arbitrary rule 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 + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'ReorderRuleResourceDataType' + } + 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::ReorderRuleResourceData` 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?(:'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 @type.nil? + true + 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 && + 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 + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/reorder_rule_resource_data_type.rb b/lib/datadog_api_client/v2/models/reorder_rule_resource_data_type.rb new file mode 100644 index 000000000000..bdb16e82482f --- /dev/null +++ b/lib/datadog_api_client/v2/models/reorder_rule_resource_data_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 + # Arbitrary rule resource type. + class ReorderRuleResourceDataType + include BaseEnumModel + + ARBITRARY_RULE = "arbitrary_rule".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/reorder_ruleset_resource_array.rb b/lib/datadog_api_client/v2/models/reorder_ruleset_resource_array.rb new file mode 100644 index 000000000000..b69fb75fef24 --- /dev/null +++ b/lib/datadog_api_client/v2/models/reorder_ruleset_resource_array.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 + # The definition of `ReorderRulesetResourceArray` object. + class ReorderRulesetResourceArray + include BaseGenericModel + + # The `ReorderRulesetResourceArray` `data`. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'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::ReorderRulesetResourceArray` 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/reorder_ruleset_resource_data.rb b/lib/datadog_api_client/v2/models/reorder_ruleset_resource_data.rb new file mode 100644 index 000000000000..f681509a48c2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/reorder_ruleset_resource_data.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `ReorderRulesetResourceData` object. + class ReorderRulesetResourceData + include BaseGenericModel + + # The `ReorderRulesetResourceData` `id`. + attr_accessor :id + + # Ruleset 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 + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'ReorderRulesetResourceDataType' + } + 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::ReorderRulesetResourceData` 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?(:'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 @type.nil? + true + 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 && + 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 + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/reorder_ruleset_resource_data_type.rb b/lib/datadog_api_client/v2/models/reorder_ruleset_resource_data_type.rb new file mode 100644 index 000000000000..d403291a9d69 --- /dev/null +++ b/lib/datadog_api_client/v2/models/reorder_ruleset_resource_data_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 + # Ruleset resource type. + class ReorderRulesetResourceDataType + include BaseEnumModel + + RULESET = "ruleset".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/rules_validate_query_request.rb b/lib/datadog_api_client/v2/models/rules_validate_query_request.rb new file mode 100644 index 000000000000..88797e9177b6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rules_validate_query_request.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `RulesValidateQueryRequest` object. + class RulesValidateQueryRequest + include BaseGenericModel + + # The definition of `RulesValidateQueryRequestData` object. + attr_accessor :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' => :'RulesValidateQueryRequestData' + } + 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::RulesValidateQueryRequest` 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 + + # 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/rules_validate_query_request_data.rb b/lib/datadog_api_client/v2/models/rules_validate_query_request_data.rb new file mode 100644 index 000000000000..1d67ff8654a7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rules_validate_query_request_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `RulesValidateQueryRequestData` object. + class RulesValidateQueryRequestData + include BaseGenericModel + + # The definition of `RulesValidateQueryRequestDataAttributes` object. + attr_accessor :attributes + + # The `RulesValidateQueryRequestData` `id`. + attr_accessor :id + + # Validate query 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' => :'RulesValidateQueryRequestDataAttributes', + :'id' => :'String', + :'type' => :'RulesValidateQueryRequestDataType' + } + 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::RulesValidateQueryRequestData` 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 @type.nil? + true + 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/rules_validate_query_request_data_attributes.rb b/lib/datadog_api_client/v2/models/rules_validate_query_request_data_attributes.rb new file mode 100644 index 000000000000..978a8f35b84d --- /dev/null +++ b/lib/datadog_api_client/v2/models/rules_validate_query_request_data_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 + # The definition of `RulesValidateQueryRequestDataAttributes` object. + class RulesValidateQueryRequestDataAttributes + include BaseGenericModel + + # The `attributes` `Query`. + attr_reader :query + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'query' => :'Query' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'query' => :'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::RulesValidateQueryRequestDataAttributes` 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?(:'query') + self.query = attributes[:'query'] + 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 @query.nil? + true + end + + # Custom attribute writer method with validation + # @param query [Object] Object to be assigned + # @!visibility private + def query=(query) + if query.nil? + fail ArgumentError, 'invalid value for "query", query cannot be nil.' + end + @query = query + 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 && + query == o.query && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [query, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/rules_validate_query_request_data_type.rb b/lib/datadog_api_client/v2/models/rules_validate_query_request_data_type.rb new file mode 100644 index 000000000000..1ede02460e76 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rules_validate_query_request_data_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 + # Validate query resource type. + class RulesValidateQueryRequestDataType + include BaseEnumModel + + VALIDATE_QUERY = "validate_query".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/rules_validate_query_response.rb b/lib/datadog_api_client/v2/models/rules_validate_query_response.rb new file mode 100644 index 000000000000..0453b65ef5a0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rules_validate_query_response.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `RulesValidateQueryResponse` object. + class RulesValidateQueryResponse + include BaseGenericModel + + # The definition of `RulesValidateQueryResponseData` object. + attr_accessor :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' => :'RulesValidateQueryResponseData' + } + 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::RulesValidateQueryResponse` 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 + + # 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/rules_validate_query_response_data.rb b/lib/datadog_api_client/v2/models/rules_validate_query_response_data.rb new file mode 100644 index 000000000000..cb59bb52cd8a --- /dev/null +++ b/lib/datadog_api_client/v2/models/rules_validate_query_response_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `RulesValidateQueryResponseData` object. + class RulesValidateQueryResponseData + include BaseGenericModel + + # The definition of `RulesValidateQueryResponseDataAttributes` object. + attr_accessor :attributes + + # The `RulesValidateQueryResponseData` `id`. + attr_accessor :id + + # Validate response 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' => :'RulesValidateQueryResponseDataAttributes', + :'id' => :'String', + :'type' => :'RulesValidateQueryResponseDataType' + } + 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::RulesValidateQueryResponseData` 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 @type.nil? + true + 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/rules_validate_query_response_data_attributes.rb b/lib/datadog_api_client/v2/models/rules_validate_query_response_data_attributes.rb new file mode 100644 index 000000000000..fca1b7270838 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rules_validate_query_response_data_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 + # The definition of `RulesValidateQueryResponseDataAttributes` object. + class RulesValidateQueryResponseDataAttributes + include BaseGenericModel + + # The `attributes` `Canonical`. + attr_reader :canonical + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'canonical' => :'Canonical' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'canonical' => :'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::RulesValidateQueryResponseDataAttributes` 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?(:'canonical') + self.canonical = attributes[:'canonical'] + 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 @canonical.nil? + true + end + + # Custom attribute writer method with validation + # @param canonical [Object] Object to be assigned + # @!visibility private + def canonical=(canonical) + if canonical.nil? + fail ArgumentError, 'invalid value for "canonical", canonical cannot be nil.' + end + @canonical = canonical + 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 && + canonical == o.canonical && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [canonical, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/rules_validate_query_response_data_type.rb b/lib/datadog_api_client/v2/models/rules_validate_query_response_data_type.rb new file mode 100644 index 000000000000..aec62d738791 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rules_validate_query_response_data_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 + # Validate response resource type. + class RulesValidateQueryResponseDataType + include BaseEnumModel + + VALIDATE_RESPONSE = "validate_response".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/ruleset_resp.rb b/lib/datadog_api_client/v2/models/ruleset_resp.rb new file mode 100644 index 000000000000..3b574f7412a3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/ruleset_resp.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `RulesetResp` object. + class RulesetResp + include BaseGenericModel + + # The definition of `RulesetRespData` object. + attr_accessor :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' => :'RulesetRespData' + } + 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::RulesetResp` 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 + + # 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/ruleset_resp_array.rb b/lib/datadog_api_client/v2/models/ruleset_resp_array.rb new file mode 100644 index 000000000000..156d4654dc4a --- /dev/null +++ b/lib/datadog_api_client/v2/models/ruleset_resp_array.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 + # The definition of `RulesetRespArray` object. + class RulesetRespArray + include BaseGenericModel + + # The `RulesetRespArray` `data`. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'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::RulesetRespArray` 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/ruleset_resp_data.rb b/lib/datadog_api_client/v2/models/ruleset_resp_data.rb new file mode 100644 index 000000000000..65502a64a4da --- /dev/null +++ b/lib/datadog_api_client/v2/models/ruleset_resp_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `RulesetRespData` object. + class RulesetRespData + include BaseGenericModel + + # The definition of `RulesetRespDataAttributes` object. + attr_accessor :attributes + + # The `RulesetRespData` `id`. + attr_accessor :id + + # Ruleset 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' => :'RulesetRespDataAttributes', + :'id' => :'String', + :'type' => :'RulesetRespDataType' + } + 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::RulesetRespData` 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 @type.nil? + true + 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/ruleset_resp_data_attributes.rb b/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes.rb new file mode 100644 index 000000000000..ec3ebf3095ae --- /dev/null +++ b/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes.rb @@ -0,0 +1,276 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `RulesetRespDataAttributes` object. + class RulesetRespDataAttributes + include BaseGenericModel + + # The definition of `RulesetRespDataAttributesCreated` object. + attr_reader :created + + # The `attributes` `enabled`. + attr_reader :enabled + + # The `attributes` `last_modified_user_uuid`. + attr_reader :last_modified_user_uuid + + # The definition of `RulesetRespDataAttributesModified` object. + attr_reader :modified + + # The `attributes` `name`. + attr_reader :name + + # The `attributes` `position`. + attr_reader :position + + # The `attributes` `rules`. + attr_reader :rules + + # The `attributes` `version`. + attr_reader :version + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created' => :'created', + :'enabled' => :'enabled', + :'last_modified_user_uuid' => :'last_modified_user_uuid', + :'modified' => :'modified', + :'name' => :'name', + :'position' => :'position', + :'rules' => :'rules', + :'version' => :'version' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created' => :'RulesetRespDataAttributesCreated', + :'enabled' => :'Boolean', + :'last_modified_user_uuid' => :'String', + :'modified' => :'RulesetRespDataAttributesModified', + :'name' => :'String', + :'position' => :'Integer', + :'rules' => :'Array', + :'version' => :'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::RulesetRespDataAttributes` 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') + self.created = attributes[:'created'] + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'last_modified_user_uuid') + self.last_modified_user_uuid = attributes[:'last_modified_user_uuid'] + end + + if attributes.key?(:'modified') + self.modified = attributes[:'modified'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'position') + self.position = attributes[:'position'] + end + + if attributes.key?(:'rules') + if (value = attributes[:'rules']).is_a?(Array) + self.rules = value + end + 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.nil? + return false if @enabled.nil? + return false if @last_modified_user_uuid.nil? + return false if @modified.nil? + return false if @name.nil? + return false if @position.nil? + return false if @position > 2147483647 + return false if @rules.nil? + return false if @version.nil? + true + end + + # Custom attribute writer method with validation + # @param created [Object] Object to be assigned + # @!visibility private + def created=(created) + if created.nil? + fail ArgumentError, 'invalid value for "created", created cannot be nil.' + end + @created = created + end + + # Custom attribute writer method with validation + # @param enabled [Object] Object to be assigned + # @!visibility private + def enabled=(enabled) + if enabled.nil? + fail ArgumentError, 'invalid value for "enabled", enabled cannot be nil.' + end + @enabled = enabled + end + + # Custom attribute writer method with validation + # @param last_modified_user_uuid [Object] Object to be assigned + # @!visibility private + def last_modified_user_uuid=(last_modified_user_uuid) + if last_modified_user_uuid.nil? + fail ArgumentError, 'invalid value for "last_modified_user_uuid", last_modified_user_uuid cannot be nil.' + end + @last_modified_user_uuid = last_modified_user_uuid + end + + # Custom attribute writer method with validation + # @param modified [Object] Object to be assigned + # @!visibility private + def modified=(modified) + if modified.nil? + fail ArgumentError, 'invalid value for "modified", modified cannot be nil.' + end + @modified = modified + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param position [Object] Object to be assigned + # @!visibility private + def position=(position) + if position.nil? + fail ArgumentError, 'invalid value for "position", position cannot be nil.' + end + if position > 2147483647 + fail ArgumentError, 'invalid value for "position", must be smaller than or equal to 2147483647.' + end + @position = position + end + + # Custom attribute writer method with validation + # @param rules [Object] Object to be assigned + # @!visibility private + def rules=(rules) + if rules.nil? + fail ArgumentError, 'invalid value for "rules", rules cannot be nil.' + end + @rules = rules + 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 == o.created && + enabled == o.enabled && + last_modified_user_uuid == o.last_modified_user_uuid && + modified == o.modified && + name == o.name && + position == o.position && + rules == o.rules && + 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, enabled, last_modified_user_uuid, modified, name, position, rules, version, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_created.rb b/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_created.rb new file mode 100644 index 000000000000..e173e3e1653d --- /dev/null +++ b/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_created.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `RulesetRespDataAttributesCreated` object. + class RulesetRespDataAttributesCreated + include BaseGenericModel + + # The `created` `nanos`. + attr_reader :nanos + + # The `created` `seconds`. + attr_accessor :seconds + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'nanos' => :'nanos', + :'seconds' => :'seconds' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'nanos' => :'Integer', + :'seconds' => :'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::RulesetRespDataAttributesCreated` 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?(:'nanos') + self.nanos = attributes[:'nanos'] + end + + if attributes.key?(:'seconds') + self.seconds = attributes[:'seconds'] + 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 !@nanos.nil? && @nanos > 2147483647 + true + end + + # Custom attribute writer method with validation + # @param nanos [Object] Object to be assigned + # @!visibility private + def nanos=(nanos) + if !nanos.nil? && nanos > 2147483647 + fail ArgumentError, 'invalid value for "nanos", must be smaller than or equal to 2147483647.' + end + @nanos = nanos + 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 && + nanos == o.nanos && + seconds == o.seconds && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [nanos, seconds, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_modified.rb b/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_modified.rb new file mode 100644 index 000000000000..8d448716403d --- /dev/null +++ b/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_modified.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `RulesetRespDataAttributesModified` object. + class RulesetRespDataAttributesModified + include BaseGenericModel + + # The `modified` `nanos`. + attr_reader :nanos + + # The `modified` `seconds`. + attr_accessor :seconds + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'nanos' => :'nanos', + :'seconds' => :'seconds' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'nanos' => :'Integer', + :'seconds' => :'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::RulesetRespDataAttributesModified` 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?(:'nanos') + self.nanos = attributes[:'nanos'] + end + + if attributes.key?(:'seconds') + self.seconds = attributes[:'seconds'] + 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 !@nanos.nil? && @nanos > 2147483647 + true + end + + # Custom attribute writer method with validation + # @param nanos [Object] Object to be assigned + # @!visibility private + def nanos=(nanos) + if !nanos.nil? && nanos > 2147483647 + fail ArgumentError, 'invalid value for "nanos", must be smaller than or equal to 2147483647.' + end + @nanos = nanos + 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 && + nanos == o.nanos && + seconds == o.seconds && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [nanos, seconds, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items.rb b/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items.rb new file mode 100644 index 000000000000..acd70d4bbdeb --- /dev/null +++ b/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items.rb @@ -0,0 +1,195 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `RulesetRespDataAttributesRulesItems` object. + class RulesetRespDataAttributesRulesItems + include BaseGenericModel + + # The `items` `enabled`. + attr_reader :enabled + + # The definition of `RulesetRespDataAttributesRulesItemsMapping` object. + attr_accessor :mapping + + # The `items` `metadata`. + attr_accessor :metadata + + # The `items` `name`. + attr_reader :name + + # The definition of `RulesetRespDataAttributesRulesItemsQuery` object. + attr_accessor :query + + # The definition of `RulesetRespDataAttributesRulesItemsReferenceTable` object. + attr_accessor :reference_table + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled', + :'mapping' => :'mapping', + :'metadata' => :'metadata', + :'name' => :'name', + :'query' => :'query', + :'reference_table' => :'reference_table' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'mapping' => :'RulesetRespDataAttributesRulesItemsMapping', + :'metadata' => :'Hash', + :'name' => :'String', + :'query' => :'RulesetRespDataAttributesRulesItemsQuery', + :'reference_table' => :'RulesetRespDataAttributesRulesItemsReferenceTable' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'mapping', + :'metadata', + :'query', + :'reference_table', + ]) + 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::RulesetRespDataAttributesRulesItems` 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?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'mapping') + self.mapping = attributes[:'mapping'] + end + + if attributes.key?(:'metadata') + self.metadata = attributes[:'metadata'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + + if attributes.key?(:'reference_table') + self.reference_table = attributes[:'reference_table'] + 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 @enabled.nil? + return false if @name.nil? + true + end + + # Custom attribute writer method with validation + # @param enabled [Object] Object to be assigned + # @!visibility private + def enabled=(enabled) + if enabled.nil? + fail ArgumentError, 'invalid value for "enabled", enabled cannot be nil.' + end + @enabled = enabled + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + enabled == o.enabled && + mapping == o.mapping && + metadata == o.metadata && + name == o.name && + query == o.query && + reference_table == o.reference_table && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, mapping, metadata, name, query, reference_table, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_mapping.rb b/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_mapping.rb new file mode 100644 index 000000000000..4fe9606ec4b6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_mapping.rb @@ -0,0 +1,167 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `RulesetRespDataAttributesRulesItemsMapping` object. + class RulesetRespDataAttributesRulesItemsMapping + include BaseGenericModel + + # The `mapping` `destination_key`. + attr_reader :destination_key + + # The `mapping` `if_not_exists`. + attr_reader :if_not_exists + + # The `mapping` `source_keys`. + attr_reader :source_keys + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'destination_key' => :'destination_key', + :'if_not_exists' => :'if_not_exists', + :'source_keys' => :'source_keys' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'destination_key' => :'String', + :'if_not_exists' => :'Boolean', + :'source_keys' => :'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::RulesetRespDataAttributesRulesItemsMapping` 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?(:'destination_key') + self.destination_key = attributes[:'destination_key'] + end + + if attributes.key?(:'if_not_exists') + self.if_not_exists = attributes[:'if_not_exists'] + end + + if attributes.key?(:'source_keys') + if (value = attributes[:'source_keys']).is_a?(Array) + self.source_keys = 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 @destination_key.nil? + return false if @if_not_exists.nil? + return false if @source_keys.nil? + true + end + + # Custom attribute writer method with validation + # @param destination_key [Object] Object to be assigned + # @!visibility private + def destination_key=(destination_key) + if destination_key.nil? + fail ArgumentError, 'invalid value for "destination_key", destination_key cannot be nil.' + end + @destination_key = destination_key + end + + # Custom attribute writer method with validation + # @param if_not_exists [Object] Object to be assigned + # @!visibility private + def if_not_exists=(if_not_exists) + if if_not_exists.nil? + fail ArgumentError, 'invalid value for "if_not_exists", if_not_exists cannot be nil.' + end + @if_not_exists = if_not_exists + end + + # Custom attribute writer method with validation + # @param source_keys [Object] Object to be assigned + # @!visibility private + def source_keys=(source_keys) + if source_keys.nil? + fail ArgumentError, 'invalid value for "source_keys", source_keys cannot be nil.' + end + @source_keys = source_keys + 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 && + destination_key == o.destination_key && + if_not_exists == o.if_not_exists && + source_keys == o.source_keys && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [destination_key, if_not_exists, source_keys, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_query.rb b/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_query.rb new file mode 100644 index 000000000000..88dc95509a97 --- /dev/null +++ b/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_query.rb @@ -0,0 +1,172 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `RulesetRespDataAttributesRulesItemsQuery` object. + class RulesetRespDataAttributesRulesItemsQuery + include BaseGenericModel + + # The definition of `RulesetRespDataAttributesRulesItemsQueryAddition` object. + attr_accessor :addition + + # The `query` `case_insensitivity`. + attr_accessor :case_insensitivity + + # The `query` `if_not_exists`. + attr_reader :if_not_exists + + # The `query` `query`. + attr_reader :query + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'addition' => :'addition', + :'case_insensitivity' => :'case_insensitivity', + :'if_not_exists' => :'if_not_exists', + :'query' => :'query' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'addition' => :'RulesetRespDataAttributesRulesItemsQueryAddition', + :'case_insensitivity' => :'Boolean', + :'if_not_exists' => :'Boolean', + :'query' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'addition', + ]) + 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::RulesetRespDataAttributesRulesItemsQuery` 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?(:'addition') + self.addition = attributes[:'addition'] + end + + if attributes.key?(:'case_insensitivity') + self.case_insensitivity = attributes[:'case_insensitivity'] + end + + if attributes.key?(:'if_not_exists') + self.if_not_exists = attributes[:'if_not_exists'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + 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 @if_not_exists.nil? + return false if @query.nil? + true + end + + # Custom attribute writer method with validation + # @param if_not_exists [Object] Object to be assigned + # @!visibility private + def if_not_exists=(if_not_exists) + if if_not_exists.nil? + fail ArgumentError, 'invalid value for "if_not_exists", if_not_exists cannot be nil.' + end + @if_not_exists = if_not_exists + end + + # Custom attribute writer method with validation + # @param query [Object] Object to be assigned + # @!visibility private + def query=(query) + if query.nil? + fail ArgumentError, 'invalid value for "query", query cannot be nil.' + end + @query = query + 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 && + addition == o.addition && + case_insensitivity == o.case_insensitivity && + if_not_exists == o.if_not_exists && + query == o.query && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [addition, case_insensitivity, if_not_exists, query, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_query_addition.rb b/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_query_addition.rb new file mode 100644 index 000000000000..505c957be07f --- /dev/null +++ b/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_query_addition.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `RulesetRespDataAttributesRulesItemsQueryAddition` object. + class RulesetRespDataAttributesRulesItemsQueryAddition + include BaseGenericModel + + # The `addition` `key`. + attr_reader :key + + # The `addition` `value`. + attr_reader :value + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'key' => :'key', + :'value' => :'value' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'key' => :'String', + :'value' => :'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::RulesetRespDataAttributesRulesItemsQueryAddition` 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?(:'key') + self.key = attributes[:'key'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + 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 @key.nil? + return false if @value.nil? + true + end + + # Custom attribute writer method with validation + # @param key [Object] Object to be assigned + # @!visibility private + def key=(key) + if key.nil? + fail ArgumentError, 'invalid value for "key", key cannot be nil.' + end + @key = key + end + + # Custom attribute writer method with validation + # @param value [Object] Object to be assigned + # @!visibility private + def value=(value) + if value.nil? + fail ArgumentError, 'invalid value for "value", value cannot be nil.' + end + @value = value + 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 && + key == o.key && + value == o.value && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [key, value, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_reference_table.rb b/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_reference_table.rb new file mode 100644 index 000000000000..aa5cfbdccc83 --- /dev/null +++ b/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_reference_table.rb @@ -0,0 +1,189 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `RulesetRespDataAttributesRulesItemsReferenceTable` object. + class RulesetRespDataAttributesRulesItemsReferenceTable + include BaseGenericModel + + # The `reference_table` `case_insensitivity`. + attr_accessor :case_insensitivity + + # The `reference_table` `field_pairs`. + attr_reader :field_pairs + + # The `reference_table` `if_not_exists`. + attr_accessor :if_not_exists + + # The `reference_table` `source_keys`. + attr_reader :source_keys + + # The `reference_table` `table_name`. + attr_reader :table_name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'case_insensitivity' => :'case_insensitivity', + :'field_pairs' => :'field_pairs', + :'if_not_exists' => :'if_not_exists', + :'source_keys' => :'source_keys', + :'table_name' => :'table_name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'case_insensitivity' => :'Boolean', + :'field_pairs' => :'Array', + :'if_not_exists' => :'Boolean', + :'source_keys' => :'Array', + :'table_name' => :'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::RulesetRespDataAttributesRulesItemsReferenceTable` 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?(:'case_insensitivity') + self.case_insensitivity = attributes[:'case_insensitivity'] + end + + if attributes.key?(:'field_pairs') + if (value = attributes[:'field_pairs']).is_a?(Array) + self.field_pairs = value + end + end + + if attributes.key?(:'if_not_exists') + self.if_not_exists = attributes[:'if_not_exists'] + end + + if attributes.key?(:'source_keys') + if (value = attributes[:'source_keys']).is_a?(Array) + self.source_keys = value + end + end + + if attributes.key?(:'table_name') + self.table_name = attributes[:'table_name'] + 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 @field_pairs.nil? + return false if @source_keys.nil? + return false if @table_name.nil? + true + end + + # Custom attribute writer method with validation + # @param field_pairs [Object] Object to be assigned + # @!visibility private + def field_pairs=(field_pairs) + if field_pairs.nil? + fail ArgumentError, 'invalid value for "field_pairs", field_pairs cannot be nil.' + end + @field_pairs = field_pairs + end + + # Custom attribute writer method with validation + # @param source_keys [Object] Object to be assigned + # @!visibility private + def source_keys=(source_keys) + if source_keys.nil? + fail ArgumentError, 'invalid value for "source_keys", source_keys cannot be nil.' + end + @source_keys = source_keys + end + + # Custom attribute writer method with validation + # @param table_name [Object] Object to be assigned + # @!visibility private + def table_name=(table_name) + if table_name.nil? + fail ArgumentError, 'invalid value for "table_name", table_name cannot be nil.' + end + @table_name = table_name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + case_insensitivity == o.case_insensitivity && + field_pairs == o.field_pairs && + if_not_exists == o.if_not_exists && + source_keys == o.source_keys && + table_name == o.table_name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [case_insensitivity, field_pairs, if_not_exists, source_keys, table_name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_reference_table_field_pairs_items.rb b/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_reference_table_field_pairs_items.rb new file mode 100644 index 000000000000..a905be1ffe5c --- /dev/null +++ b/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_reference_table_field_pairs_items.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems` object. + class RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems + include BaseGenericModel + + # The `items` `input_column`. + attr_reader :input_column + + # The `items` `output_key`. + attr_reader :output_key + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'input_column' => :'input_column', + :'output_key' => :'output_key' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'input_column' => :'String', + :'output_key' => :'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::RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems` 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?(:'input_column') + self.input_column = attributes[:'input_column'] + end + + if attributes.key?(:'output_key') + self.output_key = attributes[:'output_key'] + 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 @input_column.nil? + return false if @output_key.nil? + true + end + + # Custom attribute writer method with validation + # @param input_column [Object] Object to be assigned + # @!visibility private + def input_column=(input_column) + if input_column.nil? + fail ArgumentError, 'invalid value for "input_column", input_column cannot be nil.' + end + @input_column = input_column + end + + # Custom attribute writer method with validation + # @param output_key [Object] Object to be assigned + # @!visibility private + def output_key=(output_key) + if output_key.nil? + fail ArgumentError, 'invalid value for "output_key", output_key cannot be nil.' + end + @output_key = output_key + 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 && + input_column == o.input_column && + output_key == o.output_key && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [input_column, output_key, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/ruleset_resp_data_type.rb b/lib/datadog_api_client/v2/models/ruleset_resp_data_type.rb new file mode 100644 index 000000000000..cd01b56ff950 --- /dev/null +++ b/lib/datadog_api_client/v2/models/ruleset_resp_data_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 + # Ruleset resource type. + class RulesetRespDataType + include BaseEnumModel + + RULESET = "ruleset".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/uc_config_pair.rb b/lib/datadog_api_client/v2/models/uc_config_pair.rb new file mode 100644 index 000000000000..a2d7483f9d21 --- /dev/null +++ b/lib/datadog_api_client/v2/models/uc_config_pair.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `UCConfigPair` object. + class UCConfigPair + include BaseGenericModel + + # The definition of `UCConfigPairData` object. + attr_accessor :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' => :'UCConfigPairData' + } + 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::UCConfigPair` 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 + + # 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/uc_config_pair_data.rb b/lib/datadog_api_client/v2/models/uc_config_pair_data.rb new file mode 100644 index 000000000000..8e0d4a9a5e03 --- /dev/null +++ b/lib/datadog_api_client/v2/models/uc_config_pair_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `UCConfigPairData` object. + class UCConfigPairData + include BaseGenericModel + + # The definition of `UCConfigPairDataAttributes` object. + attr_accessor :attributes + + # The `UCConfigPairData` `id`. + attr_accessor :id + + # Azure UC configs 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' => :'UCConfigPairDataAttributes', + :'id' => :'String', + :'type' => :'UCConfigPairDataType' + } + 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::UCConfigPairData` 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 @type.nil? + true + 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/uc_config_pair_data_attributes.rb b/lib/datadog_api_client/v2/models/uc_config_pair_data_attributes.rb new file mode 100644 index 000000000000..5297d4e66c3a --- /dev/null +++ b/lib/datadog_api_client/v2/models/uc_config_pair_data_attributes.rb @@ -0,0 +1,107 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `UCConfigPairDataAttributes` object. + class UCConfigPairDataAttributes + include BaseGenericModel + + # The `attributes` `configs`. + attr_accessor :configs + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'configs' => :'configs' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'configs' => :'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::UCConfigPairDataAttributes` 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?(:'configs') + if (value = attributes[:'configs']).is_a?(Array) + self.configs = value + end + end + 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 && + configs == o.configs && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [configs, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/uc_config_pair_data_attributes_configs_items.rb b/lib/datadog_api_client/v2/models/uc_config_pair_data_attributes_configs_items.rb new file mode 100644 index 000000000000..3304aaf8d6e1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/uc_config_pair_data_attributes_configs_items.rb @@ -0,0 +1,255 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `UCConfigPairDataAttributesConfigsItems` object. + class UCConfigPairDataAttributesConfigsItems + include BaseGenericModel + + # The `items` `account_id`. + attr_accessor :account_id + + # The `items` `client_id`. + attr_accessor :client_id + + # The `items` `created_at`. + attr_accessor :created_at + + # The `items` `dataset_type`. + attr_accessor :dataset_type + + # The `items` `error_messages`. + attr_accessor :error_messages + + # The `items` `export_name`. + attr_accessor :export_name + + # The `items` `export_path`. + attr_accessor :export_path + + # The `items` `id`. + attr_accessor :id + + # The `items` `months`. + attr_accessor :months + + # The `items` `scope`. + attr_accessor :scope + + # The `items` `status`. + attr_accessor :status + + # The `items` `status_updated_at`. + attr_accessor :status_updated_at + + # The `items` `storage_account`. + attr_accessor :storage_account + + # The `items` `storage_container`. + attr_accessor :storage_container + + # The `items` `updated_at`. + attr_accessor :updated_at + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'account_id' => :'account_id', + :'client_id' => :'client_id', + :'created_at' => :'created_at', + :'dataset_type' => :'dataset_type', + :'error_messages' => :'error_messages', + :'export_name' => :'export_name', + :'export_path' => :'export_path', + :'id' => :'id', + :'months' => :'months', + :'scope' => :'scope', + :'status' => :'status', + :'status_updated_at' => :'status_updated_at', + :'storage_account' => :'storage_account', + :'storage_container' => :'storage_container', + :'updated_at' => :'updated_at' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'account_id' => :'String', + :'client_id' => :'String', + :'created_at' => :'String', + :'dataset_type' => :'String', + :'error_messages' => :'Array', + :'export_name' => :'String', + :'export_path' => :'String', + :'id' => :'String', + :'months' => :'Integer', + :'scope' => :'String', + :'status' => :'String', + :'status_updated_at' => :'String', + :'storage_account' => :'String', + :'storage_container' => :'String', + :'updated_at' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'error_messages', + ]) + 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::UCConfigPairDataAttributesConfigsItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'account_id') + self.account_id = attributes[:'account_id'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'dataset_type') + self.dataset_type = attributes[:'dataset_type'] + end + + if attributes.key?(:'error_messages') + if (value = attributes[:'error_messages']).is_a?(Array) + self.error_messages = value + end + end + + if attributes.key?(:'export_name') + self.export_name = attributes[:'export_name'] + end + + if attributes.key?(:'export_path') + self.export_path = attributes[:'export_path'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'months') + self.months = attributes[:'months'] + end + + if attributes.key?(:'scope') + self.scope = attributes[:'scope'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'status_updated_at') + self.status_updated_at = attributes[:'status_updated_at'] + end + + if attributes.key?(:'storage_account') + self.storage_account = attributes[:'storage_account'] + end + + if attributes.key?(:'storage_container') + self.storage_container = attributes[:'storage_container'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + account_id == o.account_id && + client_id == o.client_id && + created_at == o.created_at && + dataset_type == o.dataset_type && + error_messages == o.error_messages && + export_name == o.export_name && + export_path == o.export_path && + id == o.id && + months == o.months && + scope == o.scope && + status == o.status && + status_updated_at == o.status_updated_at && + storage_account == o.storage_account && + storage_container == o.storage_container && + updated_at == o.updated_at && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [account_id, client_id, created_at, dataset_type, error_messages, export_name, export_path, id, months, scope, status, status_updated_at, storage_account, storage_container, updated_at, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/uc_config_pair_data_type.rb b/lib/datadog_api_client/v2/models/uc_config_pair_data_type.rb new file mode 100644 index 000000000000..3a6caa7c74b5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/uc_config_pair_data_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 + # Azure UC configs resource type. + class UCConfigPairDataType + include BaseEnumModel + + AZURE_UC_CONFIGS = "azure_uc_configs".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/update_ruleset_request.rb b/lib/datadog_api_client/v2/models/update_ruleset_request.rb new file mode 100644 index 000000000000..7fbcf48819ab --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_ruleset_request.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `UpdateRulesetRequest` object. + class UpdateRulesetRequest + include BaseGenericModel + + # The definition of `UpdateRulesetRequestData` object. + attr_accessor :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' => :'UpdateRulesetRequestData' + } + 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::UpdateRulesetRequest` 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 + + # 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/update_ruleset_request_data.rb b/lib/datadog_api_client/v2/models/update_ruleset_request_data.rb new file mode 100644 index 000000000000..b1c3af615ce7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_ruleset_request_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `UpdateRulesetRequestData` object. + class UpdateRulesetRequestData + include BaseGenericModel + + # The definition of `UpdateRulesetRequestDataAttributes` object. + attr_accessor :attributes + + # The `UpdateRulesetRequestData` `id`. + attr_accessor :id + + # Update ruleset 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' => :'UpdateRulesetRequestDataAttributes', + :'id' => :'String', + :'type' => :'UpdateRulesetRequestDataType' + } + 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::UpdateRulesetRequestData` 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 @type.nil? + true + 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/update_ruleset_request_data_attributes.rb b/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes.rb new file mode 100644 index 000000000000..8664ce59fb1e --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes.rb @@ -0,0 +1,156 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `UpdateRulesetRequestDataAttributes` object. + class UpdateRulesetRequestDataAttributes + include BaseGenericModel + + # The `attributes` `enabled`. + attr_reader :enabled + + # The `attributes` `last_version`. + attr_accessor :last_version + + # The `attributes` `rules`. + attr_reader :rules + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled', + :'last_version' => :'last_version', + :'rules' => :'rules' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'last_version' => :'Integer', + :'rules' => :'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::UpdateRulesetRequestDataAttributes` 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?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'last_version') + self.last_version = attributes[:'last_version'] + end + + if attributes.key?(:'rules') + if (value = attributes[:'rules']).is_a?(Array) + self.rules = 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 @enabled.nil? + return false if @rules.nil? + true + end + + # Custom attribute writer method with validation + # @param enabled [Object] Object to be assigned + # @!visibility private + def enabled=(enabled) + if enabled.nil? + fail ArgumentError, 'invalid value for "enabled", enabled cannot be nil.' + end + @enabled = enabled + end + + # Custom attribute writer method with validation + # @param rules [Object] Object to be assigned + # @!visibility private + def rules=(rules) + if rules.nil? + fail ArgumentError, 'invalid value for "rules", rules cannot be nil.' + end + @rules = rules + 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 && + enabled == o.enabled && + last_version == o.last_version && + rules == o.rules && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, last_version, rules, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items.rb b/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items.rb new file mode 100644 index 000000000000..831b1228aa81 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items.rb @@ -0,0 +1,195 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `UpdateRulesetRequestDataAttributesRulesItems` object. + class UpdateRulesetRequestDataAttributesRulesItems + include BaseGenericModel + + # The `items` `enabled`. + attr_reader :enabled + + # The definition of `UpdateRulesetRequestDataAttributesRulesItemsMapping` object. + attr_accessor :mapping + + # The `items` `metadata`. + attr_accessor :metadata + + # The `items` `name`. + attr_reader :name + + # The definition of `UpdateRulesetRequestDataAttributesRulesItemsQuery` object. + attr_accessor :query + + # The definition of `UpdateRulesetRequestDataAttributesRulesItemsReferenceTable` object. + attr_accessor :reference_table + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled', + :'mapping' => :'mapping', + :'metadata' => :'metadata', + :'name' => :'name', + :'query' => :'query', + :'reference_table' => :'reference_table' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'mapping' => :'UpdateRulesetRequestDataAttributesRulesItemsMapping', + :'metadata' => :'Hash', + :'name' => :'String', + :'query' => :'UpdateRulesetRequestDataAttributesRulesItemsQuery', + :'reference_table' => :'UpdateRulesetRequestDataAttributesRulesItemsReferenceTable' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'mapping', + :'metadata', + :'query', + :'reference_table', + ]) + 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::UpdateRulesetRequestDataAttributesRulesItems` 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?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'mapping') + self.mapping = attributes[:'mapping'] + end + + if attributes.key?(:'metadata') + self.metadata = attributes[:'metadata'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + + if attributes.key?(:'reference_table') + self.reference_table = attributes[:'reference_table'] + 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 @enabled.nil? + return false if @name.nil? + true + end + + # Custom attribute writer method with validation + # @param enabled [Object] Object to be assigned + # @!visibility private + def enabled=(enabled) + if enabled.nil? + fail ArgumentError, 'invalid value for "enabled", enabled cannot be nil.' + end + @enabled = enabled + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + enabled == o.enabled && + mapping == o.mapping && + metadata == o.metadata && + name == o.name && + query == o.query && + reference_table == o.reference_table && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, mapping, metadata, name, query, reference_table, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_mapping.rb b/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_mapping.rb new file mode 100644 index 000000000000..5e74cc22f75c --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_mapping.rb @@ -0,0 +1,167 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `UpdateRulesetRequestDataAttributesRulesItemsMapping` object. + class UpdateRulesetRequestDataAttributesRulesItemsMapping + include BaseGenericModel + + # The `mapping` `destination_key`. + attr_reader :destination_key + + # The `mapping` `if_not_exists`. + attr_reader :if_not_exists + + # The `mapping` `source_keys`. + attr_reader :source_keys + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'destination_key' => :'destination_key', + :'if_not_exists' => :'if_not_exists', + :'source_keys' => :'source_keys' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'destination_key' => :'String', + :'if_not_exists' => :'Boolean', + :'source_keys' => :'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::UpdateRulesetRequestDataAttributesRulesItemsMapping` 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?(:'destination_key') + self.destination_key = attributes[:'destination_key'] + end + + if attributes.key?(:'if_not_exists') + self.if_not_exists = attributes[:'if_not_exists'] + end + + if attributes.key?(:'source_keys') + if (value = attributes[:'source_keys']).is_a?(Array) + self.source_keys = 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 @destination_key.nil? + return false if @if_not_exists.nil? + return false if @source_keys.nil? + true + end + + # Custom attribute writer method with validation + # @param destination_key [Object] Object to be assigned + # @!visibility private + def destination_key=(destination_key) + if destination_key.nil? + fail ArgumentError, 'invalid value for "destination_key", destination_key cannot be nil.' + end + @destination_key = destination_key + end + + # Custom attribute writer method with validation + # @param if_not_exists [Object] Object to be assigned + # @!visibility private + def if_not_exists=(if_not_exists) + if if_not_exists.nil? + fail ArgumentError, 'invalid value for "if_not_exists", if_not_exists cannot be nil.' + end + @if_not_exists = if_not_exists + end + + # Custom attribute writer method with validation + # @param source_keys [Object] Object to be assigned + # @!visibility private + def source_keys=(source_keys) + if source_keys.nil? + fail ArgumentError, 'invalid value for "source_keys", source_keys cannot be nil.' + end + @source_keys = source_keys + 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 && + destination_key == o.destination_key && + if_not_exists == o.if_not_exists && + source_keys == o.source_keys && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [destination_key, if_not_exists, source_keys, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_query.rb b/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_query.rb new file mode 100644 index 000000000000..d00b3d2c3056 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_query.rb @@ -0,0 +1,172 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `UpdateRulesetRequestDataAttributesRulesItemsQuery` object. + class UpdateRulesetRequestDataAttributesRulesItemsQuery + include BaseGenericModel + + # The definition of `UpdateRulesetRequestDataAttributesRulesItemsQueryAddition` object. + attr_accessor :addition + + # The `query` `case_insensitivity`. + attr_accessor :case_insensitivity + + # The `query` `if_not_exists`. + attr_reader :if_not_exists + + # The `query` `query`. + attr_reader :query + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'addition' => :'addition', + :'case_insensitivity' => :'case_insensitivity', + :'if_not_exists' => :'if_not_exists', + :'query' => :'query' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'addition' => :'UpdateRulesetRequestDataAttributesRulesItemsQueryAddition', + :'case_insensitivity' => :'Boolean', + :'if_not_exists' => :'Boolean', + :'query' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'addition', + ]) + 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::UpdateRulesetRequestDataAttributesRulesItemsQuery` 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?(:'addition') + self.addition = attributes[:'addition'] + end + + if attributes.key?(:'case_insensitivity') + self.case_insensitivity = attributes[:'case_insensitivity'] + end + + if attributes.key?(:'if_not_exists') + self.if_not_exists = attributes[:'if_not_exists'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + 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 @if_not_exists.nil? + return false if @query.nil? + true + end + + # Custom attribute writer method with validation + # @param if_not_exists [Object] Object to be assigned + # @!visibility private + def if_not_exists=(if_not_exists) + if if_not_exists.nil? + fail ArgumentError, 'invalid value for "if_not_exists", if_not_exists cannot be nil.' + end + @if_not_exists = if_not_exists + end + + # Custom attribute writer method with validation + # @param query [Object] Object to be assigned + # @!visibility private + def query=(query) + if query.nil? + fail ArgumentError, 'invalid value for "query", query cannot be nil.' + end + @query = query + 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 && + addition == o.addition && + case_insensitivity == o.case_insensitivity && + if_not_exists == o.if_not_exists && + query == o.query && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [addition, case_insensitivity, if_not_exists, query, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_query_addition.rb b/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_query_addition.rb new file mode 100644 index 000000000000..774dcc20fc15 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_query_addition.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `UpdateRulesetRequestDataAttributesRulesItemsQueryAddition` object. + class UpdateRulesetRequestDataAttributesRulesItemsQueryAddition + include BaseGenericModel + + # The `addition` `key`. + attr_reader :key + + # The `addition` `value`. + attr_reader :value + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'key' => :'key', + :'value' => :'value' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'key' => :'String', + :'value' => :'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::UpdateRulesetRequestDataAttributesRulesItemsQueryAddition` 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?(:'key') + self.key = attributes[:'key'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + 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 @key.nil? + return false if @value.nil? + true + end + + # Custom attribute writer method with validation + # @param key [Object] Object to be assigned + # @!visibility private + def key=(key) + if key.nil? + fail ArgumentError, 'invalid value for "key", key cannot be nil.' + end + @key = key + end + + # Custom attribute writer method with validation + # @param value [Object] Object to be assigned + # @!visibility private + def value=(value) + if value.nil? + fail ArgumentError, 'invalid value for "value", value cannot be nil.' + end + @value = value + 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 && + key == o.key && + value == o.value && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [key, value, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_reference_table.rb b/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_reference_table.rb new file mode 100644 index 000000000000..ff56a52c119a --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_reference_table.rb @@ -0,0 +1,189 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `UpdateRulesetRequestDataAttributesRulesItemsReferenceTable` object. + class UpdateRulesetRequestDataAttributesRulesItemsReferenceTable + include BaseGenericModel + + # The `reference_table` `case_insensitivity`. + attr_accessor :case_insensitivity + + # The `reference_table` `field_pairs`. + attr_reader :field_pairs + + # The `reference_table` `if_not_exists`. + attr_accessor :if_not_exists + + # The `reference_table` `source_keys`. + attr_reader :source_keys + + # The `reference_table` `table_name`. + attr_reader :table_name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'case_insensitivity' => :'case_insensitivity', + :'field_pairs' => :'field_pairs', + :'if_not_exists' => :'if_not_exists', + :'source_keys' => :'source_keys', + :'table_name' => :'table_name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'case_insensitivity' => :'Boolean', + :'field_pairs' => :'Array', + :'if_not_exists' => :'Boolean', + :'source_keys' => :'Array', + :'table_name' => :'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::UpdateRulesetRequestDataAttributesRulesItemsReferenceTable` 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?(:'case_insensitivity') + self.case_insensitivity = attributes[:'case_insensitivity'] + end + + if attributes.key?(:'field_pairs') + if (value = attributes[:'field_pairs']).is_a?(Array) + self.field_pairs = value + end + end + + if attributes.key?(:'if_not_exists') + self.if_not_exists = attributes[:'if_not_exists'] + end + + if attributes.key?(:'source_keys') + if (value = attributes[:'source_keys']).is_a?(Array) + self.source_keys = value + end + end + + if attributes.key?(:'table_name') + self.table_name = attributes[:'table_name'] + 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 @field_pairs.nil? + return false if @source_keys.nil? + return false if @table_name.nil? + true + end + + # Custom attribute writer method with validation + # @param field_pairs [Object] Object to be assigned + # @!visibility private + def field_pairs=(field_pairs) + if field_pairs.nil? + fail ArgumentError, 'invalid value for "field_pairs", field_pairs cannot be nil.' + end + @field_pairs = field_pairs + end + + # Custom attribute writer method with validation + # @param source_keys [Object] Object to be assigned + # @!visibility private + def source_keys=(source_keys) + if source_keys.nil? + fail ArgumentError, 'invalid value for "source_keys", source_keys cannot be nil.' + end + @source_keys = source_keys + end + + # Custom attribute writer method with validation + # @param table_name [Object] Object to be assigned + # @!visibility private + def table_name=(table_name) + if table_name.nil? + fail ArgumentError, 'invalid value for "table_name", table_name cannot be nil.' + end + @table_name = table_name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + case_insensitivity == o.case_insensitivity && + field_pairs == o.field_pairs && + if_not_exists == o.if_not_exists && + source_keys == o.source_keys && + table_name == o.table_name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [case_insensitivity, field_pairs, if_not_exists, source_keys, table_name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_reference_table_field_pairs_items.rb b/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_reference_table_field_pairs_items.rb new file mode 100644 index 000000000000..4ec335937f07 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_reference_table_field_pairs_items.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of `UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems` object. + class UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems + include BaseGenericModel + + # The `items` `input_column`. + attr_reader :input_column + + # The `items` `output_key`. + attr_reader :output_key + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'input_column' => :'input_column', + :'output_key' => :'output_key' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'input_column' => :'String', + :'output_key' => :'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::UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems` 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?(:'input_column') + self.input_column = attributes[:'input_column'] + end + + if attributes.key?(:'output_key') + self.output_key = attributes[:'output_key'] + 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 @input_column.nil? + return false if @output_key.nil? + true + end + + # Custom attribute writer method with validation + # @param input_column [Object] Object to be assigned + # @!visibility private + def input_column=(input_column) + if input_column.nil? + fail ArgumentError, 'invalid value for "input_column", input_column cannot be nil.' + end + @input_column = input_column + end + + # Custom attribute writer method with validation + # @param output_key [Object] Object to be assigned + # @!visibility private + def output_key=(output_key) + if output_key.nil? + fail ArgumentError, 'invalid value for "output_key", output_key cannot be nil.' + end + @output_key = output_key + 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 && + input_column == o.input_column && + output_key == o.output_key && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [input_column, output_key, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_ruleset_request_data_type.rb b/lib/datadog_api_client/v2/models/update_ruleset_request_data_type.rb new file mode 100644 index 000000000000..ba4740c766fa --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_ruleset_request_data_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 + # Update ruleset resource type. + class UpdateRulesetRequestDataType + include BaseEnumModel + + UPDATE_RULESET = "update_ruleset".freeze + end +end