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