datadog_api_client 2.8.0 → 2.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/schemas/v1/openapi.yaml +66 -5
  4. data/.generator/schemas/v2/openapi.yaml +860 -20
  5. data/.generator/src/generator/formatter.py +1 -0
  6. data/.generator/src/generator/templates/model_base.j2 +8 -4
  7. data/CHANGELOG.md +24 -0
  8. data/examples/v1/dashboards/CreateDashboard_2800096921.rb +62 -0
  9. data/examples/v1/dashboards/CreateDashboard_3195475781.rb +32 -0
  10. data/examples/v2/incidents/CreateIncidentIntegration.rb +31 -0
  11. data/examples/v2/incidents/DeleteIncidentIntegration.rb +14 -0
  12. data/examples/v2/incidents/GetIncidentIntegration.rb +14 -0
  13. data/examples/v2/incidents/ListIncidentIntegrations.rb +11 -0
  14. data/examples/v2/incidents/UpdateIncidentIntegration.rb +34 -0
  15. data/examples/v2/ip-allowlist/GetIPAllowlist.rb +5 -0
  16. data/examples/v2/ip-allowlist/UpdateIPAllowlist.rb +25 -0
  17. data/examples/v2/logs-metrics/CreateLogsMetric.rb +1 -1
  18. data/examples/v2/restriction-policies/DeleteRestrictionPolicy.rb +5 -0
  19. data/examples/v2/restriction-policies/GetRestrictionPolicy.rb +5 -0
  20. data/examples/v2/restriction-policies/UpdateRestrictionPolicy.rb +25 -0
  21. data/examples/v2/synthetics/GetOnDemandConcurrencyCap.rb +5 -0
  22. data/examples/v2/synthetics/GetOnDemandConcurrencyCap_2633566918.rb +5 -0
  23. data/examples/v2/synthetics/SetOnDemandConcurrencyCap.rb +7 -0
  24. data/examples/v2/synthetics/SetOnDemandConcurrencyCap_2850884405.rb +9 -0
  25. data/lib/datadog_api_client/configuration.rb +5 -0
  26. data/lib/datadog_api_client/inflector.rb +35 -0
  27. data/lib/datadog_api_client/v1/api/snapshots_api.rb +2 -2
  28. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +3 -3
  29. data/lib/datadog_api_client/v1/model_base.rb +7 -3
  30. data/lib/datadog_api_client/v1/models/application_key.rb +16 -16
  31. data/lib/datadog_api_client/v1/models/cancel_downtimes_by_scope_request.rb +1 -1
  32. data/lib/datadog_api_client/v1/models/downtime.rb +1 -1
  33. data/lib/datadog_api_client/v1/models/downtime_child.rb +1 -1
  34. data/lib/datadog_api_client/v1/models/formula_and_function_events_data_source.rb +1 -0
  35. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +1 -0
  36. data/lib/datadog_api_client/v1/models/list_stream_source.rb +3 -0
  37. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +2 -0
  38. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +21 -1
  39. data/lib/datadog_api_client/v1/models/usage_rum_sessions_hour.rb +12 -1
  40. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +21 -1
  41. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +21 -1
  42. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +21 -1
  43. data/lib/datadog_api_client/v2/api/incidents_api.rb +384 -0
  44. data/lib/datadog_api_client/v2/api/ip_allowlist_api.rb +153 -0
  45. data/lib/datadog_api_client/v2/api/logs_api.rb +1 -0
  46. data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +236 -0
  47. data/lib/datadog_api_client/v2/api/synthetics_api.rb +153 -0
  48. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +1 -1
  49. data/lib/datadog_api_client/v2/model_base.rb +7 -3
  50. data/lib/datadog_api_client/v2/models/events_data_source.rb +1 -0
  51. data/lib/datadog_api_client/v2/models/incident_integration_metadata_attributes.rb +161 -0
  52. data/lib/datadog_api_client/v2/models/incident_integration_metadata_create_data.rb +123 -0
  53. data/lib/datadog_api_client/v2/models/incident_integration_metadata_create_request.rb +102 -0
  54. data/lib/datadog_api_client/v2/models/incident_integration_metadata_list_response.rb +126 -0
  55. data/lib/datadog_api_client/v2/models/incident_integration_metadata_metadata.rb +63 -0
  56. data/lib/datadog_api_client/v2/models/incident_integration_metadata_patch_data.rb +123 -0
  57. data/lib/datadog_api_client/v2/models/incident_integration_metadata_patch_request.rb +102 -0
  58. data/lib/datadog_api_client/v2/models/incident_integration_metadata_response.rb +114 -0
  59. data/lib/datadog_api_client/v2/models/incident_integration_metadata_response_data.rb +133 -0
  60. data/lib/datadog_api_client/v2/models/incident_integration_metadata_response_included_item.rb +62 -0
  61. data/lib/datadog_api_client/v2/models/incident_update_data.rb +1 -1
  62. data/lib/datadog_api_client/v2/models/ip_allowlist_attributes.rb +103 -0
  63. data/lib/datadog_api_client/v2/models/ip_allowlist_data.rb +122 -0
  64. data/lib/datadog_api_client/v2/models/ip_allowlist_entry.rb +102 -0
  65. data/lib/datadog_api_client/v2/models/ip_allowlist_entry_attributes.rb +121 -0
  66. data/lib/datadog_api_client/v2/models/ip_allowlist_entry_data.rb +122 -0
  67. data/lib/datadog_api_client/v2/models/ip_allowlist_entry_type.rb +26 -0
  68. data/lib/datadog_api_client/v2/models/ip_allowlist_response.rb +91 -0
  69. data/lib/datadog_api_client/v2/models/ip_allowlist_type.rb +26 -0
  70. data/lib/datadog_api_client/v2/models/ip_allowlist_update_request.rb +102 -0
  71. data/lib/datadog_api_client/v2/models/jira_integration_metadata.rb +104 -0
  72. data/lib/datadog_api_client/v2/models/jira_integration_metadata_issues_item.rb +153 -0
  73. data/lib/datadog_api_client/v2/models/metrics_aggregator.rb +4 -0
  74. data/lib/datadog_api_client/v2/models/on_demand_concurrency_cap.rb +91 -0
  75. data/lib/datadog_api_client/v2/models/on_demand_concurrency_cap_attributes.rb +91 -0
  76. data/lib/datadog_api_client/v2/models/on_demand_concurrency_cap_response.rb +91 -0
  77. data/lib/datadog_api_client/v2/models/relationship_to_incident_integration_metadatas.rb +1 -1
  78. data/lib/datadog_api_client/v2/models/restriction_policy.rb +144 -0
  79. data/lib/datadog_api_client/v2/models/restriction_policy_attributes.rb +104 -0
  80. data/lib/datadog_api_client/v2/models/restriction_policy_binding.rb +127 -0
  81. data/lib/datadog_api_client/v2/models/restriction_policy_response.rb +102 -0
  82. data/lib/datadog_api_client/v2/models/restriction_policy_type.rb +26 -0
  83. data/lib/datadog_api_client/v2/models/restriction_policy_update_request.rb +102 -0
  84. data/lib/datadog_api_client/v2/models/rum_application_attributes.rb +7 -7
  85. data/lib/datadog_api_client/v2/models/rum_application_list_attributes.rb +7 -7
  86. data/lib/datadog_api_client/v2/models/security_monitoring_rule_type_read.rb +1 -0
  87. data/lib/datadog_api_client/v2/models/slack_integration_metadata.rb +104 -0
  88. data/lib/datadog_api_client/v2/models/slack_integration_metadata_channel_item.rb +154 -0
  89. data/lib/datadog_api_client/version.rb +1 -1
  90. metadata +53 -2
@@ -0,0 +1,236 @@
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 'cgi'
17
+
18
+ module DatadogAPIClient::V2
19
+ class RestrictionPoliciesAPI
20
+ attr_accessor :api_client
21
+
22
+ def initialize(api_client = DatadogAPIClient::APIClient.default)
23
+ @api_client = api_client
24
+ end
25
+
26
+ # Delete a restriction policy.
27
+ #
28
+ # @see #delete_restriction_policy_with_http_info
29
+ def delete_restriction_policy(resource_id, opts = {})
30
+ delete_restriction_policy_with_http_info(resource_id, opts)
31
+ nil
32
+ end
33
+
34
+ # Delete a restriction policy.
35
+ #
36
+ # Deletes the restriction policy associated with a specified resource.
37
+ #
38
+ # @param resource_id [String] Identifier, formatted as `type:id`. Supported types: `connection`, `dashboard`, `notebook`, `security-rule`, `slo`.
39
+ # @param opts [Hash] the optional parameters
40
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
41
+ def delete_restriction_policy_with_http_info(resource_id, opts = {})
42
+
43
+ if @api_client.config.debugging
44
+ @api_client.config.logger.debug 'Calling API: RestrictionPoliciesAPI.delete_restriction_policy ...'
45
+ end
46
+ # verify the required parameter 'resource_id' is set
47
+ if @api_client.config.client_side_validation && resource_id.nil?
48
+ fail ArgumentError, "Missing the required parameter 'resource_id' when calling RestrictionPoliciesAPI.delete_restriction_policy"
49
+ end
50
+ # resource path
51
+ local_var_path = '/api/v2/restriction_policy/{resource_id}'.sub('{resource_id}', CGI.escape(resource_id.to_s).gsub('%2F', '/'))
52
+
53
+ # query parameters
54
+ query_params = opts[:query_params] || {}
55
+
56
+ # header parameters
57
+ header_params = opts[:header_params] || {}
58
+ # HTTP header 'Accept' (if needed)
59
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:debug_body]
66
+
67
+ # return_type
68
+ return_type = opts[:debug_return_type]
69
+
70
+ # auth_names
71
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
72
+
73
+ new_options = opts.merge(
74
+ :operation => :delete_restriction_policy,
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => return_type,
81
+ :api_version => "V2"
82
+ )
83
+
84
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
85
+ if @api_client.config.debugging
86
+ @api_client.config.logger.debug "API called: RestrictionPoliciesAPI#delete_restriction_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
87
+ end
88
+ return data, status_code, headers
89
+ end
90
+
91
+ # Get a restriction policy.
92
+ #
93
+ # @see #get_restriction_policy_with_http_info
94
+ def get_restriction_policy(resource_id, opts = {})
95
+ data, _status_code, _headers = get_restriction_policy_with_http_info(resource_id, opts)
96
+ data
97
+ end
98
+
99
+ # Get a restriction policy.
100
+ #
101
+ # Retrieves the restriction policy associated with a specified resource.
102
+ #
103
+ # @param resource_id [String] Identifier, formatted as `type:id`. Supported types: `connection`, `dashboard`, `notebook`, `security-rule`, `slo`.
104
+ # @param opts [Hash] the optional parameters
105
+ # @return [Array<(RestrictionPolicyResponse, Integer, Hash)>] RestrictionPolicyResponse data, response status code and response headers
106
+ def get_restriction_policy_with_http_info(resource_id, opts = {})
107
+
108
+ if @api_client.config.debugging
109
+ @api_client.config.logger.debug 'Calling API: RestrictionPoliciesAPI.get_restriction_policy ...'
110
+ end
111
+ # verify the required parameter 'resource_id' is set
112
+ if @api_client.config.client_side_validation && resource_id.nil?
113
+ fail ArgumentError, "Missing the required parameter 'resource_id' when calling RestrictionPoliciesAPI.get_restriction_policy"
114
+ end
115
+ # resource path
116
+ local_var_path = '/api/v2/restriction_policy/{resource_id}'.sub('{resource_id}', CGI.escape(resource_id.to_s).gsub('%2F', '/'))
117
+
118
+ # query parameters
119
+ query_params = opts[:query_params] || {}
120
+
121
+ # header parameters
122
+ header_params = opts[:header_params] || {}
123
+ # HTTP header 'Accept' (if needed)
124
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
125
+
126
+ # form parameters
127
+ form_params = opts[:form_params] || {}
128
+
129
+ # http body (model)
130
+ post_body = opts[:debug_body]
131
+
132
+ # return_type
133
+ return_type = opts[:debug_return_type] || 'RestrictionPolicyResponse'
134
+
135
+ # auth_names
136
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
137
+
138
+ new_options = opts.merge(
139
+ :operation => :get_restriction_policy,
140
+ :header_params => header_params,
141
+ :query_params => query_params,
142
+ :form_params => form_params,
143
+ :body => post_body,
144
+ :auth_names => auth_names,
145
+ :return_type => return_type,
146
+ :api_version => "V2"
147
+ )
148
+
149
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
150
+ if @api_client.config.debugging
151
+ @api_client.config.logger.debug "API called: RestrictionPoliciesAPI#get_restriction_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
152
+ end
153
+ return data, status_code, headers
154
+ end
155
+
156
+ # Update a restriction policy.
157
+ #
158
+ # @see #update_restriction_policy_with_http_info
159
+ def update_restriction_policy(resource_id, body, opts = {})
160
+ data, _status_code, _headers = update_restriction_policy_with_http_info(resource_id, body, opts)
161
+ data
162
+ end
163
+
164
+ # Update a restriction policy.
165
+ #
166
+ # Updates the restriction policy associated with a resource.
167
+ #
168
+ # #### Supported resources
169
+ # Restriction policies can be applied to the following resources:
170
+ # - Connections: `connection`
171
+ # - Dashboards: `dashboard`
172
+ # - Notebooks: `notebook`
173
+ # - Security Rules: `security-rule`
174
+ # - Service Level Objectives: `slo`
175
+ #
176
+ # @param resource_id [String] Identifier, formatted as `type:id`. Supported types: `connection`, `dashboard`, `notebook`, `security-rule`, `slo`.
177
+ # @param body [RestrictionPolicyUpdateRequest] Restriction policy payload
178
+ # @param opts [Hash] the optional parameters
179
+ # @return [Array<(RestrictionPolicyResponse, Integer, Hash)>] RestrictionPolicyResponse data, response status code and response headers
180
+ def update_restriction_policy_with_http_info(resource_id, body, opts = {})
181
+
182
+ if @api_client.config.debugging
183
+ @api_client.config.logger.debug 'Calling API: RestrictionPoliciesAPI.update_restriction_policy ...'
184
+ end
185
+ # verify the required parameter 'resource_id' is set
186
+ if @api_client.config.client_side_validation && resource_id.nil?
187
+ fail ArgumentError, "Missing the required parameter 'resource_id' when calling RestrictionPoliciesAPI.update_restriction_policy"
188
+ end
189
+ # verify the required parameter 'body' is set
190
+ if @api_client.config.client_side_validation && body.nil?
191
+ fail ArgumentError, "Missing the required parameter 'body' when calling RestrictionPoliciesAPI.update_restriction_policy"
192
+ end
193
+ # resource path
194
+ local_var_path = '/api/v2/restriction_policy/{resource_id}'.sub('{resource_id}', CGI.escape(resource_id.to_s).gsub('%2F', '/'))
195
+
196
+ # query parameters
197
+ query_params = opts[:query_params] || {}
198
+
199
+ # header parameters
200
+ header_params = opts[:header_params] || {}
201
+ # HTTP header 'Accept' (if needed)
202
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
203
+ # HTTP header 'Content-Type'
204
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
205
+
206
+ # form parameters
207
+ form_params = opts[:form_params] || {}
208
+
209
+ # http body (model)
210
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
211
+
212
+ # return_type
213
+ return_type = opts[:debug_return_type] || 'RestrictionPolicyResponse'
214
+
215
+ # auth_names
216
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
217
+
218
+ new_options = opts.merge(
219
+ :operation => :update_restriction_policy,
220
+ :header_params => header_params,
221
+ :query_params => query_params,
222
+ :form_params => form_params,
223
+ :body => post_body,
224
+ :auth_names => auth_names,
225
+ :return_type => return_type,
226
+ :api_version => "V2"
227
+ )
228
+
229
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
230
+ if @api_client.config.debugging
231
+ @api_client.config.logger.debug "API called: RestrictionPoliciesAPI#update_restriction_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
232
+ end
233
+ return data, status_code, headers
234
+ end
235
+ end
236
+ end
@@ -0,0 +1,153 @@
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 'cgi'
17
+
18
+ module DatadogAPIClient::V2
19
+ class SyntheticsAPI
20
+ attr_accessor :api_client
21
+
22
+ def initialize(api_client = DatadogAPIClient::APIClient.default)
23
+ @api_client = api_client
24
+ end
25
+
26
+ # Get the on-demand concurrency cap.
27
+ #
28
+ # @see #get_on_demand_concurrency_cap_with_http_info
29
+ def get_on_demand_concurrency_cap(opts = {})
30
+ data, _status_code, _headers = get_on_demand_concurrency_cap_with_http_info(opts)
31
+ data
32
+ end
33
+
34
+ # Get the on-demand concurrency cap.
35
+ #
36
+ # Get the on-demand concurrency cap.
37
+ #
38
+ # @param opts [Hash] the optional parameters
39
+ # @return [Array<(OnDemandConcurrencyCapResponse, Integer, Hash)>] OnDemandConcurrencyCapResponse data, response status code and response headers
40
+ def get_on_demand_concurrency_cap_with_http_info(opts = {})
41
+
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: SyntheticsAPI.get_on_demand_concurrency_cap ...'
44
+ end
45
+ # resource path
46
+ local_var_path = '/api/v2/synthetics/settings/on_demand_concurrency_cap'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+
56
+ # form parameters
57
+ form_params = opts[:form_params] || {}
58
+
59
+ # http body (model)
60
+ post_body = opts[:debug_body]
61
+
62
+ # return_type
63
+ return_type = opts[:debug_return_type] || 'OnDemandConcurrencyCapResponse'
64
+
65
+ # auth_names
66
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
67
+
68
+ new_options = opts.merge(
69
+ :operation => :get_on_demand_concurrency_cap,
70
+ :header_params => header_params,
71
+ :query_params => query_params,
72
+ :form_params => form_params,
73
+ :body => post_body,
74
+ :auth_names => auth_names,
75
+ :return_type => return_type,
76
+ :api_version => "V2"
77
+ )
78
+
79
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
80
+ if @api_client.config.debugging
81
+ @api_client.config.logger.debug "API called: SyntheticsAPI#get_on_demand_concurrency_cap\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+
86
+ # Save new value for on-demand concurrency cap.
87
+ #
88
+ # @see #set_on_demand_concurrency_cap_with_http_info
89
+ def set_on_demand_concurrency_cap(body, opts = {})
90
+ data, _status_code, _headers = set_on_demand_concurrency_cap_with_http_info(body, opts)
91
+ data
92
+ end
93
+
94
+ # Save new value for on-demand concurrency cap.
95
+ #
96
+ # Save new value for on-demand concurrency cap.
97
+ #
98
+ # @param body [OnDemandConcurrencyCapAttributes] .
99
+ # @param opts [Hash] the optional parameters
100
+ # @return [Array<(OnDemandConcurrencyCapResponse, Integer, Hash)>] OnDemandConcurrencyCapResponse data, response status code and response headers
101
+ def set_on_demand_concurrency_cap_with_http_info(body, opts = {})
102
+
103
+ if @api_client.config.debugging
104
+ @api_client.config.logger.debug 'Calling API: SyntheticsAPI.set_on_demand_concurrency_cap ...'
105
+ end
106
+ # verify the required parameter 'body' is set
107
+ if @api_client.config.client_side_validation && body.nil?
108
+ fail ArgumentError, "Missing the required parameter 'body' when calling SyntheticsAPI.set_on_demand_concurrency_cap"
109
+ end
110
+ # resource path
111
+ local_var_path = '/api/v2/synthetics/settings/on_demand_concurrency_cap'
112
+
113
+ # query parameters
114
+ query_params = opts[:query_params] || {}
115
+
116
+ # header parameters
117
+ header_params = opts[:header_params] || {}
118
+ # HTTP header 'Accept' (if needed)
119
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
120
+ # HTTP header 'Content-Type'
121
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
122
+
123
+ # form parameters
124
+ form_params = opts[:form_params] || {}
125
+
126
+ # http body (model)
127
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
128
+
129
+ # return_type
130
+ return_type = opts[:debug_return_type] || 'OnDemandConcurrencyCapResponse'
131
+
132
+ # auth_names
133
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
134
+
135
+ new_options = opts.merge(
136
+ :operation => :set_on_demand_concurrency_cap,
137
+ :header_params => header_params,
138
+ :query_params => query_params,
139
+ :form_params => form_params,
140
+ :body => post_body,
141
+ :auth_names => auth_names,
142
+ :return_type => return_type,
143
+ :api_version => "V2"
144
+ )
145
+
146
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
147
+ if @api_client.config.debugging
148
+ @api_client.config.logger.debug "API called: SyntheticsAPI#set_on_demand_concurrency_cap\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
149
+ end
150
+ return data, status_code, headers
151
+ end
152
+ end
153
+ end
@@ -255,7 +255,7 @@ module DatadogAPIClient::V2
255
255
  # Get hourly usage by product family.
256
256
  #
257
257
  # @param filter_timestamp_start [Time] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour.
258
- # @param filter_product_families [String] Comma separated list of product families to retrieve. Available families are `all`, `analyzed_logs`, `application_security`, `audit_logs`, `serverless`, `ci_app`, `cloud_cost_management`, `cspm`, `custom_events`, `cws`, `dbm`, `fargate`, `infra_hosts`, `incident_management`, `indexed_logs`, `indexed_spans`, `ingested_spans`, `iot`, `lambda_traced_invocations`, `logs`, `network_flows`, `network_hosts`, `observability_pipelines`, `online_archive`, `profiling`, `rum`, `rum_browser_sessions`, `rum_mobile_sessions`, `sds`, `snmp`, `synthetics_api`, `synthetics_browser`, `synthetics_parallel_testing`, and `timeseries`.
258
+ # @param filter_product_families [String] Comma separated list of product families to retrieve. Available families are `all`, `analyzed_logs`, `application_security`, `audit_logs`, `audit_trail`, `serverless`, `ci_app`, `cloud_cost_management`, `cspm`, `custom_events`, `cws`, `dbm`, `fargate`, `infra_hosts`, `incident_management`, `indexed_logs`, `indexed_spans`, `ingested_spans`, `iot`, `lambda_traced_invocations`, `logs`, `network_flows`, `network_hosts`, `observability_pipelines`, `online_archive`, `profiling`, `rum`, `rum_browser_sessions`, `rum_mobile_sessions`, `sds`, `snmp`, `synthetics_api`, `synthetics_browser`, `synthetics_parallel_testing`, and `timeseries`.
259
259
  # @param opts [Hash] the optional parameters
260
260
  # @option opts [Time] :filter_timestamp_end Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour.
261
261
  # @option opts [Boolean] :filter_include_descendants Include child org usage in the response. Defaults to false.
@@ -67,7 +67,13 @@ module DatadogAPIClient::V2
67
67
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
68
68
  end
69
69
  elsif !attributes[self.class.attribute_map[key]].nil?
70
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
70
+ res = _deserialize(type, attributes[self.class.attribute_map[key]])
71
+ if res.instance_of? DatadogAPIClient::UnparsedObject
72
+ self._unparsed = true
73
+ elsif (res.kind_of? DatadogAPIClient::V2::BaseGenericModel) && res._unparsed
74
+ self._unparsed = true
75
+ end
76
+ self.send("#{key}=", res)
71
77
  end
72
78
  end
73
79
 
@@ -250,8 +256,6 @@ module DatadogAPIClient::V2
250
256
  model = const.build(data)
251
257
  return model if model
252
258
  else
253
- # raise if data contains keys that are not known to the model
254
- raise unless (data.keys - const.attribute_map.values).empty?
255
259
  model = const.build_from_hash(data)
256
260
  return model if model && model.valid?
257
261
  end
@@ -22,5 +22,6 @@ module DatadogAPIClient::V2
22
22
  include BaseEnumModel
23
23
 
24
24
  LOGS = "logs".freeze
25
+ RUM = "rum".freeze
25
26
  end
26
27
  end
@@ -0,0 +1,161 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # Incident integration metadata's attributes for a create request.
21
+ class IncidentIntegrationMetadataAttributes
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # UUID of the incident this integration metadata is connected to.
29
+ attr_accessor :incident_id
30
+
31
+ # A number indicating the type of integration this metadata is for. 1 indicates Slack;
32
+ # 8 indicates Jira.
33
+ attr_reader :integration_type
34
+
35
+ # Incident integration metadata's metadata attribute.
36
+ attr_reader :metadata
37
+
38
+ # A number indicating the status of this integration metadata. 0 indicates unknown;
39
+ # 1 indicates pending; 2 indicates complete; 3 indicates manually created;
40
+ # 4 indicates manually updated; 5 indicates failed.
41
+ attr_reader :status
42
+
43
+ # Attribute mapping from ruby-style variable name to JSON key.
44
+ # @!visibility private
45
+ def self.attribute_map
46
+ {
47
+ :'incident_id' => :'incident_id',
48
+ :'integration_type' => :'integration_type',
49
+ :'metadata' => :'metadata',
50
+ :'status' => :'status'
51
+ }
52
+ end
53
+
54
+ # Attribute type mapping.
55
+ # @!visibility private
56
+ def self.openapi_types
57
+ {
58
+ :'incident_id' => :'String',
59
+ :'integration_type' => :'Integer',
60
+ :'metadata' => :'IncidentIntegrationMetadataMetadata',
61
+ :'status' => :'Integer'
62
+ }
63
+ end
64
+
65
+ # Initializes the object
66
+ # @param attributes [Hash] Model attributes in the form of hash
67
+ # @!visibility private
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentIntegrationMetadataAttributes` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ attributes = attributes.each_with_object({}) { |(k, v), h|
75
+ if (!self.class.attribute_map.key?(k.to_sym))
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentIntegrationMetadataAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
77
+ end
78
+ h[k.to_sym] = v
79
+ }
80
+
81
+ if attributes.key?(:'incident_id')
82
+ self.incident_id = attributes[:'incident_id']
83
+ end
84
+
85
+ if attributes.key?(:'integration_type')
86
+ self.integration_type = attributes[:'integration_type']
87
+ end
88
+
89
+ if attributes.key?(:'metadata')
90
+ self.metadata = attributes[:'metadata']
91
+ end
92
+
93
+ if attributes.key?(:'status')
94
+ self.status = attributes[:'status']
95
+ end
96
+ end
97
+
98
+ # Check to see if the all the properties in the model are valid
99
+ # @return true if the model is valid
100
+ # @!visibility private
101
+ def valid?
102
+ return false if @integration_type.nil?
103
+ return false if @integration_type > 9
104
+ return false if @metadata.nil?
105
+ return false if !@status.nil? && @status > 5
106
+ true
107
+ end
108
+
109
+ # Custom attribute writer method with validation
110
+ # @param integration_type [Object] Object to be assigned
111
+ # @!visibility private
112
+ def integration_type=(integration_type)
113
+ if integration_type.nil?
114
+ fail ArgumentError, 'invalid value for "integration_type", integration_type cannot be nil.'
115
+ end
116
+ if integration_type > 9
117
+ fail ArgumentError, 'invalid value for "integration_type", must be smaller than or equal to 9.'
118
+ end
119
+ @integration_type = integration_type
120
+ end
121
+
122
+ # Custom attribute writer method with validation
123
+ # @param metadata [Object] Object to be assigned
124
+ # @!visibility private
125
+ def metadata=(metadata)
126
+ if metadata.nil?
127
+ fail ArgumentError, 'invalid value for "metadata", metadata cannot be nil.'
128
+ end
129
+ @metadata = metadata
130
+ end
131
+
132
+ # Custom attribute writer method with validation
133
+ # @param status [Object] Object to be assigned
134
+ # @!visibility private
135
+ def status=(status)
136
+ if !status.nil? && status > 5
137
+ fail ArgumentError, 'invalid value for "status", must be smaller than or equal to 5.'
138
+ end
139
+ @status = status
140
+ end
141
+
142
+ # Checks equality by comparing each attribute.
143
+ # @param o [Object] Object to be compared
144
+ # @!visibility private
145
+ def ==(o)
146
+ return true if self.equal?(o)
147
+ self.class == o.class &&
148
+ incident_id == o.incident_id &&
149
+ integration_type == o.integration_type &&
150
+ metadata == o.metadata &&
151
+ status == o.status
152
+ end
153
+
154
+ # Calculates hash code according to all attributes.
155
+ # @return [Integer] Hash code
156
+ # @!visibility private
157
+ def hash
158
+ [incident_id, integration_type, metadata, status].hash
159
+ end
160
+ end
161
+ end