datadog_api_client 2.6.0 → 2.7.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 +233 -14
- data/.generator/schemas/v2/openapi.yaml +1403 -151
- data/CHANGELOG.md +27 -0
- data/examples/v1/dashboards/CreateDashboard_1039800684.rb +37 -0
- data/examples/v1/dashboards/CreateDashboard_2432046716.rb +33 -0
- data/examples/v1/dashboards/CreateDashboard_2610827685.rb +38 -0
- data/examples/v1/dashboards/CreateDashboard_2843286292.rb +43 -0
- data/examples/v1/gcp-integration/CreateGCPIntegration.rb +1 -0
- data/examples/v1/gcp-integration/DeleteGCPIntegration.rb +1 -0
- data/examples/v1/gcp-integration/UpdateGCPIntegration.rb +1 -0
- data/examples/v1/monitors/ValidateExistingMonitor.rb +1 -0
- data/examples/v1/monitors/ValidateMonitor.rb +1 -0
- data/examples/v1/service-level-objectives/CreateSLO.rb +2 -2
- data/examples/v1/synthetics/CreateSyntheticsAPITest.rb +16 -0
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.rb +1 -0
- data/examples/v1/synthetics/CreateSyntheticsBrowserTest_397420811.rb +74 -0
- data/examples/v1/synthetics/UpdateBrowserTest.rb +16 -0
- data/examples/v2/cloudflare-integration/CreateCloudflareAccount.rb +16 -0
- data/examples/v2/cloudflare-integration/DeleteCloudflareAccount.rb +5 -0
- data/examples/v2/cloudflare-integration/GetCloudflareAccount.rb +8 -0
- data/examples/v2/cloudflare-integration/ListCloudflareAccounts.rb +5 -0
- data/examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb +18 -0
- data/examples/v2/fastly-integration/CreateFastlyAccount.rb +16 -0
- data/examples/v2/fastly-integration/CreateFastlyService.rb +18 -0
- data/examples/v2/fastly-integration/DeleteFastlyAccount.rb +5 -0
- data/examples/v2/fastly-integration/DeleteFastlyService.rb +5 -0
- data/examples/v2/fastly-integration/GetFastlyAccount.rb +8 -0
- data/examples/v2/fastly-integration/GetFastlyService.rb +5 -0
- data/examples/v2/fastly-integration/ListFastlyAccounts.rb +5 -0
- data/examples/v2/fastly-integration/ListFastlyServices.rb +5 -0
- data/examples/v2/fastly-integration/UpdateFastlyAccount.rb +17 -0
- data/examples/v2/fastly-integration/UpdateFastlyService.rb +18 -0
- data/examples/v2/metrics/QueryScalarData.rb +5 -6
- data/examples/v2/metrics/QueryScalarData_3112571352.rb +35 -0
- data/examples/v2/metrics/QueryTimeseriesData.rb +5 -6
- data/examples/v2/metrics/QueryTimeseriesData_301142940.rb +35 -0
- data/examples/v2/monitors/CreateMonitorConfigPolicy.rb +22 -0
- data/examples/v2/monitors/DeleteMonitorConfigPolicy.rb +8 -0
- data/examples/v2/monitors/GetMonitorConfigPolicy.rb +8 -0
- data/examples/v2/monitors/ListMonitorConfigPolicies.rb +5 -0
- data/examples/v2/monitors/UpdateMonitorConfigPolicy.rb +26 -0
- data/examples/v2/sensitive-data-scanner/CreateScanningRule.rb +6 -0
- data/examples/v2/{users → service-accounts}/CreateServiceAccount.rb +1 -1
- data/lib/datadog_api_client/inflector.rb +61 -0
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +3 -3
- data/lib/datadog_api_client/v1/models/gcp_account.rb +11 -1
- data/lib/datadog_api_client/v1/models/host_meta.rb +1 -1
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +1 -1
- data/lib/datadog_api_client/v1/models/list_stream_compute_aggregation.rb +40 -0
- data/lib/datadog_api_client/v1/models/list_stream_compute_items.rb +112 -0
- data/lib/datadog_api_client/v1/models/list_stream_group_by_items.rb +102 -0
- data/lib/datadog_api_client/v1/models/list_stream_query.rb +61 -1
- data/lib/datadog_api_client/v1/models/list_stream_source.rb +2 -0
- data/lib/datadog_api_client/v1/models/metrics_query_metadata.rb +3 -2
- data/lib/datadog_api_client/v1/models/monitor_options.rb +11 -1
- data/lib/datadog_api_client/v1/models/monitor_options_notification_presets.rb +29 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +2 -2
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +13 -13
- data/lib/datadog_api_client/v1/models/run_workflow_widget_definition.rb +187 -0
- data/lib/datadog_api_client/v1/models/run_workflow_widget_definition_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/run_workflow_widget_input.rb +123 -0
- data/lib/datadog_api_client/v1/models/synthetics_config_variable.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_options.rb +21 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_options_http_version.rb +28 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_options_scheduling.rb +103 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_options_scheduling_timeframe.rb +126 -0
- data/lib/datadog_api_client/v1/models/widget_definition.rb +1 -0
- data/lib/datadog_api_client/v2/api/cloudflare_integration_api.rb +355 -0
- data/lib/datadog_api_client/v2/api/fastly_integration_api.rb +709 -0
- data/lib/datadog_api_client/v2/api/metrics_api.rb +7 -6
- data/lib/datadog_api_client/v2/api/monitors_api.rb +355 -0
- data/lib/datadog_api_client/v2/api/service_accounts_api.rb +67 -0
- data/lib/datadog_api_client/v2/api/users_api.rb +0 -67
- data/lib/datadog_api_client/v2/models/cloudflare_account_create_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/cloudflare_account_create_request_attributes.rb +133 -0
- data/lib/datadog_api_client/v2/models/cloudflare_account_create_request_data.rb +123 -0
- data/lib/datadog_api_client/v2/models/cloudflare_account_response.rb +91 -0
- data/lib/datadog_api_client/v2/models/cloudflare_account_response_attributes.rb +112 -0
- data/lib/datadog_api_client/v2/models/cloudflare_account_response_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/cloudflare_account_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/cloudflare_account_update_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/cloudflare_account_update_request_attributes.rb +112 -0
- data/lib/datadog_api_client/v2/models/cloudflare_account_update_request_data.rb +101 -0
- data/lib/datadog_api_client/v2/models/cloudflare_accounts_response.rb +93 -0
- data/lib/datadog_api_client/v2/models/cost_by_org_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/data_scalar_column.rb +123 -0
- data/lib/datadog_api_client/v2/models/fastly_accoun_response_attributes.rb +114 -0
- data/lib/datadog_api_client/v2/models/fastly_account_create_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/fastly_account_create_request_attributes.rb +135 -0
- data/lib/datadog_api_client/v2/models/fastly_account_create_request_data.rb +123 -0
- data/lib/datadog_api_client/v2/models/fastly_account_response.rb +91 -0
- data/lib/datadog_api_client/v2/models/fastly_account_response_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/fastly_account_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/fastly_account_update_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/fastly_account_update_request_attributes.rb +91 -0
- data/lib/datadog_api_client/v2/models/fastly_account_update_request_data.rb +101 -0
- data/lib/datadog_api_client/v2/models/fastly_accounts_response.rb +93 -0
- data/lib/datadog_api_client/v2/models/fastly_service.rb +114 -0
- data/lib/datadog_api_client/v2/models/fastly_service_attributes.rb +93 -0
- data/lib/datadog_api_client/v2/models/fastly_service_data.rb +133 -0
- data/lib/datadog_api_client/v2/models/fastly_service_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/fastly_service_response.rb +91 -0
- data/lib/datadog_api_client/v2/models/fastly_service_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/fastly_services_response.rb +93 -0
- data/lib/datadog_api_client/v2/models/group_scalar_column.rb +113 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_attribute_create_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_attribute_edit_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_attribute_response.rb +101 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_create_data.rb +123 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_create_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_edit_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_edit_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_list_response.rb +93 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_policy.rb +62 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_policy_create_request.rb +62 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_resource_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_response.rb +91 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_response_data.rb +111 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_tag_policy.rb +124 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_tag_policy_create_request.rb +150 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/scalar_column.rb +35 -77
- data/lib/datadog_api_client/v2/models/scalar_formula_response_atrributes.rb +4 -16
- data/lib/datadog_api_client/v2/models/scalar_meta.rb +96 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_detection_method.rb +1 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_query_aggregation.rb +1 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response.rb +11 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +11 -1
- data/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_attributes.rb +22 -9
- data/lib/datadog_api_client/v2/models/timeseries_response_series.rb +4 -1
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +91 -3
@@ -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
|
+
# Policy and policy type for a monitor configuration policy.
|
21
|
+
class MonitorConfigPolicyAttributeEditRequest
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Whether the object has unparsed attributes
|
25
|
+
# @!visibility private
|
26
|
+
attr_accessor :_unparsed
|
27
|
+
|
28
|
+
# Configuration for the policy.
|
29
|
+
attr_reader :policy
|
30
|
+
|
31
|
+
# The monitor configuration policy type.
|
32
|
+
attr_reader :policy_type
|
33
|
+
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
35
|
+
# @!visibility private
|
36
|
+
def self.attribute_map
|
37
|
+
{
|
38
|
+
:'policy' => :'policy',
|
39
|
+
:'policy_type' => :'policy_type'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# Attribute type mapping.
|
44
|
+
# @!visibility private
|
45
|
+
def self.openapi_types
|
46
|
+
{
|
47
|
+
:'policy' => :'MonitorConfigPolicyPolicy',
|
48
|
+
:'policy_type' => :'MonitorConfigPolicyType'
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
# Initializes the object
|
53
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
54
|
+
# @!visibility private
|
55
|
+
def initialize(attributes = {})
|
56
|
+
if (!attributes.is_a?(Hash))
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonitorConfigPolicyAttributeEditRequest` initialize method"
|
58
|
+
end
|
59
|
+
|
60
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
61
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
62
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonitorConfigPolicyAttributeEditRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
64
|
+
end
|
65
|
+
h[k.to_sym] = v
|
66
|
+
}
|
67
|
+
|
68
|
+
if attributes.key?(:'policy')
|
69
|
+
self.policy = attributes[:'policy']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.key?(:'policy_type')
|
73
|
+
self.policy_type = attributes[:'policy_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 @policy.nil?
|
82
|
+
return false if @policy_type.nil?
|
83
|
+
true
|
84
|
+
end
|
85
|
+
|
86
|
+
# Custom attribute writer method with validation
|
87
|
+
# @param policy [Object] Object to be assigned
|
88
|
+
# @!visibility private
|
89
|
+
def policy=(policy)
|
90
|
+
if policy.nil?
|
91
|
+
fail ArgumentError, 'invalid value for "policy", policy cannot be nil.'
|
92
|
+
end
|
93
|
+
@policy = policy
|
94
|
+
end
|
95
|
+
|
96
|
+
# Custom attribute writer method with validation
|
97
|
+
# @param policy_type [Object] Object to be assigned
|
98
|
+
# @!visibility private
|
99
|
+
def policy_type=(policy_type)
|
100
|
+
if policy_type.nil?
|
101
|
+
fail ArgumentError, 'invalid value for "policy_type", policy_type cannot be nil.'
|
102
|
+
end
|
103
|
+
@policy_type = policy_type
|
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
|
+
policy == o.policy &&
|
113
|
+
policy_type == o.policy_type
|
114
|
+
end
|
115
|
+
|
116
|
+
# Calculates hash code according to all attributes.
|
117
|
+
# @return [Integer] Hash code
|
118
|
+
# @!visibility private
|
119
|
+
def hash
|
120
|
+
[policy, policy_type].hash
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
@@ -0,0 +1,101 @@
|
|
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
|
+
# Policy and policy type for a monitor configuration policy.
|
21
|
+
class MonitorConfigPolicyAttributeResponse
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Whether the object has unparsed attributes
|
25
|
+
# @!visibility private
|
26
|
+
attr_accessor :_unparsed
|
27
|
+
|
28
|
+
# Configuration for the policy.
|
29
|
+
attr_accessor :policy
|
30
|
+
|
31
|
+
# The monitor configuration policy type.
|
32
|
+
attr_accessor :policy_type
|
33
|
+
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
35
|
+
# @!visibility private
|
36
|
+
def self.attribute_map
|
37
|
+
{
|
38
|
+
:'policy' => :'policy',
|
39
|
+
:'policy_type' => :'policy_type'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# Attribute type mapping.
|
44
|
+
# @!visibility private
|
45
|
+
def self.openapi_types
|
46
|
+
{
|
47
|
+
:'policy' => :'MonitorConfigPolicyPolicy',
|
48
|
+
:'policy_type' => :'MonitorConfigPolicyType'
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
# Initializes the object
|
53
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
54
|
+
# @!visibility private
|
55
|
+
def initialize(attributes = {})
|
56
|
+
if (!attributes.is_a?(Hash))
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonitorConfigPolicyAttributeResponse` initialize method"
|
58
|
+
end
|
59
|
+
|
60
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
61
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
62
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonitorConfigPolicyAttributeResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
64
|
+
end
|
65
|
+
h[k.to_sym] = v
|
66
|
+
}
|
67
|
+
|
68
|
+
if attributes.key?(:'policy')
|
69
|
+
self.policy = attributes[:'policy']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.key?(:'policy_type')
|
73
|
+
self.policy_type = attributes[:'policy_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
|
+
true
|
82
|
+
end
|
83
|
+
|
84
|
+
# Checks equality by comparing each attribute.
|
85
|
+
# @param o [Object] Object to be compared
|
86
|
+
# @!visibility private
|
87
|
+
def ==(o)
|
88
|
+
return true if self.equal?(o)
|
89
|
+
self.class == o.class &&
|
90
|
+
policy == o.policy &&
|
91
|
+
policy_type == o.policy_type
|
92
|
+
end
|
93
|
+
|
94
|
+
# Calculates hash code according to all attributes.
|
95
|
+
# @return [Integer] Hash code
|
96
|
+
# @!visibility private
|
97
|
+
def hash
|
98
|
+
[policy, policy_type].hash
|
99
|
+
end
|
100
|
+
end
|
101
|
+
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
|
+
# A monitor configuration policy data.
|
21
|
+
class MonitorConfigPolicyCreateData
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Whether the object has unparsed attributes
|
25
|
+
# @!visibility private
|
26
|
+
attr_accessor :_unparsed
|
27
|
+
|
28
|
+
# Policy and policy type for a monitor configuration policy.
|
29
|
+
attr_reader :attributes
|
30
|
+
|
31
|
+
# Monitor configuration policy resource type.
|
32
|
+
attr_reader :type
|
33
|
+
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
35
|
+
# @!visibility private
|
36
|
+
def self.attribute_map
|
37
|
+
{
|
38
|
+
:'attributes' => :'attributes',
|
39
|
+
:'type' => :'type'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# Attribute type mapping.
|
44
|
+
# @!visibility private
|
45
|
+
def self.openapi_types
|
46
|
+
{
|
47
|
+
:'attributes' => :'MonitorConfigPolicyAttributeCreateRequest',
|
48
|
+
:'type' => :'MonitorConfigPolicyResourceType'
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
# Initializes the object
|
53
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
54
|
+
# @!visibility private
|
55
|
+
def initialize(attributes = {})
|
56
|
+
if (!attributes.is_a?(Hash))
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonitorConfigPolicyCreateData` initialize method"
|
58
|
+
end
|
59
|
+
|
60
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
61
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
62
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonitorConfigPolicyCreateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
64
|
+
end
|
65
|
+
h[k.to_sym] = v
|
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
|
+
# 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
|
+
attributes == o.attributes &&
|
113
|
+
type == o.type
|
114
|
+
end
|
115
|
+
|
116
|
+
# Calculates hash code according to all attributes.
|
117
|
+
# @return [Integer] Hash code
|
118
|
+
# @!visibility private
|
119
|
+
def hash
|
120
|
+
[attributes, type].hash
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
@@ -0,0 +1,102 @@
|
|
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 configuration policy.
|
21
|
+
class MonitorConfigPolicyCreateRequest
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Whether the object has unparsed attributes
|
25
|
+
# @!visibility private
|
26
|
+
attr_accessor :_unparsed
|
27
|
+
|
28
|
+
# A monitor configuration policy data.
|
29
|
+
attr_reader :data
|
30
|
+
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
32
|
+
# @!visibility private
|
33
|
+
def self.attribute_map
|
34
|
+
{
|
35
|
+
:'data' => :'data'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
# @!visibility private
|
41
|
+
def self.openapi_types
|
42
|
+
{
|
43
|
+
:'data' => :'MonitorConfigPolicyCreateData'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# Initializes the object
|
48
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
49
|
+
# @!visibility private
|
50
|
+
def initialize(attributes = {})
|
51
|
+
if (!attributes.is_a?(Hash))
|
52
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonitorConfigPolicyCreateRequest` initialize method"
|
53
|
+
end
|
54
|
+
|
55
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
56
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
57
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
58
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonitorConfigPolicyCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
59
|
+
end
|
60
|
+
h[k.to_sym] = v
|
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
|
+
# Checks equality by comparing each attribute.
|
87
|
+
# @param o [Object] Object to be compared
|
88
|
+
# @!visibility private
|
89
|
+
def ==(o)
|
90
|
+
return true if self.equal?(o)
|
91
|
+
self.class == o.class &&
|
92
|
+
data == o.data
|
93
|
+
end
|
94
|
+
|
95
|
+
# Calculates hash code according to all attributes.
|
96
|
+
# @return [Integer] Hash code
|
97
|
+
# @!visibility private
|
98
|
+
def hash
|
99
|
+
[data].hash
|
100
|
+
end
|
101
|
+
end
|
102
|
+
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
|
+
# A monitor configuration policy data.
|
21
|
+
class MonitorConfigPolicyEditData
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Whether the object has unparsed attributes
|
25
|
+
# @!visibility private
|
26
|
+
attr_accessor :_unparsed
|
27
|
+
|
28
|
+
# Policy and policy type for a monitor configuration policy.
|
29
|
+
attr_reader :attributes
|
30
|
+
|
31
|
+
# ID of this monitor configuration policy.
|
32
|
+
attr_reader :id
|
33
|
+
|
34
|
+
# Monitor configuration policy resource type.
|
35
|
+
attr_reader :type
|
36
|
+
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
38
|
+
# @!visibility private
|
39
|
+
def self.attribute_map
|
40
|
+
{
|
41
|
+
:'attributes' => :'attributes',
|
42
|
+
:'id' => :'id',
|
43
|
+
:'type' => :'type'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# Attribute type mapping.
|
48
|
+
# @!visibility private
|
49
|
+
def self.openapi_types
|
50
|
+
{
|
51
|
+
:'attributes' => :'MonitorConfigPolicyAttributeEditRequest',
|
52
|
+
:'id' => :'String',
|
53
|
+
:'type' => :'MonitorConfigPolicyResourceType'
|
54
|
+
}
|
55
|
+
end
|
56
|
+
|
57
|
+
# Initializes the object
|
58
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
59
|
+
# @!visibility private
|
60
|
+
def initialize(attributes = {})
|
61
|
+
if (!attributes.is_a?(Hash))
|
62
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonitorConfigPolicyEditData` initialize method"
|
63
|
+
end
|
64
|
+
|
65
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
66
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
67
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonitorConfigPolicyEditData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
69
|
+
end
|
70
|
+
h[k.to_sym] = v
|
71
|
+
}
|
72
|
+
|
73
|
+
if attributes.key?(:'attributes')
|
74
|
+
self.attributes = attributes[:'attributes']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.key?(:'id')
|
78
|
+
self.id = attributes[:'id']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.key?(:'type')
|
82
|
+
self.type = attributes[:'type']
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
# Check to see if the all the properties in the model are valid
|
87
|
+
# @return true if the model is valid
|
88
|
+
# @!visibility private
|
89
|
+
def valid?
|
90
|
+
return false if @attributes.nil?
|
91
|
+
return false if @id.nil?
|
92
|
+
return false if @type.nil?
|
93
|
+
true
|
94
|
+
end
|
95
|
+
|
96
|
+
# Custom attribute writer method with validation
|
97
|
+
# @param attributes [Object] Object to be assigned
|
98
|
+
# @!visibility private
|
99
|
+
def attributes=(attributes)
|
100
|
+
if attributes.nil?
|
101
|
+
fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
|
102
|
+
end
|
103
|
+
@attributes = attributes
|
104
|
+
end
|
105
|
+
|
106
|
+
# Custom attribute writer method with validation
|
107
|
+
# @param id [Object] Object to be assigned
|
108
|
+
# @!visibility private
|
109
|
+
def id=(id)
|
110
|
+
if id.nil?
|
111
|
+
fail ArgumentError, 'invalid value for "id", id cannot be nil.'
|
112
|
+
end
|
113
|
+
@id = id
|
114
|
+
end
|
115
|
+
|
116
|
+
# Custom attribute writer method with validation
|
117
|
+
# @param type [Object] Object to be assigned
|
118
|
+
# @!visibility private
|
119
|
+
def type=(type)
|
120
|
+
if type.nil?
|
121
|
+
fail ArgumentError, 'invalid value for "type", type cannot be nil.'
|
122
|
+
end
|
123
|
+
@type = type
|
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
|
+
id == o.id &&
|
134
|
+
type == o.type
|
135
|
+
end
|
136
|
+
|
137
|
+
# Calculates hash code according to all attributes.
|
138
|
+
# @return [Integer] Hash code
|
139
|
+
# @!visibility private
|
140
|
+
def hash
|
141
|
+
[attributes, id, type].hash
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|
@@ -0,0 +1,102 @@
|
|
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 editing a monitor configuration policy.
|
21
|
+
class MonitorConfigPolicyEditRequest
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Whether the object has unparsed attributes
|
25
|
+
# @!visibility private
|
26
|
+
attr_accessor :_unparsed
|
27
|
+
|
28
|
+
# A monitor configuration policy data.
|
29
|
+
attr_reader :data
|
30
|
+
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
32
|
+
# @!visibility private
|
33
|
+
def self.attribute_map
|
34
|
+
{
|
35
|
+
:'data' => :'data'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
# @!visibility private
|
41
|
+
def self.openapi_types
|
42
|
+
{
|
43
|
+
:'data' => :'MonitorConfigPolicyEditData'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# Initializes the object
|
48
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
49
|
+
# @!visibility private
|
50
|
+
def initialize(attributes = {})
|
51
|
+
if (!attributes.is_a?(Hash))
|
52
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonitorConfigPolicyEditRequest` initialize method"
|
53
|
+
end
|
54
|
+
|
55
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
56
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
57
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
58
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonitorConfigPolicyEditRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
59
|
+
end
|
60
|
+
h[k.to_sym] = v
|
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
|
+
# Checks equality by comparing each attribute.
|
87
|
+
# @param o [Object] Object to be compared
|
88
|
+
# @!visibility private
|
89
|
+
def ==(o)
|
90
|
+
return true if self.equal?(o)
|
91
|
+
self.class == o.class &&
|
92
|
+
data == o.data
|
93
|
+
end
|
94
|
+
|
95
|
+
# Calculates hash code according to all attributes.
|
96
|
+
# @return [Integer] Hash code
|
97
|
+
# @!visibility private
|
98
|
+
def hash
|
99
|
+
[data].hash
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|