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
@@ -17,12 +17,12 @@ require 'date'
17
17
  require 'time'
18
18
 
19
19
  module DatadogAPIClient::V2
20
- # List of GCP Usage Cost configs.
20
+ # List of Google Cloud Usage Cost configs.
21
21
  class GCPUsageCostConfigsResponse
22
22
  include BaseGenericModel
23
23
 
24
- # A GCP Usage Cost config.
25
- attr_accessor :data
24
+ # A Google Cloud Usage Cost config.
25
+ attr_reader :data
26
26
 
27
27
  attr_accessor :additional_properties
28
28
 
@@ -67,6 +67,24 @@ module DatadogAPIClient::V2
67
67
  end
68
68
  end
69
69
 
70
+ # Check to see if the all the properties in the model are valid
71
+ # @return true if the model is valid
72
+ # @!visibility private
73
+ def valid?
74
+ return false if @data.nil?
75
+ true
76
+ end
77
+
78
+ # Custom attribute writer method with validation
79
+ # @param data [Object] Object to be assigned
80
+ # @!visibility private
81
+ def data=(data)
82
+ if data.nil?
83
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
84
+ end
85
+ @data = data
86
+ end
87
+
70
88
  # Returns the object in the form of hash, with additionalProperties support.
71
89
  # @return [Hash] Returns the object in the form of hash
72
90
  # @!visibility private
@@ -42,6 +42,9 @@ module DatadogAPIClient::V2
42
42
  # Options on new value detection method.
43
43
  attr_accessor :new_value_options
44
44
 
45
+ # Options on sequence detection method.
46
+ attr_accessor :sequence_detection_options
47
+
45
48
  # Options on third party detection method.
46
49
  attr_accessor :third_party_rule_options
47
50
 
@@ -57,6 +60,7 @@ module DatadogAPIClient::V2
57
60
  :'keep_alive' => :'keepAlive',
58
61
  :'max_signal_duration' => :'maxSignalDuration',
59
62
  :'new_value_options' => :'newValueOptions',
63
+ :'sequence_detection_options' => :'sequenceDetectionOptions',
60
64
  :'third_party_rule_options' => :'thirdPartyRuleOptions'
61
65
  }
62
66
  end
@@ -71,6 +75,7 @@ module DatadogAPIClient::V2
71
75
  :'keep_alive' => :'SecurityMonitoringRuleKeepAlive',
72
76
  :'max_signal_duration' => :'SecurityMonitoringRuleMaxSignalDuration',
73
77
  :'new_value_options' => :'SecurityMonitoringRuleNewValueOptions',
78
+ :'sequence_detection_options' => :'SecurityMonitoringRuleSequenceDetectionOptions',
74
79
  :'third_party_rule_options' => :'SecurityMonitoringRuleThirdPartyOptions'
75
80
  }
76
81
  end
@@ -117,6 +122,10 @@ module DatadogAPIClient::V2
117
122
  self.new_value_options = attributes[:'new_value_options']
118
123
  end
119
124
 
125
+ if attributes.key?(:'sequence_detection_options')
126
+ self.sequence_detection_options = attributes[:'sequence_detection_options']
127
+ end
128
+
120
129
  if attributes.key?(:'third_party_rule_options')
121
130
  self.third_party_rule_options = attributes[:'third_party_rule_options']
122
131
  end
@@ -154,6 +163,7 @@ module DatadogAPIClient::V2
154
163
  keep_alive == o.keep_alive &&
155
164
  max_signal_duration == o.max_signal_duration &&
156
165
  new_value_options == o.new_value_options &&
166
+ sequence_detection_options == o.sequence_detection_options &&
157
167
  third_party_rule_options == o.third_party_rule_options &&
158
168
  additional_properties == o.additional_properties
159
169
  end
@@ -162,7 +172,7 @@ module DatadogAPIClient::V2
162
172
  # @return [Integer] Hash code
163
173
  # @!visibility private
164
174
  def hash
165
- [detection_method, evaluation_window, impossible_travel_options, keep_alive, max_signal_duration, new_value_options, third_party_rule_options, additional_properties].hash
175
+ [detection_method, evaluation_window, impossible_travel_options, keep_alive, max_signal_duration, new_value_options, sequence_detection_options, third_party_rule_options, additional_properties].hash
166
176
  end
167
177
  end
168
178
  end
@@ -0,0 +1,203 @@
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 incident impact's attributes.
21
+ class IncidentImpactAttributes
22
+ include BaseGenericModel
23
+
24
+ # Timestamp when the impact was created.
25
+ attr_accessor :created
26
+
27
+ # Description of the impact.
28
+ attr_reader :description
29
+
30
+ # Timestamp when the impact ended.
31
+ attr_accessor :end_at
32
+
33
+ # An object mapping impact field names to field values.
34
+ attr_accessor :fields
35
+
36
+ # The type of impact.
37
+ attr_accessor :impact_type
38
+
39
+ # Timestamp when the impact was last modified.
40
+ attr_accessor :modified
41
+
42
+ # Timestamp representing when the impact started.
43
+ attr_reader :start_at
44
+
45
+ attr_accessor :additional_properties
46
+
47
+ # Attribute mapping from ruby-style variable name to JSON key.
48
+ # @!visibility private
49
+ def self.attribute_map
50
+ {
51
+ :'created' => :'created',
52
+ :'description' => :'description',
53
+ :'end_at' => :'end_at',
54
+ :'fields' => :'fields',
55
+ :'impact_type' => :'impact_type',
56
+ :'modified' => :'modified',
57
+ :'start_at' => :'start_at'
58
+ }
59
+ end
60
+
61
+ # Attribute type mapping.
62
+ # @!visibility private
63
+ def self.openapi_types
64
+ {
65
+ :'created' => :'Time',
66
+ :'description' => :'String',
67
+ :'end_at' => :'Time',
68
+ :'fields' => :'Hash<String, Object>',
69
+ :'impact_type' => :'String',
70
+ :'modified' => :'Time',
71
+ :'start_at' => :'Time'
72
+ }
73
+ end
74
+
75
+ # List of attributes with nullable: true
76
+ # @!visibility private
77
+ def self.openapi_nullable
78
+ Set.new([
79
+ :'end_at',
80
+ :'fields',
81
+ ])
82
+ end
83
+
84
+ # Initializes the object
85
+ # @param attributes [Hash] Model attributes in the form of hash
86
+ # @!visibility private
87
+ def initialize(attributes = {})
88
+ if (!attributes.is_a?(Hash))
89
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentImpactAttributes` initialize method"
90
+ end
91
+
92
+ self.additional_properties = {}
93
+ # check to see if the attribute exists and convert string to symbol for hash key
94
+ attributes = attributes.each_with_object({}) { |(k, v), h|
95
+ if (!self.class.attribute_map.key?(k.to_sym))
96
+ self.additional_properties[k.to_sym] = v
97
+ else
98
+ h[k.to_sym] = v
99
+ end
100
+ }
101
+
102
+ if attributes.key?(:'created')
103
+ self.created = attributes[:'created']
104
+ end
105
+
106
+ if attributes.key?(:'description')
107
+ self.description = attributes[:'description']
108
+ end
109
+
110
+ if attributes.key?(:'end_at')
111
+ self.end_at = attributes[:'end_at']
112
+ end
113
+
114
+ if attributes.key?(:'fields')
115
+ self.fields = attributes[:'fields']
116
+ end
117
+
118
+ if attributes.key?(:'impact_type')
119
+ self.impact_type = attributes[:'impact_type']
120
+ end
121
+
122
+ if attributes.key?(:'modified')
123
+ self.modified = attributes[:'modified']
124
+ end
125
+
126
+ if attributes.key?(:'start_at')
127
+ self.start_at = attributes[:'start_at']
128
+ end
129
+ end
130
+
131
+ # Check to see if the all the properties in the model are valid
132
+ # @return true if the model is valid
133
+ # @!visibility private
134
+ def valid?
135
+ return false if @description.nil?
136
+ return false if @start_at.nil?
137
+ true
138
+ end
139
+
140
+ # Custom attribute writer method with validation
141
+ # @param description [Object] Object to be assigned
142
+ # @!visibility private
143
+ def description=(description)
144
+ if description.nil?
145
+ fail ArgumentError, 'invalid value for "description", description cannot be nil.'
146
+ end
147
+ @description = description
148
+ end
149
+
150
+ # Custom attribute writer method with validation
151
+ # @param start_at [Object] Object to be assigned
152
+ # @!visibility private
153
+ def start_at=(start_at)
154
+ if start_at.nil?
155
+ fail ArgumentError, 'invalid value for "start_at", start_at cannot be nil.'
156
+ end
157
+ @start_at = start_at
158
+ end
159
+
160
+ # Returns the object in the form of hash, with additionalProperties support.
161
+ # @return [Hash] Returns the object in the form of hash
162
+ # @!visibility private
163
+ def to_hash
164
+ hash = {}
165
+ self.class.attribute_map.each_pair do |attr, param|
166
+ value = self.send(attr)
167
+ if value.nil?
168
+ is_nullable = self.class.openapi_nullable.include?(attr)
169
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
170
+ end
171
+
172
+ hash[param] = _to_hash(value)
173
+ end
174
+ self.additional_properties.each_pair do |attr, value|
175
+ hash[attr] = value
176
+ end
177
+ hash
178
+ end
179
+
180
+ # Checks equality by comparing each attribute.
181
+ # @param o [Object] Object to be compared
182
+ # @!visibility private
183
+ def ==(o)
184
+ return true if self.equal?(o)
185
+ self.class == o.class &&
186
+ created == o.created &&
187
+ description == o.description &&
188
+ end_at == o.end_at &&
189
+ fields == o.fields &&
190
+ impact_type == o.impact_type &&
191
+ modified == o.modified &&
192
+ start_at == o.start_at &&
193
+ additional_properties == o.additional_properties
194
+ end
195
+
196
+ # Calculates hash code according to all attributes.
197
+ # @return [Integer] Hash code
198
+ # @!visibility private
199
+ def hash
200
+ [created, description, end_at, fields, impact_type, modified, start_at, additional_properties].hash
201
+ end
202
+ end
203
+ end
@@ -0,0 +1,173 @@
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 incident impact's attributes for a create request.
21
+ class IncidentImpactCreateAttributes
22
+ include BaseGenericModel
23
+
24
+ # Description of the impact.
25
+ attr_reader :description
26
+
27
+ # Timestamp when the impact ended.
28
+ attr_accessor :end_at
29
+
30
+ # An object mapping impact field names to field values.
31
+ attr_accessor :fields
32
+
33
+ # Timestamp when the impact started.
34
+ attr_reader :start_at
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
+ :'description' => :'description',
43
+ :'end_at' => :'end_at',
44
+ :'fields' => :'fields',
45
+ :'start_at' => :'start_at'
46
+ }
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ # @!visibility private
51
+ def self.openapi_types
52
+ {
53
+ :'description' => :'String',
54
+ :'end_at' => :'Time',
55
+ :'fields' => :'Hash<String, Object>',
56
+ :'start_at' => :'Time'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ # @!visibility private
62
+ def self.openapi_nullable
63
+ Set.new([
64
+ :'end_at',
65
+ :'fields',
66
+ ])
67
+ end
68
+
69
+ # Initializes the object
70
+ # @param attributes [Hash] Model attributes in the form of hash
71
+ # @!visibility private
72
+ def initialize(attributes = {})
73
+ if (!attributes.is_a?(Hash))
74
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentImpactCreateAttributes` initialize method"
75
+ end
76
+
77
+ self.additional_properties = {}
78
+ # check to see if the attribute exists and convert string to symbol for hash key
79
+ attributes = attributes.each_with_object({}) { |(k, v), h|
80
+ if (!self.class.attribute_map.key?(k.to_sym))
81
+ self.additional_properties[k.to_sym] = v
82
+ else
83
+ h[k.to_sym] = v
84
+ end
85
+ }
86
+
87
+ if attributes.key?(:'description')
88
+ self.description = attributes[:'description']
89
+ end
90
+
91
+ if attributes.key?(:'end_at')
92
+ self.end_at = attributes[:'end_at']
93
+ end
94
+
95
+ if attributes.key?(:'fields')
96
+ self.fields = attributes[:'fields']
97
+ end
98
+
99
+ if attributes.key?(:'start_at')
100
+ self.start_at = attributes[:'start_at']
101
+ end
102
+ end
103
+
104
+ # Check to see if the all the properties in the model are valid
105
+ # @return true if the model is valid
106
+ # @!visibility private
107
+ def valid?
108
+ return false if @description.nil?
109
+ return false if @start_at.nil?
110
+ true
111
+ end
112
+
113
+ # Custom attribute writer method with validation
114
+ # @param description [Object] Object to be assigned
115
+ # @!visibility private
116
+ def description=(description)
117
+ if description.nil?
118
+ fail ArgumentError, 'invalid value for "description", description cannot be nil.'
119
+ end
120
+ @description = description
121
+ end
122
+
123
+ # Custom attribute writer method with validation
124
+ # @param start_at [Object] Object to be assigned
125
+ # @!visibility private
126
+ def start_at=(start_at)
127
+ if start_at.nil?
128
+ fail ArgumentError, 'invalid value for "start_at", start_at cannot be nil.'
129
+ end
130
+ @start_at = start_at
131
+ end
132
+
133
+ # Returns the object in the form of hash, with additionalProperties support.
134
+ # @return [Hash] Returns the object in the form of hash
135
+ # @!visibility private
136
+ def to_hash
137
+ hash = {}
138
+ self.class.attribute_map.each_pair do |attr, param|
139
+ value = self.send(attr)
140
+ if value.nil?
141
+ is_nullable = self.class.openapi_nullable.include?(attr)
142
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
143
+ end
144
+
145
+ hash[param] = _to_hash(value)
146
+ end
147
+ self.additional_properties.each_pair do |attr, value|
148
+ hash[attr] = value
149
+ end
150
+ hash
151
+ end
152
+
153
+ # Checks equality by comparing each attribute.
154
+ # @param o [Object] Object to be compared
155
+ # @!visibility private
156
+ def ==(o)
157
+ return true if self.equal?(o)
158
+ self.class == o.class &&
159
+ description == o.description &&
160
+ end_at == o.end_at &&
161
+ fields == o.fields &&
162
+ start_at == o.start_at &&
163
+ additional_properties == o.additional_properties
164
+ end
165
+
166
+ # Calculates hash code according to all attributes.
167
+ # @return [Integer] Hash code
168
+ # @!visibility private
169
+ def hash
170
+ [description, end_at, fields, start_at, additional_properties].hash
171
+ end
172
+ end
173
+ 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
+ # Incident impact data for a create request.
21
+ class IncidentImpactCreateData
22
+ include BaseGenericModel
23
+
24
+ # The incident impact's attributes for a create request.
25
+ attr_reader :attributes
26
+
27
+ # Incident impact resource type.
28
+ attr_reader :type
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
+ :'attributes' => :'attributes',
37
+ :'type' => :'type'
38
+ }
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ # @!visibility private
43
+ def self.openapi_types
44
+ {
45
+ :'attributes' => :'IncidentImpactCreateAttributes',
46
+ :'type' => :'IncidentImpactType'
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::IncidentImpactCreateData` 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?(:'attributes')
69
+ self.attributes = attributes[:'attributes']
70
+ end
71
+
72
+ if attributes.key?(:'type')
73
+ self.type = attributes[:'type']
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 @attributes.nil?
82
+ return false if @type.nil?
83
+ true
84
+ end
85
+
86
+ # Custom attribute writer method with validation
87
+ # @param attributes [Object] Object to be assigned
88
+ # @!visibility private
89
+ def attributes=(attributes)
90
+ if attributes.nil?
91
+ fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
92
+ end
93
+ @attributes = attributes
94
+ end
95
+
96
+ # Custom attribute writer method with validation
97
+ # @param type [Object] Object to be assigned
98
+ # @!visibility private
99
+ def type=(type)
100
+ if type.nil?
101
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
102
+ end
103
+ @type = type
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
+ attributes == o.attributes &&
133
+ type == o.type &&
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
+ [attributes, type, additional_properties].hash
142
+ end
143
+ end
144
+ end