datadog_api_client 1.9.0 → 1.10.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/schemas/v1/openapi.yaml +489 -124
- data/.generator/schemas/v2/openapi.yaml +701 -28
- data/.generator/src/generator/formatter.py +6 -1
- data/.generator/src/generator/openapi.py +5 -5
- data/.generator/src/generator/templates/api_client.j2 +1 -4
- data/.generator/src/generator/templates/model_generic.j2 +42 -3
- data/.github/workflows/prepare_release.yml +15 -3
- data/CHANGELOG.md +32 -0
- data/Makefile +1 -1
- data/README.md +16 -0
- data/check-examples.sh +0 -2
- data/examples/v1/aws-integration/UpdateAWSAccount.rb +8 -4
- data/examples/v1/downtimes/CreateDowntime_2908359488.rb +1 -0
- data/examples/v1/downtimes/CreateDowntime_3059354445.rb +1 -0
- data/examples/v1/downtimes/UpdateDowntime.rb +1 -0
- data/examples/v1/monitors/CreateMonitor_1969035628.rb +52 -0
- data/examples/v1/monitors/CreateMonitor_2520912138.rb +22 -0
- data/examples/v1/security-monitoring/AddSecurityMonitoringSignalToIncident.rb +9 -0
- data/examples/v1/security-monitoring/EditSecurityMonitoringSignalAssignee.rb +9 -0
- data/examples/v1/security-monitoring/EditSecurityMonitoringSignalState.rb +10 -0
- data/examples/v1/service-level-objective-corrections/CreateSLOCorrection.rb +0 -3
- data/examples/v1/service-level-objective-corrections/CreateSLOCorrection_1326388368.rb +0 -3
- data/examples/v1/service-level-objective-corrections/DeleteSLOCorrection.rb +0 -3
- data/examples/v1/service-level-objective-corrections/GetSLOCorrection.rb +0 -3
- data/examples/v1/service-level-objective-corrections/ListSLOCorrection.rb +0 -3
- data/examples/v1/service-level-objective-corrections/UpdateSLOCorrection.rb +0 -3
- data/examples/v1/service-level-objectives/GetSLOCorrections.rb +0 -3
- data/examples/v1/synthetics/CreateSyntheticsAPITest.rb +5 -0
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1402674167.rb +44 -0
- data/examples/v1/synthetics/CreateSyntheticsBrowserTest_2932742688.rb +64 -0
- data/examples/v1/synthetics/UpdateBrowserTest.rb +5 -0
- data/examples/v1/usage-metering/GetHourlyUsageAttribution.rb +1 -1
- data/examples/v1/usage-metering/GetMonthlyUsageAttribution.rb +1 -1
- data/examples/v1/usage-metering/{GetMonthlyUsageAttribution_3738504447.rb → GetMonthlyUsageAttribution_3849653599.rb} +1 -1
- data/examples/v1/usage-metering/GetUsageAttribution.rb +1 -1
- data/examples/v1/usage-metering/GetUsageRumSessions_3271366243.rb +9 -0
- data/examples/v2/logs/SubmitLog.rb +1 -0
- data/examples/v2/logs-archives/CreateLogsArchive.rb +1 -0
- data/examples/v2/logs-archives/UpdateLogsArchive.rb +1 -0
- data/examples/v2/metrics/EstimateMetricsOutputSeries.rb +9 -0
- data/examples/v2/metrics/SubmitMetrics.rb +20 -0
- data/examples/v2/security-monitoring/UpdateSecurityMonitoringRule.rb +1 -0
- data/examples/v2/usage-metering/GetCostByOrg.rb +5 -0
- data/examples/v2/usage-metering/GetUsageApplicationSecurityMonitoring.rb +8 -0
- data/examples/v2/usage-metering/GetUsageLambdaTracedInvocations.rb +8 -0
- data/lib/datadog_api_client/v1/api/metrics_api.rb +1 -1
- data/lib/datadog_api_client/v1/api/monitors_api.rb +69 -56
- data/lib/datadog_api_client/v1/api/security_monitoring_api.rb +266 -0
- data/lib/datadog_api_client/v1/api/service_level_objective_corrections_api.rb +1 -1
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +10 -10
- data/lib/datadog_api_client/v1/api_client.rb +1 -4
- data/lib/datadog_api_client/v1/configuration.rb +0 -6
- data/lib/datadog_api_client/v1/models/add_signal_to_incident_request.rb +142 -0
- data/lib/datadog_api_client/v1/models/downtime.rb +11 -1
- data/lib/datadog_api_client/v1/models/downtime_child.rb +11 -1
- data/lib/datadog_api_client/v1/models/event.rb +1 -1
- data/lib/datadog_api_client/v1/models/http_log_item.rb +29 -4
- data/lib/datadog_api_client/v1/models/logs_category_processor.rb +1 -1
- data/lib/datadog_api_client/v1/models/logs_list_request.rb +1 -1
- data/lib/datadog_api_client/v1/models/logs_sort.rb +1 -1
- 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_group_search_response_counts.rb +2 -2
- data/lib/datadog_api_client/v1/models/{monitor_search_response_counts_tag_item.rb → monitor_search_count_item.rb} +3 -3
- data/lib/datadog_api_client/v1/models/monitor_search_response_counts.rb +4 -4
- data/lib/datadog_api_client/v1/models/monitor_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_response.rb +1 -1
- data/lib/datadog_api_client/v1/models/notebook_cell_create_request.rb +146 -0
- data/lib/datadog_api_client/v1/models/notebook_cell_create_request_attributes.rb +68 -0
- data/lib/datadog_api_client/v1/models/series.rb +2 -2
- data/lib/datadog_api_client/v1/models/signal_archive_reason.rb +29 -0
- data/lib/datadog_api_client/v1/models/signal_assignee_update_request.rb +132 -0
- data/lib/datadog_api_client/v1/models/signal_state_update_request.rb +152 -0
- data/lib/datadog_api_client/v1/models/signal_triage_state.rb +28 -0
- data/lib/datadog_api_client/v1/models/slo_correction_create_request_attributes.rb +1 -1
- data/lib/datadog_api_client/v1/models/slo_correction_response_attributes.rb +4 -4
- data/lib/datadog_api_client/v1/models/slo_correction_update_request_attributes.rb +1 -1
- data/lib/datadog_api_client/v1/models/{monitor_search_response_counts_status_item.rb → successful_signal_update_response.rb} +12 -22
- data/lib/datadog_api_client/v1/models/synthetics_api_test.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_assertion_type.rb +2 -0
- data/lib/datadog_api_client/v1/models/synthetics_browser_test_rum_settings.rb +152 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_details.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_details_sub_type.rb +2 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_options.rb +21 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +21 -1
- data/lib/datadog_api_client/v1/models/usage_attribution_response.rb +1 -1
- data/lib/datadog_api_client/v1/models/usage_rum_sessions_hour.rb +18 -4
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +11 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +11 -1
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +11 -1
- data/lib/datadog_api_client/v1.rb +11 -6
- data/lib/datadog_api_client/v2/api/authn_mappings_api.rb +0 -2
- data/lib/datadog_api_client/v2/api/metrics_api.rb +173 -0
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +228 -0
- data/lib/datadog_api_client/v2/api_client.rb +1 -4
- data/lib/datadog_api_client/v2/models/authn_mapping.rb +1 -13
- data/lib/datadog_api_client/v2/models/authn_mapping_attributes.rb +1 -12
- data/lib/datadog_api_client/v2/models/authn_mapping_response.rb +16 -4
- data/lib/datadog_api_client/v2/models/authn_mappings_response.rb +13 -1
- data/lib/datadog_api_client/v2/models/chargeback_breakdown.rb +131 -0
- data/lib/datadog_api_client/v2/models/cost_by_org.rb +133 -0
- data/lib/datadog_api_client/v2/models/cost_by_org_attributes.rb +153 -0
- data/lib/datadog_api_client/v2/models/cost_by_org_response.rb +113 -0
- data/lib/datadog_api_client/v2/models/cost_by_org_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/hourly_usage_type.rb +2 -0
- data/lib/datadog_api_client/v2/models/http_log_item.rb +40 -4
- data/lib/datadog_api_client/v2/models/intake_payload_accepted.rb +111 -0
- data/lib/datadog_api_client/v2/models/logs_archive_attributes.rb +12 -1
- data/lib/datadog_api_client/v2/models/logs_archive_create_request_attributes.rb +12 -1
- data/lib/datadog_api_client/v2/models/metric_content_encoding.rb +26 -0
- data/lib/datadog_api_client/v2/models/metric_estimate.rb +133 -0
- data/lib/datadog_api_client/v2/models/metric_estimate_attributes.rb +133 -0
- data/lib/datadog_api_client/v2/models/metric_estimate_resource_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/metric_estimate_response.rb +111 -0
- data/lib/datadog_api_client/v2/models/metric_estimate_type.rb +28 -0
- data/lib/datadog_api_client/v2/models/metric_intake_type.rb +30 -0
- data/lib/datadog_api_client/v2/models/metric_metadata.rb +111 -0
- data/lib/datadog_api_client/v2/models/metric_origin.rb +170 -0
- data/lib/datadog_api_client/{v1/models/monitor_group_search_response_counts_type_item.rb → v2/models/metric_payload.rb} +27 -24
- data/lib/datadog_api_client/v2/models/metric_point.rb +122 -0
- data/lib/datadog_api_client/{v1/models/monitor_search_response_counts_type_item.rb → v2/models/metric_resource.rb} +21 -21
- data/lib/datadog_api_client/v2/models/metric_series.rb +220 -0
- data/lib/datadog_api_client/v2/models/relationship_to_saml_assertion_attribute_data.rb +1 -5
- data/lib/datadog_api_client/v2/models/saml_assertion_attribute.rb +1 -5
- 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_hardcoded_evaluator_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb +11 -1
- data/lib/datadog_api_client/{v1/models/monitor_group_search_response_counts_status_item.rb → v2/models/usage_application_security_monitoring_response.rb} +16 -24
- data/lib/datadog_api_client/{v1/models/monitor_search_response_counts_muted_item.rb → v2/models/usage_lambda_traced_invocations_response.rb} +16 -24
- data/lib/datadog_api_client/v2.rb +22 -0
- data/lib/datadog_api_client/version.rb +1 -1
- data/spec/v1/api_client_spec.rb +3 -3
- data/spec/v2/api_client_spec.rb +3 -3
- metadata +49 -11
- data/extract-code-blocks.awk +0 -81
- data/extract-code-blocks.sh +0 -3
@@ -66,7 +66,7 @@ module DatadogAPIClient::V2
|
|
66
66
|
:'attribute_value' => :'String',
|
67
67
|
:'created_at' => :'Time',
|
68
68
|
:'modified_at' => :'Time',
|
69
|
-
:'saml_assertion_attribute_id' => :'
|
69
|
+
:'saml_assertion_attribute_id' => :'String'
|
70
70
|
}
|
71
71
|
end
|
72
72
|
|
@@ -118,20 +118,9 @@ module DatadogAPIClient::V2
|
|
118
118
|
# @return true if the model is valid
|
119
119
|
# @!visibility private
|
120
120
|
def valid?
|
121
|
-
return false if !@saml_assertion_attribute_id.nil? && @saml_assertion_attribute_id > 2147483647
|
122
121
|
true
|
123
122
|
end
|
124
123
|
|
125
|
-
# Custom attribute writer method with validation
|
126
|
-
# @param saml_assertion_attribute_id [Object] Object to be assigned
|
127
|
-
# @!visibility private
|
128
|
-
def saml_assertion_attribute_id=(saml_assertion_attribute_id)
|
129
|
-
if !saml_assertion_attribute_id.nil? && saml_assertion_attribute_id > 2147483647
|
130
|
-
fail ArgumentError, 'invalid value for "saml_assertion_attribute_id", must be smaller than or equal to 2147483647.'
|
131
|
-
end
|
132
|
-
@saml_assertion_attribute_id = saml_assertion_attribute_id
|
133
|
-
end
|
134
|
-
|
135
124
|
# Checks equality by comparing each attribute.
|
136
125
|
# @param o [Object] Object to be compared
|
137
126
|
# @!visibility private
|
@@ -28,11 +28,15 @@ module DatadogAPIClient::V2
|
|
28
28
|
# The AuthN Mapping object returned by API.
|
29
29
|
attr_accessor :data
|
30
30
|
|
31
|
+
# Included data in the AuthN Mapping response.
|
32
|
+
attr_accessor :included
|
33
|
+
|
31
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
32
35
|
# @!visibility private
|
33
36
|
def self.attribute_map
|
34
37
|
{
|
35
|
-
:'data' => :'data'
|
38
|
+
:'data' => :'data',
|
39
|
+
:'included' => :'included'
|
36
40
|
}
|
37
41
|
end
|
38
42
|
|
@@ -46,7 +50,8 @@ module DatadogAPIClient::V2
|
|
46
50
|
# @!visibility private
|
47
51
|
def self.openapi_types
|
48
52
|
{
|
49
|
-
:'data' => :'AuthNMapping'
|
53
|
+
:'data' => :'AuthNMapping',
|
54
|
+
:'included' => :'Array<AuthNMappingIncluded>'
|
50
55
|
}
|
51
56
|
end
|
52
57
|
|
@@ -76,6 +81,12 @@ module DatadogAPIClient::V2
|
|
76
81
|
if attributes.key?(:'data')
|
77
82
|
self.data = attributes[:'data']
|
78
83
|
end
|
84
|
+
|
85
|
+
if attributes.key?(:'included')
|
86
|
+
if (value = attributes[:'included']).is_a?(Array)
|
87
|
+
self.included = value
|
88
|
+
end
|
89
|
+
end
|
79
90
|
end
|
80
91
|
|
81
92
|
# Check to see if the all the properties in the model are valid
|
@@ -91,7 +102,8 @@ module DatadogAPIClient::V2
|
|
91
102
|
def ==(o)
|
92
103
|
return true if self.equal?(o)
|
93
104
|
self.class == o.class &&
|
94
|
-
data == o.data
|
105
|
+
data == o.data &&
|
106
|
+
included == o.included
|
95
107
|
end
|
96
108
|
|
97
109
|
# @see the `==` method
|
@@ -105,7 +117,7 @@ module DatadogAPIClient::V2
|
|
105
117
|
# @return [Integer] Hash code
|
106
118
|
# @!visibility private
|
107
119
|
def hash
|
108
|
-
[data].hash
|
120
|
+
[data, included].hash
|
109
121
|
end
|
110
122
|
end
|
111
123
|
end
|
@@ -28,6 +28,9 @@ module DatadogAPIClient::V2
|
|
28
28
|
# Array of returned AuthN Mappings.
|
29
29
|
attr_accessor :data
|
30
30
|
|
31
|
+
# Included data in the AuthN Mapping response.
|
32
|
+
attr_accessor :included
|
33
|
+
|
31
34
|
# Object describing meta attributes of response.
|
32
35
|
attr_accessor :meta
|
33
36
|
|
@@ -36,6 +39,7 @@ module DatadogAPIClient::V2
|
|
36
39
|
def self.attribute_map
|
37
40
|
{
|
38
41
|
:'data' => :'data',
|
42
|
+
:'included' => :'included',
|
39
43
|
:'meta' => :'meta'
|
40
44
|
}
|
41
45
|
end
|
@@ -51,6 +55,7 @@ module DatadogAPIClient::V2
|
|
51
55
|
def self.openapi_types
|
52
56
|
{
|
53
57
|
:'data' => :'Array<AuthNMapping>',
|
58
|
+
:'included' => :'Array<AuthNMappingIncluded>',
|
54
59
|
:'meta' => :'ResponseMetaAttributes'
|
55
60
|
}
|
56
61
|
end
|
@@ -84,6 +89,12 @@ module DatadogAPIClient::V2
|
|
84
89
|
end
|
85
90
|
end
|
86
91
|
|
92
|
+
if attributes.key?(:'included')
|
93
|
+
if (value = attributes[:'included']).is_a?(Array)
|
94
|
+
self.included = value
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
87
98
|
if attributes.key?(:'meta')
|
88
99
|
self.meta = attributes[:'meta']
|
89
100
|
end
|
@@ -103,6 +114,7 @@ module DatadogAPIClient::V2
|
|
103
114
|
return true if self.equal?(o)
|
104
115
|
self.class == o.class &&
|
105
116
|
data == o.data &&
|
117
|
+
included == o.included &&
|
106
118
|
meta == o.meta
|
107
119
|
end
|
108
120
|
|
@@ -117,7 +129,7 @@ module DatadogAPIClient::V2
|
|
117
129
|
# @return [Integer] Hash code
|
118
130
|
# @!visibility private
|
119
131
|
def hash
|
120
|
-
[data, meta].hash
|
132
|
+
[data, included, meta].hash
|
121
133
|
end
|
122
134
|
end
|
123
135
|
end
|
@@ -0,0 +1,131 @@
|
|
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
|
+
# Charges breakdown.
|
21
|
+
class ChargebackBreakdown
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Whether the object has unparsed attributes
|
25
|
+
# @!visibility private
|
26
|
+
attr_accessor :_unparsed
|
27
|
+
|
28
|
+
# The type of charge for a particular product.
|
29
|
+
attr_accessor :charge_type
|
30
|
+
|
31
|
+
# The cost for a particular product and charge type during a given month.
|
32
|
+
attr_accessor :cost
|
33
|
+
|
34
|
+
# The product for which cost is being reported.
|
35
|
+
attr_accessor :product_name
|
36
|
+
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
38
|
+
# @!visibility private
|
39
|
+
def self.attribute_map
|
40
|
+
{
|
41
|
+
:'charge_type' => :'charge_type',
|
42
|
+
:'cost' => :'cost',
|
43
|
+
:'product_name' => :'product_name'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# Returns all the JSON keys this model knows about
|
48
|
+
# @!visibility private
|
49
|
+
def self.acceptable_attributes
|
50
|
+
attribute_map.values
|
51
|
+
end
|
52
|
+
|
53
|
+
# Attribute type mapping.
|
54
|
+
# @!visibility private
|
55
|
+
def self.openapi_types
|
56
|
+
{
|
57
|
+
:'charge_type' => :'String',
|
58
|
+
:'cost' => :'Float',
|
59
|
+
:'product_name' => :'String'
|
60
|
+
}
|
61
|
+
end
|
62
|
+
|
63
|
+
# List of attributes with nullable: true
|
64
|
+
# @!visibility private
|
65
|
+
def self.openapi_nullable
|
66
|
+
Set.new([
|
67
|
+
])
|
68
|
+
end
|
69
|
+
|
70
|
+
# Initializes the object
|
71
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
72
|
+
# @!visibility private
|
73
|
+
def initialize(attributes = {})
|
74
|
+
if (!attributes.is_a?(Hash))
|
75
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ChargebackBreakdown` initialize method"
|
76
|
+
end
|
77
|
+
|
78
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
79
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
80
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
81
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ChargebackBreakdown`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
82
|
+
end
|
83
|
+
h[k.to_sym] = v
|
84
|
+
}
|
85
|
+
|
86
|
+
if attributes.key?(:'charge_type')
|
87
|
+
self.charge_type = attributes[:'charge_type']
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes.key?(:'cost')
|
91
|
+
self.cost = attributes[:'cost']
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes.key?(:'product_name')
|
95
|
+
self.product_name = attributes[:'product_name']
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
# Check to see if the all the properties in the model are valid
|
100
|
+
# @return true if the model is valid
|
101
|
+
# @!visibility private
|
102
|
+
def valid?
|
103
|
+
true
|
104
|
+
end
|
105
|
+
|
106
|
+
# Checks equality by comparing each attribute.
|
107
|
+
# @param o [Object] Object to be compared
|
108
|
+
# @!visibility private
|
109
|
+
def ==(o)
|
110
|
+
return true if self.equal?(o)
|
111
|
+
self.class == o.class &&
|
112
|
+
charge_type == o.charge_type &&
|
113
|
+
cost == o.cost &&
|
114
|
+
product_name == o.product_name
|
115
|
+
end
|
116
|
+
|
117
|
+
# @see the `==` method
|
118
|
+
# @param o [Object] Object to be compared
|
119
|
+
# @!visibility private
|
120
|
+
def eql?(o)
|
121
|
+
self == o
|
122
|
+
end
|
123
|
+
|
124
|
+
# Calculates hash code according to all attributes.
|
125
|
+
# @return [Integer] Hash code
|
126
|
+
# @!visibility private
|
127
|
+
def hash
|
128
|
+
[charge_type, cost, product_name].hash
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
@@ -0,0 +1,133 @@
|
|
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
|
+
# Cost data.
|
21
|
+
class CostByOrg
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Whether the object has unparsed attributes
|
25
|
+
# @!visibility private
|
26
|
+
attr_accessor :_unparsed
|
27
|
+
|
28
|
+
# Cost attributes data.
|
29
|
+
attr_accessor :attributes
|
30
|
+
|
31
|
+
# Unique ID of the response.
|
32
|
+
attr_accessor :id
|
33
|
+
|
34
|
+
# Type of cost data.
|
35
|
+
attr_accessor :type
|
36
|
+
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
38
|
+
# @!visibility private
|
39
|
+
def self.attribute_map
|
40
|
+
{
|
41
|
+
:'attributes' => :'attributes',
|
42
|
+
:'id' => :'id',
|
43
|
+
:'type' => :'type'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# Returns all the JSON keys this model knows about
|
48
|
+
# @!visibility private
|
49
|
+
def self.acceptable_attributes
|
50
|
+
attribute_map.values
|
51
|
+
end
|
52
|
+
|
53
|
+
# Attribute type mapping.
|
54
|
+
# @!visibility private
|
55
|
+
def self.openapi_types
|
56
|
+
{
|
57
|
+
:'attributes' => :'CostByOrgAttributes',
|
58
|
+
:'id' => :'String',
|
59
|
+
:'type' => :'CostByOrgType'
|
60
|
+
}
|
61
|
+
end
|
62
|
+
|
63
|
+
# List of attributes with nullable: true
|
64
|
+
# @!visibility private
|
65
|
+
def self.openapi_nullable
|
66
|
+
Set.new([
|
67
|
+
])
|
68
|
+
end
|
69
|
+
|
70
|
+
# Initializes the object
|
71
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
72
|
+
# @!visibility private
|
73
|
+
def initialize(attributes = {})
|
74
|
+
if (!attributes.is_a?(Hash))
|
75
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CostByOrg` initialize method"
|
76
|
+
end
|
77
|
+
|
78
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
79
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
80
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
81
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CostByOrg`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
82
|
+
end
|
83
|
+
h[k.to_sym] = v
|
84
|
+
}
|
85
|
+
|
86
|
+
if attributes.key?(:'attributes')
|
87
|
+
self.attributes = attributes[:'attributes']
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes.key?(:'id')
|
91
|
+
self.id = attributes[:'id']
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes.key?(:'type')
|
95
|
+
self.type = attributes[:'type']
|
96
|
+
else
|
97
|
+
self.type = 'cost_by_org'
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
# Check to see if the all the properties in the model are valid
|
102
|
+
# @return true if the model is valid
|
103
|
+
# @!visibility private
|
104
|
+
def valid?
|
105
|
+
true
|
106
|
+
end
|
107
|
+
|
108
|
+
# Checks equality by comparing each attribute.
|
109
|
+
# @param o [Object] Object to be compared
|
110
|
+
# @!visibility private
|
111
|
+
def ==(o)
|
112
|
+
return true if self.equal?(o)
|
113
|
+
self.class == o.class &&
|
114
|
+
attributes == o.attributes &&
|
115
|
+
id == o.id &&
|
116
|
+
type == o.type
|
117
|
+
end
|
118
|
+
|
119
|
+
# @see the `==` method
|
120
|
+
# @param o [Object] Object to be compared
|
121
|
+
# @!visibility private
|
122
|
+
def eql?(o)
|
123
|
+
self == o
|
124
|
+
end
|
125
|
+
|
126
|
+
# Calculates hash code according to all attributes.
|
127
|
+
# @return [Integer] Hash code
|
128
|
+
# @!visibility private
|
129
|
+
def hash
|
130
|
+
[attributes, id, type].hash
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|
@@ -0,0 +1,153 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V2 Collection
|
3
|
+
|
4
|
+
#Collection of all Datadog Public endpoints.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@datadoghq.com
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
9
|
+
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
13
|
+
|
14
|
+
=end
|
15
|
+
|
16
|
+
require 'date'
|
17
|
+
require 'time'
|
18
|
+
|
19
|
+
module DatadogAPIClient::V2
|
20
|
+
# Cost attributes data.
|
21
|
+
class CostByOrgAttributes
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Whether the object has unparsed attributes
|
25
|
+
# @!visibility private
|
26
|
+
attr_accessor :_unparsed
|
27
|
+
|
28
|
+
# List of charges data reported for the requested month.
|
29
|
+
attr_accessor :charges
|
30
|
+
|
31
|
+
# The month requested.
|
32
|
+
attr_accessor :date
|
33
|
+
|
34
|
+
# The organization name.
|
35
|
+
attr_accessor :org_name
|
36
|
+
|
37
|
+
# The organization public ID.
|
38
|
+
attr_accessor :public_id
|
39
|
+
|
40
|
+
# The total cost of products for the month.
|
41
|
+
attr_accessor :total_cost
|
42
|
+
|
43
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
44
|
+
# @!visibility private
|
45
|
+
def self.attribute_map
|
46
|
+
{
|
47
|
+
:'charges' => :'charges',
|
48
|
+
:'date' => :'date',
|
49
|
+
:'org_name' => :'org_name',
|
50
|
+
:'public_id' => :'public_id',
|
51
|
+
:'total_cost' => :'total_cost'
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# Returns all the JSON keys this model knows about
|
56
|
+
# @!visibility private
|
57
|
+
def self.acceptable_attributes
|
58
|
+
attribute_map.values
|
59
|
+
end
|
60
|
+
|
61
|
+
# Attribute type mapping.
|
62
|
+
# @!visibility private
|
63
|
+
def self.openapi_types
|
64
|
+
{
|
65
|
+
:'charges' => :'Array<ChargebackBreakdown>',
|
66
|
+
:'date' => :'Time',
|
67
|
+
:'org_name' => :'String',
|
68
|
+
:'public_id' => :'String',
|
69
|
+
:'total_cost' => :'Float'
|
70
|
+
}
|
71
|
+
end
|
72
|
+
|
73
|
+
# List of attributes with nullable: true
|
74
|
+
# @!visibility private
|
75
|
+
def self.openapi_nullable
|
76
|
+
Set.new([
|
77
|
+
])
|
78
|
+
end
|
79
|
+
|
80
|
+
# Initializes the object
|
81
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
82
|
+
# @!visibility private
|
83
|
+
def initialize(attributes = {})
|
84
|
+
if (!attributes.is_a?(Hash))
|
85
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CostByOrgAttributes` initialize method"
|
86
|
+
end
|
87
|
+
|
88
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
89
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
90
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
91
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CostByOrgAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
92
|
+
end
|
93
|
+
h[k.to_sym] = v
|
94
|
+
}
|
95
|
+
|
96
|
+
if attributes.key?(:'charges')
|
97
|
+
if (value = attributes[:'charges']).is_a?(Array)
|
98
|
+
self.charges = value
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes.key?(:'date')
|
103
|
+
self.date = attributes[:'date']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.key?(:'org_name')
|
107
|
+
self.org_name = attributes[:'org_name']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes.key?(:'public_id')
|
111
|
+
self.public_id = attributes[:'public_id']
|
112
|
+
end
|
113
|
+
|
114
|
+
if attributes.key?(:'total_cost')
|
115
|
+
self.total_cost = attributes[:'total_cost']
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
# Check to see if the all the properties in the model are valid
|
120
|
+
# @return true if the model is valid
|
121
|
+
# @!visibility private
|
122
|
+
def valid?
|
123
|
+
true
|
124
|
+
end
|
125
|
+
|
126
|
+
# Checks equality by comparing each attribute.
|
127
|
+
# @param o [Object] Object to be compared
|
128
|
+
# @!visibility private
|
129
|
+
def ==(o)
|
130
|
+
return true if self.equal?(o)
|
131
|
+
self.class == o.class &&
|
132
|
+
charges == o.charges &&
|
133
|
+
date == o.date &&
|
134
|
+
org_name == o.org_name &&
|
135
|
+
public_id == o.public_id &&
|
136
|
+
total_cost == o.total_cost
|
137
|
+
end
|
138
|
+
|
139
|
+
# @see the `==` method
|
140
|
+
# @param o [Object] Object to be compared
|
141
|
+
# @!visibility private
|
142
|
+
def eql?(o)
|
143
|
+
self == o
|
144
|
+
end
|
145
|
+
|
146
|
+
# Calculates hash code according to all attributes.
|
147
|
+
# @return [Integer] Hash code
|
148
|
+
# @!visibility private
|
149
|
+
def hash
|
150
|
+
[charges, date, org_name, public_id, total_cost].hash
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
@@ -0,0 +1,113 @@
|
|
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
|
+
# Chargeback Summary response.
|
21
|
+
class CostByOrgResponse
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Whether the object has unparsed attributes
|
25
|
+
# @!visibility private
|
26
|
+
attr_accessor :_unparsed
|
27
|
+
|
28
|
+
# Response containing Chargeback Summary.
|
29
|
+
attr_accessor :data
|
30
|
+
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
32
|
+
# @!visibility private
|
33
|
+
def self.attribute_map
|
34
|
+
{
|
35
|
+
:'data' => :'data'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Returns all the JSON keys this model knows about
|
40
|
+
# @!visibility private
|
41
|
+
def self.acceptable_attributes
|
42
|
+
attribute_map.values
|
43
|
+
end
|
44
|
+
|
45
|
+
# Attribute type mapping.
|
46
|
+
# @!visibility private
|
47
|
+
def self.openapi_types
|
48
|
+
{
|
49
|
+
:'data' => :'Array<CostByOrg>'
|
50
|
+
}
|
51
|
+
end
|
52
|
+
|
53
|
+
# List of attributes with nullable: true
|
54
|
+
# @!visibility private
|
55
|
+
def self.openapi_nullable
|
56
|
+
Set.new([
|
57
|
+
])
|
58
|
+
end
|
59
|
+
|
60
|
+
# Initializes the object
|
61
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
62
|
+
# @!visibility private
|
63
|
+
def initialize(attributes = {})
|
64
|
+
if (!attributes.is_a?(Hash))
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CostByOrgResponse` initialize method"
|
66
|
+
end
|
67
|
+
|
68
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
69
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
70
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
71
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CostByOrgResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
72
|
+
end
|
73
|
+
h[k.to_sym] = v
|
74
|
+
}
|
75
|
+
|
76
|
+
if attributes.key?(:'data')
|
77
|
+
if (value = attributes[:'data']).is_a?(Array)
|
78
|
+
self.data = value
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
# Check to see if the all the properties in the model are valid
|
84
|
+
# @return true if the model is valid
|
85
|
+
# @!visibility private
|
86
|
+
def valid?
|
87
|
+
true
|
88
|
+
end
|
89
|
+
|
90
|
+
# Checks equality by comparing each attribute.
|
91
|
+
# @param o [Object] Object to be compared
|
92
|
+
# @!visibility private
|
93
|
+
def ==(o)
|
94
|
+
return true if self.equal?(o)
|
95
|
+
self.class == o.class &&
|
96
|
+
data == o.data
|
97
|
+
end
|
98
|
+
|
99
|
+
# @see the `==` method
|
100
|
+
# @param o [Object] Object to be compared
|
101
|
+
# @!visibility private
|
102
|
+
def eql?(o)
|
103
|
+
self == o
|
104
|
+
end
|
105
|
+
|
106
|
+
# Calculates hash code according to all attributes.
|
107
|
+
# @return [Integer] Hash code
|
108
|
+
# @!visibility private
|
109
|
+
def hash
|
110
|
+
[data].hash
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
@@ -0,0 +1,26 @@
|
|
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
|
+
# Type of cost data.
|
21
|
+
class CostByOrgType
|
22
|
+
include BaseEnumModel
|
23
|
+
|
24
|
+
COST_BY_ORG = "cost_by_org".freeze
|
25
|
+
end
|
26
|
+
end
|