datadog_api_client 2.42.0 → 2.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.generator/schemas/v1/openapi.yaml +3 -7
- data/.generator/schemas/v2/openapi.yaml +2981 -63
- data/.github/CODEOWNERS +4 -4
- data/.github/workflows/reusable-ci.yml +71 -0
- data/.github/workflows/reusable-examples.yml +40 -0
- data/.github/workflows/{test_integration.yml → reusable-integration-test.yml} +66 -17
- data/.github/workflows/reusable-pre-commit.yml +84 -0
- data/.github/workflows/reusable-ruby-test.yml +65 -0
- data/.github/workflows/test.yml +31 -89
- data/CHANGELOG.md +19 -0
- data/examples/v1/dashboards/CreateDashboard_607525069.rb +61 -0
- data/examples/v2/aws-integration/GetAWSIntegrationIAMPermissionsResourceCollection.rb +5 -0
- data/examples/v2/aws-integration/GetAWSIntegrationIAMPermissionsResourceCollection_1008672547.rb +5 -0
- data/examples/v2/aws-integration/GetAWSIntegrationIAMPermissionsStandard.rb +5 -0
- data/examples/v2/aws-integration/GetAWSIntegrationIAMPermissionsStandard_3136299151.rb +5 -0
- data/examples/v2/cloud-cost-management/CreateArbitraryCostRule.rb +63 -0
- data/examples/v2/cloud-cost-management/CreateCostAzureUCConfigs.rb +0 -1
- data/examples/v2/cloud-cost-management/CreateCostGCPUsageCostConfig.rb +1 -1
- data/examples/v2/cloud-cost-management/CreateRuleset.rb +32 -0
- data/examples/v2/cloud-cost-management/DeleteArbitraryCostRule.rb +5 -0
- data/examples/v2/cloud-cost-management/DeleteCostGCPUsageCostConfig.rb +1 -1
- data/examples/v2/cloud-cost-management/DeleteRuleset.rb +5 -0
- data/examples/v2/cloud-cost-management/GetArbitraryCostRule.rb +5 -0
- data/examples/v2/cloud-cost-management/GetCostAWSCURConfig.rb +5 -0
- data/examples/v2/cloud-cost-management/GetCostAzureUCConfig.rb +5 -0
- data/examples/v2/cloud-cost-management/GetCostGCPUsageCostConfig.rb +5 -0
- data/examples/v2/cloud-cost-management/GetRuleset.rb +5 -0
- data/examples/v2/cloud-cost-management/ListArbitraryCostRules.rb +5 -0
- data/examples/v2/cloud-cost-management/ListCostGCPUsageCostConfigs.rb +1 -1
- data/examples/v2/cloud-cost-management/ListRulesets.rb +5 -0
- data/examples/v2/cloud-cost-management/ReorderArbitraryCostRules.rb +22 -0
- data/examples/v2/cloud-cost-management/ReorderRulesets.rb +13 -0
- data/examples/v2/cloud-cost-management/UpdateArbitraryCostRule.rb +63 -0
- data/examples/v2/cloud-cost-management/UpdateCostGCPUsageCostConfig.rb +1 -1
- data/examples/v2/cloud-cost-management/UpdateRuleset.rb +31 -0
- data/examples/v2/cloud-cost-management/ValidateQuery.rb +14 -0
- data/examples/v2/dora-metrics/DeleteDORADeployment.rb +5 -0
- data/examples/v2/dora-metrics/DeleteDORAFailure.rb +5 -0
- data/examples/v2/incidents/CreateIncidentImpact.rb +22 -0
- data/examples/v2/incidents/DeleteIncidentImpact.rb +12 -0
- data/examples/v2/incidents/ListIncidentImpacts.rb +11 -0
- data/examples/v2/key-management/GetCurrentUserApplicationKey.rb +4 -1
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_2899714190.rb +68 -0
- data/examples/v2/security-monitoring/ValidateSecurityMonitoringRule_4152369508.rb +70 -0
- data/lib/datadog_api_client/configuration.rb +3 -0
- data/lib/datadog_api_client/inflector.rb +104 -1
- data/lib/datadog_api_client/v1/api/synthetics_api.rb +1 -3
- data/lib/datadog_api_client/v1/models/formula_and_function_events_data_source.rb +1 -0
- data/lib/datadog_api_client/v2/api/aws_integration_api.rb +120 -0
- data/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb +1211 -126
- data/lib/datadog_api_client/v2/api/dora_metrics_api.rb +130 -0
- data/lib/datadog_api_client/v2/api/incidents_api.rb +229 -0
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +2 -0
- data/lib/datadog_api_client/v2/models/account_filtering_config.rb +8 -0
- data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request.rb +105 -0
- data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes.rb +241 -0
- data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_costs_to_allocate_items.rb +174 -0
- data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy.rb +215 -0
- data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_allocated_by_filters_items.rb +174 -0
- data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_allocated_by_items.rb +146 -0
- data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_allocated_by_items_allocated_tags_items.rb +144 -0
- data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_based_on_costs_items.rb +174 -0
- data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_evaluate_grouped_by_filters_items.rb +174 -0
- data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/arbitrary_rule_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/arbitrary_rule_response_array.rb +125 -0
- data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes.rb +351 -0
- data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_costs_to_allocate_items.rb +174 -0
- data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy.rb +215 -0
- data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_allocated_by_filters_items.rb +174 -0
- data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_allocated_by_items.rb +146 -0
- data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_allocated_by_items_allocated_tags_items.rb +144 -0
- data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_based_on_costs_items.rb +174 -0
- data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_evaluate_grouped_by_filters_items.rb +174 -0
- data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_attributes.rb +8 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_post_data.rb +1 -12
- data/lib/datadog_api_client/v2/models/aws_cur_config_response.rb +5 -5
- data/lib/datadog_api_client/v2/models/aws_cur_config_response_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_response_data_attributes.rb +225 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_response_data_attributes_account_filters.rb +137 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_response_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/aws_cur_configs_response.rb +19 -1
- data/lib/datadog_api_client/v2/models/azure_uc_config.rb +9 -1
- data/lib/datadog_api_client/v2/models/azure_uc_config_patch_data.rb +1 -12
- data/lib/datadog_api_client/v2/models/azure_uc_config_post_data.rb +1 -12
- data/lib/datadog_api_client/v2/models/azure_uc_config_post_request_attributes.rb +3 -13
- data/lib/datadog_api_client/v2/models/azure_uc_configs_response.rb +19 -1
- data/lib/datadog_api_client/v2/models/create_ruleset_request.rb +105 -0
- data/lib/datadog_api_client/v2/models/create_ruleset_request_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes.rb +135 -0
- data/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items.rb +195 -0
- data/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_mapping.rb +167 -0
- data/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_query.rb +172 -0
- data/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_query_addition.rb +144 -0
- data/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_reference_table.rb +189 -0
- data/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_reference_table_field_pairs_items.rb +144 -0
- data/lib/datadog_api_client/v2/models/create_ruleset_request_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/datastore_trigger.rb +105 -0
- data/lib/datadog_api_client/v2/models/datastore_trigger_wrapper.rb +135 -0
- data/lib/datadog_api_client/v2/models/full_api_key_attributes.rb +19 -1
- data/lib/datadog_api_client/v2/models/full_application_key_attributes.rb +12 -1
- data/lib/datadog_api_client/v2/models/gcp_uc_config_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/gcp_uc_config_response_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/gcp_uc_config_response_data_attributes.rb +235 -0
- data/lib/datadog_api_client/v2/models/gcp_uc_config_response_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config.rb +4 -4
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_attributes.rb +13 -13
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_data.rb +3 -3
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request.rb +2 -2
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request_type.rb +1 -1
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_data.rb +4 -15
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request.rb +2 -2
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request_attributes.rb +7 -7
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request_type.rb +1 -1
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_response.rb +2 -2
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_type.rb +1 -1
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_configs_response.rb +21 -3
- data/lib/datadog_api_client/v2/models/historical_job_options.rb +11 -1
- data/lib/datadog_api_client/v2/models/incident_impact_attributes.rb +203 -0
- data/lib/datadog_api_client/v2/models/incident_impact_create_attributes.rb +173 -0
- data/lib/datadog_api_client/v2/models/incident_impact_create_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/incident_impact_create_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/incident_impact_related_object.rb +28 -0
- data/lib/datadog_api_client/v2/models/incident_impact_relationships.rb +125 -0
- data/lib/datadog_api_client/v2/models/incident_impact_response.rb +135 -0
- data/lib/datadog_api_client/v2/models/incident_impact_response_data.rb +164 -0
- data/lib/datadog_api_client/v2/models/incident_impact_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/incident_impacts_response.rb +137 -0
- data/lib/datadog_api_client/v2/models/incident_response_attributes.rb +33 -1
- data/lib/datadog_api_client/v2/models/incident_response_relationships.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_config_destination_item.rb +2 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_google_pub_sub_destination.rb +251 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_google_pub_sub_destination_encoding.rb +27 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_google_pub_sub_destination_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/partial_api_key_attributes.rb +19 -1
- data/lib/datadog_api_client/v2/models/partial_application_key_attributes.rb +12 -1
- data/lib/datadog_api_client/v2/models/relationship_to_incident.rb +123 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/reorder_rule_resource_array.rb +125 -0
- data/lib/datadog_api_client/v2/models/reorder_rule_resource_data.rb +133 -0
- data/lib/datadog_api_client/v2/models/reorder_rule_resource_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/reorder_ruleset_resource_array.rb +125 -0
- data/lib/datadog_api_client/v2/models/reorder_ruleset_resource_data.rb +133 -0
- data/lib/datadog_api_client/v2/models/reorder_ruleset_resource_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/rules_validate_query_request.rb +105 -0
- data/lib/datadog_api_client/v2/models/rules_validate_query_request_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/rules_validate_query_request_data_attributes.rb +123 -0
- data/lib/datadog_api_client/v2/models/rules_validate_query_request_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/rules_validate_query_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/rules_validate_query_response_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/rules_validate_query_response_data_attributes.rb +123 -0
- data/lib/datadog_api_client/v2/models/rules_validate_query_response_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/ruleset_resp.rb +105 -0
- data/lib/datadog_api_client/v2/models/ruleset_resp_array.rb +125 -0
- data/lib/datadog_api_client/v2/models/ruleset_resp_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes.rb +276 -0
- data/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_created.rb +133 -0
- data/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_modified.rb +133 -0
- data/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items.rb +195 -0
- data/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_mapping.rb +167 -0
- data/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_query.rb +172 -0
- data/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_query_addition.rb +144 -0
- data/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_reference_table.rb +189 -0
- data/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_reference_table_field_pairs_items.rb +144 -0
- data/lib/datadog_api_client/v2/models/ruleset_resp_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/rum_application_attributes.rb +22 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_detection_method.rb +1 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb +11 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_sequence_detection_options.rb +119 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_sequence_detection_step.rb +126 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_sequence_detection_step_transition.rb +126 -0
- data/lib/datadog_api_client/v2/models/trigger.rb +1 -0
- data/lib/datadog_api_client/v2/models/uc_config_pair.rb +105 -0
- data/lib/datadog_api_client/v2/models/uc_config_pair_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/uc_config_pair_data_attributes.rb +107 -0
- data/lib/datadog_api_client/v2/models/uc_config_pair_data_attributes_configs_items.rb +255 -0
- data/lib/datadog_api_client/v2/models/uc_config_pair_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/update_ruleset_request.rb +105 -0
- data/lib/datadog_api_client/v2/models/update_ruleset_request_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes.rb +156 -0
- data/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items.rb +195 -0
- data/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_mapping.rb +167 -0
- data/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_query.rb +172 -0
- data/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_query_addition.rb +144 -0
- data/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_reference_table.rb +189 -0
- data/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_reference_table_field_pairs_items.rb +144 -0
- data/lib/datadog_api_client/v2/models/update_ruleset_request_data_type.rb +26 -0
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +137 -3
- data/examples/v1/synthetics/SearchTests_195957771.rb +0 -14
@@ -0,0 +1,241 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V2 Collection
|
3
|
+
|
4
|
+
#Collection of all Datadog Public endpoints.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@datadoghq.com
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
9
|
+
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
13
|
+
|
14
|
+
=end
|
15
|
+
|
16
|
+
require 'date'
|
17
|
+
require 'time'
|
18
|
+
|
19
|
+
module DatadogAPIClient::V2
|
20
|
+
# The definition of `ArbitraryCostUpsertRequestDataAttributes` object.
|
21
|
+
class ArbitraryCostUpsertRequestDataAttributes
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# The `attributes` `costs_to_allocate`.
|
25
|
+
attr_reader :costs_to_allocate
|
26
|
+
|
27
|
+
# The `attributes` `enabled`.
|
28
|
+
attr_accessor :enabled
|
29
|
+
|
30
|
+
# The `attributes` `order_id`.
|
31
|
+
attr_accessor :order_id
|
32
|
+
|
33
|
+
# The `attributes` `provider`.
|
34
|
+
attr_reader :provider
|
35
|
+
|
36
|
+
# The `attributes` `rejected`.
|
37
|
+
attr_accessor :rejected
|
38
|
+
|
39
|
+
# The `attributes` `rule_name`.
|
40
|
+
attr_reader :rule_name
|
41
|
+
|
42
|
+
# The definition of `ArbitraryCostUpsertRequestDataAttributesStrategy` object.
|
43
|
+
attr_reader :strategy
|
44
|
+
|
45
|
+
# The `attributes` `type`.
|
46
|
+
attr_reader :type
|
47
|
+
|
48
|
+
attr_accessor :additional_properties
|
49
|
+
|
50
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
51
|
+
# @!visibility private
|
52
|
+
def self.attribute_map
|
53
|
+
{
|
54
|
+
:'costs_to_allocate' => :'costs_to_allocate',
|
55
|
+
:'enabled' => :'enabled',
|
56
|
+
:'order_id' => :'order_id',
|
57
|
+
:'provider' => :'provider',
|
58
|
+
:'rejected' => :'rejected',
|
59
|
+
:'rule_name' => :'rule_name',
|
60
|
+
:'strategy' => :'strategy',
|
61
|
+
:'type' => :'type'
|
62
|
+
}
|
63
|
+
end
|
64
|
+
|
65
|
+
# Attribute type mapping.
|
66
|
+
# @!visibility private
|
67
|
+
def self.openapi_types
|
68
|
+
{
|
69
|
+
:'costs_to_allocate' => :'Array<ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems>',
|
70
|
+
:'enabled' => :'Boolean',
|
71
|
+
:'order_id' => :'Integer',
|
72
|
+
:'provider' => :'Array<String>',
|
73
|
+
:'rejected' => :'Boolean',
|
74
|
+
:'rule_name' => :'String',
|
75
|
+
:'strategy' => :'ArbitraryCostUpsertRequestDataAttributesStrategy',
|
76
|
+
:'type' => :'String'
|
77
|
+
}
|
78
|
+
end
|
79
|
+
|
80
|
+
# Initializes the object
|
81
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
82
|
+
# @!visibility private
|
83
|
+
def initialize(attributes = {})
|
84
|
+
if (!attributes.is_a?(Hash))
|
85
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ArbitraryCostUpsertRequestDataAttributes` initialize method"
|
86
|
+
end
|
87
|
+
|
88
|
+
self.additional_properties = {}
|
89
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
90
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
91
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
92
|
+
self.additional_properties[k.to_sym] = v
|
93
|
+
else
|
94
|
+
h[k.to_sym] = v
|
95
|
+
end
|
96
|
+
}
|
97
|
+
|
98
|
+
if attributes.key?(:'costs_to_allocate')
|
99
|
+
if (value = attributes[:'costs_to_allocate']).is_a?(Array)
|
100
|
+
self.costs_to_allocate = value
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
if attributes.key?(:'enabled')
|
105
|
+
self.enabled = attributes[:'enabled']
|
106
|
+
end
|
107
|
+
|
108
|
+
if attributes.key?(:'order_id')
|
109
|
+
self.order_id = attributes[:'order_id']
|
110
|
+
end
|
111
|
+
|
112
|
+
if attributes.key?(:'provider')
|
113
|
+
if (value = attributes[:'provider']).is_a?(Array)
|
114
|
+
self.provider = value
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes.key?(:'rejected')
|
119
|
+
self.rejected = attributes[:'rejected']
|
120
|
+
end
|
121
|
+
|
122
|
+
if attributes.key?(:'rule_name')
|
123
|
+
self.rule_name = attributes[:'rule_name']
|
124
|
+
end
|
125
|
+
|
126
|
+
if attributes.key?(:'strategy')
|
127
|
+
self.strategy = attributes[:'strategy']
|
128
|
+
end
|
129
|
+
|
130
|
+
if attributes.key?(:'type')
|
131
|
+
self.type = attributes[:'type']
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
# Check to see if the all the properties in the model are valid
|
136
|
+
# @return true if the model is valid
|
137
|
+
# @!visibility private
|
138
|
+
def valid?
|
139
|
+
return false if @costs_to_allocate.nil?
|
140
|
+
return false if @provider.nil?
|
141
|
+
return false if @rule_name.nil?
|
142
|
+
return false if @strategy.nil?
|
143
|
+
return false if @type.nil?
|
144
|
+
true
|
145
|
+
end
|
146
|
+
|
147
|
+
# Custom attribute writer method with validation
|
148
|
+
# @param costs_to_allocate [Object] Object to be assigned
|
149
|
+
# @!visibility private
|
150
|
+
def costs_to_allocate=(costs_to_allocate)
|
151
|
+
if costs_to_allocate.nil?
|
152
|
+
fail ArgumentError, 'invalid value for "costs_to_allocate", costs_to_allocate cannot be nil.'
|
153
|
+
end
|
154
|
+
@costs_to_allocate = costs_to_allocate
|
155
|
+
end
|
156
|
+
|
157
|
+
# Custom attribute writer method with validation
|
158
|
+
# @param provider [Object] Object to be assigned
|
159
|
+
# @!visibility private
|
160
|
+
def provider=(provider)
|
161
|
+
if provider.nil?
|
162
|
+
fail ArgumentError, 'invalid value for "provider", provider cannot be nil.'
|
163
|
+
end
|
164
|
+
@provider = provider
|
165
|
+
end
|
166
|
+
|
167
|
+
# Custom attribute writer method with validation
|
168
|
+
# @param rule_name [Object] Object to be assigned
|
169
|
+
# @!visibility private
|
170
|
+
def rule_name=(rule_name)
|
171
|
+
if rule_name.nil?
|
172
|
+
fail ArgumentError, 'invalid value for "rule_name", rule_name cannot be nil.'
|
173
|
+
end
|
174
|
+
@rule_name = rule_name
|
175
|
+
end
|
176
|
+
|
177
|
+
# Custom attribute writer method with validation
|
178
|
+
# @param strategy [Object] Object to be assigned
|
179
|
+
# @!visibility private
|
180
|
+
def strategy=(strategy)
|
181
|
+
if strategy.nil?
|
182
|
+
fail ArgumentError, 'invalid value for "strategy", strategy cannot be nil.'
|
183
|
+
end
|
184
|
+
@strategy = strategy
|
185
|
+
end
|
186
|
+
|
187
|
+
# Custom attribute writer method with validation
|
188
|
+
# @param type [Object] Object to be assigned
|
189
|
+
# @!visibility private
|
190
|
+
def type=(type)
|
191
|
+
if type.nil?
|
192
|
+
fail ArgumentError, 'invalid value for "type", type cannot be nil.'
|
193
|
+
end
|
194
|
+
@type = type
|
195
|
+
end
|
196
|
+
|
197
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
198
|
+
# @return [Hash] Returns the object in the form of hash
|
199
|
+
# @!visibility private
|
200
|
+
def to_hash
|
201
|
+
hash = {}
|
202
|
+
self.class.attribute_map.each_pair do |attr, param|
|
203
|
+
value = self.send(attr)
|
204
|
+
if value.nil?
|
205
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
206
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
207
|
+
end
|
208
|
+
|
209
|
+
hash[param] = _to_hash(value)
|
210
|
+
end
|
211
|
+
self.additional_properties.each_pair do |attr, value|
|
212
|
+
hash[attr] = value
|
213
|
+
end
|
214
|
+
hash
|
215
|
+
end
|
216
|
+
|
217
|
+
# Checks equality by comparing each attribute.
|
218
|
+
# @param o [Object] Object to be compared
|
219
|
+
# @!visibility private
|
220
|
+
def ==(o)
|
221
|
+
return true if self.equal?(o)
|
222
|
+
self.class == o.class &&
|
223
|
+
costs_to_allocate == o.costs_to_allocate &&
|
224
|
+
enabled == o.enabled &&
|
225
|
+
order_id == o.order_id &&
|
226
|
+
provider == o.provider &&
|
227
|
+
rejected == o.rejected &&
|
228
|
+
rule_name == o.rule_name &&
|
229
|
+
strategy == o.strategy &&
|
230
|
+
type == o.type &&
|
231
|
+
additional_properties == o.additional_properties
|
232
|
+
end
|
233
|
+
|
234
|
+
# Calculates hash code according to all attributes.
|
235
|
+
# @return [Integer] Hash code
|
236
|
+
# @!visibility private
|
237
|
+
def hash
|
238
|
+
[costs_to_allocate, enabled, order_id, provider, rejected, rule_name, strategy, type, additional_properties].hash
|
239
|
+
end
|
240
|
+
end
|
241
|
+
end
|
@@ -0,0 +1,174 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V2 Collection
|
3
|
+
|
4
|
+
#Collection of all Datadog Public endpoints.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@datadoghq.com
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
9
|
+
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
13
|
+
|
14
|
+
=end
|
15
|
+
|
16
|
+
require 'date'
|
17
|
+
require 'time'
|
18
|
+
|
19
|
+
module DatadogAPIClient::V2
|
20
|
+
# The definition of `ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems` object.
|
21
|
+
class ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# The `items` `condition`.
|
25
|
+
attr_reader :condition
|
26
|
+
|
27
|
+
# The `items` `tag`.
|
28
|
+
attr_reader :tag
|
29
|
+
|
30
|
+
# The `items` `value`.
|
31
|
+
attr_accessor :value
|
32
|
+
|
33
|
+
# The `items` `values`.
|
34
|
+
attr_accessor :values
|
35
|
+
|
36
|
+
attr_accessor :additional_properties
|
37
|
+
|
38
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
39
|
+
# @!visibility private
|
40
|
+
def self.attribute_map
|
41
|
+
{
|
42
|
+
:'condition' => :'condition',
|
43
|
+
:'tag' => :'tag',
|
44
|
+
:'value' => :'value',
|
45
|
+
:'values' => :'values'
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
# Attribute type mapping.
|
50
|
+
# @!visibility private
|
51
|
+
def self.openapi_types
|
52
|
+
{
|
53
|
+
:'condition' => :'String',
|
54
|
+
:'tag' => :'String',
|
55
|
+
:'value' => :'String',
|
56
|
+
:'values' => :'Array<String>'
|
57
|
+
}
|
58
|
+
end
|
59
|
+
|
60
|
+
# List of attributes with nullable: true
|
61
|
+
# @!visibility private
|
62
|
+
def self.openapi_nullable
|
63
|
+
Set.new([
|
64
|
+
:'values',
|
65
|
+
])
|
66
|
+
end
|
67
|
+
|
68
|
+
# Initializes the object
|
69
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
70
|
+
# @!visibility private
|
71
|
+
def initialize(attributes = {})
|
72
|
+
if (!attributes.is_a?(Hash))
|
73
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems` initialize method"
|
74
|
+
end
|
75
|
+
|
76
|
+
self.additional_properties = {}
|
77
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
78
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
79
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
80
|
+
self.additional_properties[k.to_sym] = v
|
81
|
+
else
|
82
|
+
h[k.to_sym] = v
|
83
|
+
end
|
84
|
+
}
|
85
|
+
|
86
|
+
if attributes.key?(:'condition')
|
87
|
+
self.condition = attributes[:'condition']
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes.key?(:'tag')
|
91
|
+
self.tag = attributes[:'tag']
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes.key?(:'value')
|
95
|
+
self.value = attributes[:'value']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes.key?(:'values')
|
99
|
+
if (value = attributes[:'values']).is_a?(Array)
|
100
|
+
self.values = value
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
# Check to see if the all the properties in the model are valid
|
106
|
+
# @return true if the model is valid
|
107
|
+
# @!visibility private
|
108
|
+
def valid?
|
109
|
+
return false if @condition.nil?
|
110
|
+
return false if @tag.nil?
|
111
|
+
true
|
112
|
+
end
|
113
|
+
|
114
|
+
# Custom attribute writer method with validation
|
115
|
+
# @param condition [Object] Object to be assigned
|
116
|
+
# @!visibility private
|
117
|
+
def condition=(condition)
|
118
|
+
if condition.nil?
|
119
|
+
fail ArgumentError, 'invalid value for "condition", condition cannot be nil.'
|
120
|
+
end
|
121
|
+
@condition = condition
|
122
|
+
end
|
123
|
+
|
124
|
+
# Custom attribute writer method with validation
|
125
|
+
# @param tag [Object] Object to be assigned
|
126
|
+
# @!visibility private
|
127
|
+
def tag=(tag)
|
128
|
+
if tag.nil?
|
129
|
+
fail ArgumentError, 'invalid value for "tag", tag cannot be nil.'
|
130
|
+
end
|
131
|
+
@tag = tag
|
132
|
+
end
|
133
|
+
|
134
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
135
|
+
# @return [Hash] Returns the object in the form of hash
|
136
|
+
# @!visibility private
|
137
|
+
def to_hash
|
138
|
+
hash = {}
|
139
|
+
self.class.attribute_map.each_pair do |attr, param|
|
140
|
+
value = self.send(attr)
|
141
|
+
if value.nil?
|
142
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
143
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
144
|
+
end
|
145
|
+
|
146
|
+
hash[param] = _to_hash(value)
|
147
|
+
end
|
148
|
+
self.additional_properties.each_pair do |attr, value|
|
149
|
+
hash[attr] = value
|
150
|
+
end
|
151
|
+
hash
|
152
|
+
end
|
153
|
+
|
154
|
+
# Checks equality by comparing each attribute.
|
155
|
+
# @param o [Object] Object to be compared
|
156
|
+
# @!visibility private
|
157
|
+
def ==(o)
|
158
|
+
return true if self.equal?(o)
|
159
|
+
self.class == o.class &&
|
160
|
+
condition == o.condition &&
|
161
|
+
tag == o.tag &&
|
162
|
+
value == o.value &&
|
163
|
+
values == o.values &&
|
164
|
+
additional_properties == o.additional_properties
|
165
|
+
end
|
166
|
+
|
167
|
+
# Calculates hash code according to all attributes.
|
168
|
+
# @return [Integer] Hash code
|
169
|
+
# @!visibility private
|
170
|
+
def hash
|
171
|
+
[condition, tag, value, values, additional_properties].hash
|
172
|
+
end
|
173
|
+
end
|
174
|
+
end
|
data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy.rb
ADDED
@@ -0,0 +1,215 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V2 Collection
|
3
|
+
|
4
|
+
#Collection of all Datadog Public endpoints.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@datadoghq.com
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
9
|
+
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
13
|
+
|
14
|
+
=end
|
15
|
+
|
16
|
+
require 'date'
|
17
|
+
require 'time'
|
18
|
+
|
19
|
+
module DatadogAPIClient::V2
|
20
|
+
# The definition of `ArbitraryCostUpsertRequestDataAttributesStrategy` object.
|
21
|
+
class ArbitraryCostUpsertRequestDataAttributesStrategy
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# The `strategy` `allocated_by`.
|
25
|
+
attr_accessor :allocated_by
|
26
|
+
|
27
|
+
# The `strategy` `allocated_by_filters`.
|
28
|
+
attr_accessor :allocated_by_filters
|
29
|
+
|
30
|
+
# The `strategy` `allocated_by_tag_keys`.
|
31
|
+
attr_accessor :allocated_by_tag_keys
|
32
|
+
|
33
|
+
# The `strategy` `based_on_costs`.
|
34
|
+
attr_accessor :based_on_costs
|
35
|
+
|
36
|
+
# The `strategy` `based_on_timeseries`.
|
37
|
+
attr_accessor :based_on_timeseries
|
38
|
+
|
39
|
+
# The `strategy` `evaluate_grouped_by_filters`.
|
40
|
+
attr_accessor :evaluate_grouped_by_filters
|
41
|
+
|
42
|
+
# The `strategy` `evaluate_grouped_by_tag_keys`.
|
43
|
+
attr_accessor :evaluate_grouped_by_tag_keys
|
44
|
+
|
45
|
+
# The `strategy` `granularity`.
|
46
|
+
attr_accessor :granularity
|
47
|
+
|
48
|
+
# The `strategy` `method`.
|
49
|
+
attr_reader :method
|
50
|
+
|
51
|
+
attr_accessor :additional_properties
|
52
|
+
|
53
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
54
|
+
# @!visibility private
|
55
|
+
def self.attribute_map
|
56
|
+
{
|
57
|
+
:'allocated_by' => :'allocated_by',
|
58
|
+
:'allocated_by_filters' => :'allocated_by_filters',
|
59
|
+
:'allocated_by_tag_keys' => :'allocated_by_tag_keys',
|
60
|
+
:'based_on_costs' => :'based_on_costs',
|
61
|
+
:'based_on_timeseries' => :'based_on_timeseries',
|
62
|
+
:'evaluate_grouped_by_filters' => :'evaluate_grouped_by_filters',
|
63
|
+
:'evaluate_grouped_by_tag_keys' => :'evaluate_grouped_by_tag_keys',
|
64
|
+
:'granularity' => :'granularity',
|
65
|
+
:'method' => :'method'
|
66
|
+
}
|
67
|
+
end
|
68
|
+
|
69
|
+
# Attribute type mapping.
|
70
|
+
# @!visibility private
|
71
|
+
def self.openapi_types
|
72
|
+
{
|
73
|
+
:'allocated_by' => :'Array<ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems>',
|
74
|
+
:'allocated_by_filters' => :'Array<ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems>',
|
75
|
+
:'allocated_by_tag_keys' => :'Array<String>',
|
76
|
+
:'based_on_costs' => :'Array<ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems>',
|
77
|
+
:'based_on_timeseries' => :'Hash<String, Object>',
|
78
|
+
:'evaluate_grouped_by_filters' => :'Array<ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems>',
|
79
|
+
:'evaluate_grouped_by_tag_keys' => :'Array<String>',
|
80
|
+
:'granularity' => :'String',
|
81
|
+
:'method' => :'String'
|
82
|
+
}
|
83
|
+
end
|
84
|
+
|
85
|
+
# Initializes the object
|
86
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
87
|
+
# @!visibility private
|
88
|
+
def initialize(attributes = {})
|
89
|
+
if (!attributes.is_a?(Hash))
|
90
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ArbitraryCostUpsertRequestDataAttributesStrategy` initialize method"
|
91
|
+
end
|
92
|
+
|
93
|
+
self.additional_properties = {}
|
94
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
95
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
96
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
97
|
+
self.additional_properties[k.to_sym] = v
|
98
|
+
else
|
99
|
+
h[k.to_sym] = v
|
100
|
+
end
|
101
|
+
}
|
102
|
+
|
103
|
+
if attributes.key?(:'allocated_by')
|
104
|
+
if (value = attributes[:'allocated_by']).is_a?(Array)
|
105
|
+
self.allocated_by = value
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.key?(:'allocated_by_filters')
|
110
|
+
if (value = attributes[:'allocated_by_filters']).is_a?(Array)
|
111
|
+
self.allocated_by_filters = value
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
if attributes.key?(:'allocated_by_tag_keys')
|
116
|
+
if (value = attributes[:'allocated_by_tag_keys']).is_a?(Array)
|
117
|
+
self.allocated_by_tag_keys = value
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
if attributes.key?(:'based_on_costs')
|
122
|
+
if (value = attributes[:'based_on_costs']).is_a?(Array)
|
123
|
+
self.based_on_costs = value
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
if attributes.key?(:'based_on_timeseries')
|
128
|
+
self.based_on_timeseries = attributes[:'based_on_timeseries']
|
129
|
+
end
|
130
|
+
|
131
|
+
if attributes.key?(:'evaluate_grouped_by_filters')
|
132
|
+
if (value = attributes[:'evaluate_grouped_by_filters']).is_a?(Array)
|
133
|
+
self.evaluate_grouped_by_filters = value
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
if attributes.key?(:'evaluate_grouped_by_tag_keys')
|
138
|
+
if (value = attributes[:'evaluate_grouped_by_tag_keys']).is_a?(Array)
|
139
|
+
self.evaluate_grouped_by_tag_keys = value
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
if attributes.key?(:'granularity')
|
144
|
+
self.granularity = attributes[:'granularity']
|
145
|
+
end
|
146
|
+
|
147
|
+
if attributes.key?(:'method')
|
148
|
+
self.method = attributes[:'method']
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
# Check to see if the all the properties in the model are valid
|
153
|
+
# @return true if the model is valid
|
154
|
+
# @!visibility private
|
155
|
+
def valid?
|
156
|
+
return false if @method.nil?
|
157
|
+
true
|
158
|
+
end
|
159
|
+
|
160
|
+
# Custom attribute writer method with validation
|
161
|
+
# @param method [Object] Object to be assigned
|
162
|
+
# @!visibility private
|
163
|
+
def method=(method)
|
164
|
+
if method.nil?
|
165
|
+
fail ArgumentError, 'invalid value for "method", method cannot be nil.'
|
166
|
+
end
|
167
|
+
@method = method
|
168
|
+
end
|
169
|
+
|
170
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
171
|
+
# @return [Hash] Returns the object in the form of hash
|
172
|
+
# @!visibility private
|
173
|
+
def to_hash
|
174
|
+
hash = {}
|
175
|
+
self.class.attribute_map.each_pair do |attr, param|
|
176
|
+
value = self.send(attr)
|
177
|
+
if value.nil?
|
178
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
179
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
180
|
+
end
|
181
|
+
|
182
|
+
hash[param] = _to_hash(value)
|
183
|
+
end
|
184
|
+
self.additional_properties.each_pair do |attr, value|
|
185
|
+
hash[attr] = value
|
186
|
+
end
|
187
|
+
hash
|
188
|
+
end
|
189
|
+
|
190
|
+
# Checks equality by comparing each attribute.
|
191
|
+
# @param o [Object] Object to be compared
|
192
|
+
# @!visibility private
|
193
|
+
def ==(o)
|
194
|
+
return true if self.equal?(o)
|
195
|
+
self.class == o.class &&
|
196
|
+
allocated_by == o.allocated_by &&
|
197
|
+
allocated_by_filters == o.allocated_by_filters &&
|
198
|
+
allocated_by_tag_keys == o.allocated_by_tag_keys &&
|
199
|
+
based_on_costs == o.based_on_costs &&
|
200
|
+
based_on_timeseries == o.based_on_timeseries &&
|
201
|
+
evaluate_grouped_by_filters == o.evaluate_grouped_by_filters &&
|
202
|
+
evaluate_grouped_by_tag_keys == o.evaluate_grouped_by_tag_keys &&
|
203
|
+
granularity == o.granularity &&
|
204
|
+
method == o.method &&
|
205
|
+
additional_properties == o.additional_properties
|
206
|
+
end
|
207
|
+
|
208
|
+
# Calculates hash code according to all attributes.
|
209
|
+
# @return [Integer] Hash code
|
210
|
+
# @!visibility private
|
211
|
+
def hash
|
212
|
+
[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
|
213
|
+
end
|
214
|
+
end
|
215
|
+
end
|