datadog_api_client 2.41.0 → 2.42.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.
- checksums.yaml +4 -4
- data/.generator/schemas/v1/openapi.yaml +69 -8
- data/.generator/schemas/v2/openapi.yaml +1568 -40
- data/CHANGELOG.md +15 -0
- data/examples/v2/actions-datastores/BulkWriteDatastoreItems.rb +24 -0
- data/examples/v2/actions-datastores/CreateDatastore.rb +15 -0
- data/examples/v2/actions-datastores/DeleteDatastore.rb +8 -0
- data/examples/v2/actions-datastores/DeleteDatastoreItem.rb +17 -0
- data/examples/v2/actions-datastores/GetDatastore.rb +8 -0
- data/examples/v2/actions-datastores/ListDatastoreItems.rb +8 -0
- data/examples/v2/actions-datastores/ListDatastores.rb +5 -0
- data/examples/v2/actions-datastores/UpdateDatastore.rb +18 -0
- data/examples/v2/actions-datastores/UpdateDatastoreItem.rb +18 -0
- data/examples/v2/aws-integration/CreateAWSAccount.rb +0 -3
- data/examples/v2/aws-integration/CreateAWSAccount_1716720881.rb +0 -3
- data/examples/v2/aws-integration/CreateNewAWSExternalID.rb +0 -3
- data/examples/v2/aws-integration/CreateNewAWSExternalID_364713854.rb +0 -3
- data/examples/v2/aws-integration/DeleteAWSAccount.rb +0 -3
- data/examples/v2/aws-integration/GetAWSAccount.rb +0 -3
- data/examples/v2/aws-integration/ListAWSAccounts.rb +0 -3
- data/examples/v2/aws-integration/ListAWSNamespaces.rb +0 -3
- data/examples/v2/aws-integration/ListAWSNamespaces_3031307873.rb +0 -3
- data/examples/v2/aws-integration/UpdateAWSAccount.rb +0 -3
- data/examples/v2/aws-logs-integration/ListAWSLogsServices.rb +0 -3
- data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_2836340212.rb +52 -0
- data/examples/v2/incidents/CreateIncidentNotificationRule.rb +50 -0
- data/examples/v2/incidents/CreateIncidentNotificationRule_3029800608.rb +42 -0
- data/examples/v2/incidents/DeleteIncidentNotificationRule.rb +8 -0
- data/examples/v2/incidents/DeleteIncidentNotificationRule_4148107167.rb +11 -0
- data/examples/v2/incidents/GetIncidentNotificationRule.rb +8 -0
- data/examples/v2/incidents/GetIncidentNotificationRule_67441486.rb +11 -0
- data/examples/v2/incidents/ListIncidentNotificationRules.rb +8 -0
- data/examples/v2/incidents/UpdateIncidentNotificationRule.rb +51 -0
- data/examples/v2/incidents/UpdateIncidentNotificationRule_1207309457.rb +45 -0
- data/lib/datadog_api_client/configuration.rb +5 -8
- data/lib/datadog_api_client/inflector.rb +67 -0
- data/lib/datadog_api_client/v1/api/aws_integration_api.rb +27 -0
- data/lib/datadog_api_client/v1/api/aws_logs_integration_api.rb +9 -0
- data/lib/datadog_api_client/v1/models/gcp_account.rb +18 -4
- data/lib/datadog_api_client/v1/models/gcp_monitored_resource_config.rb +118 -0
- data/lib/datadog_api_client/v1/models/gcp_monitored_resource_config_type.rb +28 -0
- data/lib/datadog_api_client/v2/api/actions_datastores_api.rb +655 -0
- data/lib/datadog_api_client/v2/api/aws_integration_api.rb +0 -42
- data/lib/datadog_api_client/v2/api/aws_logs_integration_api.rb +0 -6
- data/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb +2 -0
- data/lib/datadog_api_client/v2/api/incidents_api.rb +367 -0
- data/lib/datadog_api_client/v2/api/org_connections_api.rb +8 -0
- data/lib/datadog_api_client/v2/models/bulk_put_apps_datastore_items_request.rb +105 -0
- data/lib/datadog_api_client/v2/models/bulk_put_apps_datastore_items_request_data.rb +133 -0
- data/lib/datadog_api_client/v2/models/bulk_put_apps_datastore_items_request_data_attributes.rb +139 -0
- data/lib/datadog_api_client/v2/models/ci_app_create_pipeline_event_request.rb +2 -2
- data/lib/datadog_api_client/v2/models/ci_app_create_pipeline_event_request_data_single_or_array.rb +63 -0
- data/lib/datadog_api_client/v2/models/create_apps_datastore_request.rb +105 -0
- data/lib/datadog_api_client/v2/models/create_apps_datastore_request_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/create_apps_datastore_request_data_attributes.rb +180 -0
- data/lib/datadog_api_client/v2/models/create_apps_datastore_request_data_attributes_org_access.rb +28 -0
- data/lib/datadog_api_client/v2/models/create_apps_datastore_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/create_apps_datastore_response_data.rb +133 -0
- data/lib/datadog_api_client/v2/models/create_incident_notification_rule_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/datastore.rb +105 -0
- data/lib/datadog_api_client/v2/models/datastore_array.rb +125 -0
- data/lib/datadog_api_client/v2/models/datastore_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/datastore_data_attributes.rb +205 -0
- data/lib/datadog_api_client/v2/models/datastore_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/datastore_item_conflict_mode.rb +27 -0
- data/lib/datadog_api_client/v2/models/datastore_items_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/datastore_primary_key_generation_strategy.rb +27 -0
- data/lib/datadog_api_client/v2/models/delete_apps_datastore_item_request.rb +105 -0
- data/lib/datadog_api_client/v2/models/delete_apps_datastore_item_request_data.rb +133 -0
- data/lib/datadog_api_client/v2/models/delete_apps_datastore_item_request_data_attributes.rb +137 -0
- data/lib/datadog_api_client/v2/models/delete_apps_datastore_item_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/delete_apps_datastore_item_response_data.rb +133 -0
- data/lib/datadog_api_client/v2/models/dora_failure_request_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/gcp_monitored_resource_config.rb +118 -0
- data/lib/datadog_api_client/v2/models/gcp_monitored_resource_config_type.rb +28 -0
- data/lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb +17 -2
- data/lib/datadog_api_client/v2/models/incident_notification_rule.rb +135 -0
- data/lib/datadog_api_client/v2/models/incident_notification_rule_array.rb +147 -0
- data/lib/datadog_api_client/v2/models/incident_notification_rule_array_meta.rb +105 -0
- data/lib/datadog_api_client/v2/models/incident_notification_rule_array_meta_page.rb +125 -0
- data/lib/datadog_api_client/v2/models/incident_notification_rule_attributes.rb +265 -0
- data/lib/datadog_api_client/v2/models/incident_notification_rule_attributes_visibility.rb +28 -0
- data/lib/datadog_api_client/v2/models/incident_notification_rule_conditions_items.rb +146 -0
- data/lib/datadog_api_client/v2/models/incident_notification_rule_create_attributes.rb +201 -0
- data/lib/datadog_api_client/v2/models/incident_notification_rule_create_attributes_visibility.rb +28 -0
- data/lib/datadog_api_client/v2/models/incident_notification_rule_create_data.rb +154 -0
- data/lib/datadog_api_client/v2/models/incident_notification_rule_create_data_relationships.rb +115 -0
- data/lib/datadog_api_client/v2/models/incident_notification_rule_included_items.rb +64 -0
- data/lib/datadog_api_client/v2/models/incident_notification_rule_relationships.rb +135 -0
- data/lib/datadog_api_client/v2/models/incident_notification_rule_response_data.rb +164 -0
- data/lib/datadog_api_client/v2/models/incident_notification_rule_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/incident_notification_rule_update_data.rb +175 -0
- data/lib/datadog_api_client/v2/models/incident_notification_template_object.rb +164 -0
- data/lib/datadog_api_client/v2/models/item_api_payload.rb +105 -0
- data/lib/datadog_api_client/v2/models/item_api_payload_array.rb +139 -0
- data/lib/datadog_api_client/v2/models/item_api_payload_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/item_api_payload_data_attributes.rb +185 -0
- data/lib/datadog_api_client/v2/models/item_api_payload_meta.rb +115 -0
- data/lib/datadog_api_client/v2/models/item_api_payload_meta_page.rb +125 -0
- data/lib/datadog_api_client/v2/models/item_api_payload_meta_schema.rb +117 -0
- data/lib/datadog_api_client/v2/models/item_api_payload_meta_schema_field.rb +144 -0
- data/lib/datadog_api_client/v2/models/put_apps_datastore_item_response_array.rb +129 -0
- data/lib/datadog_api_client/v2/models/put_apps_datastore_item_response_data.rb +133 -0
- data/lib/datadog_api_client/v2/models/put_incident_notification_rule_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_notification_template.rb +123 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_notification_template_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_convert_response.rb +11 -1
- data/lib/datadog_api_client/v2/models/update_apps_datastore_item_request.rb +105 -0
- data/lib/datadog_api_client/v2/models/update_apps_datastore_item_request_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/update_apps_datastore_item_request_data_attributes.rb +158 -0
- data/lib/datadog_api_client/v2/models/update_apps_datastore_item_request_data_attributes_item_changes.rb +105 -0
- data/lib/datadog_api_client/v2/models/update_apps_datastore_item_request_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/update_apps_datastore_request.rb +105 -0
- data/lib/datadog_api_client/v2/models/update_apps_datastore_request_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/update_apps_datastore_request_data_attributes.rb +115 -0
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +87 -1
|
@@ -39,12 +39,6 @@ module DatadogAPIClient::V2
|
|
|
39
39
|
# @param opts [Hash] the optional parameters
|
|
40
40
|
# @return [Array<(AWSAccountResponse, Integer, Hash)>] AWSAccountResponse data, response status code and response headers
|
|
41
41
|
def create_aws_account_with_http_info(body, opts = {})
|
|
42
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.create_aws_account".to_sym]
|
|
43
|
-
if unstable_enabled
|
|
44
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_aws_account")
|
|
45
|
-
else
|
|
46
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_aws_account"))
|
|
47
|
-
end
|
|
48
42
|
|
|
49
43
|
if @api_client.config.debugging
|
|
50
44
|
@api_client.config.logger.debug 'Calling API: AWSIntegrationAPI.create_aws_account ...'
|
|
@@ -111,12 +105,6 @@ module DatadogAPIClient::V2
|
|
|
111
105
|
# @param opts [Hash] the optional parameters
|
|
112
106
|
# @return [Array<(AWSNewExternalIDResponse, Integer, Hash)>] AWSNewExternalIDResponse data, response status code and response headers
|
|
113
107
|
def create_new_aws_external_id_with_http_info(opts = {})
|
|
114
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.create_new_aws_external_id".to_sym]
|
|
115
|
-
if unstable_enabled
|
|
116
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_new_aws_external_id")
|
|
117
|
-
else
|
|
118
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_new_aws_external_id"))
|
|
119
|
-
end
|
|
120
108
|
|
|
121
109
|
if @api_client.config.debugging
|
|
122
110
|
@api_client.config.logger.debug 'Calling API: AWSIntegrationAPI.create_new_aws_external_id ...'
|
|
@@ -178,12 +166,6 @@ module DatadogAPIClient::V2
|
|
|
178
166
|
# @param opts [Hash] the optional parameters
|
|
179
167
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
180
168
|
def delete_aws_account_with_http_info(aws_account_config_id, opts = {})
|
|
181
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.delete_aws_account".to_sym]
|
|
182
|
-
if unstable_enabled
|
|
183
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_aws_account")
|
|
184
|
-
else
|
|
185
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_aws_account"))
|
|
186
|
-
end
|
|
187
169
|
|
|
188
170
|
if @api_client.config.debugging
|
|
189
171
|
@api_client.config.logger.debug 'Calling API: AWSIntegrationAPI.delete_aws_account ...'
|
|
@@ -249,12 +231,6 @@ module DatadogAPIClient::V2
|
|
|
249
231
|
# @param opts [Hash] the optional parameters
|
|
250
232
|
# @return [Array<(AWSAccountResponse, Integer, Hash)>] AWSAccountResponse data, response status code and response headers
|
|
251
233
|
def get_aws_account_with_http_info(aws_account_config_id, opts = {})
|
|
252
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.get_aws_account".to_sym]
|
|
253
|
-
if unstable_enabled
|
|
254
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_aws_account")
|
|
255
|
-
else
|
|
256
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_aws_account"))
|
|
257
|
-
end
|
|
258
234
|
|
|
259
235
|
if @api_client.config.debugging
|
|
260
236
|
@api_client.config.logger.debug 'Calling API: AWSIntegrationAPI.get_aws_account ...'
|
|
@@ -380,12 +356,6 @@ module DatadogAPIClient::V2
|
|
|
380
356
|
# @option opts [String] :aws_account_id Optional query parameter to filter accounts by AWS Account ID. If not provided, all accounts are returned.
|
|
381
357
|
# @return [Array<(AWSAccountsResponse, Integer, Hash)>] AWSAccountsResponse data, response status code and response headers
|
|
382
358
|
def list_aws_accounts_with_http_info(opts = {})
|
|
383
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.list_aws_accounts".to_sym]
|
|
384
|
-
if unstable_enabled
|
|
385
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_aws_accounts")
|
|
386
|
-
else
|
|
387
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_aws_accounts"))
|
|
388
|
-
end
|
|
389
359
|
|
|
390
360
|
if @api_client.config.debugging
|
|
391
361
|
@api_client.config.logger.debug 'Calling API: AWSIntegrationAPI.list_aws_accounts ...'
|
|
@@ -447,12 +417,6 @@ module DatadogAPIClient::V2
|
|
|
447
417
|
# @param opts [Hash] the optional parameters
|
|
448
418
|
# @return [Array<(AWSNamespacesResponse, Integer, Hash)>] AWSNamespacesResponse data, response status code and response headers
|
|
449
419
|
def list_aws_namespaces_with_http_info(opts = {})
|
|
450
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.list_aws_namespaces".to_sym]
|
|
451
|
-
if unstable_enabled
|
|
452
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_aws_namespaces")
|
|
453
|
-
else
|
|
454
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_aws_namespaces"))
|
|
455
|
-
end
|
|
456
420
|
|
|
457
421
|
if @api_client.config.debugging
|
|
458
422
|
@api_client.config.logger.debug 'Calling API: AWSIntegrationAPI.list_aws_namespaces ...'
|
|
@@ -515,12 +479,6 @@ module DatadogAPIClient::V2
|
|
|
515
479
|
# @param opts [Hash] the optional parameters
|
|
516
480
|
# @return [Array<(AWSAccountResponse, Integer, Hash)>] AWSAccountResponse data, response status code and response headers
|
|
517
481
|
def update_aws_account_with_http_info(aws_account_config_id, body, opts = {})
|
|
518
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.update_aws_account".to_sym]
|
|
519
|
-
if unstable_enabled
|
|
520
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_aws_account")
|
|
521
|
-
else
|
|
522
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_aws_account"))
|
|
523
|
-
end
|
|
524
482
|
|
|
525
483
|
if @api_client.config.debugging
|
|
526
484
|
@api_client.config.logger.debug 'Calling API: AWSIntegrationAPI.update_aws_account ...'
|
|
@@ -38,12 +38,6 @@ module DatadogAPIClient::V2
|
|
|
38
38
|
# @param opts [Hash] the optional parameters
|
|
39
39
|
# @return [Array<(AWSLogsServicesResponse, Integer, Hash)>] AWSLogsServicesResponse data, response status code and response headers
|
|
40
40
|
def list_aws_logs_services_with_http_info(opts = {})
|
|
41
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.list_aws_logs_services".to_sym]
|
|
42
|
-
if unstable_enabled
|
|
43
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_aws_logs_services")
|
|
44
|
-
else
|
|
45
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_aws_logs_services"))
|
|
46
|
-
end
|
|
47
41
|
|
|
48
42
|
if @api_client.config.debugging
|
|
49
43
|
@api_client.config.logger.debug 'Calling API: AWSLogsIntegrationAPI.list_aws_logs_services ...'
|
|
@@ -102,6 +102,8 @@ module DatadogAPIClient::V2
|
|
|
102
102
|
#
|
|
103
103
|
# Send your pipeline event to your Datadog platform over HTTP. For details about how pipeline executions are modeled and what execution types we support, see [Pipeline Data Model And Execution Types](https://docs.datadoghq.com/continuous_integration/guides/pipeline_data_model/).
|
|
104
104
|
#
|
|
105
|
+
# Multiple events can be sent in an array (up to 1000).
|
|
106
|
+
#
|
|
105
107
|
# Pipeline events can be submitted with a timestamp that is up to 18 hours in the past.
|
|
106
108
|
#
|
|
107
109
|
# @param body [CIAppCreatePipelineEventRequest]
|
|
@@ -174,6 +174,79 @@ module DatadogAPIClient::V2
|
|
|
174
174
|
return data, status_code, headers
|
|
175
175
|
end
|
|
176
176
|
|
|
177
|
+
# Create an incident notification rule.
|
|
178
|
+
#
|
|
179
|
+
# @see #create_incident_notification_rule_with_http_info
|
|
180
|
+
def create_incident_notification_rule(body, opts = {})
|
|
181
|
+
data, _status_code, _headers = create_incident_notification_rule_with_http_info(body, opts)
|
|
182
|
+
data
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Create an incident notification rule.
|
|
186
|
+
#
|
|
187
|
+
# Creates a new notification rule.
|
|
188
|
+
#
|
|
189
|
+
# @param body [CreateIncidentNotificationRuleRequest]
|
|
190
|
+
# @param opts [Hash] the optional parameters
|
|
191
|
+
# @return [Array<(IncidentNotificationRule, Integer, Hash)>] IncidentNotificationRule data, response status code and response headers
|
|
192
|
+
def create_incident_notification_rule_with_http_info(body, opts = {})
|
|
193
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_notification_rule".to_sym]
|
|
194
|
+
if unstable_enabled
|
|
195
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_notification_rule")
|
|
196
|
+
else
|
|
197
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_notification_rule"))
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
if @api_client.config.debugging
|
|
201
|
+
@api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_notification_rule ...'
|
|
202
|
+
end
|
|
203
|
+
# verify the required parameter 'body' is set
|
|
204
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
205
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling IncidentsAPI.create_incident_notification_rule"
|
|
206
|
+
end
|
|
207
|
+
# resource path
|
|
208
|
+
local_var_path = '/api/v2/incidents/config/notification-rules'
|
|
209
|
+
|
|
210
|
+
# query parameters
|
|
211
|
+
query_params = opts[:query_params] || {}
|
|
212
|
+
|
|
213
|
+
# header parameters
|
|
214
|
+
header_params = opts[:header_params] || {}
|
|
215
|
+
# HTTP header 'Accept' (if needed)
|
|
216
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
217
|
+
# HTTP header 'Content-Type'
|
|
218
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
219
|
+
|
|
220
|
+
# form parameters
|
|
221
|
+
form_params = opts[:form_params] || {}
|
|
222
|
+
|
|
223
|
+
# http body (model)
|
|
224
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
225
|
+
|
|
226
|
+
# return_type
|
|
227
|
+
return_type = opts[:debug_return_type] || 'IncidentNotificationRule'
|
|
228
|
+
|
|
229
|
+
# auth_names
|
|
230
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
231
|
+
|
|
232
|
+
new_options = opts.merge(
|
|
233
|
+
:operation => :create_incident_notification_rule,
|
|
234
|
+
:header_params => header_params,
|
|
235
|
+
:query_params => query_params,
|
|
236
|
+
:form_params => form_params,
|
|
237
|
+
:body => post_body,
|
|
238
|
+
:auth_names => auth_names,
|
|
239
|
+
:return_type => return_type,
|
|
240
|
+
:api_version => "V2"
|
|
241
|
+
)
|
|
242
|
+
|
|
243
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
|
244
|
+
if @api_client.config.debugging
|
|
245
|
+
@api_client.config.logger.debug "API called: IncidentsAPI#create_incident_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
246
|
+
end
|
|
247
|
+
return data, status_code, headers
|
|
248
|
+
end
|
|
249
|
+
|
|
177
250
|
# Create incident notification template.
|
|
178
251
|
#
|
|
179
252
|
# @see #create_incident_notification_template_with_http_info
|
|
@@ -545,6 +618,79 @@ module DatadogAPIClient::V2
|
|
|
545
618
|
return data, status_code, headers
|
|
546
619
|
end
|
|
547
620
|
|
|
621
|
+
# Delete an incident notification rule.
|
|
622
|
+
#
|
|
623
|
+
# @see #delete_incident_notification_rule_with_http_info
|
|
624
|
+
def delete_incident_notification_rule(id, opts = {})
|
|
625
|
+
delete_incident_notification_rule_with_http_info(id, opts)
|
|
626
|
+
nil
|
|
627
|
+
end
|
|
628
|
+
|
|
629
|
+
# Delete an incident notification rule.
|
|
630
|
+
#
|
|
631
|
+
# Deletes a notification rule by its ID.
|
|
632
|
+
#
|
|
633
|
+
# @param id [UUID] The ID of the notification rule.
|
|
634
|
+
# @param opts [Hash] the optional parameters
|
|
635
|
+
# @option opts [String] :include Comma-separated list of resources to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type`, `notification_template`
|
|
636
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
637
|
+
def delete_incident_notification_rule_with_http_info(id, opts = {})
|
|
638
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.delete_incident_notification_rule".to_sym]
|
|
639
|
+
if unstable_enabled
|
|
640
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_incident_notification_rule")
|
|
641
|
+
else
|
|
642
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_incident_notification_rule"))
|
|
643
|
+
end
|
|
644
|
+
|
|
645
|
+
if @api_client.config.debugging
|
|
646
|
+
@api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_incident_notification_rule ...'
|
|
647
|
+
end
|
|
648
|
+
# verify the required parameter 'id' is set
|
|
649
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
650
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling IncidentsAPI.delete_incident_notification_rule"
|
|
651
|
+
end
|
|
652
|
+
# resource path
|
|
653
|
+
local_var_path = '/api/v2/incidents/config/notification-rules/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/'))
|
|
654
|
+
|
|
655
|
+
# query parameters
|
|
656
|
+
query_params = opts[:query_params] || {}
|
|
657
|
+
query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
|
|
658
|
+
|
|
659
|
+
# header parameters
|
|
660
|
+
header_params = opts[:header_params] || {}
|
|
661
|
+
# HTTP header 'Accept' (if needed)
|
|
662
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
663
|
+
|
|
664
|
+
# form parameters
|
|
665
|
+
form_params = opts[:form_params] || {}
|
|
666
|
+
|
|
667
|
+
# http body (model)
|
|
668
|
+
post_body = opts[:debug_body]
|
|
669
|
+
|
|
670
|
+
# return_type
|
|
671
|
+
return_type = opts[:debug_return_type]
|
|
672
|
+
|
|
673
|
+
# auth_names
|
|
674
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
675
|
+
|
|
676
|
+
new_options = opts.merge(
|
|
677
|
+
:operation => :delete_incident_notification_rule,
|
|
678
|
+
:header_params => header_params,
|
|
679
|
+
:query_params => query_params,
|
|
680
|
+
:form_params => form_params,
|
|
681
|
+
:body => post_body,
|
|
682
|
+
:auth_names => auth_names,
|
|
683
|
+
:return_type => return_type,
|
|
684
|
+
:api_version => "V2"
|
|
685
|
+
)
|
|
686
|
+
|
|
687
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
|
|
688
|
+
if @api_client.config.debugging
|
|
689
|
+
@api_client.config.logger.debug "API called: IncidentsAPI#delete_incident_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
690
|
+
end
|
|
691
|
+
return data, status_code, headers
|
|
692
|
+
end
|
|
693
|
+
|
|
548
694
|
# Delete a notification template.
|
|
549
695
|
#
|
|
550
696
|
# @see #delete_incident_notification_template_with_http_info
|
|
@@ -914,6 +1060,79 @@ module DatadogAPIClient::V2
|
|
|
914
1060
|
return data, status_code, headers
|
|
915
1061
|
end
|
|
916
1062
|
|
|
1063
|
+
# Get an incident notification rule.
|
|
1064
|
+
#
|
|
1065
|
+
# @see #get_incident_notification_rule_with_http_info
|
|
1066
|
+
def get_incident_notification_rule(id, opts = {})
|
|
1067
|
+
data, _status_code, _headers = get_incident_notification_rule_with_http_info(id, opts)
|
|
1068
|
+
data
|
|
1069
|
+
end
|
|
1070
|
+
|
|
1071
|
+
# Get an incident notification rule.
|
|
1072
|
+
#
|
|
1073
|
+
# Retrieves a specific notification rule by its ID.
|
|
1074
|
+
#
|
|
1075
|
+
# @param id [UUID] The ID of the notification rule.
|
|
1076
|
+
# @param opts [Hash] the optional parameters
|
|
1077
|
+
# @option opts [String] :include Comma-separated list of resources to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type`, `notification_template`
|
|
1078
|
+
# @return [Array<(IncidentNotificationRule, Integer, Hash)>] IncidentNotificationRule data, response status code and response headers
|
|
1079
|
+
def get_incident_notification_rule_with_http_info(id, opts = {})
|
|
1080
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.get_incident_notification_rule".to_sym]
|
|
1081
|
+
if unstable_enabled
|
|
1082
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_incident_notification_rule")
|
|
1083
|
+
else
|
|
1084
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_incident_notification_rule"))
|
|
1085
|
+
end
|
|
1086
|
+
|
|
1087
|
+
if @api_client.config.debugging
|
|
1088
|
+
@api_client.config.logger.debug 'Calling API: IncidentsAPI.get_incident_notification_rule ...'
|
|
1089
|
+
end
|
|
1090
|
+
# verify the required parameter 'id' is set
|
|
1091
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1092
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling IncidentsAPI.get_incident_notification_rule"
|
|
1093
|
+
end
|
|
1094
|
+
# resource path
|
|
1095
|
+
local_var_path = '/api/v2/incidents/config/notification-rules/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/'))
|
|
1096
|
+
|
|
1097
|
+
# query parameters
|
|
1098
|
+
query_params = opts[:query_params] || {}
|
|
1099
|
+
query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
|
|
1100
|
+
|
|
1101
|
+
# header parameters
|
|
1102
|
+
header_params = opts[:header_params] || {}
|
|
1103
|
+
# HTTP header 'Accept' (if needed)
|
|
1104
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1105
|
+
|
|
1106
|
+
# form parameters
|
|
1107
|
+
form_params = opts[:form_params] || {}
|
|
1108
|
+
|
|
1109
|
+
# http body (model)
|
|
1110
|
+
post_body = opts[:debug_body]
|
|
1111
|
+
|
|
1112
|
+
# return_type
|
|
1113
|
+
return_type = opts[:debug_return_type] || 'IncidentNotificationRule'
|
|
1114
|
+
|
|
1115
|
+
# auth_names
|
|
1116
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
1117
|
+
|
|
1118
|
+
new_options = opts.merge(
|
|
1119
|
+
:operation => :get_incident_notification_rule,
|
|
1120
|
+
:header_params => header_params,
|
|
1121
|
+
:query_params => query_params,
|
|
1122
|
+
:form_params => form_params,
|
|
1123
|
+
:body => post_body,
|
|
1124
|
+
:auth_names => auth_names,
|
|
1125
|
+
:return_type => return_type,
|
|
1126
|
+
:api_version => "V2"
|
|
1127
|
+
)
|
|
1128
|
+
|
|
1129
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
|
1130
|
+
if @api_client.config.debugging
|
|
1131
|
+
@api_client.config.logger.debug "API called: IncidentsAPI#get_incident_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1132
|
+
end
|
|
1133
|
+
return data, status_code, headers
|
|
1134
|
+
end
|
|
1135
|
+
|
|
917
1136
|
# Get incident notification template.
|
|
918
1137
|
#
|
|
919
1138
|
# @see #get_incident_notification_template_with_http_info
|
|
@@ -1280,6 +1499,74 @@ module DatadogAPIClient::V2
|
|
|
1280
1499
|
return data, status_code, headers
|
|
1281
1500
|
end
|
|
1282
1501
|
|
|
1502
|
+
# List incident notification rules.
|
|
1503
|
+
#
|
|
1504
|
+
# @see #list_incident_notification_rules_with_http_info
|
|
1505
|
+
def list_incident_notification_rules(opts = {})
|
|
1506
|
+
data, _status_code, _headers = list_incident_notification_rules_with_http_info(opts)
|
|
1507
|
+
data
|
|
1508
|
+
end
|
|
1509
|
+
|
|
1510
|
+
# List incident notification rules.
|
|
1511
|
+
#
|
|
1512
|
+
# Lists all notification rules for the organization. Optionally filter by incident type.
|
|
1513
|
+
#
|
|
1514
|
+
# @param opts [Hash] the optional parameters
|
|
1515
|
+
# @option opts [String] :include Comma-separated list of resources to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type`, `notification_template`
|
|
1516
|
+
# @return [Array<(IncidentNotificationRuleArray, Integer, Hash)>] IncidentNotificationRuleArray data, response status code and response headers
|
|
1517
|
+
def list_incident_notification_rules_with_http_info(opts = {})
|
|
1518
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_notification_rules".to_sym]
|
|
1519
|
+
if unstable_enabled
|
|
1520
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incident_notification_rules")
|
|
1521
|
+
else
|
|
1522
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_incident_notification_rules"))
|
|
1523
|
+
end
|
|
1524
|
+
|
|
1525
|
+
if @api_client.config.debugging
|
|
1526
|
+
@api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incident_notification_rules ...'
|
|
1527
|
+
end
|
|
1528
|
+
# resource path
|
|
1529
|
+
local_var_path = '/api/v2/incidents/config/notification-rules'
|
|
1530
|
+
|
|
1531
|
+
# query parameters
|
|
1532
|
+
query_params = opts[:query_params] || {}
|
|
1533
|
+
query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
|
|
1534
|
+
|
|
1535
|
+
# header parameters
|
|
1536
|
+
header_params = opts[:header_params] || {}
|
|
1537
|
+
# HTTP header 'Accept' (if needed)
|
|
1538
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1539
|
+
|
|
1540
|
+
# form parameters
|
|
1541
|
+
form_params = opts[:form_params] || {}
|
|
1542
|
+
|
|
1543
|
+
# http body (model)
|
|
1544
|
+
post_body = opts[:debug_body]
|
|
1545
|
+
|
|
1546
|
+
# return_type
|
|
1547
|
+
return_type = opts[:debug_return_type] || 'IncidentNotificationRuleArray'
|
|
1548
|
+
|
|
1549
|
+
# auth_names
|
|
1550
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
1551
|
+
|
|
1552
|
+
new_options = opts.merge(
|
|
1553
|
+
:operation => :list_incident_notification_rules,
|
|
1554
|
+
:header_params => header_params,
|
|
1555
|
+
:query_params => query_params,
|
|
1556
|
+
:form_params => form_params,
|
|
1557
|
+
:body => post_body,
|
|
1558
|
+
:auth_names => auth_names,
|
|
1559
|
+
:return_type => return_type,
|
|
1560
|
+
:api_version => "V2"
|
|
1561
|
+
)
|
|
1562
|
+
|
|
1563
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
|
1564
|
+
if @api_client.config.debugging
|
|
1565
|
+
@api_client.config.logger.debug "API called: IncidentsAPI#list_incident_notification_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1566
|
+
end
|
|
1567
|
+
return data, status_code, headers
|
|
1568
|
+
end
|
|
1569
|
+
|
|
1283
1570
|
# List incident notification templates.
|
|
1284
1571
|
#
|
|
1285
1572
|
# @see #list_incident_notification_templates_with_http_info
|
|
@@ -1934,6 +2221,86 @@ module DatadogAPIClient::V2
|
|
|
1934
2221
|
return data, status_code, headers
|
|
1935
2222
|
end
|
|
1936
2223
|
|
|
2224
|
+
# Update an incident notification rule.
|
|
2225
|
+
#
|
|
2226
|
+
# @see #update_incident_notification_rule_with_http_info
|
|
2227
|
+
def update_incident_notification_rule(id, body, opts = {})
|
|
2228
|
+
data, _status_code, _headers = update_incident_notification_rule_with_http_info(id, body, opts)
|
|
2229
|
+
data
|
|
2230
|
+
end
|
|
2231
|
+
|
|
2232
|
+
# Update an incident notification rule.
|
|
2233
|
+
#
|
|
2234
|
+
# Updates an existing notification rule with a complete replacement.
|
|
2235
|
+
#
|
|
2236
|
+
# @param id [UUID] The ID of the notification rule.
|
|
2237
|
+
# @param body [PutIncidentNotificationRuleRequest]
|
|
2238
|
+
# @param opts [Hash] the optional parameters
|
|
2239
|
+
# @option opts [String] :include Comma-separated list of resources to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type`, `notification_template`
|
|
2240
|
+
# @return [Array<(IncidentNotificationRule, Integer, Hash)>] IncidentNotificationRule data, response status code and response headers
|
|
2241
|
+
def update_incident_notification_rule_with_http_info(id, body, opts = {})
|
|
2242
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.update_incident_notification_rule".to_sym]
|
|
2243
|
+
if unstable_enabled
|
|
2244
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_incident_notification_rule")
|
|
2245
|
+
else
|
|
2246
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_incident_notification_rule"))
|
|
2247
|
+
end
|
|
2248
|
+
|
|
2249
|
+
if @api_client.config.debugging
|
|
2250
|
+
@api_client.config.logger.debug 'Calling API: IncidentsAPI.update_incident_notification_rule ...'
|
|
2251
|
+
end
|
|
2252
|
+
# verify the required parameter 'id' is set
|
|
2253
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
2254
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling IncidentsAPI.update_incident_notification_rule"
|
|
2255
|
+
end
|
|
2256
|
+
# verify the required parameter 'body' is set
|
|
2257
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
2258
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling IncidentsAPI.update_incident_notification_rule"
|
|
2259
|
+
end
|
|
2260
|
+
# resource path
|
|
2261
|
+
local_var_path = '/api/v2/incidents/config/notification-rules/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/'))
|
|
2262
|
+
|
|
2263
|
+
# query parameters
|
|
2264
|
+
query_params = opts[:query_params] || {}
|
|
2265
|
+
query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
|
|
2266
|
+
|
|
2267
|
+
# header parameters
|
|
2268
|
+
header_params = opts[:header_params] || {}
|
|
2269
|
+
# HTTP header 'Accept' (if needed)
|
|
2270
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2271
|
+
# HTTP header 'Content-Type'
|
|
2272
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
2273
|
+
|
|
2274
|
+
# form parameters
|
|
2275
|
+
form_params = opts[:form_params] || {}
|
|
2276
|
+
|
|
2277
|
+
# http body (model)
|
|
2278
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
2279
|
+
|
|
2280
|
+
# return_type
|
|
2281
|
+
return_type = opts[:debug_return_type] || 'IncidentNotificationRule'
|
|
2282
|
+
|
|
2283
|
+
# auth_names
|
|
2284
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
2285
|
+
|
|
2286
|
+
new_options = opts.merge(
|
|
2287
|
+
:operation => :update_incident_notification_rule,
|
|
2288
|
+
:header_params => header_params,
|
|
2289
|
+
:query_params => query_params,
|
|
2290
|
+
:form_params => form_params,
|
|
2291
|
+
:body => post_body,
|
|
2292
|
+
:auth_names => auth_names,
|
|
2293
|
+
:return_type => return_type,
|
|
2294
|
+
:api_version => "V2"
|
|
2295
|
+
)
|
|
2296
|
+
|
|
2297
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options)
|
|
2298
|
+
if @api_client.config.debugging
|
|
2299
|
+
@api_client.config.logger.debug "API called: IncidentsAPI#update_incident_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2300
|
+
end
|
|
2301
|
+
return data, status_code, headers
|
|
2302
|
+
end
|
|
2303
|
+
|
|
1937
2304
|
# Update incident notification template.
|
|
1938
2305
|
#
|
|
1939
2306
|
# @see #update_incident_notification_template_with_http_info
|
|
@@ -168,6 +168,10 @@ module DatadogAPIClient::V2
|
|
|
168
168
|
# Returns a list of org connections.
|
|
169
169
|
#
|
|
170
170
|
# @param opts [Hash] the optional parameters
|
|
171
|
+
# @option opts [String] :sink_org_id The Org ID of the sink org.
|
|
172
|
+
# @option opts [String] :source_org_id The Org ID of the source org.
|
|
173
|
+
# @option opts [Integer] :limit The limit of number of entries you want to return. Default is 1000.
|
|
174
|
+
# @option opts [Integer] :offset The pagination offset which you want to query from. Default is 0.
|
|
171
175
|
# @return [Array<(OrgConnectionListResponse, Integer, Hash)>] OrgConnectionListResponse data, response status code and response headers
|
|
172
176
|
def list_org_connections_with_http_info(opts = {})
|
|
173
177
|
|
|
@@ -179,6 +183,10 @@ module DatadogAPIClient::V2
|
|
|
179
183
|
|
|
180
184
|
# query parameters
|
|
181
185
|
query_params = opts[:query_params] || {}
|
|
186
|
+
query_params[:'sink_org_id'] = opts[:'sink_org_id'] if !opts[:'sink_org_id'].nil?
|
|
187
|
+
query_params[:'source_org_id'] = opts[:'source_org_id'] if !opts[:'source_org_id'].nil?
|
|
188
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
189
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
182
190
|
|
|
183
191
|
# header parameters
|
|
184
192
|
header_params = opts[:header_params] || {}
|
|
@@ -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
|
+
# Request to insert multiple items into a datastore in a single operation.
|
|
21
|
+
class BulkPutAppsDatastoreItemsRequest
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Data wrapper containing the items to insert and their configuration for the bulk insert operation.
|
|
25
|
+
attr_accessor :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' => :'BulkPutAppsDatastoreItemsRequestData'
|
|
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::BulkPutAppsDatastoreItemsRequest` 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
|
+
# 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
|
+
data == o.data &&
|
|
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
|
+
[data, additional_properties].hash
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|