datadog_api_client 2.37.0 → 2.38.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 +20 -1
- data/.generator/schemas/v2/openapi.yaml +1083 -74
- data/CHANGELOG.md +20 -0
- data/examples/v2/action-connection/GetAppKeyRegistration.rb +5 -0
- data/examples/v2/action-connection/ListAppKeyRegistrations.rb +5 -0
- data/examples/v2/action-connection/RegisterAppKey.rb +5 -0
- data/examples/v2/action-connection/UnregisterAppKey.rb +5 -0
- data/examples/v2/events/CreateEvent.rb +4 -2
- data/examples/v2/monitors/CreateMonitorUserTemplate.rb +37 -0
- data/examples/v2/monitors/DeleteMonitorUserTemplate.rb +8 -0
- data/examples/v2/monitors/GetMonitorUserTemplate.rb +11 -0
- data/examples/v2/monitors/ListMonitorUserTemplates.rb +8 -0
- data/examples/v2/monitors/UpdateMonitorUserTemplate.rb +41 -0
- data/examples/v2/monitors/ValidateExistingMonitorUserTemplate.rb +41 -0
- data/examples/v2/monitors/ValidateMonitorUserTemplate.rb +37 -0
- data/lib/datadog_api_client/configuration.rb +59 -0
- data/lib/datadog_api_client/inflector.rb +29 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_test.rb +12 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_request_dns_server_port.rb +63 -0
- data/lib/datadog_api_client/v2/api/action_connection_api.rb +263 -4
- data/lib/datadog_api_client/v2/api/app_builder_api.rb +8 -8
- data/lib/datadog_api_client/v2/api/events_api.rb +8 -4
- data/lib/datadog_api_client/v2/api/monitors_api.rb +512 -0
- data/lib/datadog_api_client/v2/api/workflow_automation_api.rb +8 -8
- data/lib/datadog_api_client/v2/models/alert_event_custom_attributes.rb +145 -0
- data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_links_items.rb +152 -0
- data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_links_items_category.rb +28 -0
- data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_priority.rb +30 -0
- data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_status.rb +28 -0
- data/lib/datadog_api_client/v2/models/app_key_registration_data.rb +133 -0
- data/lib/datadog_api_client/v2/models/app_key_registration_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes.rb +19 -33
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_author.rb +10 -31
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_changed_resource.rb +15 -32
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_changed_resource_type.rb +1 -1
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_impacted_resources_items.rb +15 -32
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_impacted_resources_items_type.rb +1 -1
- data/lib/datadog_api_client/v2/models/event_category.rb +2 -1
- data/lib/datadog_api_client/v2/models/event_create_request.rb +32 -3
- data/lib/datadog_api_client/v2/models/event_create_request_payload.rb +20 -2
- data/lib/datadog_api_client/v2/models/event_create_response.rb +3 -3
- data/lib/datadog_api_client/v2/models/event_create_response_attributes.rb +2 -2
- data/lib/datadog_api_client/v2/models/event_create_response_attributes_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/event_create_response_attributes_attributes_evt.rb +14 -4
- data/lib/datadog_api_client/v2/models/event_create_response_payload.rb +15 -5
- data/lib/datadog_api_client/v2/models/event_create_response_payload_links.rb +105 -0
- data/lib/datadog_api_client/v2/models/event_payload.rb +48 -36
- data/lib/datadog_api_client/v2/models/event_payload_attributes.rb +3 -2
- data/lib/datadog_api_client/v2/models/event_payload_integration_id.rb +26 -0
- data/lib/datadog_api_client/v2/models/get_app_key_registration_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/incident_create_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/incident_response_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/job_definition_from_rule.rb +1 -26
- data/lib/datadog_api_client/v2/models/list_app_key_registrations_response.rb +117 -0
- data/lib/datadog_api_client/v2/models/list_app_key_registrations_response_meta.rb +115 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template.rb +200 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_create_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_create_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_create_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_list_response.rb +107 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_request_attributes.rb +172 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_resource_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_response_attributes.rb +188 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_response_data.rb +125 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_response_data_with_versions.rb +125 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_template_variables_items.rb +132 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_update_data.rb +165 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_update_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/register_app_key_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/simple_monitor_user_template.rb +188 -0
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +41 -1
@@ -0,0 +1,145 @@
|
|
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
|
+
# Alert event attributes.
|
21
|
+
class AlertEventCustomAttributes
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Free form JSON object for arbitrary data. Supports up to 100 properties per object and a maximum nesting depth of 10 levels.
|
25
|
+
attr_accessor :custom
|
26
|
+
|
27
|
+
# The links related to the event. Maximum of 20 links allowed.
|
28
|
+
attr_reader :links
|
29
|
+
|
30
|
+
# The priority of the alert.
|
31
|
+
attr_accessor :priority
|
32
|
+
|
33
|
+
# The status of the alert.
|
34
|
+
attr_reader :status
|
35
|
+
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
37
|
+
# @!visibility private
|
38
|
+
def self.attribute_map
|
39
|
+
{
|
40
|
+
:'custom' => :'custom',
|
41
|
+
:'links' => :'links',
|
42
|
+
:'priority' => :'priority',
|
43
|
+
:'status' => :'status'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# Attribute type mapping.
|
48
|
+
# @!visibility private
|
49
|
+
def self.openapi_types
|
50
|
+
{
|
51
|
+
:'custom' => :'Hash<String, Object>',
|
52
|
+
:'links' => :'Array<AlertEventCustomAttributesLinksItems>',
|
53
|
+
:'priority' => :'AlertEventCustomAttributesPriority',
|
54
|
+
:'status' => :'AlertEventCustomAttributesStatus'
|
55
|
+
}
|
56
|
+
end
|
57
|
+
|
58
|
+
# Initializes the object
|
59
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
60
|
+
# @!visibility private
|
61
|
+
def initialize(attributes = {})
|
62
|
+
if (!attributes.is_a?(Hash))
|
63
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AlertEventCustomAttributes` initialize method"
|
64
|
+
end
|
65
|
+
|
66
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
67
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
68
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
69
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AlertEventCustomAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
70
|
+
end
|
71
|
+
h[k.to_sym] = v
|
72
|
+
}
|
73
|
+
|
74
|
+
if attributes.key?(:'custom')
|
75
|
+
self.custom = attributes[:'custom']
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes.key?(:'links')
|
79
|
+
if (value = attributes[:'links']).is_a?(Array)
|
80
|
+
self.links = value
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.key?(:'priority')
|
85
|
+
self.priority = attributes[:'priority']
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.key?(:'status')
|
89
|
+
self.status = attributes[:'status']
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
# Check to see if the all the properties in the model are valid
|
94
|
+
# @return true if the model is valid
|
95
|
+
# @!visibility private
|
96
|
+
def valid?
|
97
|
+
return false if !@links.nil? && @links.length > 20
|
98
|
+
return false if !@links.nil? && @links.length < 1
|
99
|
+
return false if @status.nil?
|
100
|
+
true
|
101
|
+
end
|
102
|
+
|
103
|
+
# Custom attribute writer method with validation
|
104
|
+
# @param links [Object] Object to be assigned
|
105
|
+
# @!visibility private
|
106
|
+
def links=(links)
|
107
|
+
if !links.nil? && links.length > 20
|
108
|
+
fail ArgumentError, 'invalid value for "links", number of items must be less than or equal to 20.'
|
109
|
+
end
|
110
|
+
if !links.nil? && links.length < 1
|
111
|
+
fail ArgumentError, 'invalid value for "links", number of items must be greater than or equal to 1.'
|
112
|
+
end
|
113
|
+
@links = links
|
114
|
+
end
|
115
|
+
|
116
|
+
# Custom attribute writer method with validation
|
117
|
+
# @param status [Object] Object to be assigned
|
118
|
+
# @!visibility private
|
119
|
+
def status=(status)
|
120
|
+
if status.nil?
|
121
|
+
fail ArgumentError, 'invalid value for "status", status cannot be nil.'
|
122
|
+
end
|
123
|
+
@status = status
|
124
|
+
end
|
125
|
+
|
126
|
+
# Checks equality by comparing each attribute.
|
127
|
+
# @param o [Object] Object to be compared
|
128
|
+
# @!visibility private
|
129
|
+
def ==(o)
|
130
|
+
return true if self.equal?(o)
|
131
|
+
self.class == o.class &&
|
132
|
+
custom == o.custom &&
|
133
|
+
links == o.links &&
|
134
|
+
priority == o.priority &&
|
135
|
+
status == o.status
|
136
|
+
end
|
137
|
+
|
138
|
+
# Calculates hash code according to all attributes.
|
139
|
+
# @return [Integer] Hash code
|
140
|
+
# @!visibility private
|
141
|
+
def hash
|
142
|
+
[custom, links, priority, status].hash
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|
@@ -0,0 +1,152 @@
|
|
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
|
+
# A link.
|
21
|
+
class AlertEventCustomAttributesLinksItems
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# The category of the link.
|
25
|
+
attr_reader :category
|
26
|
+
|
27
|
+
# The display text of the link. Limited to 300 characters.
|
28
|
+
attr_reader :title
|
29
|
+
|
30
|
+
# The URL of the link. Limited to 2048 characters.
|
31
|
+
attr_reader :url
|
32
|
+
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
34
|
+
# @!visibility private
|
35
|
+
def self.attribute_map
|
36
|
+
{
|
37
|
+
:'category' => :'category',
|
38
|
+
:'title' => :'title',
|
39
|
+
:'url' => :'url'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# Attribute type mapping.
|
44
|
+
# @!visibility private
|
45
|
+
def self.openapi_types
|
46
|
+
{
|
47
|
+
:'category' => :'AlertEventCustomAttributesLinksItemsCategory',
|
48
|
+
:'title' => :'String',
|
49
|
+
:'url' => :'String'
|
50
|
+
}
|
51
|
+
end
|
52
|
+
|
53
|
+
# Initializes the object
|
54
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
55
|
+
# @!visibility private
|
56
|
+
def initialize(attributes = {})
|
57
|
+
if (!attributes.is_a?(Hash))
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AlertEventCustomAttributesLinksItems` initialize method"
|
59
|
+
end
|
60
|
+
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
62
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
63
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
64
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AlertEventCustomAttributesLinksItems`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
65
|
+
end
|
66
|
+
h[k.to_sym] = v
|
67
|
+
}
|
68
|
+
|
69
|
+
if attributes.key?(:'category')
|
70
|
+
self.category = attributes[:'category']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.key?(:'title')
|
74
|
+
self.title = attributes[:'title']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.key?(:'url')
|
78
|
+
self.url = attributes[:'url']
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
# Check to see if the all the properties in the model are valid
|
83
|
+
# @return true if the model is valid
|
84
|
+
# @!visibility private
|
85
|
+
def valid?
|
86
|
+
return false if @category.nil?
|
87
|
+
return false if !@title.nil? && @title.to_s.length > 300
|
88
|
+
return false if !@title.nil? && @title.to_s.length < 1
|
89
|
+
return false if @url.nil?
|
90
|
+
return false if @url.to_s.length > 2048
|
91
|
+
return false if @url.to_s.length < 1
|
92
|
+
true
|
93
|
+
end
|
94
|
+
|
95
|
+
# Custom attribute writer method with validation
|
96
|
+
# @param category [Object] Object to be assigned
|
97
|
+
# @!visibility private
|
98
|
+
def category=(category)
|
99
|
+
if category.nil?
|
100
|
+
fail ArgumentError, 'invalid value for "category", category cannot be nil.'
|
101
|
+
end
|
102
|
+
@category = category
|
103
|
+
end
|
104
|
+
|
105
|
+
# Custom attribute writer method with validation
|
106
|
+
# @param title [Object] Object to be assigned
|
107
|
+
# @!visibility private
|
108
|
+
def title=(title)
|
109
|
+
if !title.nil? && title.to_s.length > 300
|
110
|
+
fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 300.'
|
111
|
+
end
|
112
|
+
if !title.nil? && title.to_s.length < 1
|
113
|
+
fail ArgumentError, 'invalid value for "title", the character length must be great than or equal to 1.'
|
114
|
+
end
|
115
|
+
@title = title
|
116
|
+
end
|
117
|
+
|
118
|
+
# Custom attribute writer method with validation
|
119
|
+
# @param url [Object] Object to be assigned
|
120
|
+
# @!visibility private
|
121
|
+
def url=(url)
|
122
|
+
if url.nil?
|
123
|
+
fail ArgumentError, 'invalid value for "url", url cannot be nil.'
|
124
|
+
end
|
125
|
+
if url.to_s.length > 2048
|
126
|
+
fail ArgumentError, 'invalid value for "url", the character length must be smaller than or equal to 2048.'
|
127
|
+
end
|
128
|
+
if url.to_s.length < 1
|
129
|
+
fail ArgumentError, 'invalid value for "url", the character length must be great than or equal to 1.'
|
130
|
+
end
|
131
|
+
@url = url
|
132
|
+
end
|
133
|
+
|
134
|
+
# Checks equality by comparing each attribute.
|
135
|
+
# @param o [Object] Object to be compared
|
136
|
+
# @!visibility private
|
137
|
+
def ==(o)
|
138
|
+
return true if self.equal?(o)
|
139
|
+
self.class == o.class &&
|
140
|
+
category == o.category &&
|
141
|
+
title == o.title &&
|
142
|
+
url == o.url
|
143
|
+
end
|
144
|
+
|
145
|
+
# Calculates hash code according to all attributes.
|
146
|
+
# @return [Integer] Hash code
|
147
|
+
# @!visibility private
|
148
|
+
def hash
|
149
|
+
[category, title, url].hash
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
@@ -0,0 +1,28 @@
|
|
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 category of the link.
|
21
|
+
class AlertEventCustomAttributesLinksItemsCategory
|
22
|
+
include BaseEnumModel
|
23
|
+
|
24
|
+
RUNBOOK = "runbook".freeze
|
25
|
+
DOCUMENTATION = "documentation".freeze
|
26
|
+
DASHBOARD = "dashboard".freeze
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,30 @@
|
|
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 priority of the alert.
|
21
|
+
class AlertEventCustomAttributesPriority
|
22
|
+
include BaseEnumModel
|
23
|
+
|
24
|
+
PRIORITY_ONE = "1".freeze
|
25
|
+
PRIORITY_TWO = "2".freeze
|
26
|
+
PRIORITY_THREE = "3".freeze
|
27
|
+
PRIORITY_FOUR = "4".freeze
|
28
|
+
PRIORITY_FIVE = "5".freeze
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,28 @@
|
|
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 status of the alert.
|
21
|
+
class AlertEventCustomAttributesStatus
|
22
|
+
include BaseEnumModel
|
23
|
+
|
24
|
+
WARN = "warn".freeze
|
25
|
+
ERROR = "error".freeze
|
26
|
+
OK = "ok".freeze
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,133 @@
|
|
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
|
+
# Data related to the app key registration.
|
21
|
+
class AppKeyRegistrationData
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# The app key registration identifier
|
25
|
+
attr_accessor :id
|
26
|
+
|
27
|
+
# The definition of `AppKeyRegistrationDataType` object.
|
28
|
+
attr_reader :type
|
29
|
+
|
30
|
+
attr_accessor :additional_properties
|
31
|
+
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
33
|
+
# @!visibility private
|
34
|
+
def self.attribute_map
|
35
|
+
{
|
36
|
+
:'id' => :'id',
|
37
|
+
:'type' => :'type'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# Attribute type mapping.
|
42
|
+
# @!visibility private
|
43
|
+
def self.openapi_types
|
44
|
+
{
|
45
|
+
:'id' => :'UUID',
|
46
|
+
:'type' => :'AppKeyRegistrationDataType'
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# Initializes the object
|
51
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
52
|
+
# @!visibility private
|
53
|
+
def initialize(attributes = {})
|
54
|
+
if (!attributes.is_a?(Hash))
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AppKeyRegistrationData` initialize method"
|
56
|
+
end
|
57
|
+
|
58
|
+
self.additional_properties = {}
|
59
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
61
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
62
|
+
self.additional_properties[k.to_sym] = v
|
63
|
+
else
|
64
|
+
h[k.to_sym] = v
|
65
|
+
end
|
66
|
+
}
|
67
|
+
|
68
|
+
if attributes.key?(:'id')
|
69
|
+
self.id = attributes[:'id']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.key?(:'type')
|
73
|
+
self.type = attributes[:'type']
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
# Check to see if the all the properties in the model are valid
|
78
|
+
# @return true if the model is valid
|
79
|
+
# @!visibility private
|
80
|
+
def valid?
|
81
|
+
return false if @type.nil?
|
82
|
+
true
|
83
|
+
end
|
84
|
+
|
85
|
+
# Custom attribute writer method with validation
|
86
|
+
# @param type [Object] Object to be assigned
|
87
|
+
# @!visibility private
|
88
|
+
def type=(type)
|
89
|
+
if type.nil?
|
90
|
+
fail ArgumentError, 'invalid value for "type", type cannot be nil.'
|
91
|
+
end
|
92
|
+
@type = type
|
93
|
+
end
|
94
|
+
|
95
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
96
|
+
# @return [Hash] Returns the object in the form of hash
|
97
|
+
# @!visibility private
|
98
|
+
def to_hash
|
99
|
+
hash = {}
|
100
|
+
self.class.attribute_map.each_pair do |attr, param|
|
101
|
+
value = self.send(attr)
|
102
|
+
if value.nil?
|
103
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
104
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
105
|
+
end
|
106
|
+
|
107
|
+
hash[param] = _to_hash(value)
|
108
|
+
end
|
109
|
+
self.additional_properties.each_pair do |attr, value|
|
110
|
+
hash[attr] = value
|
111
|
+
end
|
112
|
+
hash
|
113
|
+
end
|
114
|
+
|
115
|
+
# Checks equality by comparing each attribute.
|
116
|
+
# @param o [Object] Object to be compared
|
117
|
+
# @!visibility private
|
118
|
+
def ==(o)
|
119
|
+
return true if self.equal?(o)
|
120
|
+
self.class == o.class &&
|
121
|
+
id == o.id &&
|
122
|
+
type == o.type &&
|
123
|
+
additional_properties == o.additional_properties
|
124
|
+
end
|
125
|
+
|
126
|
+
# Calculates hash code according to all attributes.
|
127
|
+
# @return [Integer] Hash code
|
128
|
+
# @!visibility private
|
129
|
+
def hash
|
130
|
+
[id, type, additional_properties].hash
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V2 Collection
|
3
|
+
|
4
|
+
#Collection of all Datadog Public endpoints.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@datadoghq.com
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
9
|
+
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
13
|
+
|
14
|
+
=end
|
15
|
+
|
16
|
+
require 'date'
|
17
|
+
require 'time'
|
18
|
+
|
19
|
+
module DatadogAPIClient::V2
|
20
|
+
# The definition of `AppKeyRegistrationDataType` object.
|
21
|
+
class AppKeyRegistrationDataType
|
22
|
+
include BaseEnumModel
|
23
|
+
|
24
|
+
APP_KEY_REGISTRATION = "app_key_registration".freeze
|
25
|
+
end
|
26
|
+
end
|
@@ -17,31 +17,29 @@ require 'date'
|
|
17
17
|
require 'time'
|
18
18
|
|
19
19
|
module DatadogAPIClient::V2
|
20
|
-
#
|
20
|
+
# Change event attributes.
|
21
21
|
class ChangeEventCustomAttributes
|
22
22
|
include BaseGenericModel
|
23
23
|
|
24
|
-
#
|
24
|
+
# The entity that made the change. Optional, if provided it must include `type` and `name`.
|
25
25
|
attr_accessor :author
|
26
26
|
|
27
|
-
# Free form object with information related to the `change` event.
|
27
|
+
# Free form JSON object with information related to the `change` event. Supports up to 100 properties per object and a maximum nesting depth of 10 levels.
|
28
28
|
attr_accessor :change_metadata
|
29
29
|
|
30
|
-
#
|
30
|
+
# A uniquely identified resource.
|
31
31
|
attr_reader :changed_resource
|
32
32
|
|
33
33
|
# A list of resources impacted by this change. It is recommended to provide an impacted resource to display
|
34
|
-
# the change event at the
|
35
|
-
|
34
|
+
# the change event at the correct location. Only resources of type `service` are supported. Maximum of 100 impacted resources allowed.
|
35
|
+
attr_reader :impacted_resources
|
36
36
|
|
37
|
-
# Free form object
|
37
|
+
# Free form JSON object representing the new state of the changed resource.
|
38
38
|
attr_accessor :new_value
|
39
39
|
|
40
|
-
# Free form object
|
40
|
+
# Free form JSON object representing the previous state of the changed resource.
|
41
41
|
attr_accessor :prev_value
|
42
42
|
|
43
|
-
attr_accessor :additional_properties
|
44
|
-
|
45
43
|
# Attribute mapping from ruby-style variable name to JSON key.
|
46
44
|
# @!visibility private
|
47
45
|
def self.attribute_map
|
@@ -76,14 +74,12 @@ module DatadogAPIClient::V2
|
|
76
74
|
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ChangeEventCustomAttributes` initialize method"
|
77
75
|
end
|
78
76
|
|
79
|
-
self.additional_properties = {}
|
80
77
|
# check to see if the attribute exists and convert string to symbol for hash key
|
81
78
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
82
79
|
if (!self.class.attribute_map.key?(k.to_sym))
|
83
|
-
|
84
|
-
else
|
85
|
-
h[k.to_sym] = v
|
80
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ChangeEventCustomAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
86
81
|
end
|
82
|
+
h[k.to_sym] = v
|
87
83
|
}
|
88
84
|
|
89
85
|
if attributes.key?(:'author')
|
@@ -118,6 +114,7 @@ module DatadogAPIClient::V2
|
|
118
114
|
# @!visibility private
|
119
115
|
def valid?
|
120
116
|
return false if @changed_resource.nil?
|
117
|
+
return false if !@impacted_resources.nil? && @impacted_resources.length > 100
|
121
118
|
true
|
122
119
|
end
|
123
120
|
|
@@ -131,24 +128,14 @@ module DatadogAPIClient::V2
|
|
131
128
|
@changed_resource = changed_resource
|
132
129
|
end
|
133
130
|
|
134
|
-
#
|
135
|
-
# @
|
131
|
+
# Custom attribute writer method with validation
|
132
|
+
# @param impacted_resources [Object] Object to be assigned
|
136
133
|
# @!visibility private
|
137
|
-
def
|
138
|
-
|
139
|
-
|
140
|
-
value = self.send(attr)
|
141
|
-
if value.nil?
|
142
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
143
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
144
|
-
end
|
145
|
-
|
146
|
-
hash[param] = _to_hash(value)
|
147
|
-
end
|
148
|
-
self.additional_properties.each_pair do |attr, value|
|
149
|
-
hash[attr] = value
|
134
|
+
def impacted_resources=(impacted_resources)
|
135
|
+
if !impacted_resources.nil? && impacted_resources.length > 100
|
136
|
+
fail ArgumentError, 'invalid value for "impacted_resources", number of items must be less than or equal to 100.'
|
150
137
|
end
|
151
|
-
|
138
|
+
@impacted_resources = impacted_resources
|
152
139
|
end
|
153
140
|
|
154
141
|
# Checks equality by comparing each attribute.
|
@@ -162,15 +149,14 @@ module DatadogAPIClient::V2
|
|
162
149
|
changed_resource == o.changed_resource &&
|
163
150
|
impacted_resources == o.impacted_resources &&
|
164
151
|
new_value == o.new_value &&
|
165
|
-
prev_value == o.prev_value
|
166
|
-
additional_properties == o.additional_properties
|
152
|
+
prev_value == o.prev_value
|
167
153
|
end
|
168
154
|
|
169
155
|
# Calculates hash code according to all attributes.
|
170
156
|
# @return [Integer] Hash code
|
171
157
|
# @!visibility private
|
172
158
|
def hash
|
173
|
-
[author, change_metadata, changed_resource, impacted_resources, new_value, prev_value
|
159
|
+
[author, change_metadata, changed_resource, impacted_resources, new_value, prev_value].hash
|
174
160
|
end
|
175
161
|
end
|
176
162
|
end
|