datadog_api_client 2.34.0 → 2.35.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/.apigentools-info +4 -4
- data/.generator/schemas/v1/openapi.yaml +59 -3
- data/.generator/schemas/v2/openapi.yaml +738 -69
- data/.generator/src/generator/formatter.py +2 -2
- data/.generator/src/generator/openapi.py +1 -1
- data/.github/workflows/release.yml +1 -1
- data/CHANGELOG.md +19 -0
- data/Gemfile +1 -0
- data/examples/v1/monitors/CreateMonitor_1539578087.rb +1 -0
- data/examples/v1/monitors/CreateMonitor_440013737.rb +1 -0
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +142 -0
- data/examples/v2/csm-threats/CreateCSMThreatsAgentRule_1295653933.rb +32 -0
- data/examples/v2/dora-metrics/CreateDORADeployment.rb +0 -3
- data/examples/v2/dora-metrics/CreateDORAFailure.rb +30 -0
- data/examples/v2/dora-metrics/CreateDORAIncident.rb +11 -9
- data/examples/v2/dora-metrics/CreateDORAIncident_1768887482.rb +25 -0
- data/examples/v2/on-call/GetTeamOnCallUsers.rb +11 -0
- data/examples/v2/security-monitoring/ListFindings_2932019633.rb +11 -0
- data/examples/v2/software-catalog/DeleteCatalogKind.rb +5 -0
- data/examples/v2/software-catalog/ListCatalogKind.rb +5 -0
- data/examples/v2/software-catalog/ListCatalogKind_3806205775.rb +5 -0
- data/examples/v2/software-catalog/UpsertCatalogKind.rb +9 -0
- data/lib/datadog_api_client/configuration.rb +0 -2
- data/lib/datadog_api_client/inflector.rb +34 -6
- data/lib/datadog_api_client/v1/api/snapshots_api.rb +2 -1
- data/lib/datadog_api_client/v1/models/monitor.rb +17 -1
- data/lib/datadog_api_client/v1/models/monitor_draft_status.rb +32 -0
- data/lib/datadog_api_client/v1/models/monitor_options.rb +1 -1
- data/lib/datadog_api_client/v1/models/monitor_update_request.rb +17 -1
- data/lib/datadog_api_client/v1/models/synthetics_api_test_step_subtype.rb +6 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +32 -2
- data/lib/datadog_api_client/v2/api/dora_metrics_api.rb +79 -15
- data/lib/datadog_api_client/v2/api/on_call_api.rb +67 -0
- data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +5 -3
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +13 -0
- data/lib/datadog_api_client/v2/api/software_catalog_api.rb +221 -0
- data/lib/datadog_api_client/v2/models/action_query_spec_inputs.rb +1 -1
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action.rb +23 -3
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action_metadata.rb +125 -0
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action_set.rb +165 -0
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_attributes.rb +37 -1
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_create_attributes.rb +57 -1
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_attributes.rb +57 -1
- data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +21 -1
- data/lib/datadog_api_client/v2/models/{dora_incident_request.rb → dora_failure_request.rb} +4 -4
- data/lib/datadog_api_client/v2/models/{dora_incident_request_attributes.rb → dora_failure_request_attributes.rb} +31 -11
- data/lib/datadog_api_client/v2/models/{dora_incident_request_data.rb → dora_failure_request_data.rb} +4 -4
- data/lib/datadog_api_client/v2/models/{dora_incident_response.rb → dora_failure_response.rb} +5 -5
- data/lib/datadog_api_client/v2/models/{dora_incident_response_data.rb → dora_failure_response_data.rb} +6 -6
- data/lib/datadog_api_client/v2/models/{dora_incident_type.rb → dora_failure_type.rb} +3 -3
- data/lib/datadog_api_client/v2/models/escalation.rb +143 -0
- data/lib/datadog_api_client/v2/models/escalation_relationships.rb +105 -0
- data/lib/datadog_api_client/v2/models/escalation_relationships_responders.rb +107 -0
- data/lib/datadog_api_client/v2/models/escalation_relationships_responders_data_items.rb +144 -0
- data/lib/datadog_api_client/v2/models/escalation_relationships_responders_data_items_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/escalation_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/finding_attributes.rb +31 -1
- data/lib/datadog_api_client/v2/models/kind_attributes.rb +143 -0
- data/lib/datadog_api_client/v2/models/kind_data.rb +153 -0
- data/lib/datadog_api_client/v2/models/kind_metadata.rb +115 -0
- data/lib/datadog_api_client/v2/models/kind_obj.rb +143 -0
- data/lib/datadog_api_client/v2/models/kind_response_meta.rb +105 -0
- data/lib/datadog_api_client/v2/models/list_kind_catalog_response.rb +117 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders.rb +117 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships.rb +115 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_escalations.rb +107 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_escalations_data_items.rb +144 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_escalations_data_items_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_responders.rb +107 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_responders_data_items.rb +144 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_responders_data_items_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders_included.rb +63 -0
- data/lib/datadog_api_client/v2/models/upsert_catalog_kind_request.rb +63 -0
- data/lib/datadog_api_client/v2/models/upsert_catalog_kind_response.rb +117 -0
- data/lib/datadog_api_client/version.rb +1 -1
- data/repository.datadog.yaml +8 -0
- metadata +44 -7
@@ -88,6 +88,71 @@ module DatadogAPIClient::V2
|
|
88
88
|
return data, status_code, headers
|
89
89
|
end
|
90
90
|
|
91
|
+
# Delete a single kind.
|
92
|
+
#
|
93
|
+
# @see #delete_catalog_kind_with_http_info
|
94
|
+
def delete_catalog_kind(kind_id, opts = {})
|
95
|
+
delete_catalog_kind_with_http_info(kind_id, opts)
|
96
|
+
nil
|
97
|
+
end
|
98
|
+
|
99
|
+
# Delete a single kind.
|
100
|
+
#
|
101
|
+
# Delete a single kind in Software Catalog.
|
102
|
+
#
|
103
|
+
# @param kind_id [String] Entity kind.
|
104
|
+
# @param opts [Hash] the optional parameters
|
105
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
106
|
+
def delete_catalog_kind_with_http_info(kind_id, opts = {})
|
107
|
+
|
108
|
+
if @api_client.config.debugging
|
109
|
+
@api_client.config.logger.debug 'Calling API: SoftwareCatalogAPI.delete_catalog_kind ...'
|
110
|
+
end
|
111
|
+
# verify the required parameter 'kind_id' is set
|
112
|
+
if @api_client.config.client_side_validation && kind_id.nil?
|
113
|
+
fail ArgumentError, "Missing the required parameter 'kind_id' when calling SoftwareCatalogAPI.delete_catalog_kind"
|
114
|
+
end
|
115
|
+
# resource path
|
116
|
+
local_var_path = '/api/v2/catalog/kind/{kind_id}'.sub('{kind_id}', CGI.escape(kind_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(['*/*'])
|
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]
|
134
|
+
|
135
|
+
# auth_names
|
136
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
137
|
+
|
138
|
+
new_options = opts.merge(
|
139
|
+
:operation => :delete_catalog_kind,
|
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::Delete, local_var_path, new_options)
|
150
|
+
if @api_client.config.debugging
|
151
|
+
@api_client.config.logger.debug "API called: SoftwareCatalogAPI#delete_catalog_kind\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
152
|
+
end
|
153
|
+
return data, status_code, headers
|
154
|
+
end
|
155
|
+
|
91
156
|
# Get a list of entities.
|
92
157
|
#
|
93
158
|
# @see #list_catalog_entity_with_http_info
|
@@ -197,6 +262,95 @@ module DatadogAPIClient::V2
|
|
197
262
|
end
|
198
263
|
end
|
199
264
|
|
265
|
+
# Get a list of entity kinds.
|
266
|
+
#
|
267
|
+
# @see #list_catalog_kind_with_http_info
|
268
|
+
def list_catalog_kind(opts = {})
|
269
|
+
data, _status_code, _headers = list_catalog_kind_with_http_info(opts)
|
270
|
+
data
|
271
|
+
end
|
272
|
+
|
273
|
+
# Get a list of entity kinds.
|
274
|
+
#
|
275
|
+
# Get a list of entity kinds from Software Catalog.
|
276
|
+
#
|
277
|
+
# @param opts [Hash] the optional parameters
|
278
|
+
# @option opts [Integer] :page_offset Specific offset to use as the beginning of the returned page.
|
279
|
+
# @option opts [Integer] :page_limit Maximum number of kinds in the response.
|
280
|
+
# @option opts [String] :filter_id Filter entities by UUID.
|
281
|
+
# @option opts [String] :filter_name Filter entities by name.
|
282
|
+
# @return [Array<(ListKindCatalogResponse, Integer, Hash)>] ListKindCatalogResponse data, response status code and response headers
|
283
|
+
def list_catalog_kind_with_http_info(opts = {})
|
284
|
+
|
285
|
+
if @api_client.config.debugging
|
286
|
+
@api_client.config.logger.debug 'Calling API: SoftwareCatalogAPI.list_catalog_kind ...'
|
287
|
+
end
|
288
|
+
# resource path
|
289
|
+
local_var_path = '/api/v2/catalog/kind'
|
290
|
+
|
291
|
+
# query parameters
|
292
|
+
query_params = opts[:query_params] || {}
|
293
|
+
query_params[:'page[offset]'] = opts[:'page_offset'] if !opts[:'page_offset'].nil?
|
294
|
+
query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil?
|
295
|
+
query_params[:'filter[id]'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
|
296
|
+
query_params[:'filter[name]'] = opts[:'filter_name'] if !opts[:'filter_name'].nil?
|
297
|
+
|
298
|
+
# header parameters
|
299
|
+
header_params = opts[:header_params] || {}
|
300
|
+
# HTTP header 'Accept' (if needed)
|
301
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
302
|
+
|
303
|
+
# form parameters
|
304
|
+
form_params = opts[:form_params] || {}
|
305
|
+
|
306
|
+
# http body (model)
|
307
|
+
post_body = opts[:debug_body]
|
308
|
+
|
309
|
+
# return_type
|
310
|
+
return_type = opts[:debug_return_type] || 'ListKindCatalogResponse'
|
311
|
+
|
312
|
+
# auth_names
|
313
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
314
|
+
|
315
|
+
new_options = opts.merge(
|
316
|
+
:operation => :list_catalog_kind,
|
317
|
+
:header_params => header_params,
|
318
|
+
:query_params => query_params,
|
319
|
+
:form_params => form_params,
|
320
|
+
:body => post_body,
|
321
|
+
:auth_names => auth_names,
|
322
|
+
:return_type => return_type,
|
323
|
+
:api_version => "V2"
|
324
|
+
)
|
325
|
+
|
326
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
327
|
+
if @api_client.config.debugging
|
328
|
+
@api_client.config.logger.debug "API called: SoftwareCatalogAPI#list_catalog_kind\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
329
|
+
end
|
330
|
+
return data, status_code, headers
|
331
|
+
end
|
332
|
+
|
333
|
+
# Get a list of entity kinds.
|
334
|
+
#
|
335
|
+
# Provide a paginated version of {#list_catalog_kind}, returning all items.
|
336
|
+
#
|
337
|
+
# To use it you need to use a block: list_catalog_kind_with_pagination { |item| p item }
|
338
|
+
#
|
339
|
+
# @yield [KindData] Paginated items
|
340
|
+
def list_catalog_kind_with_pagination(opts = {})
|
341
|
+
api_version = "V2"
|
342
|
+
page_size = @api_client.get_attribute_from_path(opts, "page_limit", 100)
|
343
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_limit", Integer, page_size)
|
344
|
+
while true do
|
345
|
+
response = list_catalog_kind(opts)
|
346
|
+
@api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
|
347
|
+
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
348
|
+
break
|
349
|
+
end
|
350
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_offset", Integer, @api_client.get_attribute_from_path(opts, "page_offset", 0) + page_size)
|
351
|
+
end
|
352
|
+
end
|
353
|
+
|
200
354
|
# Get a list of entity relations.
|
201
355
|
#
|
202
356
|
# @see #list_catalog_relation_with_http_info
|
@@ -364,5 +518,72 @@ module DatadogAPIClient::V2
|
|
364
518
|
end
|
365
519
|
return data, status_code, headers
|
366
520
|
end
|
521
|
+
|
522
|
+
# Create or update kinds.
|
523
|
+
#
|
524
|
+
# @see #upsert_catalog_kind_with_http_info
|
525
|
+
def upsert_catalog_kind(body, opts = {})
|
526
|
+
data, _status_code, _headers = upsert_catalog_kind_with_http_info(body, opts)
|
527
|
+
data
|
528
|
+
end
|
529
|
+
|
530
|
+
# Create or update kinds.
|
531
|
+
#
|
532
|
+
# Create or update kinds in Software Catalog.
|
533
|
+
#
|
534
|
+
# @param body [UpsertCatalogKindRequest] Kind YAML or JSON.
|
535
|
+
# @param opts [Hash] the optional parameters
|
536
|
+
# @return [Array<(UpsertCatalogKindResponse, Integer, Hash)>] UpsertCatalogKindResponse data, response status code and response headers
|
537
|
+
def upsert_catalog_kind_with_http_info(body, opts = {})
|
538
|
+
|
539
|
+
if @api_client.config.debugging
|
540
|
+
@api_client.config.logger.debug 'Calling API: SoftwareCatalogAPI.upsert_catalog_kind ...'
|
541
|
+
end
|
542
|
+
# verify the required parameter 'body' is set
|
543
|
+
if @api_client.config.client_side_validation && body.nil?
|
544
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling SoftwareCatalogAPI.upsert_catalog_kind"
|
545
|
+
end
|
546
|
+
# resource path
|
547
|
+
local_var_path = '/api/v2/catalog/kind'
|
548
|
+
|
549
|
+
# query parameters
|
550
|
+
query_params = opts[:query_params] || {}
|
551
|
+
|
552
|
+
# header parameters
|
553
|
+
header_params = opts[:header_params] || {}
|
554
|
+
# HTTP header 'Accept' (if needed)
|
555
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
556
|
+
# HTTP header 'Content-Type'
|
557
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
558
|
+
|
559
|
+
# form parameters
|
560
|
+
form_params = opts[:form_params] || {}
|
561
|
+
|
562
|
+
# http body (model)
|
563
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
564
|
+
|
565
|
+
# return_type
|
566
|
+
return_type = opts[:debug_return_type] || 'UpsertCatalogKindResponse'
|
567
|
+
|
568
|
+
# auth_names
|
569
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
570
|
+
|
571
|
+
new_options = opts.merge(
|
572
|
+
:operation => :upsert_catalog_kind,
|
573
|
+
:header_params => header_params,
|
574
|
+
:query_params => query_params,
|
575
|
+
:form_params => form_params,
|
576
|
+
:body => post_body,
|
577
|
+
:auth_names => auth_names,
|
578
|
+
:return_type => return_type,
|
579
|
+
:api_version => "V2"
|
580
|
+
)
|
581
|
+
|
582
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
583
|
+
if @api_client.config.debugging
|
584
|
+
@api_client.config.logger.debug "API called: SoftwareCatalogAPI#upsert_catalog_kind\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
585
|
+
end
|
586
|
+
return data, status_code, headers
|
587
|
+
end
|
367
588
|
end
|
368
589
|
end
|
@@ -27,6 +27,12 @@ module DatadogAPIClient::V2
|
|
27
27
|
# Kill system call applied on the container matching the rule
|
28
28
|
attr_accessor :kill
|
29
29
|
|
30
|
+
# The metadata action applied on the scope matching the rule
|
31
|
+
attr_accessor :metadata
|
32
|
+
|
33
|
+
# The set action applied on the scope matching the rule
|
34
|
+
attr_accessor :set
|
35
|
+
|
30
36
|
attr_accessor :additional_properties
|
31
37
|
|
32
38
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -34,7 +40,9 @@ module DatadogAPIClient::V2
|
|
34
40
|
def self.attribute_map
|
35
41
|
{
|
36
42
|
:'filter' => :'filter',
|
37
|
-
:'kill' => :'kill'
|
43
|
+
:'kill' => :'kill',
|
44
|
+
:'metadata' => :'metadata',
|
45
|
+
:'set' => :'set'
|
38
46
|
}
|
39
47
|
end
|
40
48
|
|
@@ -43,7 +51,9 @@ module DatadogAPIClient::V2
|
|
43
51
|
def self.openapi_types
|
44
52
|
{
|
45
53
|
:'filter' => :'String',
|
46
|
-
:'kill' => :'CloudWorkloadSecurityAgentRuleKill'
|
54
|
+
:'kill' => :'CloudWorkloadSecurityAgentRuleKill',
|
55
|
+
:'metadata' => :'CloudWorkloadSecurityAgentRuleActionMetadata',
|
56
|
+
:'set' => :'CloudWorkloadSecurityAgentRuleActionSet'
|
47
57
|
}
|
48
58
|
end
|
49
59
|
|
@@ -72,6 +82,14 @@ module DatadogAPIClient::V2
|
|
72
82
|
if attributes.key?(:'kill')
|
73
83
|
self.kill = attributes[:'kill']
|
74
84
|
end
|
85
|
+
|
86
|
+
if attributes.key?(:'metadata')
|
87
|
+
self.metadata = attributes[:'metadata']
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes.key?(:'set')
|
91
|
+
self.set = attributes[:'set']
|
92
|
+
end
|
75
93
|
end
|
76
94
|
|
77
95
|
# Returns the object in the form of hash, with additionalProperties support.
|
@@ -102,6 +120,8 @@ module DatadogAPIClient::V2
|
|
102
120
|
self.class == o.class &&
|
103
121
|
filter == o.filter &&
|
104
122
|
kill == o.kill &&
|
123
|
+
metadata == o.metadata &&
|
124
|
+
set == o.set &&
|
105
125
|
additional_properties == o.additional_properties
|
106
126
|
end
|
107
127
|
|
@@ -109,7 +129,7 @@ module DatadogAPIClient::V2
|
|
109
129
|
# @return [Integer] Hash code
|
110
130
|
# @!visibility private
|
111
131
|
def hash
|
112
|
-
[filter, kill, additional_properties].hash
|
132
|
+
[filter, kill, metadata, set, additional_properties].hash
|
113
133
|
end
|
114
134
|
end
|
115
135
|
end
|
@@ -0,0 +1,125 @@
|
|
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 metadata action applied on the scope matching the rule
|
21
|
+
class CloudWorkloadSecurityAgentRuleActionMetadata
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# The image tag of the metadata action
|
25
|
+
attr_accessor :image_tag
|
26
|
+
|
27
|
+
# The service of the metadata action
|
28
|
+
attr_accessor :service
|
29
|
+
|
30
|
+
# The short image of the metadata action
|
31
|
+
attr_accessor :short_image
|
32
|
+
|
33
|
+
attr_accessor :additional_properties
|
34
|
+
|
35
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
36
|
+
# @!visibility private
|
37
|
+
def self.attribute_map
|
38
|
+
{
|
39
|
+
:'image_tag' => :'image_tag',
|
40
|
+
:'service' => :'service',
|
41
|
+
:'short_image' => :'short_image'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# Attribute type mapping.
|
46
|
+
# @!visibility private
|
47
|
+
def self.openapi_types
|
48
|
+
{
|
49
|
+
:'image_tag' => :'String',
|
50
|
+
:'service' => :'String',
|
51
|
+
:'short_image' => :'String'
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# Initializes the object
|
56
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
57
|
+
# @!visibility private
|
58
|
+
def initialize(attributes = {})
|
59
|
+
if (!attributes.is_a?(Hash))
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleActionMetadata` initialize method"
|
61
|
+
end
|
62
|
+
|
63
|
+
self.additional_properties = {}
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
66
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
67
|
+
self.additional_properties[k.to_sym] = v
|
68
|
+
else
|
69
|
+
h[k.to_sym] = v
|
70
|
+
end
|
71
|
+
}
|
72
|
+
|
73
|
+
if attributes.key?(:'image_tag')
|
74
|
+
self.image_tag = attributes[:'image_tag']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.key?(:'service')
|
78
|
+
self.service = attributes[:'service']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.key?(:'short_image')
|
82
|
+
self.short_image = attributes[:'short_image']
|
83
|
+
end
|
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
|
+
image_tag == o.image_tag &&
|
113
|
+
service == o.service &&
|
114
|
+
short_image == o.short_image &&
|
115
|
+
additional_properties == o.additional_properties
|
116
|
+
end
|
117
|
+
|
118
|
+
# Calculates hash code according to all attributes.
|
119
|
+
# @return [Integer] Hash code
|
120
|
+
# @!visibility private
|
121
|
+
def hash
|
122
|
+
[image_tag, service, short_image, additional_properties].hash
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
@@ -0,0 +1,165 @@
|
|
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 set action applied on the scope matching the rule
|
21
|
+
class CloudWorkloadSecurityAgentRuleActionSet
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Whether the value should be appended to the field
|
25
|
+
attr_accessor :append
|
26
|
+
|
27
|
+
# The field of the set action
|
28
|
+
attr_accessor :field
|
29
|
+
|
30
|
+
# The name of the set action
|
31
|
+
attr_accessor :name
|
32
|
+
|
33
|
+
# The scope of the set action
|
34
|
+
attr_accessor :scope
|
35
|
+
|
36
|
+
# The size of the set action
|
37
|
+
attr_accessor :size
|
38
|
+
|
39
|
+
# The time to live of the set action
|
40
|
+
attr_accessor :ttl
|
41
|
+
|
42
|
+
# The value of the set action
|
43
|
+
attr_accessor :value
|
44
|
+
|
45
|
+
attr_accessor :additional_properties
|
46
|
+
|
47
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
48
|
+
# @!visibility private
|
49
|
+
def self.attribute_map
|
50
|
+
{
|
51
|
+
:'append' => :'append',
|
52
|
+
:'field' => :'field',
|
53
|
+
:'name' => :'name',
|
54
|
+
:'scope' => :'scope',
|
55
|
+
:'size' => :'size',
|
56
|
+
:'ttl' => :'ttl',
|
57
|
+
:'value' => :'value'
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
# Attribute type mapping.
|
62
|
+
# @!visibility private
|
63
|
+
def self.openapi_types
|
64
|
+
{
|
65
|
+
:'append' => :'Boolean',
|
66
|
+
:'field' => :'String',
|
67
|
+
:'name' => :'String',
|
68
|
+
:'scope' => :'String',
|
69
|
+
:'size' => :'Integer',
|
70
|
+
:'ttl' => :'Integer',
|
71
|
+
:'value' => :'String'
|
72
|
+
}
|
73
|
+
end
|
74
|
+
|
75
|
+
# Initializes the object
|
76
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
77
|
+
# @!visibility private
|
78
|
+
def initialize(attributes = {})
|
79
|
+
if (!attributes.is_a?(Hash))
|
80
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleActionSet` initialize method"
|
81
|
+
end
|
82
|
+
|
83
|
+
self.additional_properties = {}
|
84
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
85
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
86
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
87
|
+
self.additional_properties[k.to_sym] = v
|
88
|
+
else
|
89
|
+
h[k.to_sym] = v
|
90
|
+
end
|
91
|
+
}
|
92
|
+
|
93
|
+
if attributes.key?(:'append')
|
94
|
+
self.append = attributes[:'append']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.key?(:'field')
|
98
|
+
self.field = attributes[:'field']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.key?(:'name')
|
102
|
+
self.name = attributes[:'name']
|
103
|
+
end
|
104
|
+
|
105
|
+
if attributes.key?(:'scope')
|
106
|
+
self.scope = attributes[:'scope']
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.key?(:'size')
|
110
|
+
self.size = attributes[:'size']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.key?(:'ttl')
|
114
|
+
self.ttl = attributes[:'ttl']
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.key?(:'value')
|
118
|
+
self.value = attributes[:'value']
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
123
|
+
# @return [Hash] Returns the object in the form of hash
|
124
|
+
# @!visibility private
|
125
|
+
def to_hash
|
126
|
+
hash = {}
|
127
|
+
self.class.attribute_map.each_pair do |attr, param|
|
128
|
+
value = self.send(attr)
|
129
|
+
if value.nil?
|
130
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
131
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
132
|
+
end
|
133
|
+
|
134
|
+
hash[param] = _to_hash(value)
|
135
|
+
end
|
136
|
+
self.additional_properties.each_pair do |attr, value|
|
137
|
+
hash[attr] = value
|
138
|
+
end
|
139
|
+
hash
|
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
|
+
append == o.append &&
|
149
|
+
field == o.field &&
|
150
|
+
name == o.name &&
|
151
|
+
scope == o.scope &&
|
152
|
+
size == o.size &&
|
153
|
+
ttl == o.ttl &&
|
154
|
+
value == o.value &&
|
155
|
+
additional_properties == o.additional_properties
|
156
|
+
end
|
157
|
+
|
158
|
+
# Calculates hash code according to all attributes.
|
159
|
+
# @return [Integer] Hash code
|
160
|
+
# @!visibility private
|
161
|
+
def hash
|
162
|
+
[append, field, name, scope, size, ttl, value, additional_properties].hash
|
163
|
+
end
|
164
|
+
end
|
165
|
+
end
|