datadog_api_client 2.23.0 → 2.24.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.apigentools-info +4 -4
- data/.generator/schemas/v1/openapi.yaml +666 -156
- data/.generator/schemas/v2/openapi.yaml +774 -89
- data/.generator/src/generator/replacement.json +1 -1
- data/.github/CODEOWNERS +5 -5
- data/CHANGELOG.md +26 -0
- data/examples/v1/dashboards/CreateDashboard_1213075383.rb +10 -4
- data/examples/v1/dashboards/CreateDashboard_2336428357.rb +10 -4
- data/examples/v1/dashboards/CreateDashboard_2563642929.rb +66 -0
- data/examples/v1/dashboards/CreateDashboard_3669695268.rb +10 -4
- data/examples/v1/dashboards/CreateDashboard_915214113.rb +10 -4
- data/examples/v1/monitors/UpdateMonitor.rb +1 -0
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1241981394.rb +1 -0
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +9 -4
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.rb +15 -0
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1987645492.rb +134 -0
- data/examples/v2/api-management/ListAPIs.rb +8 -0
- data/examples/v2/csm-threats/CreateCSMThreatsAgentRule.rb +3 -0
- data/examples/v2/csm-threats/UpdateCloudWorkloadSecurityAgentRule.rb +1 -0
- data/examples/v2/organizations/GetOrgConfig.rb +5 -0
- data/examples/v2/organizations/ListOrgConfigs.rb +5 -0
- data/examples/v2/organizations/UpdateOrgConfig.rb +14 -0
- data/examples/v2/security-monitoring/TestExistingSecurityMonitoringRule.rb +21 -0
- data/examples/v2/security-monitoring/TestSecurityMonitoringRule.rb +58 -0
- data/examples/v2/security-monitoring/ValidateSecurityMonitoringRule.rb +1 -1
- data/lib/datadog_api_client/configuration.rb +1 -0
- data/lib/datadog_api_client/inflector.rb +37 -1
- data/lib/datadog_api_client/v1/api/monitors_api.rb +1 -1
- data/lib/datadog_api_client/v1/models/event.rb +1 -1
- data/lib/datadog_api_client/v1/models/formula_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/geomap_widget_request.rb +14 -4
- data/lib/datadog_api_client/v1/models/group_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/monitor.rb +1 -16
- data/lib/datadog_api_client/v1/models/monitor_update_request.rb +2 -23
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +2 -2
- data/lib/datadog_api_client/v1/models/synthetics_api_step.rb +37 -180
- data/lib/datadog_api_client/v1/models/synthetics_api_test_step.rb +206 -0
- data/lib/datadog_api_client/v1/models/{synthetics_api_step_subtype.rb → synthetics_api_test_step_subtype.rb} +2 -2
- data/lib/datadog_api_client/v1/models/synthetics_api_wait_step.rb +148 -0
- data/lib/datadog_api_client/v1/models/synthetics_api_wait_step_subtype.rb +26 -0
- data/lib/datadog_api_client/v1/models/synthetics_assertion.rb +1 -0
- data/lib/datadog_api_client/v1/models/synthetics_assertion_body_hash_operator.rb +28 -0
- data/lib/datadog_api_client/v1/models/synthetics_assertion_body_hash_target.rb +140 -0
- data/lib/datadog_api_client/v1/models/synthetics_assertion_body_hash_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/synthetics_assertion_json_path_target_target.rb +11 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_options_monitor_options.rb +0 -4
- data/lib/datadog_api_client/v1/models/synthetics_test_request_body_file.rb +22 -1
- data/lib/datadog_api_client/v1/models/table_widget_request.rb +14 -4
- data/lib/datadog_api_client/v1/models/toplist_widget_request.rb +11 -1
- data/lib/datadog_api_client/v1/models/usage_rum_sessions_hour.rb +7 -7
- data/lib/datadog_api_client/v1/models/usage_rum_sessions_response.rb +2 -2
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +168 -18
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +169 -19
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +171 -21
- data/lib/datadog_api_client/v1/models/widget_formula_sort.rb +144 -0
- data/lib/datadog_api_client/v1/models/widget_group_sort.rb +140 -0
- data/lib/datadog_api_client/v1/models/widget_sort_by.rb +110 -0
- data/lib/datadog_api_client/v1/models/widget_sort_order_by.rb +63 -0
- data/lib/datadog_api_client/v2/api/api_management_api.rb +80 -2
- data/lib/datadog_api_client/v2/api/organizations_api.rb +197 -0
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +140 -1
- data/lib/datadog_api_client/v2/models/cloud_configuration_rule_payload.rb +240 -0
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_create_attributes.rb +13 -1
- data/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/events_group_by.rb +5 -4
- data/lib/datadog_api_client/v2/models/list_apis_response.rb +92 -0
- data/lib/datadog_api_client/v2/models/list_apis_response_data.rb +90 -0
- data/lib/datadog_api_client/v2/models/list_apis_response_data_attributes.rb +80 -0
- data/lib/datadog_api_client/v2/models/list_apis_response_meta.rb +80 -0
- data/lib/datadog_api_client/v2/models/list_apis_response_meta_pagination.rb +100 -0
- data/lib/datadog_api_client/v2/models/org_config_get_response.rb +98 -0
- data/lib/datadog_api_client/v2/models/org_config_list_response.rb +100 -0
- data/lib/datadog_api_client/v2/models/org_config_read.rb +140 -0
- data/lib/datadog_api_client/v2/models/org_config_read_attributes.rb +179 -0
- data/lib/datadog_api_client/v2/models/org_config_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/org_config_write.rb +119 -0
- data/lib/datadog_api_client/v2/models/org_config_write_attributes.rb +98 -0
- data/lib/datadog_api_client/v2/models/org_config_write_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_query_payload.rb +118 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_query_payload_data.rb +120 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_test_payload.rb +62 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_test_request.rb +92 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_test_response.rb +84 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_type_test.rb +26 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_validate_payload.rb +64 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_payload.rb +251 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_payload.rb +263 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_test_payload.rb +263 -0
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +47 -3
@@ -0,0 +1,140 @@
|
|
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 single Org Config.
|
21
|
+
class OrgConfigRead
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Readable attributes of an Org Config.
|
25
|
+
attr_reader :attributes
|
26
|
+
|
27
|
+
# A unique identifier for an Org Config.
|
28
|
+
attr_reader :id
|
29
|
+
|
30
|
+
# Data type of an Org Config.
|
31
|
+
attr_reader :type
|
32
|
+
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
34
|
+
# @!visibility private
|
35
|
+
def self.attribute_map
|
36
|
+
{
|
37
|
+
:'attributes' => :'attributes',
|
38
|
+
:'id' => :'id',
|
39
|
+
:'type' => :'type'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# Attribute type mapping.
|
44
|
+
# @!visibility private
|
45
|
+
def self.openapi_types
|
46
|
+
{
|
47
|
+
:'attributes' => :'OrgConfigReadAttributes',
|
48
|
+
:'id' => :'String',
|
49
|
+
:'type' => :'OrgConfigType'
|
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::OrgConfigRead` 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::OrgConfigRead`. 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?(:'attributes')
|
70
|
+
self.attributes = attributes[:'attributes']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.key?(:'id')
|
74
|
+
self.id = attributes[:'id']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.key?(:'type')
|
78
|
+
self.type = attributes[:'type']
|
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 @attributes.nil?
|
87
|
+
return false if @id.nil?
|
88
|
+
return false if @type.nil?
|
89
|
+
true
|
90
|
+
end
|
91
|
+
|
92
|
+
# Custom attribute writer method with validation
|
93
|
+
# @param attributes [Object] Object to be assigned
|
94
|
+
# @!visibility private
|
95
|
+
def attributes=(attributes)
|
96
|
+
if attributes.nil?
|
97
|
+
fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
|
98
|
+
end
|
99
|
+
@attributes = attributes
|
100
|
+
end
|
101
|
+
|
102
|
+
# Custom attribute writer method with validation
|
103
|
+
# @param id [Object] Object to be assigned
|
104
|
+
# @!visibility private
|
105
|
+
def id=(id)
|
106
|
+
if id.nil?
|
107
|
+
fail ArgumentError, 'invalid value for "id", id cannot be nil.'
|
108
|
+
end
|
109
|
+
@id = id
|
110
|
+
end
|
111
|
+
|
112
|
+
# Custom attribute writer method with validation
|
113
|
+
# @param type [Object] Object to be assigned
|
114
|
+
# @!visibility private
|
115
|
+
def type=(type)
|
116
|
+
if type.nil?
|
117
|
+
fail ArgumentError, 'invalid value for "type", type cannot be nil.'
|
118
|
+
end
|
119
|
+
@type = type
|
120
|
+
end
|
121
|
+
|
122
|
+
# Checks equality by comparing each attribute.
|
123
|
+
# @param o [Object] Object to be compared
|
124
|
+
# @!visibility private
|
125
|
+
def ==(o)
|
126
|
+
return true if self.equal?(o)
|
127
|
+
self.class == o.class &&
|
128
|
+
attributes == o.attributes &&
|
129
|
+
id == o.id &&
|
130
|
+
type == o.type
|
131
|
+
end
|
132
|
+
|
133
|
+
# Calculates hash code according to all attributes.
|
134
|
+
# @return [Integer] Hash code
|
135
|
+
# @!visibility private
|
136
|
+
def hash
|
137
|
+
[attributes, id, type].hash
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
@@ -0,0 +1,179 @@
|
|
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
|
+
# Readable attributes of an Org Config.
|
21
|
+
class OrgConfigReadAttributes
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# The description of an Org Config.
|
25
|
+
attr_reader :description
|
26
|
+
|
27
|
+
# The timestamp of the last Org Config update (if any).
|
28
|
+
attr_accessor :modified_at
|
29
|
+
|
30
|
+
# The machine-friendly name of an Org Config.
|
31
|
+
attr_reader :name
|
32
|
+
|
33
|
+
# The value of an Org Config.
|
34
|
+
attr_reader :value
|
35
|
+
|
36
|
+
# The type of an Org Config value.
|
37
|
+
attr_reader :value_type
|
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
|
+
:'modified_at' => :'modified_at',
|
45
|
+
:'name' => :'name',
|
46
|
+
:'value' => :'value',
|
47
|
+
:'value_type' => :'value_type'
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# Attribute type mapping.
|
52
|
+
# @!visibility private
|
53
|
+
def self.openapi_types
|
54
|
+
{
|
55
|
+
:'description' => :'String',
|
56
|
+
:'modified_at' => :'Time',
|
57
|
+
:'name' => :'String',
|
58
|
+
:'value' => :'Object',
|
59
|
+
:'value_type' => :'String'
|
60
|
+
}
|
61
|
+
end
|
62
|
+
|
63
|
+
# List of attributes with nullable: true
|
64
|
+
# @!visibility private
|
65
|
+
def self.openapi_nullable
|
66
|
+
Set.new([
|
67
|
+
:'modified_at',
|
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::OrgConfigReadAttributes` 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::OrgConfigReadAttributes`. 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?(:'modified_at')
|
92
|
+
self.modified_at = attributes[:'modified_at']
|
93
|
+
end
|
94
|
+
|
95
|
+
if attributes.key?(:'name')
|
96
|
+
self.name = attributes[:'name']
|
97
|
+
end
|
98
|
+
|
99
|
+
if attributes.key?(:'value')
|
100
|
+
self.value = attributes[:'value']
|
101
|
+
end
|
102
|
+
|
103
|
+
if attributes.key?(:'value_type')
|
104
|
+
self.value_type = attributes[:'value_type']
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
# Check to see if the all the properties in the model are valid
|
109
|
+
# @return true if the model is valid
|
110
|
+
# @!visibility private
|
111
|
+
def valid?
|
112
|
+
return false if @description.nil?
|
113
|
+
return false if @name.nil?
|
114
|
+
return false if @value.nil?
|
115
|
+
return false if @value_type.nil?
|
116
|
+
true
|
117
|
+
end
|
118
|
+
|
119
|
+
# Custom attribute writer method with validation
|
120
|
+
# @param description [Object] Object to be assigned
|
121
|
+
# @!visibility private
|
122
|
+
def description=(description)
|
123
|
+
if description.nil?
|
124
|
+
fail ArgumentError, 'invalid value for "description", description cannot be nil.'
|
125
|
+
end
|
126
|
+
@description = description
|
127
|
+
end
|
128
|
+
|
129
|
+
# Custom attribute writer method with validation
|
130
|
+
# @param name [Object] Object to be assigned
|
131
|
+
# @!visibility private
|
132
|
+
def name=(name)
|
133
|
+
if name.nil?
|
134
|
+
fail ArgumentError, 'invalid value for "name", name cannot be nil.'
|
135
|
+
end
|
136
|
+
@name = name
|
137
|
+
end
|
138
|
+
|
139
|
+
# Custom attribute writer method with validation
|
140
|
+
# @param value [Object] Object to be assigned
|
141
|
+
# @!visibility private
|
142
|
+
def value=(value)
|
143
|
+
if value.nil?
|
144
|
+
fail ArgumentError, 'invalid value for "value", value cannot be nil.'
|
145
|
+
end
|
146
|
+
@value = value
|
147
|
+
end
|
148
|
+
|
149
|
+
# Custom attribute writer method with validation
|
150
|
+
# @param value_type [Object] Object to be assigned
|
151
|
+
# @!visibility private
|
152
|
+
def value_type=(value_type)
|
153
|
+
if value_type.nil?
|
154
|
+
fail ArgumentError, 'invalid value for "value_type", value_type cannot be nil.'
|
155
|
+
end
|
156
|
+
@value_type = value_type
|
157
|
+
end
|
158
|
+
|
159
|
+
# Checks equality by comparing each attribute.
|
160
|
+
# @param o [Object] Object to be compared
|
161
|
+
# @!visibility private
|
162
|
+
def ==(o)
|
163
|
+
return true if self.equal?(o)
|
164
|
+
self.class == o.class &&
|
165
|
+
description == o.description &&
|
166
|
+
modified_at == o.modified_at &&
|
167
|
+
name == o.name &&
|
168
|
+
value == o.value &&
|
169
|
+
value_type == o.value_type
|
170
|
+
end
|
171
|
+
|
172
|
+
# Calculates hash code according to all attributes.
|
173
|
+
# @return [Integer] Hash code
|
174
|
+
# @!visibility private
|
175
|
+
def hash
|
176
|
+
[description, modified_at, name, value, value_type].hash
|
177
|
+
end
|
178
|
+
end
|
179
|
+
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
|
+
# Data type of an Org Config.
|
21
|
+
class OrgConfigType
|
22
|
+
include BaseEnumModel
|
23
|
+
|
24
|
+
ORG_CONFIGS = "org_configs".freeze
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,119 @@
|
|
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
|
+
# An Org Config write operation.
|
21
|
+
class OrgConfigWrite
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Writable attributes of an Org Config.
|
25
|
+
attr_reader :attributes
|
26
|
+
|
27
|
+
# Data type of an Org Config.
|
28
|
+
attr_reader :type
|
29
|
+
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
31
|
+
# @!visibility private
|
32
|
+
def self.attribute_map
|
33
|
+
{
|
34
|
+
:'attributes' => :'attributes',
|
35
|
+
:'type' => :'type'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
# @!visibility private
|
41
|
+
def self.openapi_types
|
42
|
+
{
|
43
|
+
:'attributes' => :'OrgConfigWriteAttributes',
|
44
|
+
:'type' => :'OrgConfigType'
|
45
|
+
}
|
46
|
+
end
|
47
|
+
|
48
|
+
# Initializes the object
|
49
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
50
|
+
# @!visibility private
|
51
|
+
def initialize(attributes = {})
|
52
|
+
if (!attributes.is_a?(Hash))
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgConfigWrite` initialize method"
|
54
|
+
end
|
55
|
+
|
56
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
58
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OrgConfigWrite`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
60
|
+
end
|
61
|
+
h[k.to_sym] = v
|
62
|
+
}
|
63
|
+
|
64
|
+
if attributes.key?(:'attributes')
|
65
|
+
self.attributes = attributes[:'attributes']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.key?(:'type')
|
69
|
+
self.type = attributes[:'type']
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# Check to see if the all the properties in the model are valid
|
74
|
+
# @return true if the model is valid
|
75
|
+
# @!visibility private
|
76
|
+
def valid?
|
77
|
+
return false if @attributes.nil?
|
78
|
+
return false if @type.nil?
|
79
|
+
true
|
80
|
+
end
|
81
|
+
|
82
|
+
# Custom attribute writer method with validation
|
83
|
+
# @param attributes [Object] Object to be assigned
|
84
|
+
# @!visibility private
|
85
|
+
def attributes=(attributes)
|
86
|
+
if attributes.nil?
|
87
|
+
fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
|
88
|
+
end
|
89
|
+
@attributes = attributes
|
90
|
+
end
|
91
|
+
|
92
|
+
# Custom attribute writer method with validation
|
93
|
+
# @param type [Object] Object to be assigned
|
94
|
+
# @!visibility private
|
95
|
+
def type=(type)
|
96
|
+
if type.nil?
|
97
|
+
fail ArgumentError, 'invalid value for "type", type cannot be nil.'
|
98
|
+
end
|
99
|
+
@type = type
|
100
|
+
end
|
101
|
+
|
102
|
+
# Checks equality by comparing each attribute.
|
103
|
+
# @param o [Object] Object to be compared
|
104
|
+
# @!visibility private
|
105
|
+
def ==(o)
|
106
|
+
return true if self.equal?(o)
|
107
|
+
self.class == o.class &&
|
108
|
+
attributes == o.attributes &&
|
109
|
+
type == o.type
|
110
|
+
end
|
111
|
+
|
112
|
+
# Calculates hash code according to all attributes.
|
113
|
+
# @return [Integer] Hash code
|
114
|
+
# @!visibility private
|
115
|
+
def hash
|
116
|
+
[attributes, type].hash
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
@@ -0,0 +1,98 @@
|
|
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
|
+
# Writable attributes of an Org Config.
|
21
|
+
class OrgConfigWriteAttributes
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# The value of an Org Config.
|
25
|
+
attr_reader :value
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
# @!visibility private
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'value' => :'value'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Attribute type mapping.
|
36
|
+
# @!visibility private
|
37
|
+
def self.openapi_types
|
38
|
+
{
|
39
|
+
:'value' => :'Object'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# Initializes the object
|
44
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
45
|
+
# @!visibility private
|
46
|
+
def initialize(attributes = {})
|
47
|
+
if (!attributes.is_a?(Hash))
|
48
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgConfigWriteAttributes` initialize method"
|
49
|
+
end
|
50
|
+
|
51
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
52
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
53
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
54
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OrgConfigWriteAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
55
|
+
end
|
56
|
+
h[k.to_sym] = v
|
57
|
+
}
|
58
|
+
|
59
|
+
if attributes.key?(:'value')
|
60
|
+
self.value = attributes[:'value']
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
# Check to see if the all the properties in the model are valid
|
65
|
+
# @return true if the model is valid
|
66
|
+
# @!visibility private
|
67
|
+
def valid?
|
68
|
+
return false if @value.nil?
|
69
|
+
true
|
70
|
+
end
|
71
|
+
|
72
|
+
# Custom attribute writer method with validation
|
73
|
+
# @param value [Object] Object to be assigned
|
74
|
+
# @!visibility private
|
75
|
+
def value=(value)
|
76
|
+
if value.nil?
|
77
|
+
fail ArgumentError, 'invalid value for "value", value cannot be nil.'
|
78
|
+
end
|
79
|
+
@value = value
|
80
|
+
end
|
81
|
+
|
82
|
+
# Checks equality by comparing each attribute.
|
83
|
+
# @param o [Object] Object to be compared
|
84
|
+
# @!visibility private
|
85
|
+
def ==(o)
|
86
|
+
return true if self.equal?(o)
|
87
|
+
self.class == o.class &&
|
88
|
+
value == o.value
|
89
|
+
end
|
90
|
+
|
91
|
+
# Calculates hash code according to all attributes.
|
92
|
+
# @return [Integer] Hash code
|
93
|
+
# @!visibility private
|
94
|
+
def hash
|
95
|
+
[value].hash
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -0,0 +1,98 @@
|
|
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 request to update an Org Config.
|
21
|
+
class OrgConfigWriteRequest
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# An Org Config write operation.
|
25
|
+
attr_reader :data
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
# @!visibility private
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'data' => :'data'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Attribute type mapping.
|
36
|
+
# @!visibility private
|
37
|
+
def self.openapi_types
|
38
|
+
{
|
39
|
+
:'data' => :'OrgConfigWrite'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# Initializes the object
|
44
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
45
|
+
# @!visibility private
|
46
|
+
def initialize(attributes = {})
|
47
|
+
if (!attributes.is_a?(Hash))
|
48
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgConfigWriteRequest` initialize method"
|
49
|
+
end
|
50
|
+
|
51
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
52
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
53
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
54
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OrgConfigWriteRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
55
|
+
end
|
56
|
+
h[k.to_sym] = v
|
57
|
+
}
|
58
|
+
|
59
|
+
if attributes.key?(:'data')
|
60
|
+
self.data = attributes[:'data']
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
# Check to see if the all the properties in the model are valid
|
65
|
+
# @return true if the model is valid
|
66
|
+
# @!visibility private
|
67
|
+
def valid?
|
68
|
+
return false if @data.nil?
|
69
|
+
true
|
70
|
+
end
|
71
|
+
|
72
|
+
# Custom attribute writer method with validation
|
73
|
+
# @param data [Object] Object to be assigned
|
74
|
+
# @!visibility private
|
75
|
+
def data=(data)
|
76
|
+
if data.nil?
|
77
|
+
fail ArgumentError, 'invalid value for "data", data cannot be nil.'
|
78
|
+
end
|
79
|
+
@data = data
|
80
|
+
end
|
81
|
+
|
82
|
+
# Checks equality by comparing each attribute.
|
83
|
+
# @param o [Object] Object to be compared
|
84
|
+
# @!visibility private
|
85
|
+
def ==(o)
|
86
|
+
return true if self.equal?(o)
|
87
|
+
self.class == o.class &&
|
88
|
+
data == o.data
|
89
|
+
end
|
90
|
+
|
91
|
+
# Calculates hash code according to all attributes.
|
92
|
+
# @return [Integer] Hash code
|
93
|
+
# @!visibility private
|
94
|
+
def hash
|
95
|
+
[data].hash
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|