datadog_api_client 2.38.0 → 2.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. data/.generated-info +4 -0
  3. data/.generator/schemas/v1/openapi.yaml +493 -13
  4. data/.generator/schemas/v2/openapi.yaml +1021 -36
  5. data/.github/workflows/approved_status.yml +1 -0
  6. data/.github/workflows/test.yml +1 -1
  7. data/CHANGELOG.md +16 -0
  8. data/examples/v1/dashboards/CreateDashboard_1751391372.rb +41 -0
  9. data/examples/v1/dashboards/CreatePublicDashboard_1668947073.rb +28 -0
  10. data/examples/v1/dashboards/UpdatePublicDashboard_1708268778.rb +27 -0
  11. data/examples/v1/logs-pipelines/CreateLogsPipeline_1248402480.rb +25 -0
  12. data/examples/v1/logs-pipelines/CreateLogsPipeline_1267211320.rb +27 -0
  13. data/examples/v1/logs-pipelines/CreateLogsPipeline_1271012410.rb +25 -0
  14. data/examples/v1/logs-pipelines/CreateLogsPipeline_3314493032.rb +26 -0
  15. data/examples/v1/logs-pipelines/CreateLogsPipeline_3934594739.rb +26 -0
  16. data/examples/v1/synthetics/SearchTests.rb +5 -0
  17. data/examples/v1/synthetics/SearchTests_195957771.rb +13 -0
  18. data/examples/v2/aws-integration/GetAWSIntegrationIAMPermissions.rb +5 -0
  19. data/examples/v2/cloud-cost-management/CreateCostGCPUsageCostConfig.rb +19 -0
  20. data/examples/v2/cloud-cost-management/DeleteCostGCPUsageCostConfig.rb +5 -0
  21. data/examples/v2/cloud-cost-management/ListCostGCPUsageCostConfigs.rb +5 -0
  22. data/examples/v2/cloud-cost-management/UpdateCostGCPUsageCostConfig.rb +14 -0
  23. data/examples/v2/datasets/CreateDataset.rb +27 -0
  24. data/examples/v2/datasets/DeleteDataset.rb +5 -0
  25. data/examples/v2/datasets/GetAllDatasets.rb +5 -0
  26. data/examples/v2/datasets/GetDataset.rb +5 -0
  27. data/examples/v2/monitors/CreateMonitorNotificationRule.rb +0 -3
  28. data/examples/v2/monitors/DeleteMonitorNotificationRule.rb +0 -3
  29. data/examples/v2/monitors/GetMonitorNotificationRule.rb +0 -3
  30. data/examples/v2/monitors/GetMonitorNotificationRules.rb +0 -3
  31. data/examples/v2/monitors/UpdateMonitorNotificationRule.rb +0 -3
  32. data/examples/v2/on-call/UpdateOnCallSchedule.rb +1 -1
  33. data/examples/v2/security-monitoring/ListAssetsSBOMs.rb +12 -0
  34. data/lib/datadog_api_client/configuration.rb +1 -5
  35. data/lib/datadog_api_client/inflector.rb +41 -0
  36. data/lib/datadog_api_client/v1/api/hosts_api.rb +1 -0
  37. data/lib/datadog_api_client/v1/api/synthetics_api.rb +72 -0
  38. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +6 -6
  39. data/lib/datadog_api_client/v1/models/dashboard_template_variable.rb +14 -3
  40. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_body.rb +1 -0
  41. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +9 -1
  42. data/lib/datadog_api_client/v1/models/logs_array_processor.rb +168 -0
  43. data/lib/datadog_api_client/v1/models/logs_array_processor_operation.rb +64 -0
  44. data/lib/datadog_api_client/v1/models/logs_array_processor_operation_append.rb +175 -0
  45. data/lib/datadog_api_client/v1/models/logs_array_processor_operation_append_type.rb +26 -0
  46. data/lib/datadog_api_client/v1/models/logs_array_processor_operation_length.rb +165 -0
  47. data/lib/datadog_api_client/v1/models/logs_array_processor_operation_length_type.rb +26 -0
  48. data/lib/datadog_api_client/v1/models/logs_array_processor_operation_select.rb +207 -0
  49. data/lib/datadog_api_client/v1/models/logs_array_processor_operation_select_type.rb +26 -0
  50. data/lib/datadog_api_client/v1/models/logs_array_processor_type.rb +26 -0
  51. data/lib/datadog_api_client/v1/models/logs_processor.rb +2 -1
  52. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_body.rb +1 -0
  53. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +14 -0
  54. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +142 -1
  55. data/lib/datadog_api_client/v1/models/selectable_template_variable_items.rb +12 -1
  56. data/lib/datadog_api_client/v1/models/synthetics_step_type.rb +1 -0
  57. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +81 -1
  58. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +81 -1
  59. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +81 -1
  60. data/lib/datadog_api_client/v2/api/aws_integration_api.rb +60 -0
  61. data/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb +264 -0
  62. data/lib/datadog_api_client/v2/api/datasets_api.rb +283 -0
  63. data/lib/datadog_api_client/v2/api/events_api.rb +2 -0
  64. data/lib/datadog_api_client/v2/api/monitors_api.rb +0 -30
  65. data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +7 -3
  66. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +111 -0
  67. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +1 -1
  68. data/lib/datadog_api_client/v2/models/asset_attributes.rb +13 -1
  69. data/lib/datadog_api_client/v2/models/aws_integration_iam_permissions_response.rb +123 -0
  70. data/lib/datadog_api_client/v2/models/aws_integration_iam_permissions_response_attributes.rb +125 -0
  71. data/lib/datadog_api_client/v2/models/aws_integration_iam_permissions_response_data.rb +125 -0
  72. data/lib/datadog_api_client/v2/models/aws_integration_iam_permissions_response_data_type.rb +26 -0
  73. data/lib/datadog_api_client/v2/models/dataset.rb +154 -0
  74. data/lib/datadog_api_client/v2/models/dataset_attributes.rb +197 -0
  75. data/lib/datadog_api_client/v2/models/dataset_create_request.rb +123 -0
  76. data/lib/datadog_api_client/v2/models/dataset_response_multi.rb +125 -0
  77. data/lib/datadog_api_client/v2/models/dataset_response_single.rb +123 -0
  78. data/lib/datadog_api_client/v2/models/filters_per_product.rb +150 -0
  79. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config.rb +154 -0
  80. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_attributes.rb +369 -0
  81. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_data.rb +144 -0
  82. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request.rb +123 -0
  83. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request_attributes.rb +123 -0
  84. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request_type.rb +26 -0
  85. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_data.rb +144 -0
  86. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request.rb +123 -0
  87. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request_attributes.rb +217 -0
  88. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request_type.rb +26 -0
  89. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_response.rb +105 -0
  90. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_type.rb +26 -0
  91. data/lib/datadog_api_client/v2/models/gcp_usage_cost_configs_response.rb +107 -0
  92. data/lib/datadog_api_client/v2/models/layer_attributes.rb +1 -1
  93. data/lib/datadog_api_client/v2/models/layer_attributes_interval.rb +1 -1
  94. data/lib/datadog_api_client/v2/models/list_assets_sbo_ms_response.rb +145 -0
  95. data/lib/datadog_api_client/v2/models/sbom_attributes.rb +24 -1
  96. data/lib/datadog_api_client/v2/models/sbom_component.rb +46 -1
  97. data/lib/datadog_api_client/v2/models/sbom_component_dependency.rb +117 -0
  98. data/lib/datadog_api_client/v2/models/sbom_component_license.rb +123 -0
  99. data/lib/datadog_api_client/v2/models/sbom_component_license_license.rb +123 -0
  100. data/lib/datadog_api_client/v2/models/sbom_component_license_type.rb +33 -0
  101. data/lib/datadog_api_client/v2/models/sbom_component_property.rb +144 -0
  102. data/lib/datadog_api_client/v2/models/sbom_component_supplier.rb +123 -0
  103. data/lib/datadog_api_client/v2/models/sbom_metadata.rb +25 -3
  104. data/lib/datadog_api_client/v2/models/sbom_metadata_author.rb +105 -0
  105. data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items.rb +1 -1
  106. data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items.rb +1 -1
  107. data/lib/datadog_api_client/v2/models/vulnerability_attributes.rb +24 -1
  108. data/lib/datadog_api_client/version.rb +1 -1
  109. metadata +63 -2
  110. data/.apigentools-info +0 -16
@@ -0,0 +1,144 @@
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
+ # GCP Usage Cost config patch data.
21
+ class GCPUsageCostConfigPatchData
22
+ include BaseGenericModel
23
+
24
+ # Attributes for GCP Usage Cost config patch request.
25
+ attr_reader :attributes
26
+
27
+ # Type of GCP Usage Cost config patch request.
28
+ attr_reader :type
29
+
30
+ attr_accessor :additional_properties
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ # @!visibility private
34
+ def self.attribute_map
35
+ {
36
+ :'attributes' => :'attributes',
37
+ :'type' => :'type'
38
+ }
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ # @!visibility private
43
+ def self.openapi_types
44
+ {
45
+ :'attributes' => :'GCPUsageCostConfigPatchRequestAttributes',
46
+ :'type' => :'GCPUsageCostConfigPatchRequestType'
47
+ }
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param attributes [Hash] Model attributes in the form of hash
52
+ # @!visibility private
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GCPUsageCostConfigPatchData` initialize method"
56
+ end
57
+
58
+ self.additional_properties = {}
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!self.class.attribute_map.key?(k.to_sym))
62
+ self.additional_properties[k.to_sym] = v
63
+ else
64
+ h[k.to_sym] = v
65
+ end
66
+ }
67
+
68
+ if attributes.key?(:'attributes')
69
+ self.attributes = attributes[:'attributes']
70
+ end
71
+
72
+ if attributes.key?(:'type')
73
+ self.type = attributes[:'type']
74
+ end
75
+ end
76
+
77
+ # Check to see if the all the properties in the model are valid
78
+ # @return true if the model is valid
79
+ # @!visibility private
80
+ def valid?
81
+ return false if @attributes.nil?
82
+ return false if @type.nil?
83
+ true
84
+ end
85
+
86
+ # Custom attribute writer method with validation
87
+ # @param attributes [Object] Object to be assigned
88
+ # @!visibility private
89
+ def attributes=(attributes)
90
+ if attributes.nil?
91
+ fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
92
+ end
93
+ @attributes = attributes
94
+ end
95
+
96
+ # Custom attribute writer method with validation
97
+ # @param type [Object] Object to be assigned
98
+ # @!visibility private
99
+ def type=(type)
100
+ if type.nil?
101
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
102
+ end
103
+ @type = type
104
+ end
105
+
106
+ # Returns the object in the form of hash, with additionalProperties support.
107
+ # @return [Hash] Returns the object in the form of hash
108
+ # @!visibility private
109
+ def to_hash
110
+ hash = {}
111
+ self.class.attribute_map.each_pair do |attr, param|
112
+ value = self.send(attr)
113
+ if value.nil?
114
+ is_nullable = self.class.openapi_nullable.include?(attr)
115
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
116
+ end
117
+
118
+ hash[param] = _to_hash(value)
119
+ end
120
+ self.additional_properties.each_pair do |attr, value|
121
+ hash[attr] = value
122
+ end
123
+ hash
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
+ attributes == o.attributes &&
133
+ type == o.type &&
134
+ additional_properties == o.additional_properties
135
+ end
136
+
137
+ # Calculates hash code according to all attributes.
138
+ # @return [Integer] Hash code
139
+ # @!visibility private
140
+ def hash
141
+ [attributes, type, additional_properties].hash
142
+ end
143
+ end
144
+ end
@@ -0,0 +1,123 @@
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
+ # GCP Usage Cost config patch request.
21
+ class GCPUsageCostConfigPatchRequest
22
+ include BaseGenericModel
23
+
24
+ # GCP Usage Cost config patch data.
25
+ attr_reader :data
26
+
27
+ attr_accessor :additional_properties
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ # @!visibility private
31
+ def self.attribute_map
32
+ {
33
+ :'data' => :'data'
34
+ }
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ # @!visibility private
39
+ def self.openapi_types
40
+ {
41
+ :'data' => :'GCPUsageCostConfigPatchData'
42
+ }
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param attributes [Hash] Model attributes in the form of hash
47
+ # @!visibility private
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GCPUsageCostConfigPatchRequest` initialize method"
51
+ end
52
+
53
+ self.additional_properties = {}
54
+ # check to see if the attribute exists and convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h|
56
+ if (!self.class.attribute_map.key?(k.to_sym))
57
+ self.additional_properties[k.to_sym] = v
58
+ else
59
+ h[k.to_sym] = v
60
+ end
61
+ }
62
+
63
+ if attributes.key?(:'data')
64
+ self.data = attributes[:'data']
65
+ end
66
+ end
67
+
68
+ # Check to see if the all the properties in the model are valid
69
+ # @return true if the model is valid
70
+ # @!visibility private
71
+ def valid?
72
+ return false if @data.nil?
73
+ true
74
+ end
75
+
76
+ # Custom attribute writer method with validation
77
+ # @param data [Object] Object to be assigned
78
+ # @!visibility private
79
+ def data=(data)
80
+ if data.nil?
81
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
82
+ end
83
+ @data = data
84
+ end
85
+
86
+ # Returns the object in the form of hash, with additionalProperties support.
87
+ # @return [Hash] Returns the object in the form of hash
88
+ # @!visibility private
89
+ def to_hash
90
+ hash = {}
91
+ self.class.attribute_map.each_pair do |attr, param|
92
+ value = self.send(attr)
93
+ if value.nil?
94
+ is_nullable = self.class.openapi_nullable.include?(attr)
95
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
96
+ end
97
+
98
+ hash[param] = _to_hash(value)
99
+ end
100
+ self.additional_properties.each_pair do |attr, value|
101
+ hash[attr] = value
102
+ end
103
+ hash
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
+ data == o.data &&
113
+ additional_properties == o.additional_properties
114
+ end
115
+
116
+ # Calculates hash code according to all attributes.
117
+ # @return [Integer] Hash code
118
+ # @!visibility private
119
+ def hash
120
+ [data, additional_properties].hash
121
+ end
122
+ end
123
+ end
@@ -0,0 +1,123 @@
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
+ # Attributes for GCP Usage Cost config patch request.
21
+ class GCPUsageCostConfigPatchRequestAttributes
22
+ include BaseGenericModel
23
+
24
+ # Whether or not the Cloud Cost Management account is enabled.
25
+ attr_reader :is_enabled
26
+
27
+ attr_accessor :additional_properties
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ # @!visibility private
31
+ def self.attribute_map
32
+ {
33
+ :'is_enabled' => :'is_enabled'
34
+ }
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ # @!visibility private
39
+ def self.openapi_types
40
+ {
41
+ :'is_enabled' => :'Boolean'
42
+ }
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param attributes [Hash] Model attributes in the form of hash
47
+ # @!visibility private
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GCPUsageCostConfigPatchRequestAttributes` initialize method"
51
+ end
52
+
53
+ self.additional_properties = {}
54
+ # check to see if the attribute exists and convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h|
56
+ if (!self.class.attribute_map.key?(k.to_sym))
57
+ self.additional_properties[k.to_sym] = v
58
+ else
59
+ h[k.to_sym] = v
60
+ end
61
+ }
62
+
63
+ if attributes.key?(:'is_enabled')
64
+ self.is_enabled = attributes[:'is_enabled']
65
+ end
66
+ end
67
+
68
+ # Check to see if the all the properties in the model are valid
69
+ # @return true if the model is valid
70
+ # @!visibility private
71
+ def valid?
72
+ return false if @is_enabled.nil?
73
+ true
74
+ end
75
+
76
+ # Custom attribute writer method with validation
77
+ # @param is_enabled [Object] Object to be assigned
78
+ # @!visibility private
79
+ def is_enabled=(is_enabled)
80
+ if is_enabled.nil?
81
+ fail ArgumentError, 'invalid value for "is_enabled", is_enabled cannot be nil.'
82
+ end
83
+ @is_enabled = is_enabled
84
+ end
85
+
86
+ # Returns the object in the form of hash, with additionalProperties support.
87
+ # @return [Hash] Returns the object in the form of hash
88
+ # @!visibility private
89
+ def to_hash
90
+ hash = {}
91
+ self.class.attribute_map.each_pair do |attr, param|
92
+ value = self.send(attr)
93
+ if value.nil?
94
+ is_nullable = self.class.openapi_nullable.include?(attr)
95
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
96
+ end
97
+
98
+ hash[param] = _to_hash(value)
99
+ end
100
+ self.additional_properties.each_pair do |attr, value|
101
+ hash[attr] = value
102
+ end
103
+ hash
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
+ is_enabled == o.is_enabled &&
113
+ additional_properties == o.additional_properties
114
+ end
115
+
116
+ # Calculates hash code according to all attributes.
117
+ # @return [Integer] Hash code
118
+ # @!visibility private
119
+ def hash
120
+ [is_enabled, additional_properties].hash
121
+ end
122
+ end
123
+ 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 GCP Usage Cost config patch request.
21
+ class GCPUsageCostConfigPatchRequestType
22
+ include BaseEnumModel
23
+
24
+ GCP_USAGE_COST_CONFIG_PATCH_REQUEST = "gcp_uc_config_patch_request".freeze
25
+ end
26
+ end
@@ -0,0 +1,144 @@
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
+ # GCP Usage Cost config post data.
21
+ class GCPUsageCostConfigPostData
22
+ include BaseGenericModel
23
+
24
+ # Attributes for GCP Usage Cost config post request.
25
+ attr_reader :attributes
26
+
27
+ # Type of GCP Usage Cost config post request.
28
+ attr_reader :type
29
+
30
+ attr_accessor :additional_properties
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ # @!visibility private
34
+ def self.attribute_map
35
+ {
36
+ :'attributes' => :'attributes',
37
+ :'type' => :'type'
38
+ }
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ # @!visibility private
43
+ def self.openapi_types
44
+ {
45
+ :'attributes' => :'GCPUsageCostConfigPostRequestAttributes',
46
+ :'type' => :'GCPUsageCostConfigPostRequestType'
47
+ }
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param attributes [Hash] Model attributes in the form of hash
52
+ # @!visibility private
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GCPUsageCostConfigPostData` initialize method"
56
+ end
57
+
58
+ self.additional_properties = {}
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!self.class.attribute_map.key?(k.to_sym))
62
+ self.additional_properties[k.to_sym] = v
63
+ else
64
+ h[k.to_sym] = v
65
+ end
66
+ }
67
+
68
+ if attributes.key?(:'attributes')
69
+ self.attributes = attributes[:'attributes']
70
+ end
71
+
72
+ if attributes.key?(:'type')
73
+ self.type = attributes[:'type']
74
+ end
75
+ end
76
+
77
+ # Check to see if the all the properties in the model are valid
78
+ # @return true if the model is valid
79
+ # @!visibility private
80
+ def valid?
81
+ return false if @attributes.nil?
82
+ return false if @type.nil?
83
+ true
84
+ end
85
+
86
+ # Custom attribute writer method with validation
87
+ # @param attributes [Object] Object to be assigned
88
+ # @!visibility private
89
+ def attributes=(attributes)
90
+ if attributes.nil?
91
+ fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
92
+ end
93
+ @attributes = attributes
94
+ end
95
+
96
+ # Custom attribute writer method with validation
97
+ # @param type [Object] Object to be assigned
98
+ # @!visibility private
99
+ def type=(type)
100
+ if type.nil?
101
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
102
+ end
103
+ @type = type
104
+ end
105
+
106
+ # Returns the object in the form of hash, with additionalProperties support.
107
+ # @return [Hash] Returns the object in the form of hash
108
+ # @!visibility private
109
+ def to_hash
110
+ hash = {}
111
+ self.class.attribute_map.each_pair do |attr, param|
112
+ value = self.send(attr)
113
+ if value.nil?
114
+ is_nullable = self.class.openapi_nullable.include?(attr)
115
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
116
+ end
117
+
118
+ hash[param] = _to_hash(value)
119
+ end
120
+ self.additional_properties.each_pair do |attr, value|
121
+ hash[attr] = value
122
+ end
123
+ hash
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
+ attributes == o.attributes &&
133
+ type == o.type &&
134
+ additional_properties == o.additional_properties
135
+ end
136
+
137
+ # Calculates hash code according to all attributes.
138
+ # @return [Integer] Hash code
139
+ # @!visibility private
140
+ def hash
141
+ [attributes, type, additional_properties].hash
142
+ end
143
+ end
144
+ end
@@ -0,0 +1,123 @@
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
+ # GCP Usage Cost config post request.
21
+ class GCPUsageCostConfigPostRequest
22
+ include BaseGenericModel
23
+
24
+ # GCP Usage Cost config post data.
25
+ attr_reader :data
26
+
27
+ attr_accessor :additional_properties
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ # @!visibility private
31
+ def self.attribute_map
32
+ {
33
+ :'data' => :'data'
34
+ }
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ # @!visibility private
39
+ def self.openapi_types
40
+ {
41
+ :'data' => :'GCPUsageCostConfigPostData'
42
+ }
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param attributes [Hash] Model attributes in the form of hash
47
+ # @!visibility private
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GCPUsageCostConfigPostRequest` initialize method"
51
+ end
52
+
53
+ self.additional_properties = {}
54
+ # check to see if the attribute exists and convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h|
56
+ if (!self.class.attribute_map.key?(k.to_sym))
57
+ self.additional_properties[k.to_sym] = v
58
+ else
59
+ h[k.to_sym] = v
60
+ end
61
+ }
62
+
63
+ if attributes.key?(:'data')
64
+ self.data = attributes[:'data']
65
+ end
66
+ end
67
+
68
+ # Check to see if the all the properties in the model are valid
69
+ # @return true if the model is valid
70
+ # @!visibility private
71
+ def valid?
72
+ return false if @data.nil?
73
+ true
74
+ end
75
+
76
+ # Custom attribute writer method with validation
77
+ # @param data [Object] Object to be assigned
78
+ # @!visibility private
79
+ def data=(data)
80
+ if data.nil?
81
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
82
+ end
83
+ @data = data
84
+ end
85
+
86
+ # Returns the object in the form of hash, with additionalProperties support.
87
+ # @return [Hash] Returns the object in the form of hash
88
+ # @!visibility private
89
+ def to_hash
90
+ hash = {}
91
+ self.class.attribute_map.each_pair do |attr, param|
92
+ value = self.send(attr)
93
+ if value.nil?
94
+ is_nullable = self.class.openapi_nullable.include?(attr)
95
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
96
+ end
97
+
98
+ hash[param] = _to_hash(value)
99
+ end
100
+ self.additional_properties.each_pair do |attr, value|
101
+ hash[attr] = value
102
+ end
103
+ hash
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
+ data == o.data &&
113
+ additional_properties == o.additional_properties
114
+ end
115
+
116
+ # Calculates hash code according to all attributes.
117
+ # @return [Integer] Hash code
118
+ # @!visibility private
119
+ def hash
120
+ [data, additional_properties].hash
121
+ end
122
+ end
123
+ end