datadog_api_client 2.34.0 → 2.36.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 (111) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/schemas/v1/openapi.yaml +59 -6
  4. data/.generator/schemas/v2/openapi.yaml +1093 -69
  5. data/.generator/src/generator/formatter.py +2 -2
  6. data/.generator/src/generator/openapi.py +1 -1
  7. data/.github/workflows/release.yml +1 -1
  8. data/CHANGELOG.md +36 -0
  9. data/Gemfile +1 -0
  10. data/examples/v1/monitors/CreateMonitor_1539578087.rb +1 -0
  11. data/examples/v1/monitors/CreateMonitor_440013737.rb +1 -0
  12. data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +142 -0
  13. data/examples/v2/csm-threats/CreateCSMThreatsAgentRule_1295653933.rb +35 -0
  14. data/examples/v2/dora-metrics/CreateDORADeployment.rb +0 -3
  15. data/examples/v2/dora-metrics/CreateDORAFailure.rb +30 -0
  16. data/examples/v2/dora-metrics/CreateDORAIncident.rb +11 -9
  17. data/examples/v2/dora-metrics/CreateDORAIncident_1768887482.rb +25 -0
  18. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1735989579.rb +30 -0
  19. data/examples/v2/microsoft-teams-integration/CreateWorkflowsWebhookHandle_1716851881.rb +1 -1
  20. data/examples/v2/on-call/GetTeamOnCallUsers.rb +11 -0
  21. data/examples/v2/security-monitoring/ListFindings_2932019633.rb +11 -0
  22. data/examples/v2/software-catalog/DeleteCatalogKind.rb +5 -0
  23. data/examples/v2/software-catalog/ListCatalogKind.rb +5 -0
  24. data/examples/v2/software-catalog/ListCatalogKind_3806205775.rb +5 -0
  25. data/examples/v2/software-catalog/UpsertCatalogKind.rb +9 -0
  26. data/examples/v2/teams/AddMemberTeam.rb +15 -0
  27. data/examples/v2/teams/ListMemberTeams.rb +8 -0
  28. data/examples/v2/teams/ListMemberTeams_1662850354.rb +8 -0
  29. data/examples/v2/teams/RemoveMemberTeam.rb +8 -0
  30. data/lib/datadog_api_client/configuration.rb +3 -2
  31. data/lib/datadog_api_client/inflector.rb +42 -6
  32. data/lib/datadog_api_client/v1/api/snapshots_api.rb +2 -1
  33. data/lib/datadog_api_client/v1/models/monitor.rb +17 -1
  34. data/lib/datadog_api_client/v1/models/monitor_draft_status.rb +32 -0
  35. data/lib/datadog_api_client/v1/models/monitor_options.rb +1 -1
  36. data/lib/datadog_api_client/v1/models/monitor_update_request.rb +17 -1
  37. data/lib/datadog_api_client/v1/models/synthetics_api_test_step_subtype.rb +6 -0
  38. data/lib/datadog_api_client/v1/models/synthetics_basic_auth_web.rb +2 -31
  39. data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +32 -2
  40. data/lib/datadog_api_client/v2/api/dora_metrics_api.rb +79 -15
  41. data/lib/datadog_api_client/v2/api/on_call_api.rb +67 -0
  42. data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +5 -3
  43. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +13 -0
  44. data/lib/datadog_api_client/v2/api/software_catalog_api.rb +221 -0
  45. data/lib/datadog_api_client/v2/api/teams_api.rb +254 -0
  46. data/lib/datadog_api_client/v2/models/action_query_spec_inputs.rb +1 -1
  47. data/lib/datadog_api_client/v2/models/{dora_incident_response.rb → add_member_team_request.rb} +5 -5
  48. data/lib/datadog_api_client/v2/models/change_event_custom_attributes_author_type.rb +2 -0
  49. data/lib/datadog_api_client/v2/models/cloud_configuration_rule_payload.rb +21 -1
  50. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action.rb +33 -3
  51. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action_metadata.rb +125 -0
  52. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action_set.rb +165 -0
  53. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_attributes.rb +37 -1
  54. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_create_attributes.rb +57 -1
  55. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_attributes.rb +57 -1
  56. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination.rb +2 -1
  57. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_microsoft_sentinel.rb +228 -0
  58. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_microsoft_sentinel_type.rb +26 -0
  59. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination.rb +2 -1
  60. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_microsoft_sentinel.rb +228 -0
  61. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_microsoft_sentinel_type.rb +26 -0
  62. data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +21 -1
  63. data/lib/datadog_api_client/v2/models/{dora_incident_request.rb → dora_failure_request.rb} +4 -4
  64. data/lib/datadog_api_client/v2/models/{dora_incident_request_attributes.rb → dora_failure_request_attributes.rb} +31 -11
  65. data/lib/datadog_api_client/v2/models/{dora_incident_request_data.rb → dora_failure_request_data.rb} +4 -4
  66. data/lib/datadog_api_client/v2/models/dora_failure_response.rb +123 -0
  67. data/lib/datadog_api_client/v2/models/{dora_incident_response_data.rb → dora_failure_response_data.rb} +6 -6
  68. data/lib/datadog_api_client/v2/models/{dora_incident_type.rb → dora_failure_type.rb} +3 -3
  69. data/lib/datadog_api_client/v2/models/escalation.rb +143 -0
  70. data/lib/datadog_api_client/v2/models/escalation_relationships.rb +105 -0
  71. data/lib/datadog_api_client/v2/models/escalation_relationships_responders.rb +107 -0
  72. data/lib/datadog_api_client/v2/models/escalation_relationships_responders_data_items.rb +144 -0
  73. data/lib/datadog_api_client/v2/models/escalation_relationships_responders_data_items_type.rb +26 -0
  74. data/lib/datadog_api_client/v2/models/escalation_type.rb +26 -0
  75. data/lib/datadog_api_client/v2/models/finding_attributes.rb +31 -1
  76. data/lib/datadog_api_client/v2/models/kind_attributes.rb +143 -0
  77. data/lib/datadog_api_client/v2/models/kind_data.rb +153 -0
  78. data/lib/datadog_api_client/v2/models/kind_metadata.rb +115 -0
  79. data/lib/datadog_api_client/v2/models/kind_obj.rb +143 -0
  80. data/lib/datadog_api_client/v2/models/kind_response_meta.rb +105 -0
  81. data/lib/datadog_api_client/v2/models/list_kind_catalog_response.rb +117 -0
  82. data/lib/datadog_api_client/v2/models/member_team.rb +144 -0
  83. data/lib/datadog_api_client/v2/models/member_team_type.rb +26 -0
  84. data/lib/datadog_api_client/v2/models/security_monitoring_rule_case.rb +11 -1
  85. data/lib/datadog_api_client/v2/models/security_monitoring_rule_type_create.rb +1 -0
  86. data/lib/datadog_api_client/v2/models/security_monitoring_rule_type_read.rb +1 -0
  87. data/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb +21 -1
  88. data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_payload.rb +21 -1
  89. data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response.rb +21 -1
  90. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_payload.rb +21 -1
  91. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_query.rb +11 -1
  92. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +21 -1
  93. data/lib/datadog_api_client/v2/models/security_monitoring_third_party_rule_case.rb +11 -1
  94. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_attributes.rb +15 -3
  95. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_samplings.rb +137 -0
  96. data/lib/datadog_api_client/v2/models/team_on_call_responders.rb +117 -0
  97. data/lib/datadog_api_client/v2/models/team_on_call_responders_data.rb +143 -0
  98. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships.rb +115 -0
  99. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_escalations.rb +107 -0
  100. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_escalations_data_items.rb +144 -0
  101. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_escalations_data_items_type.rb +26 -0
  102. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_responders.rb +107 -0
  103. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_responders_data_items.rb +144 -0
  104. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_responders_data_items_type.rb +26 -0
  105. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_type.rb +26 -0
  106. data/lib/datadog_api_client/v2/models/team_on_call_responders_included.rb +63 -0
  107. data/lib/datadog_api_client/v2/models/upsert_catalog_kind_request.rb +63 -0
  108. data/lib/datadog_api_client/v2/models/upsert_catalog_kind_response.rb +117 -0
  109. data/lib/datadog_api_client/version.rb +1 -1
  110. data/repository.datadog.yaml +8 -0
  111. metadata +57 -7
@@ -0,0 +1,228 @@
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 Microsoft Sentinel destination.
21
+ class CustomDestinationResponseForwardDestinationMicrosoftSentinel
22
+ include BaseGenericModel
23
+
24
+ # Client ID from the Datadog Azure integration.
25
+ attr_reader :client_id
26
+
27
+ # Azure data collection endpoint.
28
+ attr_reader :data_collection_endpoint
29
+
30
+ # Azure data collection rule ID.
31
+ attr_reader :data_collection_rule_id
32
+
33
+ # Azure stream name.
34
+ attr_reader :stream_name
35
+
36
+ # Tenant ID from the Datadog Azure integration.
37
+ attr_reader :tenant_id
38
+
39
+ # Type of the Microsoft Sentinel destination.
40
+ attr_reader :type
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
+ :'client_id' => :'client_id',
49
+ :'data_collection_endpoint' => :'data_collection_endpoint',
50
+ :'data_collection_rule_id' => :'data_collection_rule_id',
51
+ :'stream_name' => :'stream_name',
52
+ :'tenant_id' => :'tenant_id',
53
+ :'type' => :'type'
54
+ }
55
+ end
56
+
57
+ # Attribute type mapping.
58
+ # @!visibility private
59
+ def self.openapi_types
60
+ {
61
+ :'client_id' => :'String',
62
+ :'data_collection_endpoint' => :'String',
63
+ :'data_collection_rule_id' => :'String',
64
+ :'stream_name' => :'String',
65
+ :'tenant_id' => :'String',
66
+ :'type' => :'CustomDestinationResponseForwardDestinationMicrosoftSentinelType'
67
+ }
68
+ end
69
+
70
+ # Initializes the object
71
+ # @param attributes [Hash] Model attributes in the form of hash
72
+ # @!visibility private
73
+ def initialize(attributes = {})
74
+ if (!attributes.is_a?(Hash))
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomDestinationResponseForwardDestinationMicrosoftSentinel` initialize method"
76
+ end
77
+
78
+ self.additional_properties = {}
79
+ # check to see if the attribute exists and convert string to symbol for hash key
80
+ attributes = attributes.each_with_object({}) { |(k, v), h|
81
+ if (!self.class.attribute_map.key?(k.to_sym))
82
+ self.additional_properties[k.to_sym] = v
83
+ else
84
+ h[k.to_sym] = v
85
+ end
86
+ }
87
+
88
+ if attributes.key?(:'client_id')
89
+ self.client_id = attributes[:'client_id']
90
+ end
91
+
92
+ if attributes.key?(:'data_collection_endpoint')
93
+ self.data_collection_endpoint = attributes[:'data_collection_endpoint']
94
+ end
95
+
96
+ if attributes.key?(:'data_collection_rule_id')
97
+ self.data_collection_rule_id = attributes[:'data_collection_rule_id']
98
+ end
99
+
100
+ if attributes.key?(:'stream_name')
101
+ self.stream_name = attributes[:'stream_name']
102
+ end
103
+
104
+ if attributes.key?(:'tenant_id')
105
+ self.tenant_id = attributes[:'tenant_id']
106
+ end
107
+
108
+ if attributes.key?(:'type')
109
+ self.type = attributes[:'type']
110
+ end
111
+ end
112
+
113
+ # Check to see if the all the properties in the model are valid
114
+ # @return true if the model is valid
115
+ # @!visibility private
116
+ def valid?
117
+ return false if @client_id.nil?
118
+ return false if @data_collection_endpoint.nil?
119
+ return false if @data_collection_rule_id.nil?
120
+ return false if @stream_name.nil?
121
+ return false if @tenant_id.nil?
122
+ return false if @type.nil?
123
+ true
124
+ end
125
+
126
+ # Custom attribute writer method with validation
127
+ # @param client_id [Object] Object to be assigned
128
+ # @!visibility private
129
+ def client_id=(client_id)
130
+ if client_id.nil?
131
+ fail ArgumentError, 'invalid value for "client_id", client_id cannot be nil.'
132
+ end
133
+ @client_id = client_id
134
+ end
135
+
136
+ # Custom attribute writer method with validation
137
+ # @param data_collection_endpoint [Object] Object to be assigned
138
+ # @!visibility private
139
+ def data_collection_endpoint=(data_collection_endpoint)
140
+ if data_collection_endpoint.nil?
141
+ fail ArgumentError, 'invalid value for "data_collection_endpoint", data_collection_endpoint cannot be nil.'
142
+ end
143
+ @data_collection_endpoint = data_collection_endpoint
144
+ end
145
+
146
+ # Custom attribute writer method with validation
147
+ # @param data_collection_rule_id [Object] Object to be assigned
148
+ # @!visibility private
149
+ def data_collection_rule_id=(data_collection_rule_id)
150
+ if data_collection_rule_id.nil?
151
+ fail ArgumentError, 'invalid value for "data_collection_rule_id", data_collection_rule_id cannot be nil.'
152
+ end
153
+ @data_collection_rule_id = data_collection_rule_id
154
+ end
155
+
156
+ # Custom attribute writer method with validation
157
+ # @param stream_name [Object] Object to be assigned
158
+ # @!visibility private
159
+ def stream_name=(stream_name)
160
+ if stream_name.nil?
161
+ fail ArgumentError, 'invalid value for "stream_name", stream_name cannot be nil.'
162
+ end
163
+ @stream_name = stream_name
164
+ end
165
+
166
+ # Custom attribute writer method with validation
167
+ # @param tenant_id [Object] Object to be assigned
168
+ # @!visibility private
169
+ def tenant_id=(tenant_id)
170
+ if tenant_id.nil?
171
+ fail ArgumentError, 'invalid value for "tenant_id", tenant_id cannot be nil.'
172
+ end
173
+ @tenant_id = tenant_id
174
+ end
175
+
176
+ # Custom attribute writer method with validation
177
+ # @param type [Object] Object to be assigned
178
+ # @!visibility private
179
+ def type=(type)
180
+ if type.nil?
181
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
182
+ end
183
+ @type = type
184
+ end
185
+
186
+ # Returns the object in the form of hash, with additionalProperties support.
187
+ # @return [Hash] Returns the object in the form of hash
188
+ # @!visibility private
189
+ def to_hash
190
+ hash = {}
191
+ self.class.attribute_map.each_pair do |attr, param|
192
+ value = self.send(attr)
193
+ if value.nil?
194
+ is_nullable = self.class.openapi_nullable.include?(attr)
195
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
196
+ end
197
+
198
+ hash[param] = _to_hash(value)
199
+ end
200
+ self.additional_properties.each_pair do |attr, value|
201
+ hash[attr] = value
202
+ end
203
+ hash
204
+ end
205
+
206
+ # Checks equality by comparing each attribute.
207
+ # @param o [Object] Object to be compared
208
+ # @!visibility private
209
+ def ==(o)
210
+ return true if self.equal?(o)
211
+ self.class == o.class &&
212
+ client_id == o.client_id &&
213
+ data_collection_endpoint == o.data_collection_endpoint &&
214
+ data_collection_rule_id == o.data_collection_rule_id &&
215
+ stream_name == o.stream_name &&
216
+ tenant_id == o.tenant_id &&
217
+ type == o.type &&
218
+ additional_properties == o.additional_properties
219
+ end
220
+
221
+ # Calculates hash code according to all attributes.
222
+ # @return [Integer] Hash code
223
+ # @!visibility private
224
+ def hash
225
+ [client_id, data_collection_endpoint, data_collection_rule_id, stream_name, tenant_id, type, additional_properties].hash
226
+ end
227
+ end
228
+ end
@@ -0,0 +1,26 @@
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
+ # Type of the Microsoft Sentinel destination.
21
+ class CustomDestinationResponseForwardDestinationMicrosoftSentinelType
22
+ include BaseEnumModel
23
+
24
+ MICROSOFT_SENTINEL = "microsoft_sentinel".freeze
25
+ end
26
+ end
@@ -21,6 +21,9 @@ module DatadogAPIClient::V2
21
21
  class DORADeploymentRequestAttributes
22
22
  include BaseGenericModel
23
23
 
24
+ # A list of user-defined tags. The tags must follow the `key:value` pattern. Up to 100 may be added per event.
25
+ attr_accessor :custom_tags
26
+
24
27
  # Environment name to where the service was deployed.
25
28
  attr_accessor :env
26
29
 
@@ -51,6 +54,7 @@ module DatadogAPIClient::V2
51
54
  # @!visibility private
52
55
  def self.attribute_map
53
56
  {
57
+ :'custom_tags' => :'custom_tags',
54
58
  :'env' => :'env',
55
59
  :'finished_at' => :'finished_at',
56
60
  :'git' => :'git',
@@ -66,6 +70,7 @@ module DatadogAPIClient::V2
66
70
  # @!visibility private
67
71
  def self.openapi_types
68
72
  {
73
+ :'custom_tags' => :'Array<String>',
69
74
  :'env' => :'String',
70
75
  :'finished_at' => :'Integer',
71
76
  :'git' => :'DORAGitInfo',
@@ -77,6 +82,14 @@ module DatadogAPIClient::V2
77
82
  }
78
83
  end
79
84
 
85
+ # List of attributes with nullable: true
86
+ # @!visibility private
87
+ def self.openapi_nullable
88
+ Set.new([
89
+ :'custom_tags',
90
+ ])
91
+ end
92
+
80
93
  # Initializes the object
81
94
  # @param attributes [Hash] Model attributes in the form of hash
82
95
  # @!visibility private
@@ -95,6 +108,12 @@ module DatadogAPIClient::V2
95
108
  end
96
109
  }
97
110
 
111
+ if attributes.key?(:'custom_tags')
112
+ if (value = attributes[:'custom_tags']).is_a?(Array)
113
+ self.custom_tags = value
114
+ end
115
+ end
116
+
98
117
  if attributes.key?(:'env')
99
118
  self.env = attributes[:'env']
100
119
  end
@@ -194,6 +213,7 @@ module DatadogAPIClient::V2
194
213
  def ==(o)
195
214
  return true if self.equal?(o)
196
215
  self.class == o.class &&
216
+ custom_tags == o.custom_tags &&
197
217
  env == o.env &&
198
218
  finished_at == o.finished_at &&
199
219
  git == o.git &&
@@ -209,7 +229,7 @@ module DatadogAPIClient::V2
209
229
  # @return [Integer] Hash code
210
230
  # @!visibility private
211
231
  def hash
212
- [env, finished_at, git, id, service, started_at, team, version, additional_properties].hash
232
+ [custom_tags, env, finished_at, git, id, service, started_at, team, version, additional_properties].hash
213
233
  end
214
234
  end
215
235
  end
@@ -17,8 +17,8 @@ require 'date'
17
17
  require 'time'
18
18
 
19
19
  module DatadogAPIClient::V2
20
- # Request to create a DORA incident event.
21
- class DORAIncidentRequest
20
+ # Request to create a DORA failure event.
21
+ class DORAFailureRequest
22
22
  include BaseGenericModel
23
23
 
24
24
  # The JSON:API data.
@@ -38,7 +38,7 @@ module DatadogAPIClient::V2
38
38
  # @!visibility private
39
39
  def self.openapi_types
40
40
  {
41
- :'data' => :'DORAIncidentRequestData'
41
+ :'data' => :'DORAFailureRequestData'
42
42
  }
43
43
  end
44
44
 
@@ -47,7 +47,7 @@ module DatadogAPIClient::V2
47
47
  # @!visibility private
48
48
  def initialize(attributes = {})
49
49
  if (!attributes.is_a?(Hash))
50
- fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORAIncidentRequest` initialize method"
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORAFailureRequest` initialize method"
51
51
  end
52
52
 
53
53
  self.additional_properties = {}
@@ -17,32 +17,35 @@ require 'date'
17
17
  require 'time'
18
18
 
19
19
  module DatadogAPIClient::V2
20
- # Attributes to create a DORA incident event.
21
- class DORAIncidentRequestAttributes
20
+ # Attributes to create a DORA failure event.
21
+ class DORAFailureRequestAttributes
22
22
  include BaseGenericModel
23
23
 
24
- # Environment name that was impacted by the incident.
24
+ # A list of user-defined tags. The tags must follow the `key:value` pattern. Up to 100 may be added per event.
25
+ attr_accessor :custom_tags
26
+
27
+ # Environment name that was impacted by the failure.
25
28
  attr_accessor :env
26
29
 
27
- # Unix timestamp when the incident finished. It must be in nanoseconds, milliseconds, or seconds, and it should not be older than 1 hour.
30
+ # Unix timestamp when the failure finished. It must be in nanoseconds, milliseconds, or seconds, and it should not be older than 1 hour.
28
31
  attr_accessor :finished_at
29
32
 
30
33
  # Git info for DORA Metrics events.
31
34
  attr_accessor :git
32
35
 
33
- # Incident ID. Must have at least 16 characters. Required to update a previously sent incident.
36
+ # Failure ID. Must have at least 16 characters. Required to update a previously sent failure.
34
37
  attr_accessor :id
35
38
 
36
- # Incident name.
39
+ # Failure name.
37
40
  attr_accessor :name
38
41
 
39
- # Service names impacted by the incident. If possible, use names registered in the Service Catalog. Required when the team field is not provided.
42
+ # Service names impacted by the failure. If possible, use names registered in the Service Catalog. Required when the team field is not provided.
40
43
  attr_accessor :services
41
44
 
42
- # Incident severity.
45
+ # Failure severity.
43
46
  attr_accessor :severity
44
47
 
45
- # Unix timestamp when the incident started. It must be in nanoseconds, milliseconds, or seconds.
48
+ # Unix timestamp when the failure started. It must be in nanoseconds, milliseconds, or seconds.
46
49
  attr_reader :started_at
47
50
 
48
51
  # Name of the team owning the services impacted. If possible, use team handles registered in Datadog. Required when the services field is not provided.
@@ -57,6 +60,7 @@ module DatadogAPIClient::V2
57
60
  # @!visibility private
58
61
  def self.attribute_map
59
62
  {
63
+ :'custom_tags' => :'custom_tags',
60
64
  :'env' => :'env',
61
65
  :'finished_at' => :'finished_at',
62
66
  :'git' => :'git',
@@ -74,6 +78,7 @@ module DatadogAPIClient::V2
74
78
  # @!visibility private
75
79
  def self.openapi_types
76
80
  {
81
+ :'custom_tags' => :'Array<String>',
77
82
  :'env' => :'String',
78
83
  :'finished_at' => :'Integer',
79
84
  :'git' => :'DORAGitInfo',
@@ -87,12 +92,20 @@ module DatadogAPIClient::V2
87
92
  }
88
93
  end
89
94
 
95
+ # List of attributes with nullable: true
96
+ # @!visibility private
97
+ def self.openapi_nullable
98
+ Set.new([
99
+ :'custom_tags',
100
+ ])
101
+ end
102
+
90
103
  # Initializes the object
91
104
  # @param attributes [Hash] Model attributes in the form of hash
92
105
  # @!visibility private
93
106
  def initialize(attributes = {})
94
107
  if (!attributes.is_a?(Hash))
95
- fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORAIncidentRequestAttributes` initialize method"
108
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORAFailureRequestAttributes` initialize method"
96
109
  end
97
110
 
98
111
  self.additional_properties = {}
@@ -105,6 +118,12 @@ module DatadogAPIClient::V2
105
118
  end
106
119
  }
107
120
 
121
+ if attributes.key?(:'custom_tags')
122
+ if (value = attributes[:'custom_tags']).is_a?(Array)
123
+ self.custom_tags = value
124
+ end
125
+ end
126
+
108
127
  if attributes.key?(:'env')
109
128
  self.env = attributes[:'env']
110
129
  end
@@ -192,6 +211,7 @@ module DatadogAPIClient::V2
192
211
  def ==(o)
193
212
  return true if self.equal?(o)
194
213
  self.class == o.class &&
214
+ custom_tags == o.custom_tags &&
195
215
  env == o.env &&
196
216
  finished_at == o.finished_at &&
197
217
  git == o.git &&
@@ -209,7 +229,7 @@ module DatadogAPIClient::V2
209
229
  # @return [Integer] Hash code
210
230
  # @!visibility private
211
231
  def hash
212
- [env, finished_at, git, id, name, services, severity, started_at, team, version, additional_properties].hash
232
+ [custom_tags, env, finished_at, git, id, name, services, severity, started_at, team, version, additional_properties].hash
213
233
  end
214
234
  end
215
235
  end
@@ -18,10 +18,10 @@ require 'time'
18
18
 
19
19
  module DatadogAPIClient::V2
20
20
  # The JSON:API data.
21
- class DORAIncidentRequestData
21
+ class DORAFailureRequestData
22
22
  include BaseGenericModel
23
23
 
24
- # Attributes to create a DORA incident event.
24
+ # Attributes to create a DORA failure event.
25
25
  attr_reader :attributes
26
26
 
27
27
  attr_accessor :additional_properties
@@ -38,7 +38,7 @@ module DatadogAPIClient::V2
38
38
  # @!visibility private
39
39
  def self.openapi_types
40
40
  {
41
- :'attributes' => :'DORAIncidentRequestAttributes'
41
+ :'attributes' => :'DORAFailureRequestAttributes'
42
42
  }
43
43
  end
44
44
 
@@ -47,7 +47,7 @@ module DatadogAPIClient::V2
47
47
  # @!visibility private
48
48
  def initialize(attributes = {})
49
49
  if (!attributes.is_a?(Hash))
50
- fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORAIncidentRequestData` initialize method"
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORAFailureRequestData` initialize method"
51
51
  end
52
52
 
53
53
  self.additional_properties = {}
@@ -0,0 +1,123 @@
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
+ # Response after receiving a DORA failure event.
21
+ class DORAFailureResponse
22
+ include BaseGenericModel
23
+
24
+ # Response after receiving a DORA failure event.
25
+ attr_reader :data
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
+ :'data' => :'data'
34
+ }
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ # @!visibility private
39
+ def self.openapi_types
40
+ {
41
+ :'data' => :'DORAFailureResponseData'
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::DORAFailureResponse` 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?(:'data')
64
+ self.data = attributes[:'data']
65
+ end
66
+ end
67
+
68
+ # Check to see if the all the properties in the model are valid
69
+ # @return true if the model is valid
70
+ # @!visibility private
71
+ def valid?
72
+ return false if @data.nil?
73
+ true
74
+ end
75
+
76
+ # Custom attribute writer method with validation
77
+ # @param data [Object] Object to be assigned
78
+ # @!visibility private
79
+ def data=(data)
80
+ if data.nil?
81
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
82
+ end
83
+ @data = data
84
+ end
85
+
86
+ # Returns the object in the form of hash, with additionalProperties support.
87
+ # @return [Hash] Returns the object in the form of hash
88
+ # @!visibility private
89
+ def to_hash
90
+ hash = {}
91
+ self.class.attribute_map.each_pair do |attr, param|
92
+ value = self.send(attr)
93
+ if value.nil?
94
+ is_nullable = self.class.openapi_nullable.include?(attr)
95
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
96
+ end
97
+
98
+ hash[param] = _to_hash(value)
99
+ end
100
+ self.additional_properties.each_pair do |attr, value|
101
+ hash[attr] = value
102
+ end
103
+ hash
104
+ end
105
+
106
+ # Checks equality by comparing each attribute.
107
+ # @param o [Object] Object to be compared
108
+ # @!visibility private
109
+ def ==(o)
110
+ return true if self.equal?(o)
111
+ self.class == o.class &&
112
+ data == o.data &&
113
+ additional_properties == o.additional_properties
114
+ end
115
+
116
+ # Calculates hash code according to all attributes.
117
+ # @return [Integer] Hash code
118
+ # @!visibility private
119
+ def hash
120
+ [data, additional_properties].hash
121
+ end
122
+ end
123
+ end
@@ -17,14 +17,14 @@ require 'date'
17
17
  require 'time'
18
18
 
19
19
  module DatadogAPIClient::V2
20
- # Response after receiving a DORA incident event.
21
- class DORAIncidentResponseData
20
+ # Response after receiving a DORA failure event.
21
+ class DORAFailureResponseData
22
22
  include BaseGenericModel
23
23
 
24
- # The ID of the received DORA incident event.
24
+ # The ID of the received DORA failure event.
25
25
  attr_reader :id
26
26
 
27
- # JSON:API type for DORA incident events.
27
+ # JSON:API type for DORA failure events.
28
28
  attr_accessor :type
29
29
 
30
30
  attr_accessor :additional_properties
@@ -43,7 +43,7 @@ module DatadogAPIClient::V2
43
43
  def self.openapi_types
44
44
  {
45
45
  :'id' => :'String',
46
- :'type' => :'DORAIncidentType'
46
+ :'type' => :'DORAFailureType'
47
47
  }
48
48
  end
49
49
 
@@ -52,7 +52,7 @@ module DatadogAPIClient::V2
52
52
  # @!visibility private
53
53
  def initialize(attributes = {})
54
54
  if (!attributes.is_a?(Hash))
55
- fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORAIncidentResponseData` initialize method"
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORAFailureResponseData` initialize method"
56
56
  end
57
57
 
58
58
  self.additional_properties = {}
@@ -17,10 +17,10 @@ require 'date'
17
17
  require 'time'
18
18
 
19
19
  module DatadogAPIClient::V2
20
- # JSON:API type for DORA incident events.
21
- class DORAIncidentType
20
+ # JSON:API type for DORA failure events.
21
+ class DORAFailureType
22
22
  include BaseEnumModel
23
23
 
24
- DORA_INCIDENT = "dora_incident".freeze
24
+ DORA_FAILURE = "dora_failure".freeze
25
25
  end
26
26
  end