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.
Files changed (195) hide show
  1. checksums.yaml +4 -4
  2. data/.generator/schemas/v1/openapi.yaml +3 -7
  3. data/.generator/schemas/v2/openapi.yaml +2981 -63
  4. data/.github/CODEOWNERS +4 -4
  5. data/.github/workflows/reusable-ci.yml +71 -0
  6. data/.github/workflows/reusable-examples.yml +40 -0
  7. data/.github/workflows/{test_integration.yml → reusable-integration-test.yml} +66 -17
  8. data/.github/workflows/reusable-pre-commit.yml +84 -0
  9. data/.github/workflows/reusable-ruby-test.yml +65 -0
  10. data/.github/workflows/test.yml +31 -89
  11. data/CHANGELOG.md +19 -0
  12. data/examples/v1/dashboards/CreateDashboard_607525069.rb +61 -0
  13. data/examples/v2/aws-integration/GetAWSIntegrationIAMPermissionsResourceCollection.rb +5 -0
  14. data/examples/v2/aws-integration/GetAWSIntegrationIAMPermissionsResourceCollection_1008672547.rb +5 -0
  15. data/examples/v2/aws-integration/GetAWSIntegrationIAMPermissionsStandard.rb +5 -0
  16. data/examples/v2/aws-integration/GetAWSIntegrationIAMPermissionsStandard_3136299151.rb +5 -0
  17. data/examples/v2/cloud-cost-management/CreateArbitraryCostRule.rb +63 -0
  18. data/examples/v2/cloud-cost-management/CreateCostAzureUCConfigs.rb +0 -1
  19. data/examples/v2/cloud-cost-management/CreateCostGCPUsageCostConfig.rb +1 -1
  20. data/examples/v2/cloud-cost-management/CreateRuleset.rb +32 -0
  21. data/examples/v2/cloud-cost-management/DeleteArbitraryCostRule.rb +5 -0
  22. data/examples/v2/cloud-cost-management/DeleteCostGCPUsageCostConfig.rb +1 -1
  23. data/examples/v2/cloud-cost-management/DeleteRuleset.rb +5 -0
  24. data/examples/v2/cloud-cost-management/GetArbitraryCostRule.rb +5 -0
  25. data/examples/v2/cloud-cost-management/GetCostAWSCURConfig.rb +5 -0
  26. data/examples/v2/cloud-cost-management/GetCostAzureUCConfig.rb +5 -0
  27. data/examples/v2/cloud-cost-management/GetCostGCPUsageCostConfig.rb +5 -0
  28. data/examples/v2/cloud-cost-management/GetRuleset.rb +5 -0
  29. data/examples/v2/cloud-cost-management/ListArbitraryCostRules.rb +5 -0
  30. data/examples/v2/cloud-cost-management/ListCostGCPUsageCostConfigs.rb +1 -1
  31. data/examples/v2/cloud-cost-management/ListRulesets.rb +5 -0
  32. data/examples/v2/cloud-cost-management/ReorderArbitraryCostRules.rb +22 -0
  33. data/examples/v2/cloud-cost-management/ReorderRulesets.rb +13 -0
  34. data/examples/v2/cloud-cost-management/UpdateArbitraryCostRule.rb +63 -0
  35. data/examples/v2/cloud-cost-management/UpdateCostGCPUsageCostConfig.rb +1 -1
  36. data/examples/v2/cloud-cost-management/UpdateRuleset.rb +31 -0
  37. data/examples/v2/cloud-cost-management/ValidateQuery.rb +14 -0
  38. data/examples/v2/dora-metrics/DeleteDORADeployment.rb +5 -0
  39. data/examples/v2/dora-metrics/DeleteDORAFailure.rb +5 -0
  40. data/examples/v2/incidents/CreateIncidentImpact.rb +22 -0
  41. data/examples/v2/incidents/DeleteIncidentImpact.rb +12 -0
  42. data/examples/v2/incidents/ListIncidentImpacts.rb +11 -0
  43. data/examples/v2/key-management/GetCurrentUserApplicationKey.rb +4 -1
  44. data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_2899714190.rb +68 -0
  45. data/examples/v2/security-monitoring/ValidateSecurityMonitoringRule_4152369508.rb +70 -0
  46. data/lib/datadog_api_client/configuration.rb +3 -0
  47. data/lib/datadog_api_client/inflector.rb +104 -1
  48. data/lib/datadog_api_client/v1/api/synthetics_api.rb +1 -3
  49. data/lib/datadog_api_client/v1/models/formula_and_function_events_data_source.rb +1 -0
  50. data/lib/datadog_api_client/v2/api/aws_integration_api.rb +120 -0
  51. data/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb +1211 -126
  52. data/lib/datadog_api_client/v2/api/dora_metrics_api.rb +130 -0
  53. data/lib/datadog_api_client/v2/api/incidents_api.rb +229 -0
  54. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +2 -0
  55. data/lib/datadog_api_client/v2/models/account_filtering_config.rb +8 -0
  56. data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request.rb +105 -0
  57. data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data.rb +143 -0
  58. data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes.rb +241 -0
  59. data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_costs_to_allocate_items.rb +174 -0
  60. data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy.rb +215 -0
  61. data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_allocated_by_filters_items.rb +174 -0
  62. data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_allocated_by_items.rb +146 -0
  63. data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_allocated_by_items_allocated_tags_items.rb +144 -0
  64. data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_based_on_costs_items.rb +174 -0
  65. data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_evaluate_grouped_by_filters_items.rb +174 -0
  66. data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_type.rb +26 -0
  67. data/lib/datadog_api_client/v2/models/arbitrary_rule_response.rb +105 -0
  68. data/lib/datadog_api_client/v2/models/arbitrary_rule_response_array.rb +125 -0
  69. data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data.rb +143 -0
  70. data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes.rb +351 -0
  71. data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_costs_to_allocate_items.rb +174 -0
  72. data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy.rb +215 -0
  73. data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_allocated_by_filters_items.rb +174 -0
  74. data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_allocated_by_items.rb +146 -0
  75. data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_allocated_by_items_allocated_tags_items.rb +144 -0
  76. data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_based_on_costs_items.rb +174 -0
  77. data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_evaluate_grouped_by_filters_items.rb +174 -0
  78. data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_type.rb +26 -0
  79. data/lib/datadog_api_client/v2/models/aws_cur_config_attributes.rb +8 -0
  80. data/lib/datadog_api_client/v2/models/aws_cur_config_post_data.rb +1 -12
  81. data/lib/datadog_api_client/v2/models/aws_cur_config_response.rb +5 -5
  82. data/lib/datadog_api_client/v2/models/aws_cur_config_response_data.rb +143 -0
  83. data/lib/datadog_api_client/v2/models/aws_cur_config_response_data_attributes.rb +225 -0
  84. data/lib/datadog_api_client/v2/models/aws_cur_config_response_data_attributes_account_filters.rb +137 -0
  85. data/lib/datadog_api_client/v2/models/aws_cur_config_response_data_type.rb +26 -0
  86. data/lib/datadog_api_client/v2/models/aws_cur_configs_response.rb +19 -1
  87. data/lib/datadog_api_client/v2/models/azure_uc_config.rb +9 -1
  88. data/lib/datadog_api_client/v2/models/azure_uc_config_patch_data.rb +1 -12
  89. data/lib/datadog_api_client/v2/models/azure_uc_config_post_data.rb +1 -12
  90. data/lib/datadog_api_client/v2/models/azure_uc_config_post_request_attributes.rb +3 -13
  91. data/lib/datadog_api_client/v2/models/azure_uc_configs_response.rb +19 -1
  92. data/lib/datadog_api_client/v2/models/create_ruleset_request.rb +105 -0
  93. data/lib/datadog_api_client/v2/models/create_ruleset_request_data.rb +143 -0
  94. data/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes.rb +135 -0
  95. data/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items.rb +195 -0
  96. data/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_mapping.rb +167 -0
  97. data/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_query.rb +172 -0
  98. data/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_query_addition.rb +144 -0
  99. data/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_reference_table.rb +189 -0
  100. data/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_reference_table_field_pairs_items.rb +144 -0
  101. data/lib/datadog_api_client/v2/models/create_ruleset_request_data_type.rb +26 -0
  102. data/lib/datadog_api_client/v2/models/datastore_trigger.rb +105 -0
  103. data/lib/datadog_api_client/v2/models/datastore_trigger_wrapper.rb +135 -0
  104. data/lib/datadog_api_client/v2/models/full_api_key_attributes.rb +19 -1
  105. data/lib/datadog_api_client/v2/models/full_application_key_attributes.rb +12 -1
  106. data/lib/datadog_api_client/v2/models/gcp_uc_config_response.rb +105 -0
  107. data/lib/datadog_api_client/v2/models/gcp_uc_config_response_data.rb +143 -0
  108. data/lib/datadog_api_client/v2/models/gcp_uc_config_response_data_attributes.rb +235 -0
  109. data/lib/datadog_api_client/v2/models/gcp_uc_config_response_data_type.rb +26 -0
  110. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config.rb +4 -4
  111. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_attributes.rb +13 -13
  112. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_data.rb +3 -3
  113. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request.rb +2 -2
  114. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request_attributes.rb +1 -1
  115. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request_type.rb +1 -1
  116. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_data.rb +4 -15
  117. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request.rb +2 -2
  118. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request_attributes.rb +7 -7
  119. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request_type.rb +1 -1
  120. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_response.rb +2 -2
  121. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_type.rb +1 -1
  122. data/lib/datadog_api_client/v2/models/gcp_usage_cost_configs_response.rb +21 -3
  123. data/lib/datadog_api_client/v2/models/historical_job_options.rb +11 -1
  124. data/lib/datadog_api_client/v2/models/incident_impact_attributes.rb +203 -0
  125. data/lib/datadog_api_client/v2/models/incident_impact_create_attributes.rb +173 -0
  126. data/lib/datadog_api_client/v2/models/incident_impact_create_data.rb +144 -0
  127. data/lib/datadog_api_client/v2/models/incident_impact_create_request.rb +123 -0
  128. data/lib/datadog_api_client/v2/models/incident_impact_related_object.rb +28 -0
  129. data/lib/datadog_api_client/v2/models/incident_impact_relationships.rb +125 -0
  130. data/lib/datadog_api_client/v2/models/incident_impact_response.rb +135 -0
  131. data/lib/datadog_api_client/v2/models/incident_impact_response_data.rb +164 -0
  132. data/lib/datadog_api_client/v2/models/incident_impact_type.rb +26 -0
  133. data/lib/datadog_api_client/v2/models/incident_impacts_response.rb +137 -0
  134. data/lib/datadog_api_client/v2/models/incident_response_attributes.rb +33 -1
  135. data/lib/datadog_api_client/v2/models/incident_response_relationships.rb +11 -1
  136. data/lib/datadog_api_client/v2/models/observability_pipeline_config_destination_item.rb +2 -1
  137. data/lib/datadog_api_client/v2/models/observability_pipeline_google_pub_sub_destination.rb +251 -0
  138. data/lib/datadog_api_client/v2/models/observability_pipeline_google_pub_sub_destination_encoding.rb +27 -0
  139. data/lib/datadog_api_client/v2/models/observability_pipeline_google_pub_sub_destination_type.rb +26 -0
  140. data/lib/datadog_api_client/v2/models/partial_api_key_attributes.rb +19 -1
  141. data/lib/datadog_api_client/v2/models/partial_application_key_attributes.rb +12 -1
  142. data/lib/datadog_api_client/v2/models/relationship_to_incident.rb +123 -0
  143. data/lib/datadog_api_client/v2/models/relationship_to_incident_data.rb +144 -0
  144. data/lib/datadog_api_client/v2/models/reorder_rule_resource_array.rb +125 -0
  145. data/lib/datadog_api_client/v2/models/reorder_rule_resource_data.rb +133 -0
  146. data/lib/datadog_api_client/v2/models/reorder_rule_resource_data_type.rb +26 -0
  147. data/lib/datadog_api_client/v2/models/reorder_ruleset_resource_array.rb +125 -0
  148. data/lib/datadog_api_client/v2/models/reorder_ruleset_resource_data.rb +133 -0
  149. data/lib/datadog_api_client/v2/models/reorder_ruleset_resource_data_type.rb +26 -0
  150. data/lib/datadog_api_client/v2/models/rules_validate_query_request.rb +105 -0
  151. data/lib/datadog_api_client/v2/models/rules_validate_query_request_data.rb +143 -0
  152. data/lib/datadog_api_client/v2/models/rules_validate_query_request_data_attributes.rb +123 -0
  153. data/lib/datadog_api_client/v2/models/rules_validate_query_request_data_type.rb +26 -0
  154. data/lib/datadog_api_client/v2/models/rules_validate_query_response.rb +105 -0
  155. data/lib/datadog_api_client/v2/models/rules_validate_query_response_data.rb +143 -0
  156. data/lib/datadog_api_client/v2/models/rules_validate_query_response_data_attributes.rb +123 -0
  157. data/lib/datadog_api_client/v2/models/rules_validate_query_response_data_type.rb +26 -0
  158. data/lib/datadog_api_client/v2/models/ruleset_resp.rb +105 -0
  159. data/lib/datadog_api_client/v2/models/ruleset_resp_array.rb +125 -0
  160. data/lib/datadog_api_client/v2/models/ruleset_resp_data.rb +143 -0
  161. data/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes.rb +276 -0
  162. data/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_created.rb +133 -0
  163. data/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_modified.rb +133 -0
  164. data/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items.rb +195 -0
  165. data/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_mapping.rb +167 -0
  166. data/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_query.rb +172 -0
  167. data/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_query_addition.rb +144 -0
  168. data/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_reference_table.rb +189 -0
  169. data/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_reference_table_field_pairs_items.rb +144 -0
  170. data/lib/datadog_api_client/v2/models/ruleset_resp_data_type.rb +26 -0
  171. data/lib/datadog_api_client/v2/models/rum_application_attributes.rb +22 -1
  172. data/lib/datadog_api_client/v2/models/security_monitoring_rule_detection_method.rb +1 -0
  173. data/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb +11 -1
  174. data/lib/datadog_api_client/v2/models/security_monitoring_rule_sequence_detection_options.rb +119 -0
  175. data/lib/datadog_api_client/v2/models/security_monitoring_rule_sequence_detection_step.rb +126 -0
  176. data/lib/datadog_api_client/v2/models/security_monitoring_rule_sequence_detection_step_transition.rb +126 -0
  177. data/lib/datadog_api_client/v2/models/trigger.rb +1 -0
  178. data/lib/datadog_api_client/v2/models/uc_config_pair.rb +105 -0
  179. data/lib/datadog_api_client/v2/models/uc_config_pair_data.rb +143 -0
  180. data/lib/datadog_api_client/v2/models/uc_config_pair_data_attributes.rb +107 -0
  181. data/lib/datadog_api_client/v2/models/uc_config_pair_data_attributes_configs_items.rb +255 -0
  182. data/lib/datadog_api_client/v2/models/uc_config_pair_data_type.rb +26 -0
  183. data/lib/datadog_api_client/v2/models/update_ruleset_request.rb +105 -0
  184. data/lib/datadog_api_client/v2/models/update_ruleset_request_data.rb +143 -0
  185. data/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes.rb +156 -0
  186. data/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items.rb +195 -0
  187. data/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_mapping.rb +167 -0
  188. data/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_query.rb +172 -0
  189. data/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_query_addition.rb +144 -0
  190. data/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_reference_table.rb +189 -0
  191. data/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_reference_table_field_pairs_items.rb +144 -0
  192. data/lib/datadog_api_client/v2/models/update_ruleset_request_data_type.rb +26 -0
  193. data/lib/datadog_api_client/version.rb +1 -1
  194. metadata +137 -3
  195. data/examples/v1/synthetics/SearchTests_195957771.rb +0 -14
@@ -0,0 +1,351 @@
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 `ArbitraryRuleResponseDataAttributes` object.
21
+ class ArbitraryRuleResponseDataAttributes
22
+ include BaseGenericModel
23
+
24
+ # The `attributes` `costs_to_allocate`.
25
+ attr_reader :costs_to_allocate
26
+
27
+ # The `attributes` `created`.
28
+ attr_reader :created
29
+
30
+ # The `attributes` `enabled`.
31
+ attr_reader :enabled
32
+
33
+ # The `attributes` `last_modified_user_uuid`.
34
+ attr_reader :last_modified_user_uuid
35
+
36
+ # The `attributes` `order_id`.
37
+ attr_reader :order_id
38
+
39
+ # The `attributes` `provider`.
40
+ attr_reader :provider
41
+
42
+ # The `attributes` `rejected`.
43
+ attr_accessor :rejected
44
+
45
+ # The `attributes` `rule_name`.
46
+ attr_reader :rule_name
47
+
48
+ # The definition of `ArbitraryRuleResponseDataAttributesStrategy` object.
49
+ attr_reader :strategy
50
+
51
+ # The `attributes` `type`.
52
+ attr_reader :type
53
+
54
+ # The `attributes` `updated`.
55
+ attr_reader :updated
56
+
57
+ # The `attributes` `version`.
58
+ attr_reader :version
59
+
60
+ attr_accessor :additional_properties
61
+
62
+ # Attribute mapping from ruby-style variable name to JSON key.
63
+ # @!visibility private
64
+ def self.attribute_map
65
+ {
66
+ :'costs_to_allocate' => :'costs_to_allocate',
67
+ :'created' => :'created',
68
+ :'enabled' => :'enabled',
69
+ :'last_modified_user_uuid' => :'last_modified_user_uuid',
70
+ :'order_id' => :'order_id',
71
+ :'provider' => :'provider',
72
+ :'rejected' => :'rejected',
73
+ :'rule_name' => :'rule_name',
74
+ :'strategy' => :'strategy',
75
+ :'type' => :'type',
76
+ :'updated' => :'updated',
77
+ :'version' => :'version'
78
+ }
79
+ end
80
+
81
+ # Attribute type mapping.
82
+ # @!visibility private
83
+ def self.openapi_types
84
+ {
85
+ :'costs_to_allocate' => :'Array<ArbitraryRuleResponseDataAttributesCostsToAllocateItems>',
86
+ :'created' => :'Time',
87
+ :'enabled' => :'Boolean',
88
+ :'last_modified_user_uuid' => :'String',
89
+ :'order_id' => :'Integer',
90
+ :'provider' => :'Array<String>',
91
+ :'rejected' => :'Boolean',
92
+ :'rule_name' => :'String',
93
+ :'strategy' => :'ArbitraryRuleResponseDataAttributesStrategy',
94
+ :'type' => :'String',
95
+ :'updated' => :'Time',
96
+ :'version' => :'Integer'
97
+ }
98
+ end
99
+
100
+ # Initializes the object
101
+ # @param attributes [Hash] Model attributes in the form of hash
102
+ # @!visibility private
103
+ def initialize(attributes = {})
104
+ if (!attributes.is_a?(Hash))
105
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ArbitraryRuleResponseDataAttributes` initialize method"
106
+ end
107
+
108
+ self.additional_properties = {}
109
+ # check to see if the attribute exists and convert string to symbol for hash key
110
+ attributes = attributes.each_with_object({}) { |(k, v), h|
111
+ if (!self.class.attribute_map.key?(k.to_sym))
112
+ self.additional_properties[k.to_sym] = v
113
+ else
114
+ h[k.to_sym] = v
115
+ end
116
+ }
117
+
118
+ if attributes.key?(:'costs_to_allocate')
119
+ if (value = attributes[:'costs_to_allocate']).is_a?(Array)
120
+ self.costs_to_allocate = value
121
+ end
122
+ end
123
+
124
+ if attributes.key?(:'created')
125
+ self.created = attributes[:'created']
126
+ end
127
+
128
+ if attributes.key?(:'enabled')
129
+ self.enabled = attributes[:'enabled']
130
+ end
131
+
132
+ if attributes.key?(:'last_modified_user_uuid')
133
+ self.last_modified_user_uuid = attributes[:'last_modified_user_uuid']
134
+ end
135
+
136
+ if attributes.key?(:'order_id')
137
+ self.order_id = attributes[:'order_id']
138
+ end
139
+
140
+ if attributes.key?(:'provider')
141
+ if (value = attributes[:'provider']).is_a?(Array)
142
+ self.provider = value
143
+ end
144
+ end
145
+
146
+ if attributes.key?(:'rejected')
147
+ self.rejected = attributes[:'rejected']
148
+ end
149
+
150
+ if attributes.key?(:'rule_name')
151
+ self.rule_name = attributes[:'rule_name']
152
+ end
153
+
154
+ if attributes.key?(:'strategy')
155
+ self.strategy = attributes[:'strategy']
156
+ end
157
+
158
+ if attributes.key?(:'type')
159
+ self.type = attributes[:'type']
160
+ end
161
+
162
+ if attributes.key?(:'updated')
163
+ self.updated = attributes[:'updated']
164
+ end
165
+
166
+ if attributes.key?(:'version')
167
+ self.version = attributes[:'version']
168
+ end
169
+ end
170
+
171
+ # Check to see if the all the properties in the model are valid
172
+ # @return true if the model is valid
173
+ # @!visibility private
174
+ def valid?
175
+ return false if @costs_to_allocate.nil?
176
+ return false if @created.nil?
177
+ return false if @enabled.nil?
178
+ return false if @last_modified_user_uuid.nil?
179
+ return false if @order_id.nil?
180
+ return false if @provider.nil?
181
+ return false if @rule_name.nil?
182
+ return false if @strategy.nil?
183
+ return false if @type.nil?
184
+ return false if @updated.nil?
185
+ return false if @version.nil?
186
+ return false if @version > 2147483647
187
+ true
188
+ end
189
+
190
+ # Custom attribute writer method with validation
191
+ # @param costs_to_allocate [Object] Object to be assigned
192
+ # @!visibility private
193
+ def costs_to_allocate=(costs_to_allocate)
194
+ if costs_to_allocate.nil?
195
+ fail ArgumentError, 'invalid value for "costs_to_allocate", costs_to_allocate cannot be nil.'
196
+ end
197
+ @costs_to_allocate = costs_to_allocate
198
+ end
199
+
200
+ # Custom attribute writer method with validation
201
+ # @param created [Object] Object to be assigned
202
+ # @!visibility private
203
+ def created=(created)
204
+ if created.nil?
205
+ fail ArgumentError, 'invalid value for "created", created cannot be nil.'
206
+ end
207
+ @created = created
208
+ end
209
+
210
+ # Custom attribute writer method with validation
211
+ # @param enabled [Object] Object to be assigned
212
+ # @!visibility private
213
+ def enabled=(enabled)
214
+ if enabled.nil?
215
+ fail ArgumentError, 'invalid value for "enabled", enabled cannot be nil.'
216
+ end
217
+ @enabled = enabled
218
+ end
219
+
220
+ # Custom attribute writer method with validation
221
+ # @param last_modified_user_uuid [Object] Object to be assigned
222
+ # @!visibility private
223
+ def last_modified_user_uuid=(last_modified_user_uuid)
224
+ if last_modified_user_uuid.nil?
225
+ fail ArgumentError, 'invalid value for "last_modified_user_uuid", last_modified_user_uuid cannot be nil.'
226
+ end
227
+ @last_modified_user_uuid = last_modified_user_uuid
228
+ end
229
+
230
+ # Custom attribute writer method with validation
231
+ # @param order_id [Object] Object to be assigned
232
+ # @!visibility private
233
+ def order_id=(order_id)
234
+ if order_id.nil?
235
+ fail ArgumentError, 'invalid value for "order_id", order_id cannot be nil.'
236
+ end
237
+ @order_id = order_id
238
+ end
239
+
240
+ # Custom attribute writer method with validation
241
+ # @param provider [Object] Object to be assigned
242
+ # @!visibility private
243
+ def provider=(provider)
244
+ if provider.nil?
245
+ fail ArgumentError, 'invalid value for "provider", provider cannot be nil.'
246
+ end
247
+ @provider = provider
248
+ end
249
+
250
+ # Custom attribute writer method with validation
251
+ # @param rule_name [Object] Object to be assigned
252
+ # @!visibility private
253
+ def rule_name=(rule_name)
254
+ if rule_name.nil?
255
+ fail ArgumentError, 'invalid value for "rule_name", rule_name cannot be nil.'
256
+ end
257
+ @rule_name = rule_name
258
+ end
259
+
260
+ # Custom attribute writer method with validation
261
+ # @param strategy [Object] Object to be assigned
262
+ # @!visibility private
263
+ def strategy=(strategy)
264
+ if strategy.nil?
265
+ fail ArgumentError, 'invalid value for "strategy", strategy cannot be nil.'
266
+ end
267
+ @strategy = strategy
268
+ end
269
+
270
+ # Custom attribute writer method with validation
271
+ # @param type [Object] Object to be assigned
272
+ # @!visibility private
273
+ def type=(type)
274
+ if type.nil?
275
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
276
+ end
277
+ @type = type
278
+ end
279
+
280
+ # Custom attribute writer method with validation
281
+ # @param updated [Object] Object to be assigned
282
+ # @!visibility private
283
+ def updated=(updated)
284
+ if updated.nil?
285
+ fail ArgumentError, 'invalid value for "updated", updated cannot be nil.'
286
+ end
287
+ @updated = updated
288
+ end
289
+
290
+ # Custom attribute writer method with validation
291
+ # @param version [Object] Object to be assigned
292
+ # @!visibility private
293
+ def version=(version)
294
+ if version.nil?
295
+ fail ArgumentError, 'invalid value for "version", version cannot be nil.'
296
+ end
297
+ if version > 2147483647
298
+ fail ArgumentError, 'invalid value for "version", must be smaller than or equal to 2147483647.'
299
+ end
300
+ @version = version
301
+ end
302
+
303
+ # Returns the object in the form of hash, with additionalProperties support.
304
+ # @return [Hash] Returns the object in the form of hash
305
+ # @!visibility private
306
+ def to_hash
307
+ hash = {}
308
+ self.class.attribute_map.each_pair do |attr, param|
309
+ value = self.send(attr)
310
+ if value.nil?
311
+ is_nullable = self.class.openapi_nullable.include?(attr)
312
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
313
+ end
314
+
315
+ hash[param] = _to_hash(value)
316
+ end
317
+ self.additional_properties.each_pair do |attr, value|
318
+ hash[attr] = value
319
+ end
320
+ hash
321
+ end
322
+
323
+ # Checks equality by comparing each attribute.
324
+ # @param o [Object] Object to be compared
325
+ # @!visibility private
326
+ def ==(o)
327
+ return true if self.equal?(o)
328
+ self.class == o.class &&
329
+ costs_to_allocate == o.costs_to_allocate &&
330
+ created == o.created &&
331
+ enabled == o.enabled &&
332
+ last_modified_user_uuid == o.last_modified_user_uuid &&
333
+ order_id == o.order_id &&
334
+ provider == o.provider &&
335
+ rejected == o.rejected &&
336
+ rule_name == o.rule_name &&
337
+ strategy == o.strategy &&
338
+ type == o.type &&
339
+ updated == o.updated &&
340
+ version == o.version &&
341
+ additional_properties == o.additional_properties
342
+ end
343
+
344
+ # Calculates hash code according to all attributes.
345
+ # @return [Integer] Hash code
346
+ # @!visibility private
347
+ def hash
348
+ [costs_to_allocate, created, enabled, last_modified_user_uuid, order_id, provider, rejected, rule_name, strategy, type, updated, version, additional_properties].hash
349
+ end
350
+ end
351
+ 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 `ArbitraryRuleResponseDataAttributesCostsToAllocateItems` object.
21
+ class ArbitraryRuleResponseDataAttributesCostsToAllocateItems
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::ArbitraryRuleResponseDataAttributesCostsToAllocateItems` 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