datadog_api_client 2.7.0 → 2.9.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 +195 -46
- data/.generator/schemas/v2/openapi.yaml +877 -96
- data/.generator/src/generator/formatter.py +1 -0
- data/.generator/src/generator/templates/model_base.j2 +8 -4
- data/CHANGELOG.md +39 -0
- data/examples/v1/dashboards/CreateDashboard_109450134.rb +44 -0
- data/examples/v1/dashboards/CreateDashboard_2800096921.rb +62 -0
- data/examples/v1/dashboards/CreateDashboard_3195475781.rb +32 -0
- data/examples/v1/service-level-objectives/SearchSLO.rb +0 -3
- data/examples/v2/incidents/CreateIncidentIntegration.rb +31 -0
- data/examples/v2/incidents/DeleteIncidentIntegration.rb +14 -0
- data/examples/v2/incidents/GetIncidentIntegration.rb +14 -0
- data/examples/v2/incidents/ListIncidentIntegrations.rb +11 -0
- data/examples/v2/incidents/UpdateIncidentIntegration.rb +34 -0
- data/examples/v2/ip-allowlist/GetIPAllowlist.rb +5 -0
- data/examples/v2/ip-allowlist/UpdateIPAllowlist.rb +25 -0
- data/examples/v2/logs-metrics/CreateLogsMetric.rb +1 -1
- data/examples/v2/restriction-policies/DeleteRestrictionPolicy.rb +5 -0
- data/examples/v2/restriction-policies/GetRestrictionPolicy.rb +5 -0
- data/examples/v2/restriction-policies/UpdateRestrictionPolicy.rb +25 -0
- data/examples/v2/synthetics/GetOnDemandConcurrencyCap.rb +5 -0
- data/examples/v2/synthetics/GetOnDemandConcurrencyCap_2633566918.rb +5 -0
- data/examples/v2/synthetics/SetOnDemandConcurrencyCap.rb +7 -0
- data/examples/v2/synthetics/SetOnDemandConcurrencyCap_2850884405.rb +9 -0
- data/lib/datadog_api_client/configuration.rb +5 -1
- data/lib/datadog_api_client/inflector.rb +38 -0
- data/lib/datadog_api_client/v1/api/service_level_objectives_api.rb +0 -6
- data/lib/datadog_api_client/v1/api/snapshots_api.rb +2 -2
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +3 -3
- data/lib/datadog_api_client/v1/model_base.rb +7 -3
- data/lib/datadog_api_client/v1/models/application_key.rb +16 -16
- data/lib/datadog_api_client/v1/models/cancel_downtimes_by_scope_request.rb +1 -1
- data/lib/datadog_api_client/v1/models/downtime.rb +1 -1
- data/lib/datadog_api_client/v1/models/downtime_child.rb +1 -1
- data/lib/datadog_api_client/v1/models/formula_and_function_events_data_source.rb +1 -0
- data/lib/datadog_api_client/v1/models/host_meta.rb +3 -3
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/ip_prefixes_orchestrator.rb +105 -0
- data/lib/datadog_api_client/v1/models/ip_ranges.rb +11 -1
- data/lib/datadog_api_client/v1/models/list_stream_source.rb +3 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +2 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +31 -11
- data/lib/datadog_api_client/v1/models/search_service_level_objective_attributes.rb +11 -1
- data/lib/datadog_api_client/v1/models/slo_list_widget_query.rb +16 -4
- data/lib/datadog_api_client/v1/models/slo_overall_statuses.rb +24 -1
- data/lib/datadog_api_client/v1/models/slo_state.rb +29 -0
- data/lib/datadog_api_client/v1/models/slo_status.rb +164 -0
- data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +10 -10
- data/lib/datadog_api_client/v1/models/usage_rum_sessions_hour.rb +12 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +41 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +41 -1
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +41 -1
- data/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb +3 -3
- data/lib/datadog_api_client/v2/api/ci_visibility_tests_api.rb +3 -3
- data/lib/datadog_api_client/v2/api/incidents_api.rb +384 -0
- data/lib/datadog_api_client/v2/api/ip_allowlist_api.rb +153 -0
- data/lib/datadog_api_client/v2/api/logs_api.rb +1 -0
- data/lib/datadog_api_client/v2/api/metrics_api.rb +2 -2
- data/lib/datadog_api_client/v2/api/monitors_api.rb +3 -3
- data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +236 -0
- data/lib/datadog_api_client/v2/api/synthetics_api.rb +153 -0
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +1 -1
- data/lib/datadog_api_client/v2/model_base.rb +7 -3
- data/lib/datadog_api_client/v2/models/events_data_source.rb +1 -0
- data/lib/datadog_api_client/v2/models/incident_integration_metadata_attributes.rb +161 -0
- data/lib/datadog_api_client/v2/models/incident_integration_metadata_create_data.rb +123 -0
- data/lib/datadog_api_client/v2/models/incident_integration_metadata_create_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/incident_integration_metadata_list_response.rb +126 -0
- data/lib/datadog_api_client/v2/models/incident_integration_metadata_metadata.rb +63 -0
- data/lib/datadog_api_client/v2/models/incident_integration_metadata_patch_data.rb +123 -0
- data/lib/datadog_api_client/v2/models/incident_integration_metadata_patch_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/incident_integration_metadata_response.rb +114 -0
- data/lib/datadog_api_client/v2/models/incident_integration_metadata_response_data.rb +133 -0
- data/lib/datadog_api_client/v2/models/incident_integration_metadata_response_included_item.rb +62 -0
- data/lib/datadog_api_client/v2/models/incident_update_data.rb +1 -1
- data/lib/datadog_api_client/v2/models/ip_allowlist_attributes.rb +103 -0
- data/lib/datadog_api_client/v2/models/ip_allowlist_data.rb +122 -0
- data/lib/datadog_api_client/v2/models/ip_allowlist_entry.rb +102 -0
- data/lib/datadog_api_client/v2/models/ip_allowlist_entry_attributes.rb +121 -0
- data/lib/datadog_api_client/v2/models/ip_allowlist_entry_data.rb +122 -0
- data/lib/datadog_api_client/v2/models/ip_allowlist_entry_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/ip_allowlist_response.rb +91 -0
- data/lib/datadog_api_client/v2/models/ip_allowlist_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/ip_allowlist_update_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/jira_integration_metadata.rb +104 -0
- data/lib/datadog_api_client/v2/models/jira_integration_metadata_issues_item.rb +153 -0
- data/lib/datadog_api_client/v2/models/metrics_aggregator.rb +4 -0
- data/lib/datadog_api_client/v2/models/metrics_data_source.rb +2 -1
- data/lib/datadog_api_client/v2/models/metrics_scalar_query.rb +1 -1
- data/lib/datadog_api_client/v2/models/metrics_timeseries_query.rb +1 -1
- data/lib/datadog_api_client/v2/models/on_demand_concurrency_cap.rb +91 -0
- data/lib/datadog_api_client/v2/models/on_demand_concurrency_cap_attributes.rb +91 -0
- data/lib/datadog_api_client/v2/models/on_demand_concurrency_cap_response.rb +91 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_integration_metadatas.rb +1 -1
- data/lib/datadog_api_client/v2/models/restriction_policy.rb +144 -0
- data/lib/datadog_api_client/v2/models/restriction_policy_attributes.rb +104 -0
- data/lib/datadog_api_client/v2/models/restriction_policy_binding.rb +127 -0
- data/lib/datadog_api_client/v2/models/restriction_policy_response.rb +102 -0
- data/lib/datadog_api_client/v2/models/restriction_policy_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/restriction_policy_update_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/rum_application_attributes.rb +7 -7
- data/lib/datadog_api_client/v2/models/rum_application_list_attributes.rb +7 -7
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_type_read.rb +1 -0
- data/lib/datadog_api_client/v2/models/slack_integration_metadata.rb +104 -0
- data/lib/datadog_api_client/v2/models/slack_integration_metadata_channel_item.rb +154 -0
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +57 -2
|
@@ -0,0 +1,114 @@
|
|
|
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 with an incident integration metadata.
|
|
21
|
+
class IncidentIntegrationMetadataResponse
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Whether the object has unparsed attributes
|
|
25
|
+
# @!visibility private
|
|
26
|
+
attr_accessor :_unparsed
|
|
27
|
+
|
|
28
|
+
# Incident integration metadata from a response.
|
|
29
|
+
attr_reader :data
|
|
30
|
+
|
|
31
|
+
# Included related resources that the user requested.
|
|
32
|
+
attr_accessor :included
|
|
33
|
+
|
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
|
+
# @!visibility private
|
|
36
|
+
def self.attribute_map
|
|
37
|
+
{
|
|
38
|
+
:'data' => :'data',
|
|
39
|
+
:'included' => :'included'
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Attribute type mapping.
|
|
44
|
+
# @!visibility private
|
|
45
|
+
def self.openapi_types
|
|
46
|
+
{
|
|
47
|
+
:'data' => :'IncidentIntegrationMetadataResponseData',
|
|
48
|
+
:'included' => :'Array<IncidentIntegrationMetadataResponseIncludedItem>'
|
|
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::IncidentIntegrationMetadataResponse` 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::IncidentIntegrationMetadataResponse`. 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?(:'data')
|
|
69
|
+
self.data = attributes[:'data']
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'included')
|
|
73
|
+
if (value = attributes[:'included']).is_a?(Array)
|
|
74
|
+
self.included = value
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Check to see if the all the properties in the model are valid
|
|
80
|
+
# @return true if the model is valid
|
|
81
|
+
# @!visibility private
|
|
82
|
+
def valid?
|
|
83
|
+
return false if @data.nil?
|
|
84
|
+
true
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Custom attribute writer method with validation
|
|
88
|
+
# @param data [Object] Object to be assigned
|
|
89
|
+
# @!visibility private
|
|
90
|
+
def data=(data)
|
|
91
|
+
if data.nil?
|
|
92
|
+
fail ArgumentError, 'invalid value for "data", data cannot be nil.'
|
|
93
|
+
end
|
|
94
|
+
@data = data
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Checks equality by comparing each attribute.
|
|
98
|
+
# @param o [Object] Object to be compared
|
|
99
|
+
# @!visibility private
|
|
100
|
+
def ==(o)
|
|
101
|
+
return true if self.equal?(o)
|
|
102
|
+
self.class == o.class &&
|
|
103
|
+
data == o.data &&
|
|
104
|
+
included == o.included
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Calculates hash code according to all attributes.
|
|
108
|
+
# @return [Integer] Hash code
|
|
109
|
+
# @!visibility private
|
|
110
|
+
def hash
|
|
111
|
+
[data, included].hash
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
end
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Datadog API V2 Collection
|
|
3
|
+
|
|
4
|
+
#Collection of all Datadog Public endpoints.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@datadoghq.com
|
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
|
9
|
+
|
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
|
13
|
+
|
|
14
|
+
=end
|
|
15
|
+
|
|
16
|
+
require 'date'
|
|
17
|
+
require 'time'
|
|
18
|
+
|
|
19
|
+
module DatadogAPIClient::V2
|
|
20
|
+
# Incident integration metadata from a response.
|
|
21
|
+
class IncidentIntegrationMetadataResponseData
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Whether the object has unparsed attributes
|
|
25
|
+
# @!visibility private
|
|
26
|
+
attr_accessor :_unparsed
|
|
27
|
+
|
|
28
|
+
# Incident integration metadata's attributes for a create request.
|
|
29
|
+
attr_accessor :attributes
|
|
30
|
+
|
|
31
|
+
# The incident integration metadata's ID.
|
|
32
|
+
attr_reader :id
|
|
33
|
+
|
|
34
|
+
# Integration metadata 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' => :'IncidentIntegrationMetadataAttributes',
|
|
52
|
+
:'id' => :'String',
|
|
53
|
+
:'type' => :'IncidentIntegrationMetadataType'
|
|
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::IncidentIntegrationMetadataResponseData` 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::IncidentIntegrationMetadataResponseData`. 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 @id.nil?
|
|
91
|
+
return false if @type.nil?
|
|
92
|
+
true
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Custom attribute writer method with validation
|
|
96
|
+
# @param id [Object] Object to be assigned
|
|
97
|
+
# @!visibility private
|
|
98
|
+
def id=(id)
|
|
99
|
+
if id.nil?
|
|
100
|
+
fail ArgumentError, 'invalid value for "id", id cannot be nil.'
|
|
101
|
+
end
|
|
102
|
+
@id = id
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Custom attribute writer method with validation
|
|
106
|
+
# @param type [Object] Object to be assigned
|
|
107
|
+
# @!visibility private
|
|
108
|
+
def type=(type)
|
|
109
|
+
if type.nil?
|
|
110
|
+
fail ArgumentError, 'invalid value for "type", type cannot be nil.'
|
|
111
|
+
end
|
|
112
|
+
@type = type
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Checks equality by comparing each attribute.
|
|
116
|
+
# @param o [Object] Object to be compared
|
|
117
|
+
# @!visibility private
|
|
118
|
+
def ==(o)
|
|
119
|
+
return true if self.equal?(o)
|
|
120
|
+
self.class == o.class &&
|
|
121
|
+
attributes == o.attributes &&
|
|
122
|
+
id == o.id &&
|
|
123
|
+
type == o.type
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Calculates hash code according to all attributes.
|
|
127
|
+
# @return [Integer] Hash code
|
|
128
|
+
# @!visibility private
|
|
129
|
+
def hash
|
|
130
|
+
[attributes, id, type].hash
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
end
|
|
@@ -0,0 +1,62 @@
|
|
|
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 object related to an incident integration metadata that is included in the response.
|
|
21
|
+
module IncidentIntegrationMetadataResponseIncludedItem
|
|
22
|
+
class << self
|
|
23
|
+
include BaseOneOfModel
|
|
24
|
+
include BaseOneOfModelNoDiscriminator
|
|
25
|
+
|
|
26
|
+
# List of class defined in oneOf (OpenAPI v3)
|
|
27
|
+
def openapi_one_of
|
|
28
|
+
[
|
|
29
|
+
:'User'
|
|
30
|
+
]
|
|
31
|
+
end
|
|
32
|
+
# Builds the object
|
|
33
|
+
# @param data [Mixed] Data to be matched against the list of oneOf items
|
|
34
|
+
# @return [Object] Returns the model or the data itself
|
|
35
|
+
def build(data)
|
|
36
|
+
# Go through the list of oneOf items and attempt to identify the appropriate one.
|
|
37
|
+
# Note:
|
|
38
|
+
# - We do not attempt to check whether exactly one item matches.
|
|
39
|
+
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
|
|
40
|
+
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
|
|
41
|
+
# - TODO: scalar values are de facto behaving as if they were nullable.
|
|
42
|
+
# - TODO: logging when debugging is set.
|
|
43
|
+
openapi_one_of.each do |klass|
|
|
44
|
+
begin
|
|
45
|
+
next if klass == :AnyType # "nullable: true"
|
|
46
|
+
typed_data = find_and_cast_into_type(klass, data)
|
|
47
|
+
next if typed_data._unparsed
|
|
48
|
+
return typed_data if typed_data
|
|
49
|
+
rescue # rescue all errors so we keep iterating even if the current item lookup raises
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
if openapi_one_of.include?(:AnyType)
|
|
54
|
+
data
|
|
55
|
+
else
|
|
56
|
+
self._unparsed = true
|
|
57
|
+
DatadogAPIClient::UnparsedObject.new(data)
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -0,0 +1,103 @@
|
|
|
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 of the IP allowlist.
|
|
21
|
+
class IPAllowlistAttributes
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Whether the object has unparsed attributes
|
|
25
|
+
# @!visibility private
|
|
26
|
+
attr_accessor :_unparsed
|
|
27
|
+
|
|
28
|
+
# Whether the IP allowlist logic is enabled or not.
|
|
29
|
+
attr_accessor :enabled
|
|
30
|
+
|
|
31
|
+
# Array of entries in the IP allowlist.
|
|
32
|
+
attr_accessor :entries
|
|
33
|
+
|
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
|
+
# @!visibility private
|
|
36
|
+
def self.attribute_map
|
|
37
|
+
{
|
|
38
|
+
:'enabled' => :'enabled',
|
|
39
|
+
:'entries' => :'entries'
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Attribute type mapping.
|
|
44
|
+
# @!visibility private
|
|
45
|
+
def self.openapi_types
|
|
46
|
+
{
|
|
47
|
+
:'enabled' => :'Boolean',
|
|
48
|
+
:'entries' => :'Array<IPAllowlistEntry>'
|
|
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::IPAllowlistAttributes` 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::IPAllowlistAttributes`. 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?(:'enabled')
|
|
69
|
+
self.enabled = attributes[:'enabled']
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'entries')
|
|
73
|
+
if (value = attributes[:'entries']).is_a?(Array)
|
|
74
|
+
self.entries = value
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Check to see if the all the properties in the model are valid
|
|
80
|
+
# @return true if the model is valid
|
|
81
|
+
# @!visibility private
|
|
82
|
+
def valid?
|
|
83
|
+
true
|
|
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
|
+
enabled == o.enabled &&
|
|
93
|
+
entries == o.entries
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Calculates hash code according to all attributes.
|
|
97
|
+
# @return [Integer] Hash code
|
|
98
|
+
# @!visibility private
|
|
99
|
+
def hash
|
|
100
|
+
[enabled, entries].hash
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
|
@@ -0,0 +1,122 @@
|
|
|
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
|
+
# IP allowlist data.
|
|
21
|
+
class IPAllowlistData
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Whether the object has unparsed attributes
|
|
25
|
+
# @!visibility private
|
|
26
|
+
attr_accessor :_unparsed
|
|
27
|
+
|
|
28
|
+
# Attributes of the IP allowlist.
|
|
29
|
+
attr_accessor :attributes
|
|
30
|
+
|
|
31
|
+
# The unique identifier of the org.
|
|
32
|
+
attr_accessor :id
|
|
33
|
+
|
|
34
|
+
# IP allowlist 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' => :'IPAllowlistAttributes',
|
|
52
|
+
:'id' => :'String',
|
|
53
|
+
:'type' => :'IPAllowlistType'
|
|
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::IPAllowlistData` 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::IPAllowlistData`. 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 @type.nil?
|
|
91
|
+
true
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Custom attribute writer method with validation
|
|
95
|
+
# @param type [Object] Object to be assigned
|
|
96
|
+
# @!visibility private
|
|
97
|
+
def type=(type)
|
|
98
|
+
if type.nil?
|
|
99
|
+
fail ArgumentError, 'invalid value for "type", type cannot be nil.'
|
|
100
|
+
end
|
|
101
|
+
@type = type
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Checks equality by comparing each attribute.
|
|
105
|
+
# @param o [Object] Object to be compared
|
|
106
|
+
# @!visibility private
|
|
107
|
+
def ==(o)
|
|
108
|
+
return true if self.equal?(o)
|
|
109
|
+
self.class == o.class &&
|
|
110
|
+
attributes == o.attributes &&
|
|
111
|
+
id == o.id &&
|
|
112
|
+
type == o.type
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Calculates hash code according to all attributes.
|
|
116
|
+
# @return [Integer] Hash code
|
|
117
|
+
# @!visibility private
|
|
118
|
+
def hash
|
|
119
|
+
[attributes, id, type].hash
|
|
120
|
+
end
|
|
121
|
+
end
|
|
122
|
+
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
|
+
# IP allowlist entry object.
|
|
21
|
+
class IPAllowlistEntry
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Whether the object has unparsed attributes
|
|
25
|
+
# @!visibility private
|
|
26
|
+
attr_accessor :_unparsed
|
|
27
|
+
|
|
28
|
+
# Data of the IP allowlist entry object.
|
|
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' => :'IPAllowlistEntryData'
|
|
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::IPAllowlistEntry` 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::IPAllowlistEntry`. 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
|