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,195 @@
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 `RulesetRespDataAttributesRulesItems` object.
21
+ class RulesetRespDataAttributesRulesItems
22
+ include BaseGenericModel
23
+
24
+ # The `items` `enabled`.
25
+ attr_reader :enabled
26
+
27
+ # The definition of `RulesetRespDataAttributesRulesItemsMapping` object.
28
+ attr_accessor :mapping
29
+
30
+ # The `items` `metadata`.
31
+ attr_accessor :metadata
32
+
33
+ # The `items` `name`.
34
+ attr_reader :name
35
+
36
+ # The definition of `RulesetRespDataAttributesRulesItemsQuery` object.
37
+ attr_accessor :query
38
+
39
+ # The definition of `RulesetRespDataAttributesRulesItemsReferenceTable` object.
40
+ attr_accessor :reference_table
41
+
42
+ attr_accessor :additional_properties
43
+
44
+ # Attribute mapping from ruby-style variable name to JSON key.
45
+ # @!visibility private
46
+ def self.attribute_map
47
+ {
48
+ :'enabled' => :'enabled',
49
+ :'mapping' => :'mapping',
50
+ :'metadata' => :'metadata',
51
+ :'name' => :'name',
52
+ :'query' => :'query',
53
+ :'reference_table' => :'reference_table'
54
+ }
55
+ end
56
+
57
+ # Attribute type mapping.
58
+ # @!visibility private
59
+ def self.openapi_types
60
+ {
61
+ :'enabled' => :'Boolean',
62
+ :'mapping' => :'RulesetRespDataAttributesRulesItemsMapping',
63
+ :'metadata' => :'Hash<String, String>',
64
+ :'name' => :'String',
65
+ :'query' => :'RulesetRespDataAttributesRulesItemsQuery',
66
+ :'reference_table' => :'RulesetRespDataAttributesRulesItemsReferenceTable'
67
+ }
68
+ end
69
+
70
+ # List of attributes with nullable: true
71
+ # @!visibility private
72
+ def self.openapi_nullable
73
+ Set.new([
74
+ :'mapping',
75
+ :'metadata',
76
+ :'query',
77
+ :'reference_table',
78
+ ])
79
+ end
80
+
81
+ # Initializes the object
82
+ # @param attributes [Hash] Model attributes in the form of hash
83
+ # @!visibility private
84
+ def initialize(attributes = {})
85
+ if (!attributes.is_a?(Hash))
86
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RulesetRespDataAttributesRulesItems` initialize method"
87
+ end
88
+
89
+ self.additional_properties = {}
90
+ # check to see if the attribute exists and convert string to symbol for hash key
91
+ attributes = attributes.each_with_object({}) { |(k, v), h|
92
+ if (!self.class.attribute_map.key?(k.to_sym))
93
+ self.additional_properties[k.to_sym] = v
94
+ else
95
+ h[k.to_sym] = v
96
+ end
97
+ }
98
+
99
+ if attributes.key?(:'enabled')
100
+ self.enabled = attributes[:'enabled']
101
+ end
102
+
103
+ if attributes.key?(:'mapping')
104
+ self.mapping = attributes[:'mapping']
105
+ end
106
+
107
+ if attributes.key?(:'metadata')
108
+ self.metadata = attributes[:'metadata']
109
+ end
110
+
111
+ if attributes.key?(:'name')
112
+ self.name = attributes[:'name']
113
+ end
114
+
115
+ if attributes.key?(:'query')
116
+ self.query = attributes[:'query']
117
+ end
118
+
119
+ if attributes.key?(:'reference_table')
120
+ self.reference_table = attributes[:'reference_table']
121
+ end
122
+ end
123
+
124
+ # Check to see if the all the properties in the model are valid
125
+ # @return true if the model is valid
126
+ # @!visibility private
127
+ def valid?
128
+ return false if @enabled.nil?
129
+ return false if @name.nil?
130
+ true
131
+ end
132
+
133
+ # Custom attribute writer method with validation
134
+ # @param enabled [Object] Object to be assigned
135
+ # @!visibility private
136
+ def enabled=(enabled)
137
+ if enabled.nil?
138
+ fail ArgumentError, 'invalid value for "enabled", enabled cannot be nil.'
139
+ end
140
+ @enabled = enabled
141
+ end
142
+
143
+ # Custom attribute writer method with validation
144
+ # @param name [Object] Object to be assigned
145
+ # @!visibility private
146
+ def name=(name)
147
+ if name.nil?
148
+ fail ArgumentError, 'invalid value for "name", name cannot be nil.'
149
+ end
150
+ @name = name
151
+ end
152
+
153
+ # Returns the object in the form of hash, with additionalProperties support.
154
+ # @return [Hash] Returns the object in the form of hash
155
+ # @!visibility private
156
+ def to_hash
157
+ hash = {}
158
+ self.class.attribute_map.each_pair do |attr, param|
159
+ value = self.send(attr)
160
+ if value.nil?
161
+ is_nullable = self.class.openapi_nullable.include?(attr)
162
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
163
+ end
164
+
165
+ hash[param] = _to_hash(value)
166
+ end
167
+ self.additional_properties.each_pair do |attr, value|
168
+ hash[attr] = value
169
+ end
170
+ hash
171
+ end
172
+
173
+ # Checks equality by comparing each attribute.
174
+ # @param o [Object] Object to be compared
175
+ # @!visibility private
176
+ def ==(o)
177
+ return true if self.equal?(o)
178
+ self.class == o.class &&
179
+ enabled == o.enabled &&
180
+ mapping == o.mapping &&
181
+ metadata == o.metadata &&
182
+ name == o.name &&
183
+ query == o.query &&
184
+ reference_table == o.reference_table &&
185
+ additional_properties == o.additional_properties
186
+ end
187
+
188
+ # Calculates hash code according to all attributes.
189
+ # @return [Integer] Hash code
190
+ # @!visibility private
191
+ def hash
192
+ [enabled, mapping, metadata, name, query, reference_table, additional_properties].hash
193
+ end
194
+ end
195
+ end
@@ -0,0 +1,167 @@
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 `RulesetRespDataAttributesRulesItemsMapping` object.
21
+ class RulesetRespDataAttributesRulesItemsMapping
22
+ include BaseGenericModel
23
+
24
+ # The `mapping` `destination_key`.
25
+ attr_reader :destination_key
26
+
27
+ # The `mapping` `if_not_exists`.
28
+ attr_reader :if_not_exists
29
+
30
+ # The `mapping` `source_keys`.
31
+ attr_reader :source_keys
32
+
33
+ attr_accessor :additional_properties
34
+
35
+ # Attribute mapping from ruby-style variable name to JSON key.
36
+ # @!visibility private
37
+ def self.attribute_map
38
+ {
39
+ :'destination_key' => :'destination_key',
40
+ :'if_not_exists' => :'if_not_exists',
41
+ :'source_keys' => :'source_keys'
42
+ }
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ # @!visibility private
47
+ def self.openapi_types
48
+ {
49
+ :'destination_key' => :'String',
50
+ :'if_not_exists' => :'Boolean',
51
+ :'source_keys' => :'Array<String>'
52
+ }
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param attributes [Hash] Model attributes in the form of hash
57
+ # @!visibility private
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RulesetRespDataAttributesRulesItemsMapping` initialize method"
61
+ end
62
+
63
+ self.additional_properties = {}
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ self.additional_properties[k.to_sym] = v
68
+ else
69
+ h[k.to_sym] = v
70
+ end
71
+ }
72
+
73
+ if attributes.key?(:'destination_key')
74
+ self.destination_key = attributes[:'destination_key']
75
+ end
76
+
77
+ if attributes.key?(:'if_not_exists')
78
+ self.if_not_exists = attributes[:'if_not_exists']
79
+ end
80
+
81
+ if attributes.key?(:'source_keys')
82
+ if (value = attributes[:'source_keys']).is_a?(Array)
83
+ self.source_keys = value
84
+ end
85
+ end
86
+ end
87
+
88
+ # Check to see if the all the properties in the model are valid
89
+ # @return true if the model is valid
90
+ # @!visibility private
91
+ def valid?
92
+ return false if @destination_key.nil?
93
+ return false if @if_not_exists.nil?
94
+ return false if @source_keys.nil?
95
+ true
96
+ end
97
+
98
+ # Custom attribute writer method with validation
99
+ # @param destination_key [Object] Object to be assigned
100
+ # @!visibility private
101
+ def destination_key=(destination_key)
102
+ if destination_key.nil?
103
+ fail ArgumentError, 'invalid value for "destination_key", destination_key cannot be nil.'
104
+ end
105
+ @destination_key = destination_key
106
+ end
107
+
108
+ # Custom attribute writer method with validation
109
+ # @param if_not_exists [Object] Object to be assigned
110
+ # @!visibility private
111
+ def if_not_exists=(if_not_exists)
112
+ if if_not_exists.nil?
113
+ fail ArgumentError, 'invalid value for "if_not_exists", if_not_exists cannot be nil.'
114
+ end
115
+ @if_not_exists = if_not_exists
116
+ end
117
+
118
+ # Custom attribute writer method with validation
119
+ # @param source_keys [Object] Object to be assigned
120
+ # @!visibility private
121
+ def source_keys=(source_keys)
122
+ if source_keys.nil?
123
+ fail ArgumentError, 'invalid value for "source_keys", source_keys cannot be nil.'
124
+ end
125
+ @source_keys = source_keys
126
+ end
127
+
128
+ # Returns the object in the form of hash, with additionalProperties support.
129
+ # @return [Hash] Returns the object in the form of hash
130
+ # @!visibility private
131
+ def to_hash
132
+ hash = {}
133
+ self.class.attribute_map.each_pair do |attr, param|
134
+ value = self.send(attr)
135
+ if value.nil?
136
+ is_nullable = self.class.openapi_nullable.include?(attr)
137
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
138
+ end
139
+
140
+ hash[param] = _to_hash(value)
141
+ end
142
+ self.additional_properties.each_pair do |attr, value|
143
+ hash[attr] = value
144
+ end
145
+ hash
146
+ end
147
+
148
+ # Checks equality by comparing each attribute.
149
+ # @param o [Object] Object to be compared
150
+ # @!visibility private
151
+ def ==(o)
152
+ return true if self.equal?(o)
153
+ self.class == o.class &&
154
+ destination_key == o.destination_key &&
155
+ if_not_exists == o.if_not_exists &&
156
+ source_keys == o.source_keys &&
157
+ additional_properties == o.additional_properties
158
+ end
159
+
160
+ # Calculates hash code according to all attributes.
161
+ # @return [Integer] Hash code
162
+ # @!visibility private
163
+ def hash
164
+ [destination_key, if_not_exists, source_keys, additional_properties].hash
165
+ end
166
+ end
167
+ end
@@ -0,0 +1,172 @@
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 `RulesetRespDataAttributesRulesItemsQuery` object.
21
+ class RulesetRespDataAttributesRulesItemsQuery
22
+ include BaseGenericModel
23
+
24
+ # The definition of `RulesetRespDataAttributesRulesItemsQueryAddition` object.
25
+ attr_accessor :addition
26
+
27
+ # The `query` `case_insensitivity`.
28
+ attr_accessor :case_insensitivity
29
+
30
+ # The `query` `if_not_exists`.
31
+ attr_reader :if_not_exists
32
+
33
+ # The `query` `query`.
34
+ attr_reader :query
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
+ :'addition' => :'addition',
43
+ :'case_insensitivity' => :'case_insensitivity',
44
+ :'if_not_exists' => :'if_not_exists',
45
+ :'query' => :'query'
46
+ }
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ # @!visibility private
51
+ def self.openapi_types
52
+ {
53
+ :'addition' => :'RulesetRespDataAttributesRulesItemsQueryAddition',
54
+ :'case_insensitivity' => :'Boolean',
55
+ :'if_not_exists' => :'Boolean',
56
+ :'query' => :'String'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ # @!visibility private
62
+ def self.openapi_nullable
63
+ Set.new([
64
+ :'addition',
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::RulesetRespDataAttributesRulesItemsQuery` 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?(:'addition')
87
+ self.addition = attributes[:'addition']
88
+ end
89
+
90
+ if attributes.key?(:'case_insensitivity')
91
+ self.case_insensitivity = attributes[:'case_insensitivity']
92
+ end
93
+
94
+ if attributes.key?(:'if_not_exists')
95
+ self.if_not_exists = attributes[:'if_not_exists']
96
+ end
97
+
98
+ if attributes.key?(:'query')
99
+ self.query = attributes[:'query']
100
+ end
101
+ end
102
+
103
+ # Check to see if the all the properties in the model are valid
104
+ # @return true if the model is valid
105
+ # @!visibility private
106
+ def valid?
107
+ return false if @if_not_exists.nil?
108
+ return false if @query.nil?
109
+ true
110
+ end
111
+
112
+ # Custom attribute writer method with validation
113
+ # @param if_not_exists [Object] Object to be assigned
114
+ # @!visibility private
115
+ def if_not_exists=(if_not_exists)
116
+ if if_not_exists.nil?
117
+ fail ArgumentError, 'invalid value for "if_not_exists", if_not_exists cannot be nil.'
118
+ end
119
+ @if_not_exists = if_not_exists
120
+ end
121
+
122
+ # Custom attribute writer method with validation
123
+ # @param query [Object] Object to be assigned
124
+ # @!visibility private
125
+ def query=(query)
126
+ if query.nil?
127
+ fail ArgumentError, 'invalid value for "query", query cannot be nil.'
128
+ end
129
+ @query = query
130
+ end
131
+
132
+ # Returns the object in the form of hash, with additionalProperties support.
133
+ # @return [Hash] Returns the object in the form of hash
134
+ # @!visibility private
135
+ def to_hash
136
+ hash = {}
137
+ self.class.attribute_map.each_pair do |attr, param|
138
+ value = self.send(attr)
139
+ if value.nil?
140
+ is_nullable = self.class.openapi_nullable.include?(attr)
141
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
142
+ end
143
+
144
+ hash[param] = _to_hash(value)
145
+ end
146
+ self.additional_properties.each_pair do |attr, value|
147
+ hash[attr] = value
148
+ end
149
+ hash
150
+ end
151
+
152
+ # Checks equality by comparing each attribute.
153
+ # @param o [Object] Object to be compared
154
+ # @!visibility private
155
+ def ==(o)
156
+ return true if self.equal?(o)
157
+ self.class == o.class &&
158
+ addition == o.addition &&
159
+ case_insensitivity == o.case_insensitivity &&
160
+ if_not_exists == o.if_not_exists &&
161
+ query == o.query &&
162
+ additional_properties == o.additional_properties
163
+ end
164
+
165
+ # Calculates hash code according to all attributes.
166
+ # @return [Integer] Hash code
167
+ # @!visibility private
168
+ def hash
169
+ [addition, case_insensitivity, if_not_exists, query, additional_properties].hash
170
+ end
171
+ end
172
+ end
@@ -0,0 +1,144 @@
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 `RulesetRespDataAttributesRulesItemsQueryAddition` object.
21
+ class RulesetRespDataAttributesRulesItemsQueryAddition
22
+ include BaseGenericModel
23
+
24
+ # The `addition` `key`.
25
+ attr_reader :key
26
+
27
+ # The `addition` `value`.
28
+ attr_reader :value
29
+
30
+ attr_accessor :additional_properties
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ # @!visibility private
34
+ def self.attribute_map
35
+ {
36
+ :'key' => :'key',
37
+ :'value' => :'value'
38
+ }
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ # @!visibility private
43
+ def self.openapi_types
44
+ {
45
+ :'key' => :'String',
46
+ :'value' => :'String'
47
+ }
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param attributes [Hash] Model attributes in the form of hash
52
+ # @!visibility private
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RulesetRespDataAttributesRulesItemsQueryAddition` initialize method"
56
+ end
57
+
58
+ self.additional_properties = {}
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!self.class.attribute_map.key?(k.to_sym))
62
+ self.additional_properties[k.to_sym] = v
63
+ else
64
+ h[k.to_sym] = v
65
+ end
66
+ }
67
+
68
+ if attributes.key?(:'key')
69
+ self.key = attributes[:'key']
70
+ end
71
+
72
+ if attributes.key?(:'value')
73
+ self.value = attributes[:'value']
74
+ end
75
+ end
76
+
77
+ # Check to see if the all the properties in the model are valid
78
+ # @return true if the model is valid
79
+ # @!visibility private
80
+ def valid?
81
+ return false if @key.nil?
82
+ return false if @value.nil?
83
+ true
84
+ end
85
+
86
+ # Custom attribute writer method with validation
87
+ # @param key [Object] Object to be assigned
88
+ # @!visibility private
89
+ def key=(key)
90
+ if key.nil?
91
+ fail ArgumentError, 'invalid value for "key", key cannot be nil.'
92
+ end
93
+ @key = key
94
+ end
95
+
96
+ # Custom attribute writer method with validation
97
+ # @param value [Object] Object to be assigned
98
+ # @!visibility private
99
+ def value=(value)
100
+ if value.nil?
101
+ fail ArgumentError, 'invalid value for "value", value cannot be nil.'
102
+ end
103
+ @value = value
104
+ end
105
+
106
+ # Returns the object in the form of hash, with additionalProperties support.
107
+ # @return [Hash] Returns the object in the form of hash
108
+ # @!visibility private
109
+ def to_hash
110
+ hash = {}
111
+ self.class.attribute_map.each_pair do |attr, param|
112
+ value = self.send(attr)
113
+ if value.nil?
114
+ is_nullable = self.class.openapi_nullable.include?(attr)
115
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
116
+ end
117
+
118
+ hash[param] = _to_hash(value)
119
+ end
120
+ self.additional_properties.each_pair do |attr, value|
121
+ hash[attr] = value
122
+ end
123
+ hash
124
+ end
125
+
126
+ # Checks equality by comparing each attribute.
127
+ # @param o [Object] Object to be compared
128
+ # @!visibility private
129
+ def ==(o)
130
+ return true if self.equal?(o)
131
+ self.class == o.class &&
132
+ key == o.key &&
133
+ value == o.value &&
134
+ additional_properties == o.additional_properties
135
+ end
136
+
137
+ # Calculates hash code according to all attributes.
138
+ # @return [Integer] Hash code
139
+ # @!visibility private
140
+ def hash
141
+ [key, value, additional_properties].hash
142
+ end
143
+ end
144
+ end