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.
- checksums.yaml +4 -4
- data/.generated-info +4 -0
- data/.generator/schemas/v1/openapi.yaml +493 -13
- data/.generator/schemas/v2/openapi.yaml +1021 -36
- data/.github/workflows/approved_status.yml +1 -0
- data/.github/workflows/test.yml +1 -1
- data/CHANGELOG.md +16 -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/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/monitors/CreateMonitorNotificationRule.rb +0 -3
- data/examples/v2/monitors/DeleteMonitorNotificationRule.rb +0 -3
- data/examples/v2/monitors/GetMonitorNotificationRule.rb +0 -3
- data/examples/v2/monitors/GetMonitorNotificationRules.rb +0 -3
- data/examples/v2/monitors/UpdateMonitorNotificationRule.rb +0 -3
- 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 +1 -5
- data/lib/datadog_api_client/inflector.rb +41 -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_step_type.rb +1 -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/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 +2 -0
- data/lib/datadog_api_client/v2/api/monitors_api.rb +0 -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/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/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/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/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_assets_sbo_ms_response.rb +145 -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/vulnerability_attributes.rb +24 -1
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +63 -2
- data/.apigentools-info +0 -16
@@ -27,6 +27,9 @@ module DatadogAPIClient::V2
|
|
27
27
|
# A list of software and hardware components.
|
28
28
|
attr_reader :components
|
29
29
|
|
30
|
+
# List of dependencies between components of the SBOM.
|
31
|
+
attr_reader :dependencies
|
32
|
+
|
30
33
|
# Provides additional information about a BOM.
|
31
34
|
attr_reader :metadata
|
32
35
|
|
@@ -47,6 +50,7 @@ module DatadogAPIClient::V2
|
|
47
50
|
{
|
48
51
|
:'bom_format' => :'bomFormat',
|
49
52
|
:'components' => :'components',
|
53
|
+
:'dependencies' => :'dependencies',
|
50
54
|
:'metadata' => :'metadata',
|
51
55
|
:'serial_number' => :'serialNumber',
|
52
56
|
:'spec_version' => :'specVersion',
|
@@ -60,6 +64,7 @@ module DatadogAPIClient::V2
|
|
60
64
|
{
|
61
65
|
:'bom_format' => :'String',
|
62
66
|
:'components' => :'Array<SBOMComponent>',
|
67
|
+
:'dependencies' => :'Array<SBOMComponentDependency>',
|
63
68
|
:'metadata' => :'SBOMMetadata',
|
64
69
|
:'serial_number' => :'String',
|
65
70
|
:'spec_version' => :'SpecVersion',
|
@@ -95,6 +100,12 @@ module DatadogAPIClient::V2
|
|
95
100
|
end
|
96
101
|
end
|
97
102
|
|
103
|
+
if attributes.key?(:'dependencies')
|
104
|
+
if (value = attributes[:'dependencies']).is_a?(Array)
|
105
|
+
self.dependencies = value
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
98
109
|
if attributes.key?(:'metadata')
|
99
110
|
self.metadata = attributes[:'metadata']
|
100
111
|
end
|
@@ -118,6 +129,7 @@ module DatadogAPIClient::V2
|
|
118
129
|
def valid?
|
119
130
|
return false if @bom_format.nil?
|
120
131
|
return false if @components.nil?
|
132
|
+
return false if @dependencies.nil?
|
121
133
|
return false if @metadata.nil?
|
122
134
|
return false if @serial_number.nil?
|
123
135
|
return false if @spec_version.nil?
|
@@ -145,6 +157,16 @@ module DatadogAPIClient::V2
|
|
145
157
|
@components = components
|
146
158
|
end
|
147
159
|
|
160
|
+
# Custom attribute writer method with validation
|
161
|
+
# @param dependencies [Object] Object to be assigned
|
162
|
+
# @!visibility private
|
163
|
+
def dependencies=(dependencies)
|
164
|
+
if dependencies.nil?
|
165
|
+
fail ArgumentError, 'invalid value for "dependencies", dependencies cannot be nil.'
|
166
|
+
end
|
167
|
+
@dependencies = dependencies
|
168
|
+
end
|
169
|
+
|
148
170
|
# Custom attribute writer method with validation
|
149
171
|
# @param metadata [Object] Object to be assigned
|
150
172
|
# @!visibility private
|
@@ -213,6 +235,7 @@ module DatadogAPIClient::V2
|
|
213
235
|
self.class == o.class &&
|
214
236
|
bom_format == o.bom_format &&
|
215
237
|
components == o.components &&
|
238
|
+
dependencies == o.dependencies &&
|
216
239
|
metadata == o.metadata &&
|
217
240
|
serial_number == o.serial_number &&
|
218
241
|
spec_version == o.spec_version &&
|
@@ -224,7 +247,7 @@ module DatadogAPIClient::V2
|
|
224
247
|
# @return [Integer] Hash code
|
225
248
|
# @!visibility private
|
226
249
|
def hash
|
227
|
-
[bom_format, components, metadata, serial_number, spec_version, version, additional_properties].hash
|
250
|
+
[bom_format, components, dependencies, metadata, serial_number, spec_version, version, additional_properties].hash
|
228
251
|
end
|
229
252
|
end
|
230
253
|
end
|
@@ -24,12 +24,21 @@ module DatadogAPIClient::V2
|
|
24
24
|
# An optional identifier that can be used to reference the component elsewhere in the BOM.
|
25
25
|
attr_accessor :bom_ref
|
26
26
|
|
27
|
+
# The software licenses of the SBOM component.
|
28
|
+
attr_accessor :licenses
|
29
|
+
|
27
30
|
# The name of the component. This will often be a shortened, single name of the component.
|
28
31
|
attr_reader :name
|
29
32
|
|
33
|
+
# The custom properties of the component of the SBOM.
|
34
|
+
attr_accessor :properties
|
35
|
+
|
30
36
|
# Specifies the package-url (purl). The purl, if specified, MUST be valid and conform to the [specification](https://github.com/package-url/purl-spec).
|
31
37
|
attr_accessor :purl
|
32
38
|
|
39
|
+
# The supplier of the component.
|
40
|
+
attr_reader :supplier
|
41
|
+
|
33
42
|
# The SBOM component type
|
34
43
|
attr_reader :type
|
35
44
|
|
@@ -43,8 +52,11 @@ module DatadogAPIClient::V2
|
|
43
52
|
def self.attribute_map
|
44
53
|
{
|
45
54
|
:'bom_ref' => :'bom-ref',
|
55
|
+
:'licenses' => :'licenses',
|
46
56
|
:'name' => :'name',
|
57
|
+
:'properties' => :'properties',
|
47
58
|
:'purl' => :'purl',
|
59
|
+
:'supplier' => :'supplier',
|
48
60
|
:'type' => :'type',
|
49
61
|
:'version' => :'version'
|
50
62
|
}
|
@@ -55,8 +67,11 @@ module DatadogAPIClient::V2
|
|
55
67
|
def self.openapi_types
|
56
68
|
{
|
57
69
|
:'bom_ref' => :'String',
|
70
|
+
:'licenses' => :'Array<SBOMComponentLicense>',
|
58
71
|
:'name' => :'String',
|
72
|
+
:'properties' => :'Array<SBOMComponentProperty>',
|
59
73
|
:'purl' => :'String',
|
74
|
+
:'supplier' => :'SBOMComponentSupplier',
|
60
75
|
:'type' => :'SBOMComponentType',
|
61
76
|
:'version' => :'String'
|
62
77
|
}
|
@@ -84,14 +99,30 @@ module DatadogAPIClient::V2
|
|
84
99
|
self.bom_ref = attributes[:'bom_ref']
|
85
100
|
end
|
86
101
|
|
102
|
+
if attributes.key?(:'licenses')
|
103
|
+
if (value = attributes[:'licenses']).is_a?(Array)
|
104
|
+
self.licenses = value
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
87
108
|
if attributes.key?(:'name')
|
88
109
|
self.name = attributes[:'name']
|
89
110
|
end
|
90
111
|
|
112
|
+
if attributes.key?(:'properties')
|
113
|
+
if (value = attributes[:'properties']).is_a?(Array)
|
114
|
+
self.properties = value
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
91
118
|
if attributes.key?(:'purl')
|
92
119
|
self.purl = attributes[:'purl']
|
93
120
|
end
|
94
121
|
|
122
|
+
if attributes.key?(:'supplier')
|
123
|
+
self.supplier = attributes[:'supplier']
|
124
|
+
end
|
125
|
+
|
95
126
|
if attributes.key?(:'type')
|
96
127
|
self.type = attributes[:'type']
|
97
128
|
end
|
@@ -106,6 +137,7 @@ module DatadogAPIClient::V2
|
|
106
137
|
# @!visibility private
|
107
138
|
def valid?
|
108
139
|
return false if @name.nil?
|
140
|
+
return false if @supplier.nil?
|
109
141
|
return false if @type.nil?
|
110
142
|
return false if @version.nil?
|
111
143
|
true
|
@@ -121,6 +153,16 @@ module DatadogAPIClient::V2
|
|
121
153
|
@name = name
|
122
154
|
end
|
123
155
|
|
156
|
+
# Custom attribute writer method with validation
|
157
|
+
# @param supplier [Object] Object to be assigned
|
158
|
+
# @!visibility private
|
159
|
+
def supplier=(supplier)
|
160
|
+
if supplier.nil?
|
161
|
+
fail ArgumentError, 'invalid value for "supplier", supplier cannot be nil.'
|
162
|
+
end
|
163
|
+
@supplier = supplier
|
164
|
+
end
|
165
|
+
|
124
166
|
# Custom attribute writer method with validation
|
125
167
|
# @param type [Object] Object to be assigned
|
126
168
|
# @!visibility private
|
@@ -168,8 +210,11 @@ module DatadogAPIClient::V2
|
|
168
210
|
return true if self.equal?(o)
|
169
211
|
self.class == o.class &&
|
170
212
|
bom_ref == o.bom_ref &&
|
213
|
+
licenses == o.licenses &&
|
171
214
|
name == o.name &&
|
215
|
+
properties == o.properties &&
|
172
216
|
purl == o.purl &&
|
217
|
+
supplier == o.supplier &&
|
173
218
|
type == o.type &&
|
174
219
|
version == o.version &&
|
175
220
|
additional_properties == o.additional_properties
|
@@ -179,7 +224,7 @@ module DatadogAPIClient::V2
|
|
179
224
|
# @return [Integer] Hash code
|
180
225
|
# @!visibility private
|
181
226
|
def hash
|
182
|
-
[bom_ref, name, purl, type, version, additional_properties].hash
|
227
|
+
[bom_ref, licenses, name, properties, purl, supplier, type, version, additional_properties].hash
|
183
228
|
end
|
184
229
|
end
|
185
230
|
end
|
@@ -0,0 +1,117 @@
|
|
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
|
+
# The dependencies of a component of the SBOM.
|
21
|
+
class SBOMComponentDependency
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# The components that are dependencies of the ref component.
|
25
|
+
attr_accessor :depends_on
|
26
|
+
|
27
|
+
# The identifier for the related component.
|
28
|
+
attr_accessor :ref
|
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
|
+
:'depends_on' => :'dependsOn',
|
37
|
+
:'ref' => :'ref'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# Attribute type mapping.
|
42
|
+
# @!visibility private
|
43
|
+
def self.openapi_types
|
44
|
+
{
|
45
|
+
:'depends_on' => :'Array<String>',
|
46
|
+
:'ref' => :'String'
|
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::SBOMComponentDependency` 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?(:'depends_on')
|
69
|
+
if (value = attributes[:'depends_on']).is_a?(Array)
|
70
|
+
self.depends_on = value
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
if attributes.key?(:'ref')
|
75
|
+
self.ref = attributes[:'ref']
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
80
|
+
# @return [Hash] Returns the object in the form of hash
|
81
|
+
# @!visibility private
|
82
|
+
def to_hash
|
83
|
+
hash = {}
|
84
|
+
self.class.attribute_map.each_pair do |attr, param|
|
85
|
+
value = self.send(attr)
|
86
|
+
if value.nil?
|
87
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
88
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
89
|
+
end
|
90
|
+
|
91
|
+
hash[param] = _to_hash(value)
|
92
|
+
end
|
93
|
+
self.additional_properties.each_pair do |attr, value|
|
94
|
+
hash[attr] = value
|
95
|
+
end
|
96
|
+
hash
|
97
|
+
end
|
98
|
+
|
99
|
+
# Checks equality by comparing each attribute.
|
100
|
+
# @param o [Object] Object to be compared
|
101
|
+
# @!visibility private
|
102
|
+
def ==(o)
|
103
|
+
return true if self.equal?(o)
|
104
|
+
self.class == o.class &&
|
105
|
+
depends_on == o.depends_on &&
|
106
|
+
ref == o.ref &&
|
107
|
+
additional_properties == o.additional_properties
|
108
|
+
end
|
109
|
+
|
110
|
+
# Calculates hash code according to all attributes.
|
111
|
+
# @return [Integer] Hash code
|
112
|
+
# @!visibility private
|
113
|
+
def hash
|
114
|
+
[depends_on, ref, additional_properties].hash
|
115
|
+
end
|
116
|
+
end
|
117
|
+
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
|
+
# The software license of the component of the SBOM.
|
21
|
+
class SBOMComponentLicense
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# The software license of the component of the SBOM.
|
25
|
+
attr_reader :license
|
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
|
+
:'license' => :'license'
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
# Attribute type mapping.
|
38
|
+
# @!visibility private
|
39
|
+
def self.openapi_types
|
40
|
+
{
|
41
|
+
:'license' => :'SBOMComponentLicenseLicense'
|
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::SBOMComponentLicense` 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?(:'license')
|
64
|
+
self.license = attributes[:'license']
|
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 @license.nil?
|
73
|
+
true
|
74
|
+
end
|
75
|
+
|
76
|
+
# Custom attribute writer method with validation
|
77
|
+
# @param license [Object] Object to be assigned
|
78
|
+
# @!visibility private
|
79
|
+
def license=(license)
|
80
|
+
if license.nil?
|
81
|
+
fail ArgumentError, 'invalid value for "license", license cannot be nil.'
|
82
|
+
end
|
83
|
+
@license = license
|
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
|
+
license == o.license &&
|
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
|
+
[license, 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
|
+
# The software license of the component of the SBOM.
|
21
|
+
class SBOMComponentLicenseLicense
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# The name of the software license of the component of the SBOM.
|
25
|
+
attr_reader :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::SBOMComponentLicenseLicense` 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
|
+
# 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 @name.nil?
|
73
|
+
true
|
74
|
+
end
|
75
|
+
|
76
|
+
# Custom attribute writer method with validation
|
77
|
+
# @param name [Object] Object to be assigned
|
78
|
+
# @!visibility private
|
79
|
+
def name=(name)
|
80
|
+
if name.nil?
|
81
|
+
fail ArgumentError, 'invalid value for "name", name cannot be nil.'
|
82
|
+
end
|
83
|
+
@name = name
|
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
|
+
name == o.name &&
|
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
|
+
[name, additional_properties].hash
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
@@ -0,0 +1,33 @@
|
|
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
|
+
# The SBOM component license type.
|
21
|
+
class SBOMComponentLicenseType
|
22
|
+
include BaseEnumModel
|
23
|
+
|
24
|
+
NETWORK_STRONG_COPYLEFT = "network_strong_copyleft".freeze
|
25
|
+
NON_STANDARD_COPYLEFT = "non_standard_copyleft".freeze
|
26
|
+
OTHER_NON_FREE = "other_non_free".freeze
|
27
|
+
OTHER_NON_STANDARD = "other_non_standard".freeze
|
28
|
+
PERMISSIVE = "permissive".freeze
|
29
|
+
PUBLIC_DOMAIN = "public_domain".freeze
|
30
|
+
STRONG_COPYLEFT = "strong_copyleft".freeze
|
31
|
+
WEAK_COPYLEFT = "weak_copyleft".freeze
|
32
|
+
end
|
33
|
+
end
|