datadog_api_client 2.37.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.
- checksums.yaml +4 -4
- data/.generated-info +4 -0
- data/.generator/schemas/v1/openapi.yaml +513 -14
- data/.generator/schemas/v2/openapi.yaml +2101 -107
- data/.github/workflows/approved_status.yml +1 -0
- data/.github/workflows/test.yml +1 -1
- data/CHANGELOG.md +36 -0
- data/examples/v1/dashboards/CreateDashboard_1751391372.rb +41 -0
- data/examples/v1/dashboards/CreatePublicDashboard_1668947073.rb +28 -0
- data/examples/v1/dashboards/UpdatePublicDashboard_1708268778.rb +27 -0
- data/examples/v1/logs-pipelines/CreateLogsPipeline_1248402480.rb +25 -0
- data/examples/v1/logs-pipelines/CreateLogsPipeline_1267211320.rb +27 -0
- data/examples/v1/logs-pipelines/CreateLogsPipeline_1271012410.rb +25 -0
- data/examples/v1/logs-pipelines/CreateLogsPipeline_3314493032.rb +26 -0
- data/examples/v1/logs-pipelines/CreateLogsPipeline_3934594739.rb +26 -0
- data/examples/v1/synthetics/SearchTests.rb +5 -0
- data/examples/v1/synthetics/SearchTests_195957771.rb +13 -0
- data/examples/v2/action-connection/GetAppKeyRegistration.rb +5 -0
- data/examples/v2/action-connection/ListAppKeyRegistrations.rb +5 -0
- data/examples/v2/action-connection/RegisterAppKey.rb +5 -0
- data/examples/v2/action-connection/UnregisterAppKey.rb +5 -0
- data/examples/v2/aws-integration/GetAWSIntegrationIAMPermissions.rb +5 -0
- data/examples/v2/cloud-cost-management/CreateCostGCPUsageCostConfig.rb +19 -0
- data/examples/v2/cloud-cost-management/DeleteCostGCPUsageCostConfig.rb +5 -0
- data/examples/v2/cloud-cost-management/ListCostGCPUsageCostConfigs.rb +5 -0
- data/examples/v2/cloud-cost-management/UpdateCostGCPUsageCostConfig.rb +14 -0
- data/examples/v2/datasets/CreateDataset.rb +27 -0
- data/examples/v2/datasets/DeleteDataset.rb +5 -0
- data/examples/v2/datasets/GetAllDatasets.rb +5 -0
- data/examples/v2/datasets/GetDataset.rb +5 -0
- data/examples/v2/events/CreateEvent.rb +4 -2
- data/examples/v2/monitors/CreateMonitorNotificationRule.rb +0 -3
- data/examples/v2/monitors/CreateMonitorUserTemplate.rb +37 -0
- data/examples/v2/monitors/DeleteMonitorNotificationRule.rb +0 -3
- data/examples/v2/monitors/DeleteMonitorUserTemplate.rb +8 -0
- data/examples/v2/monitors/GetMonitorNotificationRule.rb +0 -3
- data/examples/v2/monitors/GetMonitorNotificationRules.rb +0 -3
- data/examples/v2/monitors/GetMonitorUserTemplate.rb +11 -0
- data/examples/v2/monitors/ListMonitorUserTemplates.rb +8 -0
- data/examples/v2/monitors/UpdateMonitorNotificationRule.rb +0 -3
- data/examples/v2/monitors/UpdateMonitorUserTemplate.rb +41 -0
- data/examples/v2/monitors/ValidateExistingMonitorUserTemplate.rb +41 -0
- data/examples/v2/monitors/ValidateMonitorUserTemplate.rb +37 -0
- data/examples/v2/on-call/UpdateOnCallSchedule.rb +1 -1
- data/examples/v2/security-monitoring/ListAssetsSBOMs.rb +12 -0
- data/lib/datadog_api_client/configuration.rb +60 -5
- data/lib/datadog_api_client/inflector.rb +70 -0
- data/lib/datadog_api_client/v1/api/hosts_api.rb +1 -0
- data/lib/datadog_api_client/v1/api/synthetics_api.rb +72 -0
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +6 -6
- data/lib/datadog_api_client/v1/models/dashboard_template_variable.rb +14 -3
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_body.rb +1 -0
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +9 -1
- data/lib/datadog_api_client/v1/models/logs_array_processor.rb +168 -0
- data/lib/datadog_api_client/v1/models/logs_array_processor_operation.rb +64 -0
- data/lib/datadog_api_client/v1/models/logs_array_processor_operation_append.rb +175 -0
- data/lib/datadog_api_client/v1/models/logs_array_processor_operation_append_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/logs_array_processor_operation_length.rb +165 -0
- data/lib/datadog_api_client/v1/models/logs_array_processor_operation_length_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/logs_array_processor_operation_select.rb +207 -0
- data/lib/datadog_api_client/v1/models/logs_array_processor_operation_select_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/logs_array_processor_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/logs_processor.rb +2 -1
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_body.rb +1 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +14 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +142 -1
- data/lib/datadog_api_client/v1/models/selectable_template_variable_items.rb +12 -1
- data/lib/datadog_api_client/v1/models/synthetics_mobile_test.rb +12 -1
- data/lib/datadog_api_client/v1/models/synthetics_step_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_request_dns_server_port.rb +63 -0
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +81 -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 +81 -1
- data/lib/datadog_api_client/v2/api/action_connection_api.rb +263 -4
- data/lib/datadog_api_client/v2/api/app_builder_api.rb +8 -8
- data/lib/datadog_api_client/v2/api/aws_integration_api.rb +60 -0
- data/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb +264 -0
- data/lib/datadog_api_client/v2/api/datasets_api.rb +283 -0
- data/lib/datadog_api_client/v2/api/events_api.rb +10 -4
- data/lib/datadog_api_client/v2/api/monitors_api.rb +512 -30
- data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +7 -3
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +111 -0
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/workflow_automation_api.rb +8 -8
- data/lib/datadog_api_client/v2/models/alert_event_custom_attributes.rb +145 -0
- data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_links_items.rb +152 -0
- data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_links_items_category.rb +28 -0
- data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_priority.rb +30 -0
- data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_status.rb +28 -0
- data/lib/datadog_api_client/v2/models/app_key_registration_data.rb +133 -0
- data/lib/datadog_api_client/v2/models/app_key_registration_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/asset_attributes.rb +13 -1
- data/lib/datadog_api_client/v2/models/aws_integration_iam_permissions_response.rb +123 -0
- data/lib/datadog_api_client/v2/models/aws_integration_iam_permissions_response_attributes.rb +125 -0
- data/lib/datadog_api_client/v2/models/aws_integration_iam_permissions_response_data.rb +125 -0
- data/lib/datadog_api_client/v2/models/aws_integration_iam_permissions_response_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes.rb +19 -33
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_author.rb +10 -31
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_changed_resource.rb +15 -32
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_changed_resource_type.rb +1 -1
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_impacted_resources_items.rb +15 -32
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_impacted_resources_items_type.rb +1 -1
- data/lib/datadog_api_client/v2/models/dataset.rb +154 -0
- data/lib/datadog_api_client/v2/models/dataset_attributes.rb +197 -0
- data/lib/datadog_api_client/v2/models/dataset_create_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/dataset_response_multi.rb +125 -0
- data/lib/datadog_api_client/v2/models/dataset_response_single.rb +123 -0
- data/lib/datadog_api_client/v2/models/event_category.rb +2 -1
- data/lib/datadog_api_client/v2/models/event_create_request.rb +32 -3
- data/lib/datadog_api_client/v2/models/event_create_request_payload.rb +20 -2
- data/lib/datadog_api_client/v2/models/event_create_response.rb +3 -3
- data/lib/datadog_api_client/v2/models/event_create_response_attributes.rb +2 -2
- data/lib/datadog_api_client/v2/models/event_create_response_attributes_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/event_create_response_attributes_attributes_evt.rb +14 -4
- data/lib/datadog_api_client/v2/models/event_create_response_payload.rb +15 -5
- data/lib/datadog_api_client/v2/models/event_create_response_payload_links.rb +105 -0
- data/lib/datadog_api_client/v2/models/event_payload.rb +48 -36
- data/lib/datadog_api_client/v2/models/event_payload_attributes.rb +3 -2
- data/lib/datadog_api_client/v2/models/event_payload_integration_id.rb +26 -0
- data/lib/datadog_api_client/v2/models/filters_per_product.rb +150 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config.rb +154 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_attributes.rb +369 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request_attributes.rb +123 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request_attributes.rb +217 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_configs_response.rb +107 -0
- data/lib/datadog_api_client/v2/models/get_app_key_registration_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/incident_create_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/incident_response_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/job_definition_from_rule.rb +1 -26
- data/lib/datadog_api_client/v2/models/layer_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/layer_attributes_interval.rb +1 -1
- data/lib/datadog_api_client/v2/models/list_app_key_registrations_response.rb +117 -0
- data/lib/datadog_api_client/v2/models/list_app_key_registrations_response_meta.rb +115 -0
- data/lib/datadog_api_client/v2/models/list_assets_sbo_ms_response.rb +145 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template.rb +200 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_create_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_create_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_create_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_list_response.rb +107 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_request_attributes.rb +172 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_resource_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_response_attributes.rb +188 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_response_data.rb +125 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_response_data_with_versions.rb +125 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_template_variables_items.rb +132 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_update_data.rb +165 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_update_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/register_app_key_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/sbom_attributes.rb +24 -1
- data/lib/datadog_api_client/v2/models/sbom_component.rb +46 -1
- data/lib/datadog_api_client/v2/models/sbom_component_dependency.rb +117 -0
- data/lib/datadog_api_client/v2/models/sbom_component_license.rb +123 -0
- data/lib/datadog_api_client/v2/models/sbom_component_license_license.rb +123 -0
- data/lib/datadog_api_client/v2/models/sbom_component_license_type.rb +33 -0
- data/lib/datadog_api_client/v2/models/sbom_component_property.rb +144 -0
- data/lib/datadog_api_client/v2/models/sbom_component_supplier.rb +123 -0
- data/lib/datadog_api_client/v2/models/sbom_metadata.rb +25 -3
- data/lib/datadog_api_client/v2/models/sbom_metadata_author.rb +105 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items.rb +1 -1
- data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items.rb +1 -1
- data/lib/datadog_api_client/v2/models/simple_monitor_user_template.rb +188 -0
- data/lib/datadog_api_client/v2/models/vulnerability_attributes.rb +24 -1
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +103 -2
- data/.apigentools-info +0 -16
@@ -17,31 +17,29 @@ require 'date'
|
|
17
17
|
require 'time'
|
18
18
|
|
19
19
|
module DatadogAPIClient::V2
|
20
|
-
#
|
20
|
+
# Change event attributes.
|
21
21
|
class ChangeEventCustomAttributes
|
22
22
|
include BaseGenericModel
|
23
23
|
|
24
|
-
#
|
24
|
+
# The entity that made the change. Optional, if provided it must include `type` and `name`.
|
25
25
|
attr_accessor :author
|
26
26
|
|
27
|
-
# Free form object with information related to the `change` event.
|
27
|
+
# Free form JSON object with information related to the `change` event. Supports up to 100 properties per object and a maximum nesting depth of 10 levels.
|
28
28
|
attr_accessor :change_metadata
|
29
29
|
|
30
|
-
#
|
30
|
+
# A uniquely identified resource.
|
31
31
|
attr_reader :changed_resource
|
32
32
|
|
33
33
|
# A list of resources impacted by this change. It is recommended to provide an impacted resource to display
|
34
|
-
# the change event at the
|
35
|
-
|
34
|
+
# the change event at the correct location. Only resources of type `service` are supported. Maximum of 100 impacted resources allowed.
|
35
|
+
attr_reader :impacted_resources
|
36
36
|
|
37
|
-
# Free form object
|
37
|
+
# Free form JSON object representing the new state of the changed resource.
|
38
38
|
attr_accessor :new_value
|
39
39
|
|
40
|
-
# Free form object
|
40
|
+
# Free form JSON object representing the previous state of the changed resource.
|
41
41
|
attr_accessor :prev_value
|
42
42
|
|
43
|
-
attr_accessor :additional_properties
|
44
|
-
|
45
43
|
# Attribute mapping from ruby-style variable name to JSON key.
|
46
44
|
# @!visibility private
|
47
45
|
def self.attribute_map
|
@@ -76,14 +74,12 @@ module DatadogAPIClient::V2
|
|
76
74
|
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ChangeEventCustomAttributes` initialize method"
|
77
75
|
end
|
78
76
|
|
79
|
-
self.additional_properties = {}
|
80
77
|
# check to see if the attribute exists and convert string to symbol for hash key
|
81
78
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
82
79
|
if (!self.class.attribute_map.key?(k.to_sym))
|
83
|
-
|
84
|
-
else
|
85
|
-
h[k.to_sym] = v
|
80
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ChangeEventCustomAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
86
81
|
end
|
82
|
+
h[k.to_sym] = v
|
87
83
|
}
|
88
84
|
|
89
85
|
if attributes.key?(:'author')
|
@@ -118,6 +114,7 @@ module DatadogAPIClient::V2
|
|
118
114
|
# @!visibility private
|
119
115
|
def valid?
|
120
116
|
return false if @changed_resource.nil?
|
117
|
+
return false if !@impacted_resources.nil? && @impacted_resources.length > 100
|
121
118
|
true
|
122
119
|
end
|
123
120
|
|
@@ -131,24 +128,14 @@ module DatadogAPIClient::V2
|
|
131
128
|
@changed_resource = changed_resource
|
132
129
|
end
|
133
130
|
|
134
|
-
#
|
135
|
-
# @
|
131
|
+
# Custom attribute writer method with validation
|
132
|
+
# @param impacted_resources [Object] Object to be assigned
|
136
133
|
# @!visibility private
|
137
|
-
def
|
138
|
-
|
139
|
-
|
140
|
-
value = self.send(attr)
|
141
|
-
if value.nil?
|
142
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
143
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
144
|
-
end
|
145
|
-
|
146
|
-
hash[param] = _to_hash(value)
|
147
|
-
end
|
148
|
-
self.additional_properties.each_pair do |attr, value|
|
149
|
-
hash[attr] = value
|
134
|
+
def impacted_resources=(impacted_resources)
|
135
|
+
if !impacted_resources.nil? && impacted_resources.length > 100
|
136
|
+
fail ArgumentError, 'invalid value for "impacted_resources", number of items must be less than or equal to 100.'
|
150
137
|
end
|
151
|
-
|
138
|
+
@impacted_resources = impacted_resources
|
152
139
|
end
|
153
140
|
|
154
141
|
# Checks equality by comparing each attribute.
|
@@ -162,15 +149,14 @@ module DatadogAPIClient::V2
|
|
162
149
|
changed_resource == o.changed_resource &&
|
163
150
|
impacted_resources == o.impacted_resources &&
|
164
151
|
new_value == o.new_value &&
|
165
|
-
prev_value == o.prev_value
|
166
|
-
additional_properties == o.additional_properties
|
152
|
+
prev_value == o.prev_value
|
167
153
|
end
|
168
154
|
|
169
155
|
# Calculates hash code according to all attributes.
|
170
156
|
# @return [Integer] Hash code
|
171
157
|
# @!visibility private
|
172
158
|
def hash
|
173
|
-
[author, change_metadata, changed_resource, impacted_resources, new_value, prev_value
|
159
|
+
[author, change_metadata, changed_resource, impacted_resources, new_value, prev_value].hash
|
174
160
|
end
|
175
161
|
end
|
176
162
|
end
|
@@ -17,18 +17,16 @@ require 'date'
|
|
17
17
|
require 'time'
|
18
18
|
|
19
19
|
module DatadogAPIClient::V2
|
20
|
-
#
|
20
|
+
# The entity that made the change. Optional, if provided it must include `type` and `name`.
|
21
21
|
class ChangeEventCustomAttributesAuthor
|
22
22
|
include BaseGenericModel
|
23
23
|
|
24
|
-
#
|
24
|
+
# The name of the user or system that made the change. Limited to 128 characters.
|
25
25
|
attr_reader :name
|
26
26
|
|
27
27
|
# Author's type.
|
28
28
|
attr_reader :type
|
29
29
|
|
30
|
-
attr_accessor :additional_properties
|
31
|
-
|
32
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
33
31
|
# @!visibility private
|
34
32
|
def self.attribute_map
|
@@ -55,14 +53,12 @@ module DatadogAPIClient::V2
|
|
55
53
|
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ChangeEventCustomAttributesAuthor` initialize method"
|
56
54
|
end
|
57
55
|
|
58
|
-
self.additional_properties = {}
|
59
56
|
# check to see if the attribute exists and convert string to symbol for hash key
|
60
57
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
61
58
|
if (!self.class.attribute_map.key?(k.to_sym))
|
62
|
-
|
63
|
-
else
|
64
|
-
h[k.to_sym] = v
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ChangeEventCustomAttributesAuthor`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
65
60
|
end
|
61
|
+
h[k.to_sym] = v
|
66
62
|
}
|
67
63
|
|
68
64
|
if attributes.key?(:'name')
|
@@ -80,6 +76,7 @@ module DatadogAPIClient::V2
|
|
80
76
|
def valid?
|
81
77
|
return false if @name.nil?
|
82
78
|
return false if @name.to_s.length > 128
|
79
|
+
return false if @name.to_s.length < 1
|
83
80
|
return false if @type.nil?
|
84
81
|
true
|
85
82
|
end
|
@@ -94,6 +91,9 @@ module DatadogAPIClient::V2
|
|
94
91
|
if name.to_s.length > 128
|
95
92
|
fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 128.'
|
96
93
|
end
|
94
|
+
if name.to_s.length < 1
|
95
|
+
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
96
|
+
end
|
97
97
|
@name = name
|
98
98
|
end
|
99
99
|
|
@@ -107,26 +107,6 @@ module DatadogAPIClient::V2
|
|
107
107
|
@type = type
|
108
108
|
end
|
109
109
|
|
110
|
-
# Returns the object in the form of hash, with additionalProperties support.
|
111
|
-
# @return [Hash] Returns the object in the form of hash
|
112
|
-
# @!visibility private
|
113
|
-
def to_hash
|
114
|
-
hash = {}
|
115
|
-
self.class.attribute_map.each_pair do |attr, param|
|
116
|
-
value = self.send(attr)
|
117
|
-
if value.nil?
|
118
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
119
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
120
|
-
end
|
121
|
-
|
122
|
-
hash[param] = _to_hash(value)
|
123
|
-
end
|
124
|
-
self.additional_properties.each_pair do |attr, value|
|
125
|
-
hash[attr] = value
|
126
|
-
end
|
127
|
-
hash
|
128
|
-
end
|
129
|
-
|
130
110
|
# Checks equality by comparing each attribute.
|
131
111
|
# @param o [Object] Object to be compared
|
132
112
|
# @!visibility private
|
@@ -134,15 +114,14 @@ module DatadogAPIClient::V2
|
|
134
114
|
return true if self.equal?(o)
|
135
115
|
self.class == o.class &&
|
136
116
|
name == o.name &&
|
137
|
-
type == o.type
|
138
|
-
additional_properties == o.additional_properties
|
117
|
+
type == o.type
|
139
118
|
end
|
140
119
|
|
141
120
|
# Calculates hash code according to all attributes.
|
142
121
|
# @return [Integer] Hash code
|
143
122
|
# @!visibility private
|
144
123
|
def hash
|
145
|
-
[name, type
|
124
|
+
[name, type].hash
|
146
125
|
end
|
147
126
|
end
|
148
127
|
end
|
@@ -17,18 +17,16 @@ require 'date'
|
|
17
17
|
require 'time'
|
18
18
|
|
19
19
|
module DatadogAPIClient::V2
|
20
|
-
#
|
20
|
+
# A uniquely identified resource.
|
21
21
|
class ChangeEventCustomAttributesChangedResource
|
22
22
|
include BaseGenericModel
|
23
23
|
|
24
|
-
#
|
24
|
+
# The name of the resource that was changed. Limited to 128 characters.
|
25
25
|
attr_reader :name
|
26
26
|
|
27
|
-
#
|
27
|
+
# The type of the resource that was changed.
|
28
28
|
attr_reader :type
|
29
29
|
|
30
|
-
attr_accessor :additional_properties
|
31
|
-
|
32
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
33
31
|
# @!visibility private
|
34
32
|
def self.attribute_map
|
@@ -55,14 +53,12 @@ module DatadogAPIClient::V2
|
|
55
53
|
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ChangeEventCustomAttributesChangedResource` initialize method"
|
56
54
|
end
|
57
55
|
|
58
|
-
self.additional_properties = {}
|
59
56
|
# check to see if the attribute exists and convert string to symbol for hash key
|
60
57
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
61
58
|
if (!self.class.attribute_map.key?(k.to_sym))
|
62
|
-
|
63
|
-
else
|
64
|
-
h[k.to_sym] = v
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ChangeEventCustomAttributesChangedResource`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
65
60
|
end
|
61
|
+
h[k.to_sym] = v
|
66
62
|
}
|
67
63
|
|
68
64
|
if attributes.key?(:'name')
|
@@ -79,6 +75,8 @@ module DatadogAPIClient::V2
|
|
79
75
|
# @!visibility private
|
80
76
|
def valid?
|
81
77
|
return false if @name.nil?
|
78
|
+
return false if @name.to_s.length > 128
|
79
|
+
return false if @name.to_s.length < 1
|
82
80
|
return false if @type.nil?
|
83
81
|
true
|
84
82
|
end
|
@@ -90,6 +88,12 @@ module DatadogAPIClient::V2
|
|
90
88
|
if name.nil?
|
91
89
|
fail ArgumentError, 'invalid value for "name", name cannot be nil.'
|
92
90
|
end
|
91
|
+
if name.to_s.length > 128
|
92
|
+
fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 128.'
|
93
|
+
end
|
94
|
+
if name.to_s.length < 1
|
95
|
+
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
96
|
+
end
|
93
97
|
@name = name
|
94
98
|
end
|
95
99
|
|
@@ -103,26 +107,6 @@ module DatadogAPIClient::V2
|
|
103
107
|
@type = type
|
104
108
|
end
|
105
109
|
|
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
110
|
# Checks equality by comparing each attribute.
|
127
111
|
# @param o [Object] Object to be compared
|
128
112
|
# @!visibility private
|
@@ -130,15 +114,14 @@ module DatadogAPIClient::V2
|
|
130
114
|
return true if self.equal?(o)
|
131
115
|
self.class == o.class &&
|
132
116
|
name == o.name &&
|
133
|
-
type == o.type
|
134
|
-
additional_properties == o.additional_properties
|
117
|
+
type == o.type
|
135
118
|
end
|
136
119
|
|
137
120
|
# Calculates hash code according to all attributes.
|
138
121
|
# @return [Integer] Hash code
|
139
122
|
# @!visibility private
|
140
123
|
def hash
|
141
|
-
[name, type
|
124
|
+
[name, type].hash
|
142
125
|
end
|
143
126
|
end
|
144
127
|
end
|
data/lib/datadog_api_client/v2/models/change_event_custom_attributes_impacted_resources_items.rb
CHANGED
@@ -17,18 +17,16 @@ require 'date'
|
|
17
17
|
require 'time'
|
18
18
|
|
19
19
|
module DatadogAPIClient::V2
|
20
|
-
# Object representing a uniquely identified resource.
|
20
|
+
# Object representing a uniquely identified resource.
|
21
21
|
class ChangeEventCustomAttributesImpactedResourcesItems
|
22
22
|
include BaseGenericModel
|
23
23
|
|
24
|
-
#
|
24
|
+
# The name of the impacted resource. Limited to 128 characters.
|
25
25
|
attr_reader :name
|
26
26
|
|
27
|
-
#
|
27
|
+
# The type of the impacted resource.
|
28
28
|
attr_reader :type
|
29
29
|
|
30
|
-
attr_accessor :additional_properties
|
31
|
-
|
32
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
33
31
|
# @!visibility private
|
34
32
|
def self.attribute_map
|
@@ -55,14 +53,12 @@ module DatadogAPIClient::V2
|
|
55
53
|
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ChangeEventCustomAttributesImpactedResourcesItems` initialize method"
|
56
54
|
end
|
57
55
|
|
58
|
-
self.additional_properties = {}
|
59
56
|
# check to see if the attribute exists and convert string to symbol for hash key
|
60
57
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
61
58
|
if (!self.class.attribute_map.key?(k.to_sym))
|
62
|
-
|
63
|
-
else
|
64
|
-
h[k.to_sym] = v
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ChangeEventCustomAttributesImpactedResourcesItems`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
65
60
|
end
|
61
|
+
h[k.to_sym] = v
|
66
62
|
}
|
67
63
|
|
68
64
|
if attributes.key?(:'name')
|
@@ -79,6 +75,8 @@ module DatadogAPIClient::V2
|
|
79
75
|
# @!visibility private
|
80
76
|
def valid?
|
81
77
|
return false if @name.nil?
|
78
|
+
return false if @name.to_s.length > 128
|
79
|
+
return false if @name.to_s.length < 1
|
82
80
|
return false if @type.nil?
|
83
81
|
true
|
84
82
|
end
|
@@ -90,6 +88,12 @@ module DatadogAPIClient::V2
|
|
90
88
|
if name.nil?
|
91
89
|
fail ArgumentError, 'invalid value for "name", name cannot be nil.'
|
92
90
|
end
|
91
|
+
if name.to_s.length > 128
|
92
|
+
fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 128.'
|
93
|
+
end
|
94
|
+
if name.to_s.length < 1
|
95
|
+
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
96
|
+
end
|
93
97
|
@name = name
|
94
98
|
end
|
95
99
|
|
@@ -103,26 +107,6 @@ module DatadogAPIClient::V2
|
|
103
107
|
@type = type
|
104
108
|
end
|
105
109
|
|
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
110
|
# Checks equality by comparing each attribute.
|
127
111
|
# @param o [Object] Object to be compared
|
128
112
|
# @!visibility private
|
@@ -130,15 +114,14 @@ module DatadogAPIClient::V2
|
|
130
114
|
return true if self.equal?(o)
|
131
115
|
self.class == o.class &&
|
132
116
|
name == o.name &&
|
133
|
-
type == o.type
|
134
|
-
additional_properties == o.additional_properties
|
117
|
+
type == o.type
|
135
118
|
end
|
136
119
|
|
137
120
|
# Calculates hash code according to all attributes.
|
138
121
|
# @return [Integer] Hash code
|
139
122
|
# @!visibility private
|
140
123
|
def hash
|
141
|
-
[name, type
|
124
|
+
[name, type].hash
|
142
125
|
end
|
143
126
|
end
|
144
127
|
end
|
@@ -0,0 +1,154 @@
|
|
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
|
+
# Dataset object.
|
21
|
+
class Dataset
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Dataset metadata and configuration(s).
|
25
|
+
attr_reader :attributes
|
26
|
+
|
27
|
+
# Unique identifier for the dataset.
|
28
|
+
attr_accessor :id
|
29
|
+
|
30
|
+
# Resource type, always "dataset".
|
31
|
+
attr_reader :type
|
32
|
+
|
33
|
+
attr_accessor :additional_properties
|
34
|
+
|
35
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
36
|
+
# @!visibility private
|
37
|
+
def self.attribute_map
|
38
|
+
{
|
39
|
+
:'attributes' => :'attributes',
|
40
|
+
:'id' => :'id',
|
41
|
+
:'type' => :'type'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# Attribute type mapping.
|
46
|
+
# @!visibility private
|
47
|
+
def self.openapi_types
|
48
|
+
{
|
49
|
+
:'attributes' => :'DatasetAttributes',
|
50
|
+
:'id' => :'String',
|
51
|
+
:'type' => :'String'
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# Initializes the object
|
56
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
57
|
+
# @!visibility private
|
58
|
+
def initialize(attributes = {})
|
59
|
+
if (!attributes.is_a?(Hash))
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::Dataset` initialize method"
|
61
|
+
end
|
62
|
+
|
63
|
+
self.additional_properties = {}
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
66
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
67
|
+
self.additional_properties[k.to_sym] = v
|
68
|
+
else
|
69
|
+
h[k.to_sym] = v
|
70
|
+
end
|
71
|
+
}
|
72
|
+
|
73
|
+
if attributes.key?(:'attributes')
|
74
|
+
self.attributes = attributes[:'attributes']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.key?(:'id')
|
78
|
+
self.id = attributes[:'id']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.key?(:'type')
|
82
|
+
self.type = attributes[:'type']
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
# Check to see if the all the properties in the model are valid
|
87
|
+
# @return true if the model is valid
|
88
|
+
# @!visibility private
|
89
|
+
def valid?
|
90
|
+
return false if @attributes.nil?
|
91
|
+
return false if @type.nil?
|
92
|
+
true
|
93
|
+
end
|
94
|
+
|
95
|
+
# Custom attribute writer method with validation
|
96
|
+
# @param attributes [Object] Object to be assigned
|
97
|
+
# @!visibility private
|
98
|
+
def attributes=(attributes)
|
99
|
+
if attributes.nil?
|
100
|
+
fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
|
101
|
+
end
|
102
|
+
@attributes = attributes
|
103
|
+
end
|
104
|
+
|
105
|
+
# Custom attribute writer method with validation
|
106
|
+
# @param type [Object] Object to be assigned
|
107
|
+
# @!visibility private
|
108
|
+
def type=(type)
|
109
|
+
if type.nil?
|
110
|
+
fail ArgumentError, 'invalid value for "type", type cannot be nil.'
|
111
|
+
end
|
112
|
+
@type = type
|
113
|
+
end
|
114
|
+
|
115
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
116
|
+
# @return [Hash] Returns the object in the form of hash
|
117
|
+
# @!visibility private
|
118
|
+
def to_hash
|
119
|
+
hash = {}
|
120
|
+
self.class.attribute_map.each_pair do |attr, param|
|
121
|
+
value = self.send(attr)
|
122
|
+
if value.nil?
|
123
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
124
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
125
|
+
end
|
126
|
+
|
127
|
+
hash[param] = _to_hash(value)
|
128
|
+
end
|
129
|
+
self.additional_properties.each_pair do |attr, value|
|
130
|
+
hash[attr] = value
|
131
|
+
end
|
132
|
+
hash
|
133
|
+
end
|
134
|
+
|
135
|
+
# Checks equality by comparing each attribute.
|
136
|
+
# @param o [Object] Object to be compared
|
137
|
+
# @!visibility private
|
138
|
+
def ==(o)
|
139
|
+
return true if self.equal?(o)
|
140
|
+
self.class == o.class &&
|
141
|
+
attributes == o.attributes &&
|
142
|
+
id == o.id &&
|
143
|
+
type == o.type &&
|
144
|
+
additional_properties == o.additional_properties
|
145
|
+
end
|
146
|
+
|
147
|
+
# Calculates hash code according to all attributes.
|
148
|
+
# @return [Integer] Hash code
|
149
|
+
# @!visibility private
|
150
|
+
def hash
|
151
|
+
[attributes, id, type, additional_properties].hash
|
152
|
+
end
|
153
|
+
end
|
154
|
+
end
|