datadog_api_client 2.24.0 → 2.25.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/conftest.py +2 -0
  4. data/.generator/schemas/v1/openapi.yaml +265 -8
  5. data/.generator/schemas/v2/openapi.yaml +1471 -32
  6. data/.generator/src/generator/openapi.py +4 -0
  7. data/CHANGELOG.md +41 -0
  8. data/examples/v1/azure-integration/CreateAzureIntegration.rb +1 -1
  9. data/examples/v1/azure-integration/UpdateAzureHostFilters.rb +7 -1
  10. data/examples/v1/azure-integration/UpdateAzureIntegration.rb +7 -1
  11. data/examples/v1/dashboards/CreateDashboard_985012506.rb +61 -0
  12. data/examples/v1/synthetics/CreateSyntheticsAPITest_1717840259.rb +163 -0
  13. data/examples/v1/synthetics/CreateSyntheticsBrowserTest.rb +2 -0
  14. data/examples/v2/cloud-cost-management/DeleteCustomCostsFile.rb +5 -0
  15. data/examples/v2/cloud-cost-management/DeleteCustomCostsFile_372970393.rb +5 -0
  16. data/examples/v2/cloud-cost-management/GetCustomCostsFile.rb +5 -0
  17. data/examples/v2/cloud-cost-management/GetCustomCostsFile_1307381576.rb +5 -0
  18. data/examples/v2/cloud-cost-management/ListCustomCostsFiles.rb +5 -0
  19. data/examples/v2/cloud-cost-management/ListCustomCostsFiles_1968771127.rb +5 -0
  20. data/examples/v2/cloud-cost-management/UploadCustomCostsFile.rb +15 -0
  21. data/examples/v2/cloud-cost-management/UploadCustomCostsFile_4125168396.rb +19 -0
  22. data/examples/v2/network-device-monitoring/GetDevice.rb +5 -0
  23. data/examples/v2/network-device-monitoring/GetInterfaces.rb +5 -0
  24. data/examples/v2/network-device-monitoring/ListDeviceUserTags.rb +5 -0
  25. data/examples/v2/network-device-monitoring/ListDevices.rb +10 -0
  26. data/examples/v2/network-device-monitoring/UpdateDeviceUserTags.rb +18 -0
  27. data/examples/v2/roles/CreateRole.rb +0 -3
  28. data/examples/v2/security-monitoring/ConvertExistingSecurityMonitoringRule.rb +8 -0
  29. data/examples/v2/security-monitoring/ConvertSecurityMonitoringRuleFromJSONToTerraform.rb +36 -0
  30. data/examples/v2/service-scorecards/UpdateScorecardRule.rb +24 -0
  31. data/examples/v2/workflow-automation/CancelWorkflowInstance.rb +5 -0
  32. data/examples/v2/workflow-automation/CreateWorkflowInstance.rb +13 -0
  33. data/examples/v2/workflow-automation/GetWorkflowInstance.rb +5 -0
  34. data/examples/v2/workflow-automation/ListWorkflowInstances.rb +5 -0
  35. data/lib/datadog_api_client/configuration.rb +1 -0
  36. data/lib/datadog_api_client/inflector.rb +53 -1
  37. data/lib/datadog_api_client/v1/api/aws_logs_integration_api.rb +1 -1
  38. data/lib/datadog_api_client/v1/api/hosts_api.rb +1 -1
  39. data/lib/datadog_api_client/v1/api/monitors_api.rb +12 -1
  40. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +7 -3
  41. data/lib/datadog_api_client/v1/models/azure_account.rb +14 -1
  42. data/lib/datadog_api_client/v1/models/azure_account_metrics_config.rb +85 -0
  43. data/lib/datadog_api_client/v1/models/formula_and_function_apm_dependency_stats_query_definition.rb +24 -1
  44. data/lib/datadog_api_client/v1/models/formula_and_function_apm_resource_stats_query_definition.rb +24 -1
  45. data/lib/datadog_api_client/v1/models/formula_and_function_cloud_cost_query_definition.rb +24 -1
  46. data/lib/datadog_api_client/v1/models/formula_and_function_event_query_definition.rb +24 -1
  47. data/lib/datadog_api_client/v1/models/formula_and_function_events_data_source.rb +1 -0
  48. data/lib/datadog_api_client/v1/models/formula_and_function_metric_query_definition.rb +24 -1
  49. data/lib/datadog_api_client/v1/models/formula_and_function_process_query_definition.rb +24 -1
  50. data/lib/datadog_api_client/v1/models/formula_and_function_slo_query_definition.rb +24 -1
  51. data/lib/datadog_api_client/v1/models/formula_and_function_slo_query_type.rb +1 -0
  52. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +2 -0
  53. data/lib/datadog_api_client/v1/models/list_stream_source.rb +1 -0
  54. data/lib/datadog_api_client/v1/models/monitor_formula_and_function_events_data_source.rb +1 -0
  55. data/lib/datadog_api_client/v1/models/monitor_type.rb +1 -0
  56. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +4 -0
  57. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +41 -1
  58. data/lib/datadog_api_client/v1/models/synthetics_basic_auth_digest.rb +12 -1
  59. data/lib/datadog_api_client/v1/models/synthetics_basic_auth_oauth_client.rb +12 -1
  60. data/lib/datadog_api_client/v1/models/synthetics_basic_auth_oauth_rop.rb +12 -1
  61. data/lib/datadog_api_client/v1/models/synthetics_delete_tests_payload.rb +12 -1
  62. data/lib/datadog_api_client/v1/models/synthetics_test_options.rb +21 -1
  63. data/lib/datadog_api_client/v1/models/usage_billable_summary_hour.rb +21 -1
  64. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +61 -1
  65. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +81 -1
  66. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +61 -1
  67. data/lib/datadog_api_client/v2/api/api_management_api.rb +5 -5
  68. data/lib/datadog_api_client/v2/api/authn_mappings_api.rb +6 -0
  69. data/lib/datadog_api_client/v2/api/case_management_api.rb +13 -13
  70. data/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb +260 -0
  71. data/lib/datadog_api_client/v2/api/network_device_monitoring_api.rb +362 -0
  72. data/lib/datadog_api_client/v2/api/organizations_api.rb +1 -1
  73. data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +15 -7
  74. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +134 -0
  75. data/lib/datadog_api_client/v2/api/service_scorecards_api.rb +79 -1
  76. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +8 -0
  77. data/lib/datadog_api_client/v2/api/workflow_automation_api.rb +307 -0
  78. data/lib/datadog_api_client/v2/models/api_key_relationships.rb +9 -1
  79. data/lib/datadog_api_client/v2/models/authn_mapping_resource_type.rb +27 -0
  80. data/lib/datadog_api_client/v2/models/cost_by_org_attributes.rb +21 -1
  81. data/lib/datadog_api_client/v2/models/custom_cost_get_response_meta.rb +80 -0
  82. data/lib/datadog_api_client/v2/models/custom_cost_list_response_meta.rb +90 -0
  83. data/lib/datadog_api_client/v2/models/custom_cost_upload_response_meta.rb +80 -0
  84. data/lib/datadog_api_client/v2/models/custom_costs_file_get_response.rb +90 -0
  85. data/lib/datadog_api_client/v2/models/custom_costs_file_line_item.rb +173 -0
  86. data/lib/datadog_api_client/v2/models/custom_costs_file_list_response.rb +92 -0
  87. data/lib/datadog_api_client/v2/models/custom_costs_file_metadata.rb +152 -0
  88. data/lib/datadog_api_client/v2/models/custom_costs_file_metadata_high_level.rb +100 -0
  89. data/lib/datadog_api_client/v2/models/custom_costs_file_metadata_with_content.rb +164 -0
  90. data/lib/datadog_api_client/v2/models/custom_costs_file_metadata_with_content_high_level.rb +100 -0
  91. data/lib/datadog_api_client/v2/models/custom_costs_file_upload_response.rb +90 -0
  92. data/lib/datadog_api_client/v2/models/custom_costs_file_usage_charge_period.rb +90 -0
  93. data/lib/datadog_api_client/v2/models/custom_costs_user.rb +100 -0
  94. data/lib/datadog_api_client/v2/models/device_attributes.rb +272 -0
  95. data/lib/datadog_api_client/v2/models/device_attributes_interface_statuses.rb +110 -0
  96. data/lib/datadog_api_client/v2/models/devices_list_data.rb +100 -0
  97. data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +2 -2
  98. data/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb +2 -2
  99. data/lib/datadog_api_client/v2/models/full_application_key_attributes.rb +1 -1
  100. data/lib/datadog_api_client/v2/models/get_device_attributes.rb +262 -0
  101. data/lib/datadog_api_client/v2/models/get_device_data.rb +100 -0
  102. data/lib/datadog_api_client/v2/models/get_device_response.rb +80 -0
  103. data/lib/datadog_api_client/v2/models/get_interfaces_data.rb +100 -0
  104. data/lib/datadog_api_client/v2/models/get_interfaces_response.rb +82 -0
  105. data/lib/datadog_api_client/v2/models/hourly_usage_attributes.rb +21 -1
  106. data/lib/datadog_api_client/v2/models/interface_attributes.rb +130 -0
  107. data/lib/datadog_api_client/v2/models/interface_attributes_status.rb +29 -0
  108. data/lib/datadog_api_client/v2/models/list_devices_response.rb +92 -0
  109. data/lib/datadog_api_client/v2/models/list_devices_response_metadata.rb +80 -0
  110. data/lib/datadog_api_client/v2/models/list_devices_response_metadata_page.rb +80 -0
  111. data/lib/datadog_api_client/v2/models/list_tags_response.rb +80 -0
  112. data/lib/datadog_api_client/v2/models/list_tags_response_data.rb +100 -0
  113. data/lib/datadog_api_client/v2/models/list_tags_response_data_attributes.rb +82 -0
  114. data/lib/datadog_api_client/v2/models/projected_cost_attributes.rb +21 -1
  115. data/lib/datadog_api_client/v2/models/role_relationships.rb +4 -14
  116. data/lib/datadog_api_client/v2/models/role_update_attributes.rb +32 -4
  117. data/lib/datadog_api_client/v2/models/rum_application_attributes.rb +1 -1
  118. data/lib/datadog_api_client/v2/models/rum_application_create_attributes.rb +1 -1
  119. data/lib/datadog_api_client/v2/models/rum_application_list_attributes.rb +1 -1
  120. data/lib/datadog_api_client/v2/models/rum_application_update_attributes.rb +1 -1
  121. data/lib/datadog_api_client/v2/models/security_monitoring_rule_convert_payload.rb +63 -0
  122. data/lib/datadog_api_client/v2/models/security_monitoring_rule_convert_response.rb +80 -0
  123. data/lib/datadog_api_client/v2/models/security_monitoring_rule_detection_method.rb +1 -0
  124. data/lib/datadog_api_client/v2/models/security_monitoring_rule_evaluation_window.rb +1 -1
  125. data/lib/datadog_api_client/v2/models/security_monitoring_rule_keep_alive.rb +1 -1
  126. data/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb +2 -2
  127. data/lib/datadog_api_client/v2/models/update_rule_request.rb +80 -0
  128. data/lib/datadog_api_client/v2/models/update_rule_request_data.rb +90 -0
  129. data/lib/datadog_api_client/v2/models/update_rule_response.rb +80 -0
  130. data/lib/datadog_api_client/v2/models/update_rule_response_data.rb +110 -0
  131. data/lib/datadog_api_client/v2/models/user_attributes.rb +11 -1
  132. data/lib/datadog_api_client/v2/models/workflow_instance_create_meta.rb +80 -0
  133. data/lib/datadog_api_client/v2/models/workflow_instance_create_request.rb +80 -0
  134. data/lib/datadog_api_client/v2/models/workflow_instance_create_response.rb +80 -0
  135. data/lib/datadog_api_client/v2/models/workflow_instance_create_response_data.rb +80 -0
  136. data/lib/datadog_api_client/v2/models/workflow_instance_list_item.rb +80 -0
  137. data/lib/datadog_api_client/v2/models/workflow_list_instances_response.rb +92 -0
  138. data/lib/datadog_api_client/v2/models/workflow_list_instances_response_meta.rb +80 -0
  139. data/lib/datadog_api_client/v2/models/workflow_list_instances_response_meta_page.rb +80 -0
  140. data/lib/datadog_api_client/v2/models/worklflow_cancel_instance_response.rb +80 -0
  141. data/lib/datadog_api_client/v2/models/worklflow_cancel_instance_response_data.rb +80 -0
  142. data/lib/datadog_api_client/v2/models/worklflow_get_instance_response.rb +80 -0
  143. data/lib/datadog_api_client/v2/models/worklflow_get_instance_response_data.rb +80 -0
  144. data/lib/datadog_api_client/v2/models/worklflow_get_instance_response_data_attributes.rb +80 -0
  145. data/lib/datadog_api_client/version.rb +1 -1
  146. metadata +76 -2
@@ -0,0 +1,272 @@
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
+ # The device attributes
21
+ class DeviceAttributes
22
+ include BaseGenericModel
23
+
24
+ # The device description
25
+ attr_accessor :description
26
+
27
+ # The device type
28
+ attr_accessor :device_type
29
+
30
+ # The device integration
31
+ attr_accessor :integration
32
+
33
+ # Count of the device interfaces by status
34
+ attr_accessor :interface_statuses
35
+
36
+ # The device IP address
37
+ attr_accessor :ip_address
38
+
39
+ # The device location
40
+ attr_accessor :location
41
+
42
+ # The device model
43
+ attr_accessor :model
44
+
45
+ # The device name
46
+ attr_accessor :name
47
+
48
+ # The device OS hostname
49
+ attr_accessor :os_hostname
50
+
51
+ # The device OS name
52
+ attr_accessor :os_name
53
+
54
+ # The device OS version
55
+ attr_accessor :os_version
56
+
57
+ # The device ping status
58
+ attr_accessor :ping_status
59
+
60
+ # The device product name
61
+ attr_accessor :product_name
62
+
63
+ # The device serial number
64
+ attr_accessor :serial_number
65
+
66
+ # The device SNMP status
67
+ attr_accessor :status
68
+
69
+ # The device subnet
70
+ attr_accessor :subnet
71
+
72
+ # The device `sys_object_id`
73
+ attr_accessor :sys_object_id
74
+
75
+ # The list of device tags
76
+ attr_accessor :tags
77
+
78
+ # The device vendor
79
+ attr_accessor :vendor
80
+
81
+ # The device version
82
+ attr_accessor :version
83
+
84
+ # Attribute mapping from ruby-style variable name to JSON key.
85
+ # @!visibility private
86
+ def self.attribute_map
87
+ {
88
+ :'description' => :'description',
89
+ :'device_type' => :'device_type',
90
+ :'integration' => :'integration',
91
+ :'interface_statuses' => :'interface_statuses',
92
+ :'ip_address' => :'ip_address',
93
+ :'location' => :'location',
94
+ :'model' => :'model',
95
+ :'name' => :'name',
96
+ :'os_hostname' => :'os_hostname',
97
+ :'os_name' => :'os_name',
98
+ :'os_version' => :'os_version',
99
+ :'ping_status' => :'ping_status',
100
+ :'product_name' => :'product_name',
101
+ :'serial_number' => :'serial_number',
102
+ :'status' => :'status',
103
+ :'subnet' => :'subnet',
104
+ :'sys_object_id' => :'sys_object_id',
105
+ :'tags' => :'tags',
106
+ :'vendor' => :'vendor',
107
+ :'version' => :'version'
108
+ }
109
+ end
110
+
111
+ # Attribute type mapping.
112
+ # @!visibility private
113
+ def self.openapi_types
114
+ {
115
+ :'description' => :'String',
116
+ :'device_type' => :'String',
117
+ :'integration' => :'String',
118
+ :'interface_statuses' => :'DeviceAttributesInterfaceStatuses',
119
+ :'ip_address' => :'String',
120
+ :'location' => :'String',
121
+ :'model' => :'String',
122
+ :'name' => :'String',
123
+ :'os_hostname' => :'String',
124
+ :'os_name' => :'String',
125
+ :'os_version' => :'String',
126
+ :'ping_status' => :'String',
127
+ :'product_name' => :'String',
128
+ :'serial_number' => :'String',
129
+ :'status' => :'String',
130
+ :'subnet' => :'String',
131
+ :'sys_object_id' => :'String',
132
+ :'tags' => :'Array<String>',
133
+ :'vendor' => :'String',
134
+ :'version' => :'String'
135
+ }
136
+ end
137
+
138
+ # Initializes the object
139
+ # @param attributes [Hash] Model attributes in the form of hash
140
+ # @!visibility private
141
+ def initialize(attributes = {})
142
+ if (!attributes.is_a?(Hash))
143
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DeviceAttributes` initialize method"
144
+ end
145
+
146
+ # check to see if the attribute exists and convert string to symbol for hash key
147
+ attributes = attributes.each_with_object({}) { |(k, v), h|
148
+ if (!self.class.attribute_map.key?(k.to_sym))
149
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DeviceAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
150
+ end
151
+ h[k.to_sym] = v
152
+ }
153
+
154
+ if attributes.key?(:'description')
155
+ self.description = attributes[:'description']
156
+ end
157
+
158
+ if attributes.key?(:'device_type')
159
+ self.device_type = attributes[:'device_type']
160
+ end
161
+
162
+ if attributes.key?(:'integration')
163
+ self.integration = attributes[:'integration']
164
+ end
165
+
166
+ if attributes.key?(:'interface_statuses')
167
+ self.interface_statuses = attributes[:'interface_statuses']
168
+ end
169
+
170
+ if attributes.key?(:'ip_address')
171
+ self.ip_address = attributes[:'ip_address']
172
+ end
173
+
174
+ if attributes.key?(:'location')
175
+ self.location = attributes[:'location']
176
+ end
177
+
178
+ if attributes.key?(:'model')
179
+ self.model = attributes[:'model']
180
+ end
181
+
182
+ if attributes.key?(:'name')
183
+ self.name = attributes[:'name']
184
+ end
185
+
186
+ if attributes.key?(:'os_hostname')
187
+ self.os_hostname = attributes[:'os_hostname']
188
+ end
189
+
190
+ if attributes.key?(:'os_name')
191
+ self.os_name = attributes[:'os_name']
192
+ end
193
+
194
+ if attributes.key?(:'os_version')
195
+ self.os_version = attributes[:'os_version']
196
+ end
197
+
198
+ if attributes.key?(:'ping_status')
199
+ self.ping_status = attributes[:'ping_status']
200
+ end
201
+
202
+ if attributes.key?(:'product_name')
203
+ self.product_name = attributes[:'product_name']
204
+ end
205
+
206
+ if attributes.key?(:'serial_number')
207
+ self.serial_number = attributes[:'serial_number']
208
+ end
209
+
210
+ if attributes.key?(:'status')
211
+ self.status = attributes[:'status']
212
+ end
213
+
214
+ if attributes.key?(:'subnet')
215
+ self.subnet = attributes[:'subnet']
216
+ end
217
+
218
+ if attributes.key?(:'sys_object_id')
219
+ self.sys_object_id = attributes[:'sys_object_id']
220
+ end
221
+
222
+ if attributes.key?(:'tags')
223
+ if (value = attributes[:'tags']).is_a?(Array)
224
+ self.tags = value
225
+ end
226
+ end
227
+
228
+ if attributes.key?(:'vendor')
229
+ self.vendor = attributes[:'vendor']
230
+ end
231
+
232
+ if attributes.key?(:'version')
233
+ self.version = attributes[:'version']
234
+ end
235
+ end
236
+
237
+ # Checks equality by comparing each attribute.
238
+ # @param o [Object] Object to be compared
239
+ # @!visibility private
240
+ def ==(o)
241
+ return true if self.equal?(o)
242
+ self.class == o.class &&
243
+ description == o.description &&
244
+ device_type == o.device_type &&
245
+ integration == o.integration &&
246
+ interface_statuses == o.interface_statuses &&
247
+ ip_address == o.ip_address &&
248
+ location == o.location &&
249
+ model == o.model &&
250
+ name == o.name &&
251
+ os_hostname == o.os_hostname &&
252
+ os_name == o.os_name &&
253
+ os_version == o.os_version &&
254
+ ping_status == o.ping_status &&
255
+ product_name == o.product_name &&
256
+ serial_number == o.serial_number &&
257
+ status == o.status &&
258
+ subnet == o.subnet &&
259
+ sys_object_id == o.sys_object_id &&
260
+ tags == o.tags &&
261
+ vendor == o.vendor &&
262
+ version == o.version
263
+ end
264
+
265
+ # Calculates hash code according to all attributes.
266
+ # @return [Integer] Hash code
267
+ # @!visibility private
268
+ def hash
269
+ [description, device_type, integration, interface_statuses, ip_address, location, model, name, os_hostname, os_name, os_version, ping_status, product_name, serial_number, status, subnet, sys_object_id, tags, vendor, version].hash
270
+ end
271
+ end
272
+ end
@@ -0,0 +1,110 @@
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
+ # Count of the device interfaces by status
21
+ class DeviceAttributesInterfaceStatuses
22
+ include BaseGenericModel
23
+
24
+ # The number of interfaces that are down
25
+ attr_accessor :down
26
+
27
+ # The number of interfaces that are off
28
+ attr_accessor :off
29
+
30
+ # The number of interfaces that are up
31
+ attr_accessor :up
32
+
33
+ # The number of interfaces that are in a warning state
34
+ attr_accessor :warning
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ # @!visibility private
38
+ def self.attribute_map
39
+ {
40
+ :'down' => :'down',
41
+ :'off' => :'off',
42
+ :'up' => :'up',
43
+ :'warning' => :'warning'
44
+ }
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ # @!visibility private
49
+ def self.openapi_types
50
+ {
51
+ :'down' => :'Integer',
52
+ :'off' => :'Integer',
53
+ :'up' => :'Integer',
54
+ :'warning' => :'Integer'
55
+ }
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param attributes [Hash] Model attributes in the form of hash
60
+ # @!visibility private
61
+ def initialize(attributes = {})
62
+ if (!attributes.is_a?(Hash))
63
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DeviceAttributesInterfaceStatuses` initialize method"
64
+ end
65
+
66
+ # check to see if the attribute exists and convert string to symbol for hash key
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!self.class.attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DeviceAttributesInterfaceStatuses`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'down')
75
+ self.down = attributes[:'down']
76
+ end
77
+
78
+ if attributes.key?(:'off')
79
+ self.off = attributes[:'off']
80
+ end
81
+
82
+ if attributes.key?(:'up')
83
+ self.up = attributes[:'up']
84
+ end
85
+
86
+ if attributes.key?(:'warning')
87
+ self.warning = attributes[:'warning']
88
+ end
89
+ end
90
+
91
+ # Checks equality by comparing each attribute.
92
+ # @param o [Object] Object to be compared
93
+ # @!visibility private
94
+ def ==(o)
95
+ return true if self.equal?(o)
96
+ self.class == o.class &&
97
+ down == o.down &&
98
+ off == o.off &&
99
+ up == o.up &&
100
+ warning == o.warning
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Integer] Hash code
105
+ # @!visibility private
106
+ def hash
107
+ [down, off, up, warning].hash
108
+ end
109
+ end
110
+ end
@@ -0,0 +1,100 @@
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
+ # The devices list data
21
+ class DevicesListData
22
+ include BaseGenericModel
23
+
24
+ # The device attributes
25
+ attr_accessor :attributes
26
+
27
+ # The device ID
28
+ attr_accessor :id
29
+
30
+ # The type of the resource. The value should always be device.
31
+ attr_accessor :type
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ # @!visibility private
35
+ def self.attribute_map
36
+ {
37
+ :'attributes' => :'attributes',
38
+ :'id' => :'id',
39
+ :'type' => :'type'
40
+ }
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ # @!visibility private
45
+ def self.openapi_types
46
+ {
47
+ :'attributes' => :'DeviceAttributes',
48
+ :'id' => :'String',
49
+ :'type' => :'String'
50
+ }
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param attributes [Hash] Model attributes in the form of hash
55
+ # @!visibility private
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DevicesListData` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ attributes = attributes.each_with_object({}) { |(k, v), h|
63
+ if (!self.class.attribute_map.key?(k.to_sym))
64
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DevicesListData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
65
+ end
66
+ h[k.to_sym] = v
67
+ }
68
+
69
+ if attributes.key?(:'attributes')
70
+ self.attributes = attributes[:'attributes']
71
+ end
72
+
73
+ if attributes.key?(:'id')
74
+ self.id = attributes[:'id']
75
+ end
76
+
77
+ if attributes.key?(:'type')
78
+ self.type = attributes[:'type']
79
+ end
80
+ end
81
+
82
+ # Checks equality by comparing each attribute.
83
+ # @param o [Object] Object to be compared
84
+ # @!visibility private
85
+ def ==(o)
86
+ return true if self.equal?(o)
87
+ self.class == o.class &&
88
+ attributes == o.attributes &&
89
+ id == o.id &&
90
+ type == o.type
91
+ end
92
+
93
+ # Calculates hash code according to all attributes.
94
+ # @return [Integer] Hash code
95
+ # @!visibility private
96
+ def hash
97
+ [attributes, id, type].hash
98
+ end
99
+ end
100
+ end
@@ -24,7 +24,7 @@ module DatadogAPIClient::V2
24
24
  # Environment name to where the service was deployed.
25
25
  attr_accessor :env
26
26
 
27
- # Unix timestamp in nanoseconds when the deployment finished. It should not be older than 1 hour.
27
+ # Unix timestamp when the deployment finished. It must be in nanoseconds, milliseconds, or seconds, and it should not be older than 1 hour.
28
28
  attr_reader :finished_at
29
29
 
30
30
  # Git info for DORA Metrics events.
@@ -36,7 +36,7 @@ module DatadogAPIClient::V2
36
36
  # Service name from a service available in the Service Catalog.
37
37
  attr_reader :service
38
38
 
39
- # Unix timestamp in nanoseconds when the deployment started.
39
+ # Unix timestamp when the deployment started. It must be in nanoseconds, milliseconds, or seconds.
40
40
  attr_reader :started_at
41
41
 
42
42
  # Version to correlate with [APM Deployment Tracking](https://docs.datadoghq.com/tracing/services/deployment_tracking/).
@@ -24,7 +24,7 @@ module DatadogAPIClient::V2
24
24
  # Environment name that was impacted by the incident.
25
25
  attr_accessor :env
26
26
 
27
- # Unix timestamp in nanoseconds when the incident finished. It should not be older than 1 hour.
27
+ # Unix timestamp when the incident finished. It must be in nanoseconds, milliseconds, or seconds, and it should not be older than 1 hour.
28
28
  attr_accessor :finished_at
29
29
 
30
30
  # Git info for DORA Metrics events.
@@ -42,7 +42,7 @@ module DatadogAPIClient::V2
42
42
  # Incident severity.
43
43
  attr_accessor :severity
44
44
 
45
- # Unix timestamp in nanoseconds when the incident started.
45
+ # Unix timestamp when the incident started. It must be in nanoseconds, milliseconds, or seconds.
46
46
  attr_reader :started_at
47
47
 
48
48
  # Name of the team owning the services impacted. If possible, use team handles registered in Datadog. Required when the services field is not provided.
@@ -52,7 +52,7 @@ module DatadogAPIClient::V2
52
52
  # @!visibility private
53
53
  def self.openapi_types
54
54
  {
55
- :'created_at' => :'String',
55
+ :'created_at' => :'Time',
56
56
  :'key' => :'String',
57
57
  :'last4' => :'String',
58
58
  :'name' => :'String',