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,104 @@
|
|
|
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
|
+
# Restriction policy attributes.
|
|
21
|
+
class RestrictionPolicyAttributes
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Whether the object has unparsed attributes
|
|
25
|
+
# @!visibility private
|
|
26
|
+
attr_accessor :_unparsed
|
|
27
|
+
|
|
28
|
+
# An array of bindings.
|
|
29
|
+
attr_reader :bindings
|
|
30
|
+
|
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
32
|
+
# @!visibility private
|
|
33
|
+
def self.attribute_map
|
|
34
|
+
{
|
|
35
|
+
:'bindings' => :'bindings'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Attribute type mapping.
|
|
40
|
+
# @!visibility private
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'bindings' => :'Array<RestrictionPolicyBinding>'
|
|
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::RestrictionPolicyAttributes` 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::RestrictionPolicyAttributes`. 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?(:'bindings')
|
|
64
|
+
if (value = attributes[:'bindings']).is_a?(Array)
|
|
65
|
+
self.bindings = value
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Check to see if the all the properties in the model are valid
|
|
71
|
+
# @return true if the model is valid
|
|
72
|
+
# @!visibility private
|
|
73
|
+
def valid?
|
|
74
|
+
return false if @bindings.nil?
|
|
75
|
+
true
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Custom attribute writer method with validation
|
|
79
|
+
# @param bindings [Object] Object to be assigned
|
|
80
|
+
# @!visibility private
|
|
81
|
+
def bindings=(bindings)
|
|
82
|
+
if bindings.nil?
|
|
83
|
+
fail ArgumentError, 'invalid value for "bindings", bindings cannot be nil.'
|
|
84
|
+
end
|
|
85
|
+
@bindings = bindings
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Checks equality by comparing each attribute.
|
|
89
|
+
# @param o [Object] Object to be compared
|
|
90
|
+
# @!visibility private
|
|
91
|
+
def ==(o)
|
|
92
|
+
return true if self.equal?(o)
|
|
93
|
+
self.class == o.class &&
|
|
94
|
+
bindings == o.bindings
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Calculates hash code according to all attributes.
|
|
98
|
+
# @return [Integer] Hash code
|
|
99
|
+
# @!visibility private
|
|
100
|
+
def hash
|
|
101
|
+
[bindings].hash
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|
|
@@ -0,0 +1,127 @@
|
|
|
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
|
+
# Specifies which principals are associated with a relation.
|
|
21
|
+
class RestrictionPolicyBinding
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Whether the object has unparsed attributes
|
|
25
|
+
# @!visibility private
|
|
26
|
+
attr_accessor :_unparsed
|
|
27
|
+
|
|
28
|
+
# An array of principals. A principal is a subject or group of subjects.
|
|
29
|
+
# Each principal is formatted as `type:id`. Supported types: `role` and `org`.
|
|
30
|
+
# The org ID can be obtained through the api/v2/current_user API.
|
|
31
|
+
attr_reader :principals
|
|
32
|
+
|
|
33
|
+
# The role/level of access.
|
|
34
|
+
attr_reader :relation
|
|
35
|
+
|
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
|
+
# @!visibility private
|
|
38
|
+
def self.attribute_map
|
|
39
|
+
{
|
|
40
|
+
:'principals' => :'principals',
|
|
41
|
+
:'relation' => :'relation'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Attribute type mapping.
|
|
46
|
+
# @!visibility private
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'principals' => :'Array<String>',
|
|
50
|
+
:'relation' => :'String'
|
|
51
|
+
}
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Initializes the object
|
|
55
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
|
56
|
+
# @!visibility private
|
|
57
|
+
def initialize(attributes = {})
|
|
58
|
+
if (!attributes.is_a?(Hash))
|
|
59
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RestrictionPolicyBinding` initialize method"
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RestrictionPolicyBinding`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
66
|
+
end
|
|
67
|
+
h[k.to_sym] = v
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'principals')
|
|
71
|
+
if (value = attributes[:'principals']).is_a?(Array)
|
|
72
|
+
self.principals = value
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'relation')
|
|
77
|
+
self.relation = attributes[:'relation']
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Check to see if the all the properties in the model are valid
|
|
82
|
+
# @return true if the model is valid
|
|
83
|
+
# @!visibility private
|
|
84
|
+
def valid?
|
|
85
|
+
return false if @principals.nil?
|
|
86
|
+
return false if @relation.nil?
|
|
87
|
+
true
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Custom attribute writer method with validation
|
|
91
|
+
# @param principals [Object] Object to be assigned
|
|
92
|
+
# @!visibility private
|
|
93
|
+
def principals=(principals)
|
|
94
|
+
if principals.nil?
|
|
95
|
+
fail ArgumentError, 'invalid value for "principals", principals cannot be nil.'
|
|
96
|
+
end
|
|
97
|
+
@principals = principals
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Custom attribute writer method with validation
|
|
101
|
+
# @param relation [Object] Object to be assigned
|
|
102
|
+
# @!visibility private
|
|
103
|
+
def relation=(relation)
|
|
104
|
+
if relation.nil?
|
|
105
|
+
fail ArgumentError, 'invalid value for "relation", relation cannot be nil.'
|
|
106
|
+
end
|
|
107
|
+
@relation = relation
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Checks equality by comparing each attribute.
|
|
111
|
+
# @param o [Object] Object to be compared
|
|
112
|
+
# @!visibility private
|
|
113
|
+
def ==(o)
|
|
114
|
+
return true if self.equal?(o)
|
|
115
|
+
self.class == o.class &&
|
|
116
|
+
principals == o.principals &&
|
|
117
|
+
relation == o.relation
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Calculates hash code according to all attributes.
|
|
121
|
+
# @return [Integer] Hash code
|
|
122
|
+
# @!visibility private
|
|
123
|
+
def hash
|
|
124
|
+
[principals, relation].hash
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
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
|
+
# Response containing information about a single restriction policy.
|
|
21
|
+
class RestrictionPolicyResponse
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Whether the object has unparsed attributes
|
|
25
|
+
# @!visibility private
|
|
26
|
+
attr_accessor :_unparsed
|
|
27
|
+
|
|
28
|
+
# Restriction policy 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' => :'RestrictionPolicy'
|
|
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::RestrictionPolicyResponse` 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::RestrictionPolicyResponse`. 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,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
|
+
# Restriction policy type.
|
|
21
|
+
class RestrictionPolicyType
|
|
22
|
+
include BaseEnumModel
|
|
23
|
+
|
|
24
|
+
RESTRICTION_POLICY = "restriction_policy".freeze
|
|
25
|
+
end
|
|
26
|
+
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
|
+
# Update request for a restriction policy.
|
|
21
|
+
class RestrictionPolicyUpdateRequest
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Whether the object has unparsed attributes
|
|
25
|
+
# @!visibility private
|
|
26
|
+
attr_accessor :_unparsed
|
|
27
|
+
|
|
28
|
+
# Restriction policy 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' => :'RestrictionPolicy'
|
|
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::RestrictionPolicyUpdateRequest` 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::RestrictionPolicyUpdateRequest`. 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
|
|
@@ -38,7 +38,7 @@ module DatadogAPIClient::V2
|
|
|
38
38
|
attr_reader :created_by_handle
|
|
39
39
|
|
|
40
40
|
# Hash of the RUM application. Optional.
|
|
41
|
-
attr_accessor :
|
|
41
|
+
attr_accessor :_hash
|
|
42
42
|
|
|
43
43
|
# Indicates if the RUM application is active.
|
|
44
44
|
attr_accessor :is_active
|
|
@@ -66,7 +66,7 @@ module DatadogAPIClient::V2
|
|
|
66
66
|
:'client_token' => :'client_token',
|
|
67
67
|
:'created_at' => :'created_at',
|
|
68
68
|
:'created_by_handle' => :'created_by_handle',
|
|
69
|
-
:'
|
|
69
|
+
:'_hash' => :'hash',
|
|
70
70
|
:'is_active' => :'is_active',
|
|
71
71
|
:'name' => :'name',
|
|
72
72
|
:'org_id' => :'org_id',
|
|
@@ -84,7 +84,7 @@ module DatadogAPIClient::V2
|
|
|
84
84
|
:'client_token' => :'String',
|
|
85
85
|
:'created_at' => :'Integer',
|
|
86
86
|
:'created_by_handle' => :'String',
|
|
87
|
-
:'
|
|
87
|
+
:'_hash' => :'String',
|
|
88
88
|
:'is_active' => :'Boolean',
|
|
89
89
|
:'name' => :'String',
|
|
90
90
|
:'org_id' => :'Integer',
|
|
@@ -126,8 +126,8 @@ module DatadogAPIClient::V2
|
|
|
126
126
|
self.created_by_handle = attributes[:'created_by_handle']
|
|
127
127
|
end
|
|
128
128
|
|
|
129
|
-
if attributes.key?(:'
|
|
130
|
-
self.
|
|
129
|
+
if attributes.key?(:'_hash')
|
|
130
|
+
self._hash = attributes[:'_hash']
|
|
131
131
|
end
|
|
132
132
|
|
|
133
133
|
if attributes.key?(:'is_active')
|
|
@@ -275,7 +275,7 @@ module DatadogAPIClient::V2
|
|
|
275
275
|
client_token == o.client_token &&
|
|
276
276
|
created_at == o.created_at &&
|
|
277
277
|
created_by_handle == o.created_by_handle &&
|
|
278
|
-
|
|
278
|
+
_hash == o._hash &&
|
|
279
279
|
is_active == o.is_active &&
|
|
280
280
|
name == o.name &&
|
|
281
281
|
org_id == o.org_id &&
|
|
@@ -288,7 +288,7 @@ module DatadogAPIClient::V2
|
|
|
288
288
|
# @return [Integer] Hash code
|
|
289
289
|
# @!visibility private
|
|
290
290
|
def hash
|
|
291
|
-
[application_id, client_token, created_at, created_by_handle,
|
|
291
|
+
[application_id, client_token, created_at, created_by_handle, _hash, is_active, name, org_id, type, updated_at, updated_by_handle].hash
|
|
292
292
|
end
|
|
293
293
|
end
|
|
294
294
|
end
|
|
@@ -35,7 +35,7 @@ module DatadogAPIClient::V2
|
|
|
35
35
|
attr_reader :created_by_handle
|
|
36
36
|
|
|
37
37
|
# Hash of the RUM application. Optional.
|
|
38
|
-
attr_accessor :
|
|
38
|
+
attr_accessor :_hash
|
|
39
39
|
|
|
40
40
|
# Indicates if the RUM application is active.
|
|
41
41
|
attr_accessor :is_active
|
|
@@ -62,7 +62,7 @@ module DatadogAPIClient::V2
|
|
|
62
62
|
:'application_id' => :'application_id',
|
|
63
63
|
:'created_at' => :'created_at',
|
|
64
64
|
:'created_by_handle' => :'created_by_handle',
|
|
65
|
-
:'
|
|
65
|
+
:'_hash' => :'hash',
|
|
66
66
|
:'is_active' => :'is_active',
|
|
67
67
|
:'name' => :'name',
|
|
68
68
|
:'org_id' => :'org_id',
|
|
@@ -79,7 +79,7 @@ module DatadogAPIClient::V2
|
|
|
79
79
|
:'application_id' => :'String',
|
|
80
80
|
:'created_at' => :'Integer',
|
|
81
81
|
:'created_by_handle' => :'String',
|
|
82
|
-
:'
|
|
82
|
+
:'_hash' => :'String',
|
|
83
83
|
:'is_active' => :'Boolean',
|
|
84
84
|
:'name' => :'String',
|
|
85
85
|
:'org_id' => :'Integer',
|
|
@@ -117,8 +117,8 @@ module DatadogAPIClient::V2
|
|
|
117
117
|
self.created_by_handle = attributes[:'created_by_handle']
|
|
118
118
|
end
|
|
119
119
|
|
|
120
|
-
if attributes.key?(:'
|
|
121
|
-
self.
|
|
120
|
+
if attributes.key?(:'_hash')
|
|
121
|
+
self._hash = attributes[:'_hash']
|
|
122
122
|
end
|
|
123
123
|
|
|
124
124
|
if attributes.key?(:'is_active')
|
|
@@ -254,7 +254,7 @@ module DatadogAPIClient::V2
|
|
|
254
254
|
application_id == o.application_id &&
|
|
255
255
|
created_at == o.created_at &&
|
|
256
256
|
created_by_handle == o.created_by_handle &&
|
|
257
|
-
|
|
257
|
+
_hash == o._hash &&
|
|
258
258
|
is_active == o.is_active &&
|
|
259
259
|
name == o.name &&
|
|
260
260
|
org_id == o.org_id &&
|
|
@@ -267,7 +267,7 @@ module DatadogAPIClient::V2
|
|
|
267
267
|
# @return [Integer] Hash code
|
|
268
268
|
# @!visibility private
|
|
269
269
|
def hash
|
|
270
|
-
[application_id, created_at, created_by_handle,
|
|
270
|
+
[application_id, created_at, created_by_handle, _hash, is_active, name, org_id, type, updated_at, updated_by_handle].hash
|
|
271
271
|
end
|
|
272
272
|
end
|
|
273
273
|
end
|
|
@@ -25,5 +25,6 @@ module DatadogAPIClient::V2
|
|
|
25
25
|
INFRASTRUCTURE_CONFIGURATION = "infrastructure_configuration".freeze
|
|
26
26
|
WORKLOAD_SECURITY = "workload_security".freeze
|
|
27
27
|
CLOUD_CONFIGURATION = "cloud_configuration".freeze
|
|
28
|
+
APPLICATION_SECURITY = "application_security".freeze
|
|
28
29
|
end
|
|
29
30
|
end
|
|
@@ -0,0 +1,104 @@
|
|
|
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 for the Slack integration.
|
|
21
|
+
class SlackIntegrationMetadata
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Whether the object has unparsed attributes
|
|
25
|
+
# @!visibility private
|
|
26
|
+
attr_accessor :_unparsed
|
|
27
|
+
|
|
28
|
+
# Array of Slack channels in this integration metadata.
|
|
29
|
+
attr_reader :channels
|
|
30
|
+
|
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
32
|
+
# @!visibility private
|
|
33
|
+
def self.attribute_map
|
|
34
|
+
{
|
|
35
|
+
:'channels' => :'channels'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Attribute type mapping.
|
|
40
|
+
# @!visibility private
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'channels' => :'Array<SlackIntegrationMetadataChannelItem>'
|
|
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::SlackIntegrationMetadata` 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::SlackIntegrationMetadata`. 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?(:'channels')
|
|
64
|
+
if (value = attributes[:'channels']).is_a?(Array)
|
|
65
|
+
self.channels = value
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Check to see if the all the properties in the model are valid
|
|
71
|
+
# @return true if the model is valid
|
|
72
|
+
# @!visibility private
|
|
73
|
+
def valid?
|
|
74
|
+
return false if @channels.nil?
|
|
75
|
+
true
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Custom attribute writer method with validation
|
|
79
|
+
# @param channels [Object] Object to be assigned
|
|
80
|
+
# @!visibility private
|
|
81
|
+
def channels=(channels)
|
|
82
|
+
if channels.nil?
|
|
83
|
+
fail ArgumentError, 'invalid value for "channels", channels cannot be nil.'
|
|
84
|
+
end
|
|
85
|
+
@channels = channels
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Checks equality by comparing each attribute.
|
|
89
|
+
# @param o [Object] Object to be compared
|
|
90
|
+
# @!visibility private
|
|
91
|
+
def ==(o)
|
|
92
|
+
return true if self.equal?(o)
|
|
93
|
+
self.class == o.class &&
|
|
94
|
+
channels == o.channels
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Calculates hash code according to all attributes.
|
|
98
|
+
# @return [Integer] Hash code
|
|
99
|
+
# @!visibility private
|
|
100
|
+
def hash
|
|
101
|
+
[channels].hash
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|