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,164 @@
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 of a cost file's metadata.
21
+ class CustomCostsFileMetadataWithContent
22
+ include BaseGenericModel
23
+
24
+ # Total cost in the cost file.
25
+ attr_accessor :billed_cost
26
+
27
+ # Currency used in the Custom Costs file.
28
+ attr_accessor :billing_currency
29
+
30
+ # Usage charge period of a Custom Costs file.
31
+ attr_accessor :charge_period
32
+
33
+ # Detail of the line items from the Custom Costs file.
34
+ attr_accessor :content
35
+
36
+ # Name of the Custom Costs file.
37
+ attr_accessor :name
38
+
39
+ # Providers contained in the Custom Costs file.
40
+ attr_accessor :provider_names
41
+
42
+ # Status of the Custom Costs file.
43
+ attr_accessor :status
44
+
45
+ # Timestamp in millisecond of the upload time of the Custom Costs file.
46
+ attr_accessor :uploaded_at
47
+
48
+ # Metadata of the user that has uploaded the Custom Costs file.
49
+ attr_accessor :uploaded_by
50
+
51
+ # Attribute mapping from ruby-style variable name to JSON key.
52
+ # @!visibility private
53
+ def self.attribute_map
54
+ {
55
+ :'billed_cost' => :'billed_cost',
56
+ :'billing_currency' => :'billing_currency',
57
+ :'charge_period' => :'charge_period',
58
+ :'content' => :'content',
59
+ :'name' => :'name',
60
+ :'provider_names' => :'provider_names',
61
+ :'status' => :'status',
62
+ :'uploaded_at' => :'uploaded_at',
63
+ :'uploaded_by' => :'uploaded_by'
64
+ }
65
+ end
66
+
67
+ # Attribute type mapping.
68
+ # @!visibility private
69
+ def self.openapi_types
70
+ {
71
+ :'billed_cost' => :'Float',
72
+ :'billing_currency' => :'String',
73
+ :'charge_period' => :'CustomCostsFileUsageChargePeriod',
74
+ :'content' => :'Array<CustomCostsFileLineItem>',
75
+ :'name' => :'String',
76
+ :'provider_names' => :'Array<String>',
77
+ :'status' => :'String',
78
+ :'uploaded_at' => :'Float',
79
+ :'uploaded_by' => :'CustomCostsUser'
80
+ }
81
+ end
82
+
83
+ # Initializes the object
84
+ # @param attributes [Hash] Model attributes in the form of hash
85
+ # @!visibility private
86
+ def initialize(attributes = {})
87
+ if (!attributes.is_a?(Hash))
88
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomCostsFileMetadataWithContent` initialize method"
89
+ end
90
+
91
+ # check to see if the attribute exists and convert string to symbol for hash key
92
+ attributes = attributes.each_with_object({}) { |(k, v), h|
93
+ if (!self.class.attribute_map.key?(k.to_sym))
94
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomCostsFileMetadataWithContent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
95
+ end
96
+ h[k.to_sym] = v
97
+ }
98
+
99
+ if attributes.key?(:'billed_cost')
100
+ self.billed_cost = attributes[:'billed_cost']
101
+ end
102
+
103
+ if attributes.key?(:'billing_currency')
104
+ self.billing_currency = attributes[:'billing_currency']
105
+ end
106
+
107
+ if attributes.key?(:'charge_period')
108
+ self.charge_period = attributes[:'charge_period']
109
+ end
110
+
111
+ if attributes.key?(:'content')
112
+ if (value = attributes[:'content']).is_a?(Array)
113
+ self.content = value
114
+ end
115
+ end
116
+
117
+ if attributes.key?(:'name')
118
+ self.name = attributes[:'name']
119
+ end
120
+
121
+ if attributes.key?(:'provider_names')
122
+ if (value = attributes[:'provider_names']).is_a?(Array)
123
+ self.provider_names = value
124
+ end
125
+ end
126
+
127
+ if attributes.key?(:'status')
128
+ self.status = attributes[:'status']
129
+ end
130
+
131
+ if attributes.key?(:'uploaded_at')
132
+ self.uploaded_at = attributes[:'uploaded_at']
133
+ end
134
+
135
+ if attributes.key?(:'uploaded_by')
136
+ self.uploaded_by = attributes[:'uploaded_by']
137
+ end
138
+ end
139
+
140
+ # Checks equality by comparing each attribute.
141
+ # @param o [Object] Object to be compared
142
+ # @!visibility private
143
+ def ==(o)
144
+ return true if self.equal?(o)
145
+ self.class == o.class &&
146
+ billed_cost == o.billed_cost &&
147
+ billing_currency == o.billing_currency &&
148
+ charge_period == o.charge_period &&
149
+ content == o.content &&
150
+ name == o.name &&
151
+ provider_names == o.provider_names &&
152
+ status == o.status &&
153
+ uploaded_at == o.uploaded_at &&
154
+ uploaded_by == o.uploaded_by
155
+ end
156
+
157
+ # Calculates hash code according to all attributes.
158
+ # @return [Integer] Hash code
159
+ # @!visibility private
160
+ def hash
161
+ [billed_cost, billing_currency, charge_period, content, name, provider_names, status, uploaded_at, uploaded_by].hash
162
+ end
163
+ end
164
+ 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
+ # JSON API format of for a Custom Costs file with content.
21
+ class CustomCostsFileMetadataWithContentHighLevel
22
+ include BaseGenericModel
23
+
24
+ # Schema of a cost file's metadata.
25
+ attr_accessor :attributes
26
+
27
+ # ID of the Custom Costs metadata.
28
+ attr_accessor :id
29
+
30
+ # Type of the Custom Costs file metadata.
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' => :'CustomCostsFileMetadataWithContent',
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::CustomCostsFileMetadataWithContentHighLevel` 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::CustomCostsFileMetadataWithContentHighLevel`. 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
@@ -0,0 +1,90 @@
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 for Uploaded Custom Costs files.
21
+ class CustomCostsFileUploadResponse
22
+ include BaseGenericModel
23
+
24
+ # JSON API format for a Custom Costs file.
25
+ attr_accessor :data
26
+
27
+ # Meta for the response from the Upload Custom Costs endpoints.
28
+ attr_accessor :meta
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ # @!visibility private
32
+ def self.attribute_map
33
+ {
34
+ :'data' => :'data',
35
+ :'meta' => :'meta'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ # @!visibility private
41
+ def self.openapi_types
42
+ {
43
+ :'data' => :'CustomCostsFileMetadataHighLevel',
44
+ :'meta' => :'CustomCostUploadResponseMeta'
45
+ }
46
+ end
47
+
48
+ # Initializes the object
49
+ # @param attributes [Hash] Model attributes in the form of hash
50
+ # @!visibility private
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomCostsFileUploadResponse` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomCostsFileUploadResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'data')
65
+ self.data = attributes[:'data']
66
+ end
67
+
68
+ if attributes.key?(:'meta')
69
+ self.meta = attributes[:'meta']
70
+ end
71
+ end
72
+
73
+ # Checks equality by comparing each attribute.
74
+ # @param o [Object] Object to be compared
75
+ # @!visibility private
76
+ def ==(o)
77
+ return true if self.equal?(o)
78
+ self.class == o.class &&
79
+ data == o.data &&
80
+ meta == o.meta
81
+ end
82
+
83
+ # Calculates hash code according to all attributes.
84
+ # @return [Integer] Hash code
85
+ # @!visibility private
86
+ def hash
87
+ [data, meta].hash
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,90 @@
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
+ # Usage charge period of a Custom Costs file.
21
+ class CustomCostsFileUsageChargePeriod
22
+ include BaseGenericModel
23
+
24
+ # End of the usage of the Custom Costs file.
25
+ attr_accessor :_end
26
+
27
+ # Start of the usage of the Custom Costs file.
28
+ attr_accessor :start
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ # @!visibility private
32
+ def self.attribute_map
33
+ {
34
+ :'_end' => :'end',
35
+ :'start' => :'start'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ # @!visibility private
41
+ def self.openapi_types
42
+ {
43
+ :'_end' => :'Float',
44
+ :'start' => :'Float'
45
+ }
46
+ end
47
+
48
+ # Initializes the object
49
+ # @param attributes [Hash] Model attributes in the form of hash
50
+ # @!visibility private
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomCostsFileUsageChargePeriod` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomCostsFileUsageChargePeriod`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'_end')
65
+ self._end = attributes[:'_end']
66
+ end
67
+
68
+ if attributes.key?(:'start')
69
+ self.start = attributes[:'start']
70
+ end
71
+ end
72
+
73
+ # Checks equality by comparing each attribute.
74
+ # @param o [Object] Object to be compared
75
+ # @!visibility private
76
+ def ==(o)
77
+ return true if self.equal?(o)
78
+ self.class == o.class &&
79
+ _end == o._end &&
80
+ start == o.start
81
+ end
82
+
83
+ # Calculates hash code according to all attributes.
84
+ # @return [Integer] Hash code
85
+ # @!visibility private
86
+ def hash
87
+ [_end, start].hash
88
+ end
89
+ end
90
+ 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
+ # Metadata of the user that has uploaded the Custom Costs file.
21
+ class CustomCostsUser
22
+ include BaseGenericModel
23
+
24
+ # The name of the Custom Costs file.
25
+ attr_accessor :email
26
+
27
+ # The name of the Custom Costs file.
28
+ attr_accessor :icon
29
+
30
+ # Name of the user.
31
+ attr_accessor :name
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ # @!visibility private
35
+ def self.attribute_map
36
+ {
37
+ :'email' => :'email',
38
+ :'icon' => :'icon',
39
+ :'name' => :'name'
40
+ }
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ # @!visibility private
45
+ def self.openapi_types
46
+ {
47
+ :'email' => :'String',
48
+ :'icon' => :'String',
49
+ :'name' => :'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::CustomCostsUser` 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::CustomCostsUser`. 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?(:'email')
70
+ self.email = attributes[:'email']
71
+ end
72
+
73
+ if attributes.key?(:'icon')
74
+ self.icon = attributes[:'icon']
75
+ end
76
+
77
+ if attributes.key?(:'name')
78
+ self.name = attributes[:'name']
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
+ email == o.email &&
89
+ icon == o.icon &&
90
+ name == o.name
91
+ end
92
+
93
+ # Calculates hash code according to all attributes.
94
+ # @return [Integer] Hash code
95
+ # @!visibility private
96
+ def hash
97
+ [email, icon, name].hash
98
+ end
99
+ end
100
+ end