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.
- checksums.yaml +4 -4
- data/.apigentools-info +4 -4
- data/.generator/conftest.py +2 -0
- data/.generator/schemas/v1/openapi.yaml +265 -8
- data/.generator/schemas/v2/openapi.yaml +1471 -32
- data/.generator/src/generator/openapi.py +4 -0
- data/CHANGELOG.md +41 -0
- data/examples/v1/azure-integration/CreateAzureIntegration.rb +1 -1
- data/examples/v1/azure-integration/UpdateAzureHostFilters.rb +7 -1
- data/examples/v1/azure-integration/UpdateAzureIntegration.rb +7 -1
- data/examples/v1/dashboards/CreateDashboard_985012506.rb +61 -0
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1717840259.rb +163 -0
- data/examples/v1/synthetics/CreateSyntheticsBrowserTest.rb +2 -0
- data/examples/v2/cloud-cost-management/DeleteCustomCostsFile.rb +5 -0
- data/examples/v2/cloud-cost-management/DeleteCustomCostsFile_372970393.rb +5 -0
- data/examples/v2/cloud-cost-management/GetCustomCostsFile.rb +5 -0
- data/examples/v2/cloud-cost-management/GetCustomCostsFile_1307381576.rb +5 -0
- data/examples/v2/cloud-cost-management/ListCustomCostsFiles.rb +5 -0
- data/examples/v2/cloud-cost-management/ListCustomCostsFiles_1968771127.rb +5 -0
- data/examples/v2/cloud-cost-management/UploadCustomCostsFile.rb +15 -0
- data/examples/v2/cloud-cost-management/UploadCustomCostsFile_4125168396.rb +19 -0
- data/examples/v2/network-device-monitoring/GetDevice.rb +5 -0
- data/examples/v2/network-device-monitoring/GetInterfaces.rb +5 -0
- data/examples/v2/network-device-monitoring/ListDeviceUserTags.rb +5 -0
- data/examples/v2/network-device-monitoring/ListDevices.rb +10 -0
- data/examples/v2/network-device-monitoring/UpdateDeviceUserTags.rb +18 -0
- data/examples/v2/roles/CreateRole.rb +0 -3
- data/examples/v2/security-monitoring/ConvertExistingSecurityMonitoringRule.rb +8 -0
- data/examples/v2/security-monitoring/ConvertSecurityMonitoringRuleFromJSONToTerraform.rb +36 -0
- data/examples/v2/service-scorecards/UpdateScorecardRule.rb +24 -0
- data/examples/v2/workflow-automation/CancelWorkflowInstance.rb +5 -0
- data/examples/v2/workflow-automation/CreateWorkflowInstance.rb +13 -0
- data/examples/v2/workflow-automation/GetWorkflowInstance.rb +5 -0
- data/examples/v2/workflow-automation/ListWorkflowInstances.rb +5 -0
- data/lib/datadog_api_client/configuration.rb +1 -0
- data/lib/datadog_api_client/inflector.rb +53 -1
- data/lib/datadog_api_client/v1/api/aws_logs_integration_api.rb +1 -1
- data/lib/datadog_api_client/v1/api/hosts_api.rb +1 -1
- data/lib/datadog_api_client/v1/api/monitors_api.rb +12 -1
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +7 -3
- data/lib/datadog_api_client/v1/models/azure_account.rb +14 -1
- data/lib/datadog_api_client/v1/models/azure_account_metrics_config.rb +85 -0
- data/lib/datadog_api_client/v1/models/formula_and_function_apm_dependency_stats_query_definition.rb +24 -1
- data/lib/datadog_api_client/v1/models/formula_and_function_apm_resource_stats_query_definition.rb +24 -1
- data/lib/datadog_api_client/v1/models/formula_and_function_cloud_cost_query_definition.rb +24 -1
- data/lib/datadog_api_client/v1/models/formula_and_function_event_query_definition.rb +24 -1
- data/lib/datadog_api_client/v1/models/formula_and_function_events_data_source.rb +1 -0
- data/lib/datadog_api_client/v1/models/formula_and_function_metric_query_definition.rb +24 -1
- data/lib/datadog_api_client/v1/models/formula_and_function_process_query_definition.rb +24 -1
- data/lib/datadog_api_client/v1/models/formula_and_function_slo_query_definition.rb +24 -1
- data/lib/datadog_api_client/v1/models/formula_and_function_slo_query_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +2 -0
- data/lib/datadog_api_client/v1/models/list_stream_source.rb +1 -0
- data/lib/datadog_api_client/v1/models/monitor_formula_and_function_events_data_source.rb +1 -0
- data/lib/datadog_api_client/v1/models/monitor_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +4 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +41 -1
- data/lib/datadog_api_client/v1/models/synthetics_basic_auth_digest.rb +12 -1
- data/lib/datadog_api_client/v1/models/synthetics_basic_auth_oauth_client.rb +12 -1
- data/lib/datadog_api_client/v1/models/synthetics_basic_auth_oauth_rop.rb +12 -1
- data/lib/datadog_api_client/v1/models/synthetics_delete_tests_payload.rb +12 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_options.rb +21 -1
- data/lib/datadog_api_client/v1/models/usage_billable_summary_hour.rb +21 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +61 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +81 -1
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +61 -1
- data/lib/datadog_api_client/v2/api/api_management_api.rb +5 -5
- data/lib/datadog_api_client/v2/api/authn_mappings_api.rb +6 -0
- data/lib/datadog_api_client/v2/api/case_management_api.rb +13 -13
- data/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb +260 -0
- data/lib/datadog_api_client/v2/api/network_device_monitoring_api.rb +362 -0
- data/lib/datadog_api_client/v2/api/organizations_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +15 -7
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +134 -0
- data/lib/datadog_api_client/v2/api/service_scorecards_api.rb +79 -1
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +8 -0
- data/lib/datadog_api_client/v2/api/workflow_automation_api.rb +307 -0
- data/lib/datadog_api_client/v2/models/api_key_relationships.rb +9 -1
- data/lib/datadog_api_client/v2/models/authn_mapping_resource_type.rb +27 -0
- data/lib/datadog_api_client/v2/models/cost_by_org_attributes.rb +21 -1
- data/lib/datadog_api_client/v2/models/custom_cost_get_response_meta.rb +80 -0
- data/lib/datadog_api_client/v2/models/custom_cost_list_response_meta.rb +90 -0
- data/lib/datadog_api_client/v2/models/custom_cost_upload_response_meta.rb +80 -0
- data/lib/datadog_api_client/v2/models/custom_costs_file_get_response.rb +90 -0
- data/lib/datadog_api_client/v2/models/custom_costs_file_line_item.rb +173 -0
- data/lib/datadog_api_client/v2/models/custom_costs_file_list_response.rb +92 -0
- data/lib/datadog_api_client/v2/models/custom_costs_file_metadata.rb +152 -0
- data/lib/datadog_api_client/v2/models/custom_costs_file_metadata_high_level.rb +100 -0
- data/lib/datadog_api_client/v2/models/custom_costs_file_metadata_with_content.rb +164 -0
- data/lib/datadog_api_client/v2/models/custom_costs_file_metadata_with_content_high_level.rb +100 -0
- data/lib/datadog_api_client/v2/models/custom_costs_file_upload_response.rb +90 -0
- data/lib/datadog_api_client/v2/models/custom_costs_file_usage_charge_period.rb +90 -0
- data/lib/datadog_api_client/v2/models/custom_costs_user.rb +100 -0
- data/lib/datadog_api_client/v2/models/device_attributes.rb +272 -0
- data/lib/datadog_api_client/v2/models/device_attributes_interface_statuses.rb +110 -0
- data/lib/datadog_api_client/v2/models/devices_list_data.rb +100 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +2 -2
- data/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb +2 -2
- data/lib/datadog_api_client/v2/models/full_application_key_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/get_device_attributes.rb +262 -0
- data/lib/datadog_api_client/v2/models/get_device_data.rb +100 -0
- data/lib/datadog_api_client/v2/models/get_device_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/get_interfaces_data.rb +100 -0
- data/lib/datadog_api_client/v2/models/get_interfaces_response.rb +82 -0
- data/lib/datadog_api_client/v2/models/hourly_usage_attributes.rb +21 -1
- data/lib/datadog_api_client/v2/models/interface_attributes.rb +130 -0
- data/lib/datadog_api_client/v2/models/interface_attributes_status.rb +29 -0
- data/lib/datadog_api_client/v2/models/list_devices_response.rb +92 -0
- data/lib/datadog_api_client/v2/models/list_devices_response_metadata.rb +80 -0
- data/lib/datadog_api_client/v2/models/list_devices_response_metadata_page.rb +80 -0
- data/lib/datadog_api_client/v2/models/list_tags_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/list_tags_response_data.rb +100 -0
- data/lib/datadog_api_client/v2/models/list_tags_response_data_attributes.rb +82 -0
- data/lib/datadog_api_client/v2/models/projected_cost_attributes.rb +21 -1
- data/lib/datadog_api_client/v2/models/role_relationships.rb +4 -14
- data/lib/datadog_api_client/v2/models/role_update_attributes.rb +32 -4
- data/lib/datadog_api_client/v2/models/rum_application_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/rum_application_create_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/rum_application_list_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/rum_application_update_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_convert_payload.rb +63 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_convert_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_detection_method.rb +1 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_evaluation_window.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_keep_alive.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb +2 -2
- data/lib/datadog_api_client/v2/models/update_rule_request.rb +80 -0
- data/lib/datadog_api_client/v2/models/update_rule_request_data.rb +90 -0
- data/lib/datadog_api_client/v2/models/update_rule_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/update_rule_response_data.rb +110 -0
- data/lib/datadog_api_client/v2/models/user_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/workflow_instance_create_meta.rb +80 -0
- data/lib/datadog_api_client/v2/models/workflow_instance_create_request.rb +80 -0
- data/lib/datadog_api_client/v2/models/workflow_instance_create_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/workflow_instance_create_response_data.rb +80 -0
- data/lib/datadog_api_client/v2/models/workflow_instance_list_item.rb +80 -0
- data/lib/datadog_api_client/v2/models/workflow_list_instances_response.rb +92 -0
- data/lib/datadog_api_client/v2/models/workflow_list_instances_response_meta.rb +80 -0
- data/lib/datadog_api_client/v2/models/workflow_list_instances_response_meta_page.rb +80 -0
- data/lib/datadog_api_client/v2/models/worklflow_cancel_instance_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/worklflow_cancel_instance_response_data.rb +80 -0
- data/lib/datadog_api_client/v2/models/worklflow_get_instance_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/worklflow_get_instance_response_data.rb +80 -0
- data/lib/datadog_api_client/v2/models/worklflow_get_instance_response_data_attributes.rb +80 -0
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +76 -2
@@ -0,0 +1,80 @@
|
|
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
|
+
# Meta for the response from the Upload Custom Costs endpoints.
|
21
|
+
class CustomCostUploadResponseMeta
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Version of Custom Costs file
|
25
|
+
attr_accessor :version
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
# @!visibility private
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'version' => :'version'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Attribute type mapping.
|
36
|
+
# @!visibility private
|
37
|
+
def self.openapi_types
|
38
|
+
{
|
39
|
+
:'version' => :'String'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# Initializes the object
|
44
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
45
|
+
# @!visibility private
|
46
|
+
def initialize(attributes = {})
|
47
|
+
if (!attributes.is_a?(Hash))
|
48
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomCostUploadResponseMeta` initialize method"
|
49
|
+
end
|
50
|
+
|
51
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
52
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
53
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
54
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomCostUploadResponseMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
55
|
+
end
|
56
|
+
h[k.to_sym] = v
|
57
|
+
}
|
58
|
+
|
59
|
+
if attributes.key?(:'version')
|
60
|
+
self.version = attributes[:'version']
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
# Checks equality by comparing each attribute.
|
65
|
+
# @param o [Object] Object to be compared
|
66
|
+
# @!visibility private
|
67
|
+
def ==(o)
|
68
|
+
return true if self.equal?(o)
|
69
|
+
self.class == o.class &&
|
70
|
+
version == o.version
|
71
|
+
end
|
72
|
+
|
73
|
+
# Calculates hash code according to all attributes.
|
74
|
+
# @return [Integer] Hash code
|
75
|
+
# @!visibility private
|
76
|
+
def hash
|
77
|
+
[version].hash
|
78
|
+
end
|
79
|
+
end
|
80
|
+
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 Get Custom Costs files.
|
21
|
+
class CustomCostsFileGetResponse
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# JSON API format of for a Custom Costs file with content.
|
25
|
+
attr_accessor :data
|
26
|
+
|
27
|
+
# Meta for the response from the Get 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' => :'CustomCostsFileMetadataWithContentHighLevel',
|
44
|
+
:'meta' => :'CustomCostGetResponseMeta'
|
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::CustomCostsFileGetResponse` 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::CustomCostsFileGetResponse`. 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,173 @@
|
|
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
|
+
# Line item details from a Custom Costs file.
|
21
|
+
class CustomCostsFileLineItem
|
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
|
+
# Description for the line item cost.
|
31
|
+
attr_accessor :charge_description
|
32
|
+
|
33
|
+
# End date of the usage charge.
|
34
|
+
attr_reader :charge_period_end
|
35
|
+
|
36
|
+
# Start date of the usage charge.
|
37
|
+
attr_reader :charge_period_start
|
38
|
+
|
39
|
+
# Name of the provider for the line item.
|
40
|
+
attr_accessor :provider_name
|
41
|
+
|
42
|
+
# Additional tags for the line item.
|
43
|
+
attr_accessor :tags
|
44
|
+
|
45
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
46
|
+
# @!visibility private
|
47
|
+
def self.attribute_map
|
48
|
+
{
|
49
|
+
:'billed_cost' => :'BilledCost',
|
50
|
+
:'billing_currency' => :'BillingCurrency',
|
51
|
+
:'charge_description' => :'ChargeDescription',
|
52
|
+
:'charge_period_end' => :'ChargePeriodEnd',
|
53
|
+
:'charge_period_start' => :'ChargePeriodStart',
|
54
|
+
:'provider_name' => :'ProviderName',
|
55
|
+
:'tags' => :'Tags'
|
56
|
+
}
|
57
|
+
end
|
58
|
+
|
59
|
+
# Attribute type mapping.
|
60
|
+
# @!visibility private
|
61
|
+
def self.openapi_types
|
62
|
+
{
|
63
|
+
:'billed_cost' => :'Float',
|
64
|
+
:'billing_currency' => :'String',
|
65
|
+
:'charge_description' => :'String',
|
66
|
+
:'charge_period_end' => :'String',
|
67
|
+
:'charge_period_start' => :'String',
|
68
|
+
:'provider_name' => :'String',
|
69
|
+
:'tags' => :'Hash<String, String>'
|
70
|
+
}
|
71
|
+
end
|
72
|
+
|
73
|
+
# Initializes the object
|
74
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
75
|
+
# @!visibility private
|
76
|
+
def initialize(attributes = {})
|
77
|
+
if (!attributes.is_a?(Hash))
|
78
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomCostsFileLineItem` initialize method"
|
79
|
+
end
|
80
|
+
|
81
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
82
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
83
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
84
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomCostsFileLineItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
85
|
+
end
|
86
|
+
h[k.to_sym] = v
|
87
|
+
}
|
88
|
+
|
89
|
+
if attributes.key?(:'billed_cost')
|
90
|
+
self.billed_cost = attributes[:'billed_cost']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.key?(:'billing_currency')
|
94
|
+
self.billing_currency = attributes[:'billing_currency']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.key?(:'charge_description')
|
98
|
+
self.charge_description = attributes[:'charge_description']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.key?(:'charge_period_end')
|
102
|
+
self.charge_period_end = attributes[:'charge_period_end']
|
103
|
+
end
|
104
|
+
|
105
|
+
if attributes.key?(:'charge_period_start')
|
106
|
+
self.charge_period_start = attributes[:'charge_period_start']
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.key?(:'provider_name')
|
110
|
+
self.provider_name = attributes[:'provider_name']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.key?(:'tags')
|
114
|
+
self.tags = attributes[:'tags']
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
# Check to see if the all the properties in the model are valid
|
119
|
+
# @return true if the model is valid
|
120
|
+
# @!visibility private
|
121
|
+
def valid?
|
122
|
+
pattern = Regexp.new(/^\d{4}-\d{2}-\d{2}$/)
|
123
|
+
return false if !@charge_period_end.nil? && @charge_period_end !~ pattern
|
124
|
+
pattern = Regexp.new(/^\d{4}-\d{2}-\d{2}$/)
|
125
|
+
return false if !@charge_period_start.nil? && @charge_period_start !~ pattern
|
126
|
+
true
|
127
|
+
end
|
128
|
+
|
129
|
+
# Custom attribute writer method with validation
|
130
|
+
# @param charge_period_end [Object] Object to be assigned
|
131
|
+
# @!visibility private
|
132
|
+
def charge_period_end=(charge_period_end)
|
133
|
+
pattern = Regexp.new(/^\d{4}-\d{2}-\d{2}$/)
|
134
|
+
if !charge_period_end.nil? && charge_period_end !~ pattern
|
135
|
+
fail ArgumentError, "invalid value for \"charge_period_end\", must conform to the pattern #{pattern}."
|
136
|
+
end
|
137
|
+
@charge_period_end = charge_period_end
|
138
|
+
end
|
139
|
+
|
140
|
+
# Custom attribute writer method with validation
|
141
|
+
# @param charge_period_start [Object] Object to be assigned
|
142
|
+
# @!visibility private
|
143
|
+
def charge_period_start=(charge_period_start)
|
144
|
+
pattern = Regexp.new(/^\d{4}-\d{2}-\d{2}$/)
|
145
|
+
if !charge_period_start.nil? && charge_period_start !~ pattern
|
146
|
+
fail ArgumentError, "invalid value for \"charge_period_start\", must conform to the pattern #{pattern}."
|
147
|
+
end
|
148
|
+
@charge_period_start = charge_period_start
|
149
|
+
end
|
150
|
+
|
151
|
+
# Checks equality by comparing each attribute.
|
152
|
+
# @param o [Object] Object to be compared
|
153
|
+
# @!visibility private
|
154
|
+
def ==(o)
|
155
|
+
return true if self.equal?(o)
|
156
|
+
self.class == o.class &&
|
157
|
+
billed_cost == o.billed_cost &&
|
158
|
+
billing_currency == o.billing_currency &&
|
159
|
+
charge_description == o.charge_description &&
|
160
|
+
charge_period_end == o.charge_period_end &&
|
161
|
+
charge_period_start == o.charge_period_start &&
|
162
|
+
provider_name == o.provider_name &&
|
163
|
+
tags == o.tags
|
164
|
+
end
|
165
|
+
|
166
|
+
# Calculates hash code according to all attributes.
|
167
|
+
# @return [Integer] Hash code
|
168
|
+
# @!visibility private
|
169
|
+
def hash
|
170
|
+
[billed_cost, billing_currency, charge_description, charge_period_end, charge_period_start, provider_name, tags].hash
|
171
|
+
end
|
172
|
+
end
|
173
|
+
end
|
@@ -0,0 +1,92 @@
|
|
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 List Custom Costs files.
|
21
|
+
class CustomCostsFileListResponse
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# List of Custom Costs files.
|
25
|
+
attr_accessor :data
|
26
|
+
|
27
|
+
# Meta for the response from the List 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' => :'Array<CustomCostsFileMetadataHighLevel>',
|
44
|
+
:'meta' => :'CustomCostListResponseMeta'
|
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::CustomCostsFileListResponse` 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::CustomCostsFileListResponse`. 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
|
+
if (value = attributes[:'data']).is_a?(Array)
|
66
|
+
self.data = value
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.key?(:'meta')
|
71
|
+
self.meta = attributes[:'meta']
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# Checks equality by comparing each attribute.
|
76
|
+
# @param o [Object] Object to be compared
|
77
|
+
# @!visibility private
|
78
|
+
def ==(o)
|
79
|
+
return true if self.equal?(o)
|
80
|
+
self.class == o.class &&
|
81
|
+
data == o.data &&
|
82
|
+
meta == o.meta
|
83
|
+
end
|
84
|
+
|
85
|
+
# Calculates hash code according to all attributes.
|
86
|
+
# @return [Integer] Hash code
|
87
|
+
# @!visibility private
|
88
|
+
def hash
|
89
|
+
[data, meta].hash
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
@@ -0,0 +1,152 @@
|
|
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 Custom Costs metadata.
|
21
|
+
class CustomCostsFileMetadata
|
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
|
+
# Name of the Custom Costs file.
|
34
|
+
attr_accessor :name
|
35
|
+
|
36
|
+
# Providers contained in the Custom Costs file.
|
37
|
+
attr_accessor :provider_names
|
38
|
+
|
39
|
+
# Status of the Custom Costs file.
|
40
|
+
attr_accessor :status
|
41
|
+
|
42
|
+
# Timestamp, in millisecond, of the upload time of the Custom Costs file.
|
43
|
+
attr_accessor :uploaded_at
|
44
|
+
|
45
|
+
# Metadata of the user that has uploaded the Custom Costs file.
|
46
|
+
attr_accessor :uploaded_by
|
47
|
+
|
48
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
49
|
+
# @!visibility private
|
50
|
+
def self.attribute_map
|
51
|
+
{
|
52
|
+
:'billed_cost' => :'billed_cost',
|
53
|
+
:'billing_currency' => :'billing_currency',
|
54
|
+
:'charge_period' => :'charge_period',
|
55
|
+
:'name' => :'name',
|
56
|
+
:'provider_names' => :'provider_names',
|
57
|
+
:'status' => :'status',
|
58
|
+
:'uploaded_at' => :'uploaded_at',
|
59
|
+
:'uploaded_by' => :'uploaded_by'
|
60
|
+
}
|
61
|
+
end
|
62
|
+
|
63
|
+
# Attribute type mapping.
|
64
|
+
# @!visibility private
|
65
|
+
def self.openapi_types
|
66
|
+
{
|
67
|
+
:'billed_cost' => :'Float',
|
68
|
+
:'billing_currency' => :'String',
|
69
|
+
:'charge_period' => :'CustomCostsFileUsageChargePeriod',
|
70
|
+
:'name' => :'String',
|
71
|
+
:'provider_names' => :'Array<String>',
|
72
|
+
:'status' => :'String',
|
73
|
+
:'uploaded_at' => :'Float',
|
74
|
+
:'uploaded_by' => :'CustomCostsUser'
|
75
|
+
}
|
76
|
+
end
|
77
|
+
|
78
|
+
# Initializes the object
|
79
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
80
|
+
# @!visibility private
|
81
|
+
def initialize(attributes = {})
|
82
|
+
if (!attributes.is_a?(Hash))
|
83
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomCostsFileMetadata` initialize method"
|
84
|
+
end
|
85
|
+
|
86
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
87
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
88
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
89
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CustomCostsFileMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
90
|
+
end
|
91
|
+
h[k.to_sym] = v
|
92
|
+
}
|
93
|
+
|
94
|
+
if attributes.key?(:'billed_cost')
|
95
|
+
self.billed_cost = attributes[:'billed_cost']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes.key?(:'billing_currency')
|
99
|
+
self.billing_currency = attributes[:'billing_currency']
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes.key?(:'charge_period')
|
103
|
+
self.charge_period = attributes[:'charge_period']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.key?(:'name')
|
107
|
+
self.name = attributes[:'name']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes.key?(:'provider_names')
|
111
|
+
if (value = attributes[:'provider_names']).is_a?(Array)
|
112
|
+
self.provider_names = value
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
if attributes.key?(:'status')
|
117
|
+
self.status = attributes[:'status']
|
118
|
+
end
|
119
|
+
|
120
|
+
if attributes.key?(:'uploaded_at')
|
121
|
+
self.uploaded_at = attributes[:'uploaded_at']
|
122
|
+
end
|
123
|
+
|
124
|
+
if attributes.key?(:'uploaded_by')
|
125
|
+
self.uploaded_by = attributes[:'uploaded_by']
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
# Checks equality by comparing each attribute.
|
130
|
+
# @param o [Object] Object to be compared
|
131
|
+
# @!visibility private
|
132
|
+
def ==(o)
|
133
|
+
return true if self.equal?(o)
|
134
|
+
self.class == o.class &&
|
135
|
+
billed_cost == o.billed_cost &&
|
136
|
+
billing_currency == o.billing_currency &&
|
137
|
+
charge_period == o.charge_period &&
|
138
|
+
name == o.name &&
|
139
|
+
provider_names == o.provider_names &&
|
140
|
+
status == o.status &&
|
141
|
+
uploaded_at == o.uploaded_at &&
|
142
|
+
uploaded_by == o.uploaded_by
|
143
|
+
end
|
144
|
+
|
145
|
+
# Calculates hash code according to all attributes.
|
146
|
+
# @return [Integer] Hash code
|
147
|
+
# @!visibility private
|
148
|
+
def hash
|
149
|
+
[billed_cost, billing_currency, charge_period, name, provider_names, status, uploaded_at, uploaded_by].hash
|
150
|
+
end
|
151
|
+
end
|
152
|
+
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 for a Custom Costs file.
|
21
|
+
class CustomCostsFileMetadataHighLevel
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Schema of a Custom Costs 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' => :'CustomCostsFileMetadata',
|
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::CustomCostsFileMetadataHighLevel` 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::CustomCostsFileMetadataHighLevel`. 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
|