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
@@ -0,0 +1,105 @@
|
|
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
|
+
# Author of the SBOM.
|
21
|
+
class SBOMMetadataAuthor
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# The identifier of the Author of the SBOM.
|
25
|
+
attr_accessor :name
|
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
|
+
:'name' => :'name'
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
# Attribute type mapping.
|
38
|
+
# @!visibility private
|
39
|
+
def self.openapi_types
|
40
|
+
{
|
41
|
+
:'name' => :'String'
|
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::SBOMMetadataAuthor` 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?(:'name')
|
64
|
+
self.name = attributes[:'name']
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
69
|
+
# @return [Hash] Returns the object in the form of hash
|
70
|
+
# @!visibility private
|
71
|
+
def to_hash
|
72
|
+
hash = {}
|
73
|
+
self.class.attribute_map.each_pair do |attr, param|
|
74
|
+
value = self.send(attr)
|
75
|
+
if value.nil?
|
76
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
77
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
78
|
+
end
|
79
|
+
|
80
|
+
hash[param] = _to_hash(value)
|
81
|
+
end
|
82
|
+
self.additional_properties.each_pair do |attr, value|
|
83
|
+
hash[attr] = value
|
84
|
+
end
|
85
|
+
hash
|
86
|
+
end
|
87
|
+
|
88
|
+
# Checks equality by comparing each attribute.
|
89
|
+
# @param o [Object] Object to be compared
|
90
|
+
# @!visibility private
|
91
|
+
def ==(o)
|
92
|
+
return true if self.equal?(o)
|
93
|
+
self.class == o.class &&
|
94
|
+
name == o.name &&
|
95
|
+
additional_properties == o.additional_properties
|
96
|
+
end
|
97
|
+
|
98
|
+
# Calculates hash code according to all attributes.
|
99
|
+
# @return [Integer] Hash code
|
100
|
+
# @!visibility private
|
101
|
+
def hash
|
102
|
+
[name, additional_properties].hash
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items.rb
CHANGED
@@ -27,7 +27,7 @@ module DatadogAPIClient::V2
|
|
27
27
|
# The date/time after which this layer no longer applies (in ISO 8601).
|
28
28
|
attr_accessor :end_date
|
29
29
|
|
30
|
-
# Defines how often the rotation repeats, using a combination of days and optional seconds.
|
30
|
+
# Defines how often the rotation repeats, using a combination of days and optional seconds. Should be at least 1 hour.
|
31
31
|
attr_reader :interval
|
32
32
|
|
33
33
|
# A list of members who participate in this layer's rotation.
|
data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items.rb
CHANGED
@@ -31,7 +31,7 @@ module DatadogAPIClient::V2
|
|
31
31
|
# A unique identifier for the layer being updated.
|
32
32
|
attr_accessor :id
|
33
33
|
|
34
|
-
# Defines how often the rotation repeats, using a combination of days and optional seconds.
|
34
|
+
# Defines how often the rotation repeats, using a combination of days and optional seconds. Should be at least 1 hour.
|
35
35
|
attr_reader :interval
|
36
36
|
|
37
37
|
# The members assigned to this layer.
|
@@ -0,0 +1,188 @@
|
|
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
|
+
# A simplified version of a monitor user template.
|
21
|
+
class SimpleMonitorUserTemplate
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# The created timestamp of the template.
|
25
|
+
attr_accessor :created
|
26
|
+
|
27
|
+
# A brief description of the monitor user template.
|
28
|
+
attr_accessor :description
|
29
|
+
|
30
|
+
# The unique identifier. The initial version will match the template ID.
|
31
|
+
attr_accessor :id
|
32
|
+
|
33
|
+
# A valid monitor definition in the same format as the [V1 Monitor API](https://docs.datadoghq.com/api/latest/monitors/#create-a-monitor).
|
34
|
+
attr_accessor :monitor_definition
|
35
|
+
|
36
|
+
# The definition of `MonitorUserTemplateTags` object.
|
37
|
+
attr_accessor :tags
|
38
|
+
|
39
|
+
# The definition of `MonitorUserTemplateTemplateVariables` object.
|
40
|
+
attr_accessor :template_variables
|
41
|
+
|
42
|
+
# The title of the monitor user template.
|
43
|
+
attr_accessor :title
|
44
|
+
|
45
|
+
# The version of the monitor user template.
|
46
|
+
attr_accessor :version
|
47
|
+
|
48
|
+
attr_accessor :additional_properties
|
49
|
+
|
50
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
51
|
+
# @!visibility private
|
52
|
+
def self.attribute_map
|
53
|
+
{
|
54
|
+
:'created' => :'created',
|
55
|
+
:'description' => :'description',
|
56
|
+
:'id' => :'id',
|
57
|
+
:'monitor_definition' => :'monitor_definition',
|
58
|
+
:'tags' => :'tags',
|
59
|
+
:'template_variables' => :'template_variables',
|
60
|
+
:'title' => :'title',
|
61
|
+
:'version' => :'version'
|
62
|
+
}
|
63
|
+
end
|
64
|
+
|
65
|
+
# Attribute type mapping.
|
66
|
+
# @!visibility private
|
67
|
+
def self.openapi_types
|
68
|
+
{
|
69
|
+
:'created' => :'Time',
|
70
|
+
:'description' => :'String',
|
71
|
+
:'id' => :'String',
|
72
|
+
:'monitor_definition' => :'Hash<String, Object>',
|
73
|
+
:'tags' => :'Array<String>',
|
74
|
+
:'template_variables' => :'Array<MonitorUserTemplateTemplateVariablesItems>',
|
75
|
+
:'title' => :'String',
|
76
|
+
:'version' => :'Integer'
|
77
|
+
}
|
78
|
+
end
|
79
|
+
|
80
|
+
# List of attributes with nullable: true
|
81
|
+
# @!visibility private
|
82
|
+
def self.openapi_nullable
|
83
|
+
Set.new([
|
84
|
+
:'description',
|
85
|
+
:'version',
|
86
|
+
])
|
87
|
+
end
|
88
|
+
|
89
|
+
# Initializes the object
|
90
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
91
|
+
# @!visibility private
|
92
|
+
def initialize(attributes = {})
|
93
|
+
if (!attributes.is_a?(Hash))
|
94
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SimpleMonitorUserTemplate` initialize method"
|
95
|
+
end
|
96
|
+
|
97
|
+
self.additional_properties = {}
|
98
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
99
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
100
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
101
|
+
self.additional_properties[k.to_sym] = v
|
102
|
+
else
|
103
|
+
h[k.to_sym] = v
|
104
|
+
end
|
105
|
+
}
|
106
|
+
|
107
|
+
if attributes.key?(:'created')
|
108
|
+
self.created = attributes[:'created']
|
109
|
+
end
|
110
|
+
|
111
|
+
if attributes.key?(:'description')
|
112
|
+
self.description = attributes[:'description']
|
113
|
+
end
|
114
|
+
|
115
|
+
if attributes.key?(:'id')
|
116
|
+
self.id = attributes[:'id']
|
117
|
+
end
|
118
|
+
|
119
|
+
if attributes.key?(:'monitor_definition')
|
120
|
+
self.monitor_definition = attributes[:'monitor_definition']
|
121
|
+
end
|
122
|
+
|
123
|
+
if attributes.key?(:'tags')
|
124
|
+
if (value = attributes[:'tags']).is_a?(Array)
|
125
|
+
self.tags = value
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
if attributes.key?(:'template_variables')
|
130
|
+
if (value = attributes[:'template_variables']).is_a?(Array)
|
131
|
+
self.template_variables = value
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
if attributes.key?(:'title')
|
136
|
+
self.title = attributes[:'title']
|
137
|
+
end
|
138
|
+
|
139
|
+
if attributes.key?(:'version')
|
140
|
+
self.version = attributes[:'version']
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
145
|
+
# @return [Hash] Returns the object in the form of hash
|
146
|
+
# @!visibility private
|
147
|
+
def to_hash
|
148
|
+
hash = {}
|
149
|
+
self.class.attribute_map.each_pair do |attr, param|
|
150
|
+
value = self.send(attr)
|
151
|
+
if value.nil?
|
152
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
153
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
154
|
+
end
|
155
|
+
|
156
|
+
hash[param] = _to_hash(value)
|
157
|
+
end
|
158
|
+
self.additional_properties.each_pair do |attr, value|
|
159
|
+
hash[attr] = value
|
160
|
+
end
|
161
|
+
hash
|
162
|
+
end
|
163
|
+
|
164
|
+
# Checks equality by comparing each attribute.
|
165
|
+
# @param o [Object] Object to be compared
|
166
|
+
# @!visibility private
|
167
|
+
def ==(o)
|
168
|
+
return true if self.equal?(o)
|
169
|
+
self.class == o.class &&
|
170
|
+
created == o.created &&
|
171
|
+
description == o.description &&
|
172
|
+
id == o.id &&
|
173
|
+
monitor_definition == o.monitor_definition &&
|
174
|
+
tags == o.tags &&
|
175
|
+
template_variables == o.template_variables &&
|
176
|
+
title == o.title &&
|
177
|
+
version == o.version &&
|
178
|
+
additional_properties == o.additional_properties
|
179
|
+
end
|
180
|
+
|
181
|
+
# Calculates hash code according to all attributes.
|
182
|
+
# @return [Integer] Hash code
|
183
|
+
# @!visibility private
|
184
|
+
def hash
|
185
|
+
[created, description, id, monitor_definition, tags, template_variables, title, version, additional_properties].hash
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|
@@ -60,6 +60,9 @@ module DatadogAPIClient::V2
|
|
60
60
|
# Vulnerability library.
|
61
61
|
attr_accessor :library
|
62
62
|
|
63
|
+
# Vulnerability origin.
|
64
|
+
attr_reader :origin
|
65
|
+
|
63
66
|
# List of remediations.
|
64
67
|
attr_reader :remediations
|
65
68
|
|
@@ -100,6 +103,7 @@ module DatadogAPIClient::V2
|
|
100
103
|
:'language' => :'language',
|
101
104
|
:'last_detection' => :'last_detection',
|
102
105
|
:'library' => :'library',
|
106
|
+
:'origin' => :'origin',
|
103
107
|
:'remediations' => :'remediations',
|
104
108
|
:'repo_digests' => :'repo_digests',
|
105
109
|
:'risks' => :'risks',
|
@@ -127,6 +131,7 @@ module DatadogAPIClient::V2
|
|
127
131
|
:'language' => :'String',
|
128
132
|
:'last_detection' => :'String',
|
129
133
|
:'library' => :'Library',
|
134
|
+
:'origin' => :'Array<String>',
|
130
135
|
:'remediations' => :'Array<Remediation>',
|
131
136
|
:'repo_digests' => :'Array<String>',
|
132
137
|
:'risks' => :'VulnerabilityRisks',
|
@@ -209,6 +214,12 @@ module DatadogAPIClient::V2
|
|
209
214
|
self.library = attributes[:'library']
|
210
215
|
end
|
211
216
|
|
217
|
+
if attributes.key?(:'origin')
|
218
|
+
if (value = attributes[:'origin']).is_a?(Array)
|
219
|
+
self.origin = value
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
212
223
|
if attributes.key?(:'remediations')
|
213
224
|
if (value = attributes[:'remediations']).is_a?(Array)
|
214
225
|
self.remediations = value
|
@@ -254,6 +265,7 @@ module DatadogAPIClient::V2
|
|
254
265
|
return false if @fix_available.nil?
|
255
266
|
return false if @language.nil?
|
256
267
|
return false if @last_detection.nil?
|
268
|
+
return false if @origin.nil?
|
257
269
|
return false if @remediations.nil?
|
258
270
|
return false if @risks.nil?
|
259
271
|
return false if @status.nil?
|
@@ -343,6 +355,16 @@ module DatadogAPIClient::V2
|
|
343
355
|
@last_detection = last_detection
|
344
356
|
end
|
345
357
|
|
358
|
+
# Custom attribute writer method with validation
|
359
|
+
# @param origin [Object] Object to be assigned
|
360
|
+
# @!visibility private
|
361
|
+
def origin=(origin)
|
362
|
+
if origin.nil?
|
363
|
+
fail ArgumentError, 'invalid value for "origin", origin cannot be nil.'
|
364
|
+
end
|
365
|
+
@origin = origin
|
366
|
+
end
|
367
|
+
|
346
368
|
# Custom attribute writer method with validation
|
347
369
|
# @param remediations [Object] Object to be assigned
|
348
370
|
# @!visibility private
|
@@ -442,6 +464,7 @@ module DatadogAPIClient::V2
|
|
442
464
|
language == o.language &&
|
443
465
|
last_detection == o.last_detection &&
|
444
466
|
library == o.library &&
|
467
|
+
origin == o.origin &&
|
445
468
|
remediations == o.remediations &&
|
446
469
|
repo_digests == o.repo_digests &&
|
447
470
|
risks == o.risks &&
|
@@ -456,7 +479,7 @@ module DatadogAPIClient::V2
|
|
456
479
|
# @return [Integer] Hash code
|
457
480
|
# @!visibility private
|
458
481
|
def hash
|
459
|
-
[advisory_id, code_location, cve_list, cvss, dependency_locations, description, ecosystem, exposure_time, first_detection, fix_available, language, last_detection, library, remediations, repo_digests, risks, status, title, tool, type, additional_properties].hash
|
482
|
+
[advisory_id, code_location, cve_list, cvss, dependency_locations, description, ecosystem, exposure_time, first_detection, fix_available, language, last_detection, library, origin, remediations, repo_digests, risks, status, title, tool, type, additional_properties].hash
|
460
483
|
end
|
461
484
|
end
|
462
485
|
end
|