datadog_api_client 2.34.0 → 2.35.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.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/schemas/v1/openapi.yaml +59 -3
  4. data/.generator/schemas/v2/openapi.yaml +738 -69
  5. data/.generator/src/generator/formatter.py +2 -2
  6. data/.generator/src/generator/openapi.py +1 -1
  7. data/.github/workflows/release.yml +1 -1
  8. data/CHANGELOG.md +19 -0
  9. data/Gemfile +1 -0
  10. data/examples/v1/monitors/CreateMonitor_1539578087.rb +1 -0
  11. data/examples/v1/monitors/CreateMonitor_440013737.rb +1 -0
  12. data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +142 -0
  13. data/examples/v2/csm-threats/CreateCSMThreatsAgentRule_1295653933.rb +32 -0
  14. data/examples/v2/dora-metrics/CreateDORADeployment.rb +0 -3
  15. data/examples/v2/dora-metrics/CreateDORAFailure.rb +30 -0
  16. data/examples/v2/dora-metrics/CreateDORAIncident.rb +11 -9
  17. data/examples/v2/dora-metrics/CreateDORAIncident_1768887482.rb +25 -0
  18. data/examples/v2/on-call/GetTeamOnCallUsers.rb +11 -0
  19. data/examples/v2/security-monitoring/ListFindings_2932019633.rb +11 -0
  20. data/examples/v2/software-catalog/DeleteCatalogKind.rb +5 -0
  21. data/examples/v2/software-catalog/ListCatalogKind.rb +5 -0
  22. data/examples/v2/software-catalog/ListCatalogKind_3806205775.rb +5 -0
  23. data/examples/v2/software-catalog/UpsertCatalogKind.rb +9 -0
  24. data/lib/datadog_api_client/configuration.rb +0 -2
  25. data/lib/datadog_api_client/inflector.rb +34 -6
  26. data/lib/datadog_api_client/v1/api/snapshots_api.rb +2 -1
  27. data/lib/datadog_api_client/v1/models/monitor.rb +17 -1
  28. data/lib/datadog_api_client/v1/models/monitor_draft_status.rb +32 -0
  29. data/lib/datadog_api_client/v1/models/monitor_options.rb +1 -1
  30. data/lib/datadog_api_client/v1/models/monitor_update_request.rb +17 -1
  31. data/lib/datadog_api_client/v1/models/synthetics_api_test_step_subtype.rb +6 -0
  32. data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +32 -2
  33. data/lib/datadog_api_client/v2/api/dora_metrics_api.rb +79 -15
  34. data/lib/datadog_api_client/v2/api/on_call_api.rb +67 -0
  35. data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +5 -3
  36. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +13 -0
  37. data/lib/datadog_api_client/v2/api/software_catalog_api.rb +221 -0
  38. data/lib/datadog_api_client/v2/models/action_query_spec_inputs.rb +1 -1
  39. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action.rb +23 -3
  40. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action_metadata.rb +125 -0
  41. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action_set.rb +165 -0
  42. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_attributes.rb +37 -1
  43. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_create_attributes.rb +57 -1
  44. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_attributes.rb +57 -1
  45. data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +21 -1
  46. data/lib/datadog_api_client/v2/models/{dora_incident_request.rb → dora_failure_request.rb} +4 -4
  47. data/lib/datadog_api_client/v2/models/{dora_incident_request_attributes.rb → dora_failure_request_attributes.rb} +31 -11
  48. data/lib/datadog_api_client/v2/models/{dora_incident_request_data.rb → dora_failure_request_data.rb} +4 -4
  49. data/lib/datadog_api_client/v2/models/{dora_incident_response.rb → dora_failure_response.rb} +5 -5
  50. data/lib/datadog_api_client/v2/models/{dora_incident_response_data.rb → dora_failure_response_data.rb} +6 -6
  51. data/lib/datadog_api_client/v2/models/{dora_incident_type.rb → dora_failure_type.rb} +3 -3
  52. data/lib/datadog_api_client/v2/models/escalation.rb +143 -0
  53. data/lib/datadog_api_client/v2/models/escalation_relationships.rb +105 -0
  54. data/lib/datadog_api_client/v2/models/escalation_relationships_responders.rb +107 -0
  55. data/lib/datadog_api_client/v2/models/escalation_relationships_responders_data_items.rb +144 -0
  56. data/lib/datadog_api_client/v2/models/escalation_relationships_responders_data_items_type.rb +26 -0
  57. data/lib/datadog_api_client/v2/models/escalation_type.rb +26 -0
  58. data/lib/datadog_api_client/v2/models/finding_attributes.rb +31 -1
  59. data/lib/datadog_api_client/v2/models/kind_attributes.rb +143 -0
  60. data/lib/datadog_api_client/v2/models/kind_data.rb +153 -0
  61. data/lib/datadog_api_client/v2/models/kind_metadata.rb +115 -0
  62. data/lib/datadog_api_client/v2/models/kind_obj.rb +143 -0
  63. data/lib/datadog_api_client/v2/models/kind_response_meta.rb +105 -0
  64. data/lib/datadog_api_client/v2/models/list_kind_catalog_response.rb +117 -0
  65. data/lib/datadog_api_client/v2/models/team_on_call_responders.rb +117 -0
  66. data/lib/datadog_api_client/v2/models/team_on_call_responders_data.rb +143 -0
  67. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships.rb +115 -0
  68. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_escalations.rb +107 -0
  69. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_escalations_data_items.rb +144 -0
  70. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_escalations_data_items_type.rb +26 -0
  71. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_responders.rb +107 -0
  72. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_responders_data_items.rb +144 -0
  73. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_responders_data_items_type.rb +26 -0
  74. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_type.rb +26 -0
  75. data/lib/datadog_api_client/v2/models/team_on_call_responders_included.rb +63 -0
  76. data/lib/datadog_api_client/v2/models/upsert_catalog_kind_request.rb +63 -0
  77. data/lib/datadog_api_client/v2/models/upsert_catalog_kind_response.rb +117 -0
  78. data/lib/datadog_api_client/version.rb +1 -1
  79. data/repository.datadog.yaml +8 -0
  80. metadata +44 -7
@@ -0,0 +1,117 @@
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
+ # List kind response.
21
+ class ListKindCatalogResponse
22
+ include BaseGenericModel
23
+
24
+ # List of kind responses.
25
+ attr_accessor :data
26
+
27
+ # Kind response metadata.
28
+ attr_accessor :meta
29
+
30
+ attr_accessor :additional_properties
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ # @!visibility private
34
+ def self.attribute_map
35
+ {
36
+ :'data' => :'data',
37
+ :'meta' => :'meta'
38
+ }
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ # @!visibility private
43
+ def self.openapi_types
44
+ {
45
+ :'data' => :'Array<KindData>',
46
+ :'meta' => :'KindResponseMeta'
47
+ }
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param attributes [Hash] Model attributes in the form of hash
52
+ # @!visibility private
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListKindCatalogResponse` initialize method"
56
+ end
57
+
58
+ self.additional_properties = {}
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!self.class.attribute_map.key?(k.to_sym))
62
+ self.additional_properties[k.to_sym] = v
63
+ else
64
+ h[k.to_sym] = v
65
+ end
66
+ }
67
+
68
+ if attributes.key?(:'data')
69
+ if (value = attributes[:'data']).is_a?(Array)
70
+ self.data = value
71
+ end
72
+ end
73
+
74
+ if attributes.key?(:'meta')
75
+ self.meta = attributes[:'meta']
76
+ end
77
+ end
78
+
79
+ # Returns the object in the form of hash, with additionalProperties support.
80
+ # @return [Hash] Returns the object in the form of hash
81
+ # @!visibility private
82
+ def to_hash
83
+ hash = {}
84
+ self.class.attribute_map.each_pair do |attr, param|
85
+ value = self.send(attr)
86
+ if value.nil?
87
+ is_nullable = self.class.openapi_nullable.include?(attr)
88
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
89
+ end
90
+
91
+ hash[param] = _to_hash(value)
92
+ end
93
+ self.additional_properties.each_pair do |attr, value|
94
+ hash[attr] = value
95
+ end
96
+ hash
97
+ end
98
+
99
+ # Checks equality by comparing each attribute.
100
+ # @param o [Object] Object to be compared
101
+ # @!visibility private
102
+ def ==(o)
103
+ return true if self.equal?(o)
104
+ self.class == o.class &&
105
+ data == o.data &&
106
+ meta == o.meta &&
107
+ additional_properties == o.additional_properties
108
+ end
109
+
110
+ # Calculates hash code according to all attributes.
111
+ # @return [Integer] Hash code
112
+ # @!visibility private
113
+ def hash
114
+ [data, meta, additional_properties].hash
115
+ end
116
+ end
117
+ end
@@ -0,0 +1,117 @@
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
+ # Root object representing a team's on-call responder configuration.
21
+ class TeamOnCallResponders
22
+ include BaseGenericModel
23
+
24
+ # Defines the main on-call responder object for a team, including relationships and metadata.
25
+ attr_accessor :data
26
+
27
+ # The `TeamOnCallResponders` `included`.
28
+ attr_accessor :included
29
+
30
+ attr_accessor :additional_properties
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ # @!visibility private
34
+ def self.attribute_map
35
+ {
36
+ :'data' => :'data',
37
+ :'included' => :'included'
38
+ }
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ # @!visibility private
43
+ def self.openapi_types
44
+ {
45
+ :'data' => :'TeamOnCallRespondersData',
46
+ :'included' => :'Array<TeamOnCallRespondersIncluded>'
47
+ }
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param attributes [Hash] Model attributes in the form of hash
52
+ # @!visibility private
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamOnCallResponders` initialize method"
56
+ end
57
+
58
+ self.additional_properties = {}
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!self.class.attribute_map.key?(k.to_sym))
62
+ self.additional_properties[k.to_sym] = v
63
+ else
64
+ h[k.to_sym] = v
65
+ end
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
+ # Returns the object in the form of hash, with additionalProperties support.
80
+ # @return [Hash] Returns the object in the form of hash
81
+ # @!visibility private
82
+ def to_hash
83
+ hash = {}
84
+ self.class.attribute_map.each_pair do |attr, param|
85
+ value = self.send(attr)
86
+ if value.nil?
87
+ is_nullable = self.class.openapi_nullable.include?(attr)
88
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
89
+ end
90
+
91
+ hash[param] = _to_hash(value)
92
+ end
93
+ self.additional_properties.each_pair do |attr, value|
94
+ hash[attr] = value
95
+ end
96
+ hash
97
+ end
98
+
99
+ # Checks equality by comparing each attribute.
100
+ # @param o [Object] Object to be compared
101
+ # @!visibility private
102
+ def ==(o)
103
+ return true if self.equal?(o)
104
+ self.class == o.class &&
105
+ data == o.data &&
106
+ included == o.included &&
107
+ additional_properties == o.additional_properties
108
+ end
109
+
110
+ # Calculates hash code according to all attributes.
111
+ # @return [Integer] Hash code
112
+ # @!visibility private
113
+ def hash
114
+ [data, included, additional_properties].hash
115
+ end
116
+ end
117
+ end
@@ -0,0 +1,143 @@
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
+ # Defines the main on-call responder object for a team, including relationships and metadata.
21
+ class TeamOnCallRespondersData
22
+ include BaseGenericModel
23
+
24
+ # Unique identifier of the on-call responder configuration.
25
+ attr_accessor :id
26
+
27
+ # Relationship objects linked to a team's on-call responder configuration, including escalations and responders.
28
+ attr_accessor :relationships
29
+
30
+ # Represents the resource type for a group of users assigned to handle on-call duties within a team.
31
+ attr_reader :type
32
+
33
+ attr_accessor :additional_properties
34
+
35
+ # Attribute mapping from ruby-style variable name to JSON key.
36
+ # @!visibility private
37
+ def self.attribute_map
38
+ {
39
+ :'id' => :'id',
40
+ :'relationships' => :'relationships',
41
+ :'type' => :'type'
42
+ }
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ # @!visibility private
47
+ def self.openapi_types
48
+ {
49
+ :'id' => :'String',
50
+ :'relationships' => :'TeamOnCallRespondersDataRelationships',
51
+ :'type' => :'TeamOnCallRespondersDataType'
52
+ }
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param attributes [Hash] Model attributes in the form of hash
57
+ # @!visibility private
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamOnCallRespondersData` initialize method"
61
+ end
62
+
63
+ self.additional_properties = {}
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ self.additional_properties[k.to_sym] = v
68
+ else
69
+ h[k.to_sym] = v
70
+ end
71
+ }
72
+
73
+ if attributes.key?(:'id')
74
+ self.id = attributes[:'id']
75
+ end
76
+
77
+ if attributes.key?(:'relationships')
78
+ self.relationships = attributes[:'relationships']
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
+ # Returns the object in the form of hash, with additionalProperties support.
105
+ # @return [Hash] Returns the object in the form of hash
106
+ # @!visibility private
107
+ def to_hash
108
+ hash = {}
109
+ self.class.attribute_map.each_pair do |attr, param|
110
+ value = self.send(attr)
111
+ if value.nil?
112
+ is_nullable = self.class.openapi_nullable.include?(attr)
113
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
114
+ end
115
+
116
+ hash[param] = _to_hash(value)
117
+ end
118
+ self.additional_properties.each_pair do |attr, value|
119
+ hash[attr] = value
120
+ end
121
+ hash
122
+ end
123
+
124
+ # Checks equality by comparing each attribute.
125
+ # @param o [Object] Object to be compared
126
+ # @!visibility private
127
+ def ==(o)
128
+ return true if self.equal?(o)
129
+ self.class == o.class &&
130
+ id == o.id &&
131
+ relationships == o.relationships &&
132
+ type == o.type &&
133
+ additional_properties == o.additional_properties
134
+ end
135
+
136
+ # Calculates hash code according to all attributes.
137
+ # @return [Integer] Hash code
138
+ # @!visibility private
139
+ def hash
140
+ [id, relationships, type, additional_properties].hash
141
+ end
142
+ end
143
+ end
@@ -0,0 +1,115 @@
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
+ # Relationship objects linked to a team's on-call responder configuration, including escalations and responders.
21
+ class TeamOnCallRespondersDataRelationships
22
+ include BaseGenericModel
23
+
24
+ # Defines the escalation policy steps linked to the team's on-call configuration.
25
+ attr_accessor :escalations
26
+
27
+ # Defines the list of users assigned as on-call responders for the team.
28
+ attr_accessor :responders
29
+
30
+ attr_accessor :additional_properties
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ # @!visibility private
34
+ def self.attribute_map
35
+ {
36
+ :'escalations' => :'escalations',
37
+ :'responders' => :'responders'
38
+ }
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ # @!visibility private
43
+ def self.openapi_types
44
+ {
45
+ :'escalations' => :'TeamOnCallRespondersDataRelationshipsEscalations',
46
+ :'responders' => :'TeamOnCallRespondersDataRelationshipsResponders'
47
+ }
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param attributes [Hash] Model attributes in the form of hash
52
+ # @!visibility private
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamOnCallRespondersDataRelationships` initialize method"
56
+ end
57
+
58
+ self.additional_properties = {}
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!self.class.attribute_map.key?(k.to_sym))
62
+ self.additional_properties[k.to_sym] = v
63
+ else
64
+ h[k.to_sym] = v
65
+ end
66
+ }
67
+
68
+ if attributes.key?(:'escalations')
69
+ self.escalations = attributes[:'escalations']
70
+ end
71
+
72
+ if attributes.key?(:'responders')
73
+ self.responders = attributes[:'responders']
74
+ end
75
+ end
76
+
77
+ # Returns the object in the form of hash, with additionalProperties support.
78
+ # @return [Hash] Returns the object in the form of hash
79
+ # @!visibility private
80
+ def to_hash
81
+ hash = {}
82
+ self.class.attribute_map.each_pair do |attr, param|
83
+ value = self.send(attr)
84
+ if value.nil?
85
+ is_nullable = self.class.openapi_nullable.include?(attr)
86
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
87
+ end
88
+
89
+ hash[param] = _to_hash(value)
90
+ end
91
+ self.additional_properties.each_pair do |attr, value|
92
+ hash[attr] = value
93
+ end
94
+ hash
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
+ escalations == o.escalations &&
104
+ responders == o.responders &&
105
+ additional_properties == o.additional_properties
106
+ end
107
+
108
+ # Calculates hash code according to all attributes.
109
+ # @return [Integer] Hash code
110
+ # @!visibility private
111
+ def hash
112
+ [escalations, responders, additional_properties].hash
113
+ end
114
+ end
115
+ end
@@ -0,0 +1,107 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # Defines the escalation policy steps linked to the team's on-call configuration.
21
+ class TeamOnCallRespondersDataRelationshipsEscalations
22
+ include BaseGenericModel
23
+
24
+ # Array of escalation step references.
25
+ attr_accessor :data
26
+
27
+ attr_accessor :additional_properties
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ # @!visibility private
31
+ def self.attribute_map
32
+ {
33
+ :'data' => :'data'
34
+ }
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ # @!visibility private
39
+ def self.openapi_types
40
+ {
41
+ :'data' => :'Array<TeamOnCallRespondersDataRelationshipsEscalationsDataItems>'
42
+ }
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param attributes [Hash] Model attributes in the form of hash
47
+ # @!visibility private
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamOnCallRespondersDataRelationshipsEscalations` initialize method"
51
+ end
52
+
53
+ self.additional_properties = {}
54
+ # check to see if the attribute exists and convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h|
56
+ if (!self.class.attribute_map.key?(k.to_sym))
57
+ self.additional_properties[k.to_sym] = v
58
+ else
59
+ h[k.to_sym] = v
60
+ end
61
+ }
62
+
63
+ if attributes.key?(:'data')
64
+ if (value = attributes[:'data']).is_a?(Array)
65
+ self.data = value
66
+ end
67
+ end
68
+ end
69
+
70
+ # Returns the object in the form of hash, with additionalProperties support.
71
+ # @return [Hash] Returns the object in the form of hash
72
+ # @!visibility private
73
+ def to_hash
74
+ hash = {}
75
+ self.class.attribute_map.each_pair do |attr, param|
76
+ value = self.send(attr)
77
+ if value.nil?
78
+ is_nullable = self.class.openapi_nullable.include?(attr)
79
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
80
+ end
81
+
82
+ hash[param] = _to_hash(value)
83
+ end
84
+ self.additional_properties.each_pair do |attr, value|
85
+ hash[attr] = value
86
+ end
87
+ hash
88
+ end
89
+
90
+ # Checks equality by comparing each attribute.
91
+ # @param o [Object] Object to be compared
92
+ # @!visibility private
93
+ def ==(o)
94
+ return true if self.equal?(o)
95
+ self.class == o.class &&
96
+ data == o.data &&
97
+ additional_properties == o.additional_properties
98
+ end
99
+
100
+ # Calculates hash code according to all attributes.
101
+ # @return [Integer] Hash code
102
+ # @!visibility private
103
+ def hash
104
+ [data, additional_properties].hash
105
+ end
106
+ end
107
+ end