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,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
+ # Kind attributes.
21
+ class KindAttributes
22
+ include BaseGenericModel
23
+
24
+ # Short description of the kind.
25
+ attr_accessor :description
26
+
27
+ # User friendly name of the kind.
28
+ attr_accessor :display_name
29
+
30
+ # The kind name.
31
+ attr_reader :name
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
+ :'description' => :'description',
40
+ :'display_name' => :'displayName',
41
+ :'name' => :'name'
42
+ }
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ # @!visibility private
47
+ def self.openapi_types
48
+ {
49
+ :'description' => :'String',
50
+ :'display_name' => :'String',
51
+ :'name' => :'String'
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::KindAttributes` 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?(:'description')
74
+ self.description = attributes[:'description']
75
+ end
76
+
77
+ if attributes.key?(:'display_name')
78
+ self.display_name = attributes[:'display_name']
79
+ end
80
+
81
+ if attributes.key?(:'name')
82
+ self.name = attributes[:'name']
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 !@name.nil? && @name.to_s.length < 1
91
+ true
92
+ end
93
+
94
+ # Custom attribute writer method with validation
95
+ # @param name [Object] Object to be assigned
96
+ # @!visibility private
97
+ def name=(name)
98
+ if !name.nil? && name.to_s.length < 1
99
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
100
+ end
101
+ @name = name
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
+ description == o.description &&
131
+ display_name == o.display_name &&
132
+ name == o.name &&
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
+ [description, display_name, name, additional_properties].hash
141
+ end
142
+ end
143
+ end
@@ -0,0 +1,153 @@
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
+ # Schema that defines the structure of a Kind object in the Software Catalog.
21
+ class KindData
22
+ include BaseGenericModel
23
+
24
+ # Kind attributes.
25
+ attr_accessor :attributes
26
+
27
+ # A read-only globally unique identifier for the entity generated by Datadog. User supplied values are ignored.
28
+ attr_reader :id
29
+
30
+ # Kind metadata.
31
+ attr_accessor :meta
32
+
33
+ # Kind.
34
+ attr_accessor :type
35
+
36
+ attr_accessor :additional_properties
37
+
38
+ # Attribute mapping from ruby-style variable name to JSON key.
39
+ # @!visibility private
40
+ def self.attribute_map
41
+ {
42
+ :'attributes' => :'attributes',
43
+ :'id' => :'id',
44
+ :'meta' => :'meta',
45
+ :'type' => :'type'
46
+ }
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ # @!visibility private
51
+ def self.openapi_types
52
+ {
53
+ :'attributes' => :'KindAttributes',
54
+ :'id' => :'String',
55
+ :'meta' => :'KindMetadata',
56
+ :'type' => :'String'
57
+ }
58
+ end
59
+
60
+ # Initializes the object
61
+ # @param attributes [Hash] Model attributes in the form of hash
62
+ # @!visibility private
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::KindData` initialize method"
66
+ end
67
+
68
+ self.additional_properties = {}
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!self.class.attribute_map.key?(k.to_sym))
72
+ self.additional_properties[k.to_sym] = v
73
+ else
74
+ h[k.to_sym] = v
75
+ end
76
+ }
77
+
78
+ if attributes.key?(:'attributes')
79
+ self.attributes = attributes[:'attributes']
80
+ end
81
+
82
+ if attributes.key?(:'id')
83
+ self.id = attributes[:'id']
84
+ end
85
+
86
+ if attributes.key?(:'meta')
87
+ self.meta = attributes[:'meta']
88
+ end
89
+
90
+ if attributes.key?(:'type')
91
+ self.type = attributes[:'type']
92
+ end
93
+ end
94
+
95
+ # Check to see if the all the properties in the model are valid
96
+ # @return true if the model is valid
97
+ # @!visibility private
98
+ def valid?
99
+ return false if !@id.nil? && @id.to_s.length < 1
100
+ true
101
+ end
102
+
103
+ # Custom attribute writer method with validation
104
+ # @param id [Object] Object to be assigned
105
+ # @!visibility private
106
+ def id=(id)
107
+ if !id.nil? && id.to_s.length < 1
108
+ fail ArgumentError, 'invalid value for "id", the character length must be great than or equal to 1.'
109
+ end
110
+ @id = id
111
+ end
112
+
113
+ # Returns the object in the form of hash, with additionalProperties support.
114
+ # @return [Hash] Returns the object in the form of hash
115
+ # @!visibility private
116
+ def to_hash
117
+ hash = {}
118
+ self.class.attribute_map.each_pair do |attr, param|
119
+ value = self.send(attr)
120
+ if value.nil?
121
+ is_nullable = self.class.openapi_nullable.include?(attr)
122
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
123
+ end
124
+
125
+ hash[param] = _to_hash(value)
126
+ end
127
+ self.additional_properties.each_pair do |attr, value|
128
+ hash[attr] = value
129
+ end
130
+ hash
131
+ end
132
+
133
+ # Checks equality by comparing each attribute.
134
+ # @param o [Object] Object to be compared
135
+ # @!visibility private
136
+ def ==(o)
137
+ return true if self.equal?(o)
138
+ self.class == o.class &&
139
+ attributes == o.attributes &&
140
+ id == o.id &&
141
+ meta == o.meta &&
142
+ type == o.type &&
143
+ additional_properties == o.additional_properties
144
+ end
145
+
146
+ # Calculates hash code according to all attributes.
147
+ # @return [Integer] Hash code
148
+ # @!visibility private
149
+ def hash
150
+ [attributes, id, meta, type, additional_properties].hash
151
+ end
152
+ end
153
+ 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
+ # Kind metadata.
21
+ class KindMetadata
22
+ include BaseGenericModel
23
+
24
+ # The creation time.
25
+ attr_accessor :created_at
26
+
27
+ # The modification time.
28
+ attr_accessor :modified_at
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
+ :'created_at' => :'createdAt',
37
+ :'modified_at' => :'modifiedAt'
38
+ }
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ # @!visibility private
43
+ def self.openapi_types
44
+ {
45
+ :'created_at' => :'String',
46
+ :'modified_at' => :'String'
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::KindMetadata` 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?(:'created_at')
69
+ self.created_at = attributes[:'created_at']
70
+ end
71
+
72
+ if attributes.key?(:'modified_at')
73
+ self.modified_at = attributes[:'modified_at']
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
+ created_at == o.created_at &&
104
+ modified_at == o.modified_at &&
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
+ [created_at, modified_at, additional_properties].hash
113
+ end
114
+ end
115
+ 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
+ # Schema for kind.
21
+ class KindObj
22
+ include BaseGenericModel
23
+
24
+ # Short description of the kind.
25
+ attr_accessor :description
26
+
27
+ # The display name of the kind. Automatically generated if not provided.
28
+ attr_accessor :display_name
29
+
30
+ # The name of the kind to create or update. This must be in kebab-case format.
31
+ attr_reader :kind
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
+ :'description' => :'description',
40
+ :'display_name' => :'displayName',
41
+ :'kind' => :'kind'
42
+ }
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ # @!visibility private
47
+ def self.openapi_types
48
+ {
49
+ :'description' => :'String',
50
+ :'display_name' => :'String',
51
+ :'kind' => :'String'
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::KindObj` 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?(:'description')
74
+ self.description = attributes[:'description']
75
+ end
76
+
77
+ if attributes.key?(:'display_name')
78
+ self.display_name = attributes[:'display_name']
79
+ end
80
+
81
+ if attributes.key?(:'kind')
82
+ self.kind = attributes[:'kind']
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 @kind.nil?
91
+ true
92
+ end
93
+
94
+ # Custom attribute writer method with validation
95
+ # @param kind [Object] Object to be assigned
96
+ # @!visibility private
97
+ def kind=(kind)
98
+ if kind.nil?
99
+ fail ArgumentError, 'invalid value for "kind", kind cannot be nil.'
100
+ end
101
+ @kind = kind
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
+ description == o.description &&
131
+ display_name == o.display_name &&
132
+ kind == o.kind &&
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
+ [description, display_name, kind, additional_properties].hash
141
+ end
142
+ end
143
+ end
@@ -0,0 +1,105 @@
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
+ # Kind response metadata.
21
+ class KindResponseMeta
22
+ include BaseGenericModel
23
+
24
+ # Total kinds count.
25
+ attr_accessor :count
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
+ :'count' => :'count'
34
+ }
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ # @!visibility private
39
+ def self.openapi_types
40
+ {
41
+ :'count' => :'Integer'
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::KindResponseMeta` 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?(:'count')
64
+ self.count = attributes[:'count']
65
+ end
66
+ end
67
+
68
+ # Returns the object in the form of hash, with additionalProperties support.
69
+ # @return [Hash] Returns the object in the form of hash
70
+ # @!visibility private
71
+ def to_hash
72
+ hash = {}
73
+ self.class.attribute_map.each_pair do |attr, param|
74
+ value = self.send(attr)
75
+ if value.nil?
76
+ is_nullable = self.class.openapi_nullable.include?(attr)
77
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
78
+ end
79
+
80
+ hash[param] = _to_hash(value)
81
+ end
82
+ self.additional_properties.each_pair do |attr, value|
83
+ hash[attr] = value
84
+ end
85
+ hash
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
+ count == o.count &&
95
+ additional_properties == o.additional_properties
96
+ end
97
+
98
+ # Calculates hash code according to all attributes.
99
+ # @return [Integer] Hash code
100
+ # @!visibility private
101
+ def hash
102
+ [count, additional_properties].hash
103
+ end
104
+ end
105
+ end