datadog_api_client 2.57.0 → 2.58.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 (110) hide show
  1. checksums.yaml +4 -4
  2. data/.generator/schemas/v1/openapi.yaml +2 -0
  3. data/.generator/schemas/v2/openapi.yaml +748 -397
  4. data/CHANGELOG.md +21 -0
  5. data/examples/v1/monitors/CreateMonitor_1348801712.rb +23 -0
  6. data/examples/v2/ci-visibility-github-accounts/ListCIAppGitHubAccounts.rb +5 -0
  7. data/examples/v2/ci-visibility-github-accounts/UpdateCIAppGitHubAccount.rb +20 -0
  8. data/examples/v2/dora-metrics/PatchDORADeploymentByVersion.rb +24 -0
  9. data/examples/v2/governance-console/UpdateGovernanceControl.rb +0 -1
  10. data/examples/v2/status-pages/PatchMaintenanceUpdate.rb +15 -0
  11. data/lib/datadog_api_client/configuration.rb +1 -3
  12. data/lib/datadog_api_client/inflector.rb +33 -14
  13. data/lib/datadog_api_client/v1/models/monitor_type.rb +1 -0
  14. data/lib/datadog_api_client/v2/api/ci_visibility_git_hub_accounts_api.rb +160 -0
  15. data/lib/datadog_api_client/v2/api/dora_metrics_api.rb +73 -0
  16. data/lib/datadog_api_client/v2/api/status_pages_api.rb +83 -1
  17. data/lib/datadog_api_client/v2/models/agent_trigger.rb +105 -0
  18. data/lib/datadog_api_client/v2/models/agent_trigger_wrapper.rb +135 -0
  19. data/lib/datadog_api_client/v2/models/api_trigger_wrapper.rb +1 -1
  20. data/lib/datadog_api_client/v2/models/app_trigger_wrapper.rb +1 -1
  21. data/lib/datadog_api_client/v2/models/case_trigger_wrapper.rb +1 -1
  22. data/lib/datadog_api_client/v2/models/change_event_trigger_wrapper.rb +1 -1
  23. data/lib/datadog_api_client/v2/models/ci_app_git_hub_account_attributes.rb +147 -0
  24. data/lib/datadog_api_client/v2/models/{rum_rate_limit_config_data.rb → ci_app_git_hub_account_data.rb} +10 -8
  25. data/lib/datadog_api_client/v2/models/ci_app_git_hub_account_repository.rb +115 -0
  26. data/lib/datadog_api_client/v2/models/{rum_rate_limit_config_response.rb → ci_app_git_hub_account_response.rb} +5 -5
  27. data/lib/datadog_api_client/v2/models/{rum_rate_limit_quota_reached_action.rb → ci_app_git_hub_account_type.rb} +4 -4
  28. data/lib/datadog_api_client/v2/models/{rum_rate_limit_config_update_request.rb → ci_app_git_hub_account_update_request.rb} +5 -5
  29. data/lib/datadog_api_client/v2/models/ci_app_git_hub_account_update_request_attributes.rb +159 -0
  30. data/lib/datadog_api_client/v2/models/ci_app_git_hub_account_update_request_data.rb +146 -0
  31. data/lib/datadog_api_client/v2/models/ci_app_git_hub_account_update_request_repository.rb +148 -0
  32. data/lib/datadog_api_client/v2/models/{rum_rate_limit_adaptive_config.rb → ci_app_git_hub_accounts_response.rb} +19 -25
  33. data/lib/datadog_api_client/v2/models/completion_condition.rb +4 -29
  34. data/lib/datadog_api_client/v2/models/completion_gate.rb +4 -29
  35. data/lib/datadog_api_client/v2/models/create_degradation_request.rb +13 -3
  36. data/lib/datadog_api_client/v2/models/create_status_page_request_data_attributes.rb +1 -11
  37. data/lib/datadog_api_client/v2/models/create_table_request_data_attributes_schema.rb +9 -1
  38. data/lib/datadog_api_client/v2/models/create_upload_request_data_attributes.rb +5 -1
  39. data/lib/datadog_api_client/v2/models/dashboard_trigger_wrapper.rb +1 -1
  40. data/lib/datadog_api_client/v2/models/database_monitoring_trigger_wrapper.rb +1 -1
  41. data/lib/datadog_api_client/v2/models/datastore_trigger_wrapper.rb +1 -1
  42. data/lib/datadog_api_client/v2/models/degradation_request_meta.rb +105 -0
  43. data/lib/datadog_api_client/v2/models/deployment_gates_fdd_rule_options.rb +13 -1
  44. data/lib/datadog_api_client/v2/models/deployment_rule_options_faulty_deployment_detection.rb +13 -1
  45. data/lib/datadog_api_client/v2/models/dora_deployment_patch_by_version_remediation.rb +63 -0
  46. data/lib/datadog_api_client/v2/models/dora_deployment_patch_by_version_remediation_by_id.rb +119 -0
  47. data/lib/datadog_api_client/v2/models/dora_deployment_patch_by_version_remediation_by_version.rb +119 -0
  48. data/lib/datadog_api_client/v2/models/dora_deployment_patch_by_version_request.rb +123 -0
  49. data/lib/datadog_api_client/v2/models/dora_deployment_patch_by_version_request_attributes.rb +196 -0
  50. data/lib/datadog_api_client/v2/models/dora_deployment_patch_by_version_request_data.rb +144 -0
  51. data/lib/datadog_api_client/v2/models/dora_deployment_patch_remediation.rb +15 -5
  52. data/lib/datadog_api_client/v2/models/dora_deployment_patch_request_attributes.rb +1 -1
  53. data/lib/datadog_api_client/v2/models/error_handler.rb +4 -29
  54. data/lib/datadog_api_client/v2/models/fleet_agent_info_details_v2.rb +1 -49
  55. data/lib/datadog_api_client/v2/models/form_trigger_wrapper.rb +1 -1
  56. data/lib/datadog_api_client/v2/models/github_webhook_trigger_wrapper.rb +1 -1
  57. data/lib/datadog_api_client/v2/models/governance_control_attributes.rb +1 -22
  58. data/lib/datadog_api_client/v2/models/governance_control_parameter_definition.rb +10 -13
  59. data/lib/datadog_api_client/v2/models/governance_control_update_attributes.rb +1 -11
  60. data/lib/datadog_api_client/v2/models/incident_trigger_wrapper.rb +1 -1
  61. data/lib/datadog_api_client/v2/models/input_schema_parameters.rb +4 -0
  62. data/lib/datadog_api_client/v2/models/maintenance_update.rb +105 -0
  63. data/lib/datadog_api_client/v2/models/maintenance_update_data.rb +164 -0
  64. data/lib/datadog_api_client/v2/models/maintenance_update_data_attributes.rb +167 -0
  65. data/lib/datadog_api_client/v2/models/{rum_rate_limit_config_type.rb → maintenance_update_data_attributes_status.rb} +6 -3
  66. data/lib/datadog_api_client/v2/models/maintenance_update_data_relationships.rb +125 -0
  67. data/lib/datadog_api_client/v2/models/maintenance_update_data_relationships_maintenance.rb +123 -0
  68. data/lib/datadog_api_client/v2/models/maintenance_update_data_relationships_maintenance_data.rb +144 -0
  69. data/lib/datadog_api_client/v2/models/{rum_rate_limit_config_update_attributes.rb → maintenance_update_data_relationships_user.rb} +17 -38
  70. data/lib/datadog_api_client/v2/models/maintenance_update_data_relationships_user_data.rb +144 -0
  71. data/lib/datadog_api_client/v2/models/monitor_trigger_wrapper.rb +1 -1
  72. data/lib/datadog_api_client/v2/models/notebook_trigger_wrapper.rb +1 -1
  73. data/lib/datadog_api_client/v2/models/on_call_trigger_wrapper.rb +1 -1
  74. data/lib/datadog_api_client/v2/models/outbound_edge.rb +8 -0
  75. data/lib/datadog_api_client/v2/models/parameter.rb +4 -0
  76. data/lib/datadog_api_client/v2/models/patch_degradation_request.rb +13 -3
  77. data/lib/datadog_api_client/v2/models/patch_maintenance_request_data_attributes.rb +11 -1
  78. data/lib/datadog_api_client/v2/models/patch_maintenance_update_request.rb +105 -0
  79. data/lib/datadog_api_client/v2/models/{rum_rate_limit_config_update_data.rb → patch_maintenance_update_request_data.rb} +9 -21
  80. data/lib/datadog_api_client/v2/models/patch_maintenance_update_request_data_attributes.rb +105 -0
  81. data/lib/datadog_api_client/v2/models/{rum_rate_limit_scope_type.rb → patch_maintenance_update_request_data_type.rb} +3 -3
  82. data/lib/datadog_api_client/v2/models/patch_status_page_request_data_attributes.rb +1 -11
  83. data/lib/datadog_api_client/v2/models/patch_table_request_data_attributes_schema.rb +9 -1
  84. data/lib/datadog_api_client/v2/models/readiness_gate.rb +4 -29
  85. data/lib/datadog_api_client/v2/models/retry_strategy.rb +12 -26
  86. data/lib/datadog_api_client/v2/models/retry_strategy_linear.rb +18 -29
  87. data/lib/datadog_api_client/v2/models/schedule_trigger_wrapper.rb +1 -1
  88. data/lib/datadog_api_client/v2/models/security_trigger_wrapper.rb +1 -1
  89. data/lib/datadog_api_client/v2/models/self_service_trigger_wrapper.rb +1 -1
  90. data/lib/datadog_api_client/v2/models/slack_trigger_wrapper.rb +1 -1
  91. data/lib/datadog_api_client/v2/models/software_catalog_trigger_wrapper.rb +1 -1
  92. data/lib/datadog_api_client/v2/models/spec.rb +1 -1
  93. data/lib/datadog_api_client/v2/models/step.rb +11 -2
  94. data/lib/datadog_api_client/v2/models/step_display.rb +2 -1
  95. data/lib/datadog_api_client/v2/models/table_result_v2_data_attributes_schema.rb +9 -1
  96. data/lib/datadog_api_client/v2/models/trigger.rb +1 -0
  97. data/lib/datadog_api_client/v2/models/workflow_data_attributes.rb +1 -1
  98. data/lib/datadog_api_client/v2/models/workflow_data_update_attributes.rb +1 -1
  99. data/lib/datadog_api_client/v2/models/workflow_list_item_attributes.rb +1 -1
  100. data/lib/datadog_api_client/v2/models/workflow_trigger_wrapper.rb +2 -2
  101. data/lib/datadog_api_client/version.rb +1 -1
  102. metadata +39 -18
  103. data/examples/v2/rum-rate-limit/DeleteRumRateLimitConfig.rb +0 -8
  104. data/examples/v2/rum-rate-limit/GetRumRateLimitConfig.rb +0 -8
  105. data/examples/v2/rum-rate-limit/UpdateRumRateLimitConfig.rb +0 -28
  106. data/lib/datadog_api_client/v2/api/rum_rate_limit_api.rb +0 -277
  107. data/lib/datadog_api_client/v2/models/rum_rate_limit_config_attributes.rb +0 -185
  108. data/lib/datadog_api_client/v2/models/rum_rate_limit_custom_config.rb +0 -223
  109. data/lib/datadog_api_client/v2/models/rum_rate_limit_mode.rb +0 -28
  110. data/lib/datadog_api_client/v2/models/rum_rate_limit_window_type.rb +0 -26
@@ -24,13 +24,17 @@ module DatadogAPIClient::V2
24
24
  # The data object for creating a degradation.
25
25
  attr_accessor :data
26
26
 
27
+ # The supported metadata for a degradation request.
28
+ attr_accessor :meta
29
+
27
30
  attr_accessor :additional_properties
28
31
 
29
32
  # Attribute mapping from ruby-style variable name to JSON key.
30
33
  # @!visibility private
31
34
  def self.attribute_map
32
35
  {
33
- :'data' => :'data'
36
+ :'data' => :'data',
37
+ :'meta' => :'meta'
34
38
  }
35
39
  end
36
40
 
@@ -38,7 +42,8 @@ module DatadogAPIClient::V2
38
42
  # @!visibility private
39
43
  def self.openapi_types
40
44
  {
41
- :'data' => :'CreateDegradationRequestData'
45
+ :'data' => :'CreateDegradationRequestData',
46
+ :'meta' => :'DegradationRequestMeta'
42
47
  }
43
48
  end
44
49
 
@@ -63,6 +68,10 @@ module DatadogAPIClient::V2
63
68
  if attributes.key?(:'data')
64
69
  self.data = attributes[:'data']
65
70
  end
71
+
72
+ if attributes.key?(:'meta')
73
+ self.meta = attributes[:'meta']
74
+ end
66
75
  end
67
76
 
68
77
  # Returns the object in the form of hash, with additionalProperties support.
@@ -92,6 +101,7 @@ module DatadogAPIClient::V2
92
101
  return true if self.equal?(o)
93
102
  self.class == o.class &&
94
103
  data == o.data &&
104
+ meta == o.meta &&
95
105
  additional_properties == o.additional_properties
96
106
  end
97
107
 
@@ -99,7 +109,7 @@ module DatadogAPIClient::V2
99
109
  # @return [Integer] Hash code
100
110
  # @!visibility private
101
111
  def hash
102
- [data, additional_properties].hash
112
+ [data, meta, additional_properties].hash
103
113
  end
104
114
  end
105
115
  end
@@ -33,9 +33,6 @@ module DatadogAPIClient::V2
33
33
  # Base64-encoded image data included in email notifications sent to status page subscribers.
34
34
  attr_accessor :email_header_image
35
35
 
36
- # Whether the status page is enabled.
37
- attr_accessor :enabled
38
-
39
36
  # Base64-encoded image data displayed in the browser tab.
40
37
  attr_accessor :favicon
41
38
 
@@ -67,7 +64,6 @@ module DatadogAPIClient::V2
67
64
  :'components' => :'components',
68
65
  :'domain_prefix' => :'domain_prefix',
69
66
  :'email_header_image' => :'email_header_image',
70
- :'enabled' => :'enabled',
71
67
  :'favicon' => :'favicon',
72
68
  :'name' => :'name',
73
69
  :'slack_app_icon' => :'slack_app_icon',
@@ -86,7 +82,6 @@ module DatadogAPIClient::V2
86
82
  :'components' => :'Array<CreateStatusPageRequestDataAttributesComponentsItems>',
87
83
  :'domain_prefix' => :'String',
88
84
  :'email_header_image' => :'String',
89
- :'enabled' => :'Boolean',
90
85
  :'favicon' => :'String',
91
86
  :'name' => :'String',
92
87
  :'slack_app_icon' => :'String',
@@ -133,10 +128,6 @@ module DatadogAPIClient::V2
133
128
  self.email_header_image = attributes[:'email_header_image']
134
129
  end
135
130
 
136
- if attributes.key?(:'enabled')
137
- self.enabled = attributes[:'enabled']
138
- end
139
-
140
131
  if attributes.key?(:'favicon')
141
132
  self.favicon = attributes[:'favicon']
142
133
  end
@@ -247,7 +238,6 @@ module DatadogAPIClient::V2
247
238
  components == o.components &&
248
239
  domain_prefix == o.domain_prefix &&
249
240
  email_header_image == o.email_header_image &&
250
- enabled == o.enabled &&
251
241
  favicon == o.favicon &&
252
242
  name == o.name &&
253
243
  slack_app_icon == o.slack_app_icon &&
@@ -262,7 +252,7 @@ module DatadogAPIClient::V2
262
252
  # @return [Integer] Hash code
263
253
  # @!visibility private
264
254
  def hash
265
- [company_logo, components, domain_prefix, email_header_image, enabled, favicon, name, slack_app_icon, slack_subscriptions_enabled, subscriptions_enabled, type, visualization_type, additional_properties].hash
255
+ [company_logo, components, domain_prefix, email_header_image, favicon, name, slack_app_icon, slack_subscriptions_enabled, subscriptions_enabled, type, visualization_type, additional_properties].hash
266
256
  end
267
257
  end
268
258
  end
@@ -21,7 +21,7 @@ module DatadogAPIClient::V2
21
21
  class CreateTableRequestDataAttributesSchema
22
22
  include BaseGenericModel
23
23
 
24
- # The schema fields.
24
+ # The schema fields. Maximum of 200 columns.
25
25
  attr_reader :fields
26
26
 
27
27
  # List of field names that serve as primary keys for the table. Only one primary key is supported, and it is used as an ID to retrieve rows.
@@ -83,6 +83,8 @@ module DatadogAPIClient::V2
83
83
  # @!visibility private
84
84
  def valid?
85
85
  return false if @fields.nil?
86
+ return false if @fields.length > 200
87
+ return false if @fields.length < 1
86
88
  return false if @primary_keys.nil?
87
89
  true
88
90
  end
@@ -94,6 +96,12 @@ module DatadogAPIClient::V2
94
96
  if fields.nil?
95
97
  fail ArgumentError, 'invalid value for "fields", fields cannot be nil.'
96
98
  end
99
+ if fields.length > 200
100
+ fail ArgumentError, 'invalid value for "fields", number of items must be less than or equal to 200.'
101
+ end
102
+ if fields.length < 1
103
+ fail ArgumentError, 'invalid value for "fields", number of items must be greater than or equal to 1.'
104
+ end
97
105
  @fields = fields
98
106
  end
99
107
 
@@ -21,7 +21,7 @@ module DatadogAPIClient::V2
21
21
  class CreateUploadRequestDataAttributes
22
22
  include BaseGenericModel
23
23
 
24
- # The CSV file headers that define the schema fields, provided in the same order as the columns in the uploaded file.
24
+ # The CSV file headers that define the schema fields, provided in the same order as the columns in the uploaded file. Maximum of 200 columns.
25
25
  attr_reader :headers
26
26
 
27
27
  # Number of parts to split the file into for multipart upload.
@@ -99,6 +99,7 @@ module DatadogAPIClient::V2
99
99
  # @!visibility private
100
100
  def valid?
101
101
  return false if @headers.nil?
102
+ return false if @headers.length > 200
102
103
  return false if @part_count.nil?
103
104
  return false if @part_count > 20
104
105
  return false if @part_size.nil?
@@ -113,6 +114,9 @@ module DatadogAPIClient::V2
113
114
  if headers.nil?
114
115
  fail ArgumentError, 'invalid value for "headers", headers cannot be nil.'
115
116
  end
117
+ if headers.length > 200
118
+ fail ArgumentError, 'invalid value for "headers", number of items must be less than or equal to 200.'
119
+ end
116
120
  @headers = headers
117
121
  end
118
122
 
@@ -24,7 +24,7 @@ module DatadogAPIClient::V2
24
24
  # Trigger a workflow from a Dashboard.
25
25
  attr_reader :dashboard_trigger
26
26
 
27
- # A list of steps that run first after a trigger fires.
27
+ # Names of existing workflow steps that run first after a trigger fires.
28
28
  attr_accessor :start_step_names
29
29
 
30
30
  attr_accessor :additional_properties
@@ -24,7 +24,7 @@ module DatadogAPIClient::V2
24
24
  # Trigger a workflow from Database Monitoring.
25
25
  attr_reader :database_monitoring_trigger
26
26
 
27
- # A list of steps that run first after a trigger fires.
27
+ # Names of existing workflow steps that run first after a trigger fires.
28
28
  attr_accessor :start_step_names
29
29
 
30
30
  attr_accessor :additional_properties
@@ -24,7 +24,7 @@ module DatadogAPIClient::V2
24
24
  # Trigger a workflow from a Datastore. For automatic triggering a handle must be configured and the workflow must be published.
25
25
  attr_reader :datastore_trigger
26
26
 
27
- # A list of steps that run first after a trigger fires.
27
+ # Names of existing workflow steps that run first after a trigger fires.
28
28
  attr_accessor :start_step_names
29
29
 
30
30
  attr_accessor :additional_properties
@@ -0,0 +1,105 @@
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 supported metadata for a degradation request.
21
+ class DegradationRequestMeta
22
+ include BaseGenericModel
23
+
24
+ # A unique key used to ensure idempotent requests.
25
+ attr_accessor :idempotency_key
26
+
27
+ attr_accessor :additional_properties
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ # @!visibility private
31
+ def self.attribute_map
32
+ {
33
+ :'idempotency_key' => :'idempotency_key'
34
+ }
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ # @!visibility private
39
+ def self.openapi_types
40
+ {
41
+ :'idempotency_key' => :'UUID'
42
+ }
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param attributes [Hash] Model attributes in the form of hash
47
+ # @!visibility private
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DegradationRequestMeta` initialize method"
51
+ end
52
+
53
+ self.additional_properties = {}
54
+ # check to see if the attribute exists and convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h|
56
+ if (!self.class.attribute_map.key?(k.to_sym))
57
+ self.additional_properties[k.to_sym] = v
58
+ else
59
+ h[k.to_sym] = v
60
+ end
61
+ }
62
+
63
+ if attributes.key?(:'idempotency_key')
64
+ self.idempotency_key = attributes[:'idempotency_key']
65
+ end
66
+ end
67
+
68
+ # Returns the object in the form of hash, with additionalProperties support.
69
+ # @return [Hash] Returns the object in the form of hash
70
+ # @!visibility private
71
+ def to_hash
72
+ hash = {}
73
+ self.class.attribute_map.each_pair do |attr, param|
74
+ value = self.send(attr)
75
+ if value.nil?
76
+ is_nullable = self.class.openapi_nullable.include?(attr)
77
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
78
+ end
79
+
80
+ hash[param] = _to_hash(value)
81
+ end
82
+ self.additional_properties.each_pair do |attr, value|
83
+ hash[attr] = value
84
+ end
85
+ hash
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param o [Object] Object to be compared
90
+ # @!visibility private
91
+ def ==(o)
92
+ return true if self.equal?(o)
93
+ self.class == o.class &&
94
+ idempotency_key == o.idempotency_key &&
95
+ additional_properties == o.additional_properties
96
+ end
97
+
98
+ # Calculates hash code according to all attributes.
99
+ # @return [Integer] Hash code
100
+ # @!visibility private
101
+ def hash
102
+ [idempotency_key, additional_properties].hash
103
+ end
104
+ end
105
+ end
@@ -21,6 +21,9 @@ module DatadogAPIClient::V2
21
21
  class DeploymentGatesFDDRuleOptions
22
22
  include BaseGenericModel
23
23
 
24
+ # APM resource names to include in analysis. Mutually exclusive with `excluded_resources`.
25
+ attr_accessor :allowed_resources
26
+
24
27
  # Evaluation window in seconds. Maximum 7200 (2 hours).
25
28
  attr_reader :duration
26
29
 
@@ -33,6 +36,7 @@ module DatadogAPIClient::V2
33
36
  # @!visibility private
34
37
  def self.attribute_map
35
38
  {
39
+ :'allowed_resources' => :'allowed_resources',
36
40
  :'duration' => :'duration',
37
41
  :'excluded_resources' => :'excluded_resources'
38
42
  }
@@ -42,6 +46,7 @@ module DatadogAPIClient::V2
42
46
  # @!visibility private
43
47
  def self.openapi_types
44
48
  {
49
+ :'allowed_resources' => :'Array<String>',
45
50
  :'duration' => :'Integer',
46
51
  :'excluded_resources' => :'Array<String>'
47
52
  }
@@ -65,6 +70,12 @@ module DatadogAPIClient::V2
65
70
  end
66
71
  }
67
72
 
73
+ if attributes.key?(:'allowed_resources')
74
+ if (value = attributes[:'allowed_resources']).is_a?(Array)
75
+ self.allowed_resources = value
76
+ end
77
+ end
78
+
68
79
  if attributes.key?(:'duration')
69
80
  self.duration = attributes[:'duration']
70
81
  end
@@ -120,6 +131,7 @@ module DatadogAPIClient::V2
120
131
  def ==(o)
121
132
  return true if self.equal?(o)
122
133
  self.class == o.class &&
134
+ allowed_resources == o.allowed_resources &&
123
135
  duration == o.duration &&
124
136
  excluded_resources == o.excluded_resources &&
125
137
  additional_properties == o.additional_properties
@@ -129,7 +141,7 @@ module DatadogAPIClient::V2
129
141
  # @return [Integer] Hash code
130
142
  # @!visibility private
131
143
  def hash
132
- [duration, excluded_resources, additional_properties].hash
144
+ [allowed_resources, duration, excluded_resources, additional_properties].hash
133
145
  end
134
146
  end
135
147
  end
@@ -21,6 +21,9 @@ module DatadogAPIClient::V2
21
21
  class DeploymentRuleOptionsFaultyDeploymentDetection
22
22
  include BaseGenericModel
23
23
 
24
+ # Resources to include in faulty deployment detection. Mutually exclusive with `excluded_resources`.
25
+ attr_accessor :allowed_resources
26
+
24
27
  # The duration for faulty deployment detection.
25
28
  attr_accessor :duration
26
29
 
@@ -31,6 +34,7 @@ module DatadogAPIClient::V2
31
34
  # @!visibility private
32
35
  def self.attribute_map
33
36
  {
37
+ :'allowed_resources' => :'allowed_resources',
34
38
  :'duration' => :'duration',
35
39
  :'excluded_resources' => :'excluded_resources'
36
40
  }
@@ -40,6 +44,7 @@ module DatadogAPIClient::V2
40
44
  # @!visibility private
41
45
  def self.openapi_types
42
46
  {
47
+ :'allowed_resources' => :'Array<String>',
43
48
  :'duration' => :'Integer',
44
49
  :'excluded_resources' => :'Array<String>'
45
50
  }
@@ -61,6 +66,12 @@ module DatadogAPIClient::V2
61
66
  h[k.to_sym] = v
62
67
  }
63
68
 
69
+ if attributes.key?(:'allowed_resources')
70
+ if (value = attributes[:'allowed_resources']).is_a?(Array)
71
+ self.allowed_resources = value
72
+ end
73
+ end
74
+
64
75
  if attributes.key?(:'duration')
65
76
  self.duration = attributes[:'duration']
66
77
  end
@@ -78,6 +89,7 @@ module DatadogAPIClient::V2
78
89
  def ==(o)
79
90
  return true if self.equal?(o)
80
91
  self.class == o.class &&
92
+ allowed_resources == o.allowed_resources &&
81
93
  duration == o.duration &&
82
94
  excluded_resources == o.excluded_resources
83
95
  end
@@ -86,7 +98,7 @@ module DatadogAPIClient::V2
86
98
  # @return [Integer] Hash code
87
99
  # @!visibility private
88
100
  def hash
89
- [duration, excluded_resources].hash
101
+ [allowed_resources, duration, excluded_resources].hash
90
102
  end
91
103
  end
92
104
  end
@@ -0,0 +1,63 @@
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
+ # Remediation details for the deployment. Optional, but required to calculate failed deployment recovery time. Specify either `id` or `version` to identify the remediation deployment, but not both.
21
+ module DORADeploymentPatchByVersionRemediation
22
+ class << self
23
+ include BaseOneOfModel
24
+ include BaseOneOfModelNoDiscriminator
25
+
26
+ # List of class defined in oneOf (OpenAPI v3)
27
+ def openapi_one_of
28
+ [
29
+ :'DORADeploymentPatchByVersionRemediationByID',
30
+ :'DORADeploymentPatchByVersionRemediationByVersion'
31
+ ]
32
+ end
33
+ # Builds the object
34
+ # @param data [Mixed] Data to be matched against the list of oneOf items
35
+ # @return [Object] Returns the model or the data itself
36
+ def build(data)
37
+ # Go through the list of oneOf items and attempt to identify the appropriate one.
38
+ # Note:
39
+ # - We do not attempt to check whether exactly one item matches.
40
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
41
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
42
+ # - TODO: scalar values are de facto behaving as if they were nullable.
43
+ # - TODO: logging when debugging is set.
44
+ openapi_one_of.each do |klass|
45
+ begin
46
+ next if klass == :AnyType # "nullable: true"
47
+ typed_data = find_and_cast_into_type(klass, data)
48
+ next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed
49
+ return typed_data if typed_data
50
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
51
+ end
52
+ end
53
+
54
+ if openapi_one_of.include?(:AnyType)
55
+ data
56
+ else
57
+ self._unparsed = true
58
+ DatadogAPIClient::UnparsedObject.new(data)
59
+ end
60
+ end
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,119 @@
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
+ # Remediation details identified by the ID of the remediation deployment.
21
+ class DORADeploymentPatchByVersionRemediationByID
22
+ include BaseGenericModel
23
+
24
+ # The ID of the remediation deployment.
25
+ attr_reader :id
26
+
27
+ # The type of remediation action taken. Required when the failed deployment must be linked to a remediation deployment.
28
+ attr_reader :type
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ # @!visibility private
32
+ def self.attribute_map
33
+ {
34
+ :'id' => :'id',
35
+ :'type' => :'type'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ # @!visibility private
41
+ def self.openapi_types
42
+ {
43
+ :'id' => :'String',
44
+ :'type' => :'DORADeploymentPatchRemediationType'
45
+ }
46
+ end
47
+
48
+ # Initializes the object
49
+ # @param attributes [Hash] Model attributes in the form of hash
50
+ # @!visibility private
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORADeploymentPatchByVersionRemediationByID` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DORADeploymentPatchByVersionRemediationByID`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'id')
65
+ self.id = attributes[:'id']
66
+ end
67
+
68
+ if attributes.key?(:'type')
69
+ self.type = attributes[:'type']
70
+ end
71
+ end
72
+
73
+ # Check to see if the all the properties in the model are valid
74
+ # @return true if the model is valid
75
+ # @!visibility private
76
+ def valid?
77
+ return false if @id.nil?
78
+ return false if @type.nil?
79
+ true
80
+ end
81
+
82
+ # Custom attribute writer method with validation
83
+ # @param id [Object] Object to be assigned
84
+ # @!visibility private
85
+ def id=(id)
86
+ if id.nil?
87
+ fail ArgumentError, 'invalid value for "id", id cannot be nil.'
88
+ end
89
+ @id = id
90
+ end
91
+
92
+ # Custom attribute writer method with validation
93
+ # @param type [Object] Object to be assigned
94
+ # @!visibility private
95
+ def type=(type)
96
+ if type.nil?
97
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
98
+ end
99
+ @type = type
100
+ end
101
+
102
+ # Checks equality by comparing each attribute.
103
+ # @param o [Object] Object to be compared
104
+ # @!visibility private
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ id == o.id &&
109
+ type == o.type
110
+ end
111
+
112
+ # Calculates hash code according to all attributes.
113
+ # @return [Integer] Hash code
114
+ # @!visibility private
115
+ def hash
116
+ [id, type].hash
117
+ end
118
+ end
119
+ end