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,117 @@
|
|
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 paginated list of app key registrations.
|
21
|
+
class ListAppKeyRegistrationsResponse
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# An array of app key registrations.
|
25
|
+
attr_accessor :data
|
26
|
+
|
27
|
+
# The definition of `ListAppKeyRegistrationsResponseMeta` object.
|
28
|
+
attr_accessor :meta
|
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
|
+
:'data' => :'data',
|
37
|
+
:'meta' => :'meta'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# Attribute type mapping.
|
42
|
+
# @!visibility private
|
43
|
+
def self.openapi_types
|
44
|
+
{
|
45
|
+
:'data' => :'Array<AppKeyRegistrationData>',
|
46
|
+
:'meta' => :'ListAppKeyRegistrationsResponseMeta'
|
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::ListAppKeyRegistrationsResponse` 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?(:'data')
|
69
|
+
if (value = attributes[:'data']).is_a?(Array)
|
70
|
+
self.data = value
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
if attributes.key?(:'meta')
|
75
|
+
self.meta = attributes[:'meta']
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
80
|
+
# @return [Hash] Returns the object in the form of hash
|
81
|
+
# @!visibility private
|
82
|
+
def to_hash
|
83
|
+
hash = {}
|
84
|
+
self.class.attribute_map.each_pair do |attr, param|
|
85
|
+
value = self.send(attr)
|
86
|
+
if value.nil?
|
87
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
88
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
89
|
+
end
|
90
|
+
|
91
|
+
hash[param] = _to_hash(value)
|
92
|
+
end
|
93
|
+
self.additional_properties.each_pair do |attr, value|
|
94
|
+
hash[attr] = value
|
95
|
+
end
|
96
|
+
hash
|
97
|
+
end
|
98
|
+
|
99
|
+
# Checks equality by comparing each attribute.
|
100
|
+
# @param o [Object] Object to be compared
|
101
|
+
# @!visibility private
|
102
|
+
def ==(o)
|
103
|
+
return true if self.equal?(o)
|
104
|
+
self.class == o.class &&
|
105
|
+
data == o.data &&
|
106
|
+
meta == o.meta &&
|
107
|
+
additional_properties == o.additional_properties
|
108
|
+
end
|
109
|
+
|
110
|
+
# Calculates hash code according to all attributes.
|
111
|
+
# @return [Integer] Hash code
|
112
|
+
# @!visibility private
|
113
|
+
def hash
|
114
|
+
[data, meta, additional_properties].hash
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
@@ -0,0 +1,115 @@
|
|
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 `ListAppKeyRegistrationsResponseMeta` object.
|
21
|
+
class ListAppKeyRegistrationsResponseMeta
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# The total number of app key registrations.
|
25
|
+
attr_accessor :total
|
26
|
+
|
27
|
+
# The total number of app key registrations that match the specified filters.
|
28
|
+
attr_accessor :total_filtered
|
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
|
+
:'total' => :'total',
|
37
|
+
:'total_filtered' => :'total_filtered'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# Attribute type mapping.
|
42
|
+
# @!visibility private
|
43
|
+
def self.openapi_types
|
44
|
+
{
|
45
|
+
:'total' => :'Integer',
|
46
|
+
:'total_filtered' => :'Integer'
|
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::ListAppKeyRegistrationsResponseMeta` 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?(:'total')
|
69
|
+
self.total = attributes[:'total']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.key?(:'total_filtered')
|
73
|
+
self.total_filtered = attributes[:'total_filtered']
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
78
|
+
# @return [Hash] Returns the object in the form of hash
|
79
|
+
# @!visibility private
|
80
|
+
def to_hash
|
81
|
+
hash = {}
|
82
|
+
self.class.attribute_map.each_pair do |attr, param|
|
83
|
+
value = self.send(attr)
|
84
|
+
if value.nil?
|
85
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
86
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
87
|
+
end
|
88
|
+
|
89
|
+
hash[param] = _to_hash(value)
|
90
|
+
end
|
91
|
+
self.additional_properties.each_pair do |attr, value|
|
92
|
+
hash[attr] = value
|
93
|
+
end
|
94
|
+
hash
|
95
|
+
end
|
96
|
+
|
97
|
+
# Checks equality by comparing each attribute.
|
98
|
+
# @param o [Object] Object to be compared
|
99
|
+
# @!visibility private
|
100
|
+
def ==(o)
|
101
|
+
return true if self.equal?(o)
|
102
|
+
self.class == o.class &&
|
103
|
+
total == o.total &&
|
104
|
+
total_filtered == o.total_filtered &&
|
105
|
+
additional_properties == o.additional_properties
|
106
|
+
end
|
107
|
+
|
108
|
+
# Calculates hash code according to all attributes.
|
109
|
+
# @return [Integer] Hash code
|
110
|
+
# @!visibility private
|
111
|
+
def hash
|
112
|
+
[total, total_filtered, additional_properties].hash
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
@@ -0,0 +1,200 @@
|
|
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 monitor user template object.
|
21
|
+
class MonitorUserTemplate
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# The created timestamp of the template.
|
25
|
+
attr_accessor :created
|
26
|
+
|
27
|
+
# A brief description of the monitor user template.
|
28
|
+
attr_accessor :description
|
29
|
+
|
30
|
+
# The last modified timestamp. When the template version was created.
|
31
|
+
attr_accessor :modified
|
32
|
+
|
33
|
+
# A valid monitor definition in the same format as the [V1 Monitor API](https://docs.datadoghq.com/api/latest/monitors/#create-a-monitor).
|
34
|
+
attr_accessor :monitor_definition
|
35
|
+
|
36
|
+
# The definition of `MonitorUserTemplateTags` object.
|
37
|
+
attr_accessor :tags
|
38
|
+
|
39
|
+
# The definition of `MonitorUserTemplateTemplateVariables` object.
|
40
|
+
attr_accessor :template_variables
|
41
|
+
|
42
|
+
# The title of the monitor user template.
|
43
|
+
attr_accessor :title
|
44
|
+
|
45
|
+
# The version of the monitor user template.
|
46
|
+
attr_accessor :version
|
47
|
+
|
48
|
+
# All versions of the monitor user template.
|
49
|
+
attr_accessor :versions
|
50
|
+
|
51
|
+
attr_accessor :additional_properties
|
52
|
+
|
53
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
54
|
+
# @!visibility private
|
55
|
+
def self.attribute_map
|
56
|
+
{
|
57
|
+
:'created' => :'created',
|
58
|
+
:'description' => :'description',
|
59
|
+
:'modified' => :'modified',
|
60
|
+
:'monitor_definition' => :'monitor_definition',
|
61
|
+
:'tags' => :'tags',
|
62
|
+
:'template_variables' => :'template_variables',
|
63
|
+
:'title' => :'title',
|
64
|
+
:'version' => :'version',
|
65
|
+
:'versions' => :'versions'
|
66
|
+
}
|
67
|
+
end
|
68
|
+
|
69
|
+
# Attribute type mapping.
|
70
|
+
# @!visibility private
|
71
|
+
def self.openapi_types
|
72
|
+
{
|
73
|
+
:'created' => :'Time',
|
74
|
+
:'description' => :'String',
|
75
|
+
:'modified' => :'Time',
|
76
|
+
:'monitor_definition' => :'Hash<String, Object>',
|
77
|
+
:'tags' => :'Array<String>',
|
78
|
+
:'template_variables' => :'Array<MonitorUserTemplateTemplateVariablesItems>',
|
79
|
+
:'title' => :'String',
|
80
|
+
:'version' => :'Integer',
|
81
|
+
:'versions' => :'Array<SimpleMonitorUserTemplate>'
|
82
|
+
}
|
83
|
+
end
|
84
|
+
|
85
|
+
# List of attributes with nullable: true
|
86
|
+
# @!visibility private
|
87
|
+
def self.openapi_nullable
|
88
|
+
Set.new([
|
89
|
+
:'description',
|
90
|
+
:'version',
|
91
|
+
])
|
92
|
+
end
|
93
|
+
|
94
|
+
# Initializes the object
|
95
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
96
|
+
# @!visibility private
|
97
|
+
def initialize(attributes = {})
|
98
|
+
if (!attributes.is_a?(Hash))
|
99
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonitorUserTemplate` initialize method"
|
100
|
+
end
|
101
|
+
|
102
|
+
self.additional_properties = {}
|
103
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
104
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
105
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
106
|
+
self.additional_properties[k.to_sym] = v
|
107
|
+
else
|
108
|
+
h[k.to_sym] = v
|
109
|
+
end
|
110
|
+
}
|
111
|
+
|
112
|
+
if attributes.key?(:'created')
|
113
|
+
self.created = attributes[:'created']
|
114
|
+
end
|
115
|
+
|
116
|
+
if attributes.key?(:'description')
|
117
|
+
self.description = attributes[:'description']
|
118
|
+
end
|
119
|
+
|
120
|
+
if attributes.key?(:'modified')
|
121
|
+
self.modified = attributes[:'modified']
|
122
|
+
end
|
123
|
+
|
124
|
+
if attributes.key?(:'monitor_definition')
|
125
|
+
self.monitor_definition = attributes[:'monitor_definition']
|
126
|
+
end
|
127
|
+
|
128
|
+
if attributes.key?(:'tags')
|
129
|
+
if (value = attributes[:'tags']).is_a?(Array)
|
130
|
+
self.tags = value
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
if attributes.key?(:'template_variables')
|
135
|
+
if (value = attributes[:'template_variables']).is_a?(Array)
|
136
|
+
self.template_variables = value
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
if attributes.key?(:'title')
|
141
|
+
self.title = attributes[:'title']
|
142
|
+
end
|
143
|
+
|
144
|
+
if attributes.key?(:'version')
|
145
|
+
self.version = attributes[:'version']
|
146
|
+
end
|
147
|
+
|
148
|
+
if attributes.key?(:'versions')
|
149
|
+
if (value = attributes[:'versions']).is_a?(Array)
|
150
|
+
self.versions = value
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
156
|
+
# @return [Hash] Returns the object in the form of hash
|
157
|
+
# @!visibility private
|
158
|
+
def to_hash
|
159
|
+
hash = {}
|
160
|
+
self.class.attribute_map.each_pair do |attr, param|
|
161
|
+
value = self.send(attr)
|
162
|
+
if value.nil?
|
163
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
164
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
165
|
+
end
|
166
|
+
|
167
|
+
hash[param] = _to_hash(value)
|
168
|
+
end
|
169
|
+
self.additional_properties.each_pair do |attr, value|
|
170
|
+
hash[attr] = value
|
171
|
+
end
|
172
|
+
hash
|
173
|
+
end
|
174
|
+
|
175
|
+
# Checks equality by comparing each attribute.
|
176
|
+
# @param o [Object] Object to be compared
|
177
|
+
# @!visibility private
|
178
|
+
def ==(o)
|
179
|
+
return true if self.equal?(o)
|
180
|
+
self.class == o.class &&
|
181
|
+
created == o.created &&
|
182
|
+
description == o.description &&
|
183
|
+
modified == o.modified &&
|
184
|
+
monitor_definition == o.monitor_definition &&
|
185
|
+
tags == o.tags &&
|
186
|
+
template_variables == o.template_variables &&
|
187
|
+
title == o.title &&
|
188
|
+
version == o.version &&
|
189
|
+
versions == o.versions &&
|
190
|
+
additional_properties == o.additional_properties
|
191
|
+
end
|
192
|
+
|
193
|
+
# Calculates hash code according to all attributes.
|
194
|
+
# @return [Integer] Hash code
|
195
|
+
# @!visibility private
|
196
|
+
def hash
|
197
|
+
[created, description, modified, monitor_definition, tags, template_variables, title, version, versions, additional_properties].hash
|
198
|
+
end
|
199
|
+
end
|
200
|
+
end
|
@@ -0,0 +1,144 @@
|
|
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
|
+
# Monitor user template data.
|
21
|
+
class MonitorUserTemplateCreateData
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Attributes for a monitor user template.
|
25
|
+
attr_reader :attributes
|
26
|
+
|
27
|
+
# Monitor user template resource type.
|
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
|
+
:'attributes' => :'attributes',
|
37
|
+
:'type' => :'type'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# Attribute type mapping.
|
42
|
+
# @!visibility private
|
43
|
+
def self.openapi_types
|
44
|
+
{
|
45
|
+
:'attributes' => :'MonitorUserTemplateRequestAttributes',
|
46
|
+
:'type' => :'MonitorUserTemplateResourceType'
|
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::MonitorUserTemplateCreateData` 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?(:'attributes')
|
69
|
+
self.attributes = attributes[:'attributes']
|
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 @attributes.nil?
|
82
|
+
return false if @type.nil?
|
83
|
+
true
|
84
|
+
end
|
85
|
+
|
86
|
+
# Custom attribute writer method with validation
|
87
|
+
# @param attributes [Object] Object to be assigned
|
88
|
+
# @!visibility private
|
89
|
+
def attributes=(attributes)
|
90
|
+
if attributes.nil?
|
91
|
+
fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
|
92
|
+
end
|
93
|
+
@attributes = attributes
|
94
|
+
end
|
95
|
+
|
96
|
+
# Custom attribute writer method with validation
|
97
|
+
# @param type [Object] Object to be assigned
|
98
|
+
# @!visibility private
|
99
|
+
def type=(type)
|
100
|
+
if type.nil?
|
101
|
+
fail ArgumentError, 'invalid value for "type", type cannot be nil.'
|
102
|
+
end
|
103
|
+
@type = type
|
104
|
+
end
|
105
|
+
|
106
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
107
|
+
# @return [Hash] Returns the object in the form of hash
|
108
|
+
# @!visibility private
|
109
|
+
def to_hash
|
110
|
+
hash = {}
|
111
|
+
self.class.attribute_map.each_pair do |attr, param|
|
112
|
+
value = self.send(attr)
|
113
|
+
if value.nil?
|
114
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
115
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
116
|
+
end
|
117
|
+
|
118
|
+
hash[param] = _to_hash(value)
|
119
|
+
end
|
120
|
+
self.additional_properties.each_pair do |attr, value|
|
121
|
+
hash[attr] = value
|
122
|
+
end
|
123
|
+
hash
|
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
|
+
attributes == o.attributes &&
|
133
|
+
type == o.type &&
|
134
|
+
additional_properties == o.additional_properties
|
135
|
+
end
|
136
|
+
|
137
|
+
# Calculates hash code according to all attributes.
|
138
|
+
# @return [Integer] Hash code
|
139
|
+
# @!visibility private
|
140
|
+
def hash
|
141
|
+
[attributes, type, additional_properties].hash
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|
@@ -0,0 +1,123 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V2 Collection
|
3
|
+
|
4
|
+
#Collection of all Datadog Public endpoints.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@datadoghq.com
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
9
|
+
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
13
|
+
|
14
|
+
=end
|
15
|
+
|
16
|
+
require 'date'
|
17
|
+
require 'time'
|
18
|
+
|
19
|
+
module DatadogAPIClient::V2
|
20
|
+
# Request for creating a monitor user template.
|
21
|
+
class MonitorUserTemplateCreateRequest
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Monitor user template data.
|
25
|
+
attr_reader :data
|
26
|
+
|
27
|
+
attr_accessor :additional_properties
|
28
|
+
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
30
|
+
# @!visibility private
|
31
|
+
def self.attribute_map
|
32
|
+
{
|
33
|
+
:'data' => :'data'
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
# Attribute type mapping.
|
38
|
+
# @!visibility private
|
39
|
+
def self.openapi_types
|
40
|
+
{
|
41
|
+
:'data' => :'MonitorUserTemplateCreateData'
|
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::MonitorUserTemplateCreateRequest` initialize method"
|
51
|
+
end
|
52
|
+
|
53
|
+
self.additional_properties = {}
|
54
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
55
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
56
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
57
|
+
self.additional_properties[k.to_sym] = v
|
58
|
+
else
|
59
|
+
h[k.to_sym] = v
|
60
|
+
end
|
61
|
+
}
|
62
|
+
|
63
|
+
if attributes.key?(:'data')
|
64
|
+
self.data = attributes[:'data']
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
# Check to see if the all the properties in the model are valid
|
69
|
+
# @return true if the model is valid
|
70
|
+
# @!visibility private
|
71
|
+
def valid?
|
72
|
+
return false if @data.nil?
|
73
|
+
true
|
74
|
+
end
|
75
|
+
|
76
|
+
# Custom attribute writer method with validation
|
77
|
+
# @param data [Object] Object to be assigned
|
78
|
+
# @!visibility private
|
79
|
+
def data=(data)
|
80
|
+
if data.nil?
|
81
|
+
fail ArgumentError, 'invalid value for "data", data cannot be nil.'
|
82
|
+
end
|
83
|
+
@data = data
|
84
|
+
end
|
85
|
+
|
86
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
87
|
+
# @return [Hash] Returns the object in the form of hash
|
88
|
+
# @!visibility private
|
89
|
+
def to_hash
|
90
|
+
hash = {}
|
91
|
+
self.class.attribute_map.each_pair do |attr, param|
|
92
|
+
value = self.send(attr)
|
93
|
+
if value.nil?
|
94
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
95
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
96
|
+
end
|
97
|
+
|
98
|
+
hash[param] = _to_hash(value)
|
99
|
+
end
|
100
|
+
self.additional_properties.each_pair do |attr, value|
|
101
|
+
hash[attr] = value
|
102
|
+
end
|
103
|
+
hash
|
104
|
+
end
|
105
|
+
|
106
|
+
# Checks equality by comparing each attribute.
|
107
|
+
# @param o [Object] Object to be compared
|
108
|
+
# @!visibility private
|
109
|
+
def ==(o)
|
110
|
+
return true if self.equal?(o)
|
111
|
+
self.class == o.class &&
|
112
|
+
data == o.data &&
|
113
|
+
additional_properties == o.additional_properties
|
114
|
+
end
|
115
|
+
|
116
|
+
# Calculates hash code according to all attributes.
|
117
|
+
# @return [Integer] Hash code
|
118
|
+
# @!visibility private
|
119
|
+
def hash
|
120
|
+
[data, additional_properties].hash
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|