datadog_api_client 1.9.0 → 1.10.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/.apigentools-info +4 -4
- data/.generator/schemas/v1/openapi.yaml +489 -124
- data/.generator/schemas/v2/openapi.yaml +701 -28
- data/.generator/src/generator/formatter.py +6 -1
- data/.generator/src/generator/openapi.py +5 -5
- data/.generator/src/generator/templates/api_client.j2 +1 -4
- data/.generator/src/generator/templates/model_generic.j2 +42 -3
- data/.github/workflows/prepare_release.yml +15 -3
- data/CHANGELOG.md +32 -0
- data/Makefile +1 -1
- data/README.md +16 -0
- data/check-examples.sh +0 -2
- data/examples/v1/aws-integration/UpdateAWSAccount.rb +8 -4
- data/examples/v1/downtimes/CreateDowntime_2908359488.rb +1 -0
- data/examples/v1/downtimes/CreateDowntime_3059354445.rb +1 -0
- data/examples/v1/downtimes/UpdateDowntime.rb +1 -0
- data/examples/v1/monitors/CreateMonitor_1969035628.rb +52 -0
- data/examples/v1/monitors/CreateMonitor_2520912138.rb +22 -0
- data/examples/v1/security-monitoring/AddSecurityMonitoringSignalToIncident.rb +9 -0
- data/examples/v1/security-monitoring/EditSecurityMonitoringSignalAssignee.rb +9 -0
- data/examples/v1/security-monitoring/EditSecurityMonitoringSignalState.rb +10 -0
- data/examples/v1/service-level-objective-corrections/CreateSLOCorrection.rb +0 -3
- data/examples/v1/service-level-objective-corrections/CreateSLOCorrection_1326388368.rb +0 -3
- data/examples/v1/service-level-objective-corrections/DeleteSLOCorrection.rb +0 -3
- data/examples/v1/service-level-objective-corrections/GetSLOCorrection.rb +0 -3
- data/examples/v1/service-level-objective-corrections/ListSLOCorrection.rb +0 -3
- data/examples/v1/service-level-objective-corrections/UpdateSLOCorrection.rb +0 -3
- data/examples/v1/service-level-objectives/GetSLOCorrections.rb +0 -3
- data/examples/v1/synthetics/CreateSyntheticsAPITest.rb +5 -0
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1402674167.rb +44 -0
- data/examples/v1/synthetics/CreateSyntheticsBrowserTest_2932742688.rb +64 -0
- data/examples/v1/synthetics/UpdateBrowserTest.rb +5 -0
- data/examples/v1/usage-metering/GetHourlyUsageAttribution.rb +1 -1
- data/examples/v1/usage-metering/GetMonthlyUsageAttribution.rb +1 -1
- data/examples/v1/usage-metering/{GetMonthlyUsageAttribution_3738504447.rb → GetMonthlyUsageAttribution_3849653599.rb} +1 -1
- data/examples/v1/usage-metering/GetUsageAttribution.rb +1 -1
- data/examples/v1/usage-metering/GetUsageRumSessions_3271366243.rb +9 -0
- data/examples/v2/logs/SubmitLog.rb +1 -0
- data/examples/v2/logs-archives/CreateLogsArchive.rb +1 -0
- data/examples/v2/logs-archives/UpdateLogsArchive.rb +1 -0
- data/examples/v2/metrics/EstimateMetricsOutputSeries.rb +9 -0
- data/examples/v2/metrics/SubmitMetrics.rb +20 -0
- data/examples/v2/security-monitoring/UpdateSecurityMonitoringRule.rb +1 -0
- data/examples/v2/usage-metering/GetCostByOrg.rb +5 -0
- data/examples/v2/usage-metering/GetUsageApplicationSecurityMonitoring.rb +8 -0
- data/examples/v2/usage-metering/GetUsageLambdaTracedInvocations.rb +8 -0
- data/lib/datadog_api_client/v1/api/metrics_api.rb +1 -1
- data/lib/datadog_api_client/v1/api/monitors_api.rb +69 -56
- data/lib/datadog_api_client/v1/api/security_monitoring_api.rb +266 -0
- data/lib/datadog_api_client/v1/api/service_level_objective_corrections_api.rb +1 -1
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +10 -10
- data/lib/datadog_api_client/v1/api_client.rb +1 -4
- data/lib/datadog_api_client/v1/configuration.rb +0 -6
- data/lib/datadog_api_client/v1/models/add_signal_to_incident_request.rb +142 -0
- data/lib/datadog_api_client/v1/models/downtime.rb +11 -1
- data/lib/datadog_api_client/v1/models/downtime_child.rb +11 -1
- data/lib/datadog_api_client/v1/models/event.rb +1 -1
- data/lib/datadog_api_client/v1/models/http_log_item.rb +29 -4
- data/lib/datadog_api_client/v1/models/logs_category_processor.rb +1 -1
- data/lib/datadog_api_client/v1/models/logs_list_request.rb +1 -1
- data/lib/datadog_api_client/v1/models/logs_sort.rb +1 -1
- data/lib/datadog_api_client/v1/models/monitor_formula_and_function_events_data_source.rb +1 -0
- data/lib/datadog_api_client/v1/models/monitor_group_search_response_counts.rb +2 -2
- data/lib/datadog_api_client/v1/models/{monitor_search_response_counts_tag_item.rb → monitor_search_count_item.rb} +3 -3
- data/lib/datadog_api_client/v1/models/monitor_search_response_counts.rb +4 -4
- data/lib/datadog_api_client/v1/models/monitor_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_response.rb +1 -1
- data/lib/datadog_api_client/v1/models/notebook_cell_create_request.rb +146 -0
- data/lib/datadog_api_client/v1/models/notebook_cell_create_request_attributes.rb +68 -0
- data/lib/datadog_api_client/v1/models/series.rb +2 -2
- data/lib/datadog_api_client/v1/models/signal_archive_reason.rb +29 -0
- data/lib/datadog_api_client/v1/models/signal_assignee_update_request.rb +132 -0
- data/lib/datadog_api_client/v1/models/signal_state_update_request.rb +152 -0
- data/lib/datadog_api_client/v1/models/signal_triage_state.rb +28 -0
- data/lib/datadog_api_client/v1/models/slo_correction_create_request_attributes.rb +1 -1
- data/lib/datadog_api_client/v1/models/slo_correction_response_attributes.rb +4 -4
- data/lib/datadog_api_client/v1/models/slo_correction_update_request_attributes.rb +1 -1
- data/lib/datadog_api_client/v1/models/{monitor_search_response_counts_status_item.rb → successful_signal_update_response.rb} +12 -22
- data/lib/datadog_api_client/v1/models/synthetics_api_test.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_assertion_type.rb +2 -0
- data/lib/datadog_api_client/v1/models/synthetics_browser_test_rum_settings.rb +152 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_details.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_details_sub_type.rb +2 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_options.rb +21 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +21 -1
- data/lib/datadog_api_client/v1/models/usage_attribution_response.rb +1 -1
- data/lib/datadog_api_client/v1/models/usage_rum_sessions_hour.rb +18 -4
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +11 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +11 -1
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +11 -1
- data/lib/datadog_api_client/v1.rb +11 -6
- data/lib/datadog_api_client/v2/api/authn_mappings_api.rb +0 -2
- data/lib/datadog_api_client/v2/api/metrics_api.rb +173 -0
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +228 -0
- data/lib/datadog_api_client/v2/api_client.rb +1 -4
- data/lib/datadog_api_client/v2/models/authn_mapping.rb +1 -13
- data/lib/datadog_api_client/v2/models/authn_mapping_attributes.rb +1 -12
- data/lib/datadog_api_client/v2/models/authn_mapping_response.rb +16 -4
- data/lib/datadog_api_client/v2/models/authn_mappings_response.rb +13 -1
- data/lib/datadog_api_client/v2/models/chargeback_breakdown.rb +131 -0
- data/lib/datadog_api_client/v2/models/cost_by_org.rb +133 -0
- data/lib/datadog_api_client/v2/models/cost_by_org_attributes.rb +153 -0
- data/lib/datadog_api_client/v2/models/cost_by_org_response.rb +113 -0
- data/lib/datadog_api_client/v2/models/cost_by_org_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/hourly_usage_type.rb +2 -0
- data/lib/datadog_api_client/v2/models/http_log_item.rb +40 -4
- data/lib/datadog_api_client/v2/models/intake_payload_accepted.rb +111 -0
- data/lib/datadog_api_client/v2/models/logs_archive_attributes.rb +12 -1
- data/lib/datadog_api_client/v2/models/logs_archive_create_request_attributes.rb +12 -1
- data/lib/datadog_api_client/v2/models/metric_content_encoding.rb +26 -0
- data/lib/datadog_api_client/v2/models/metric_estimate.rb +133 -0
- data/lib/datadog_api_client/v2/models/metric_estimate_attributes.rb +133 -0
- data/lib/datadog_api_client/v2/models/metric_estimate_resource_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/metric_estimate_response.rb +111 -0
- data/lib/datadog_api_client/v2/models/metric_estimate_type.rb +28 -0
- data/lib/datadog_api_client/v2/models/metric_intake_type.rb +30 -0
- data/lib/datadog_api_client/v2/models/metric_metadata.rb +111 -0
- data/lib/datadog_api_client/v2/models/metric_origin.rb +170 -0
- data/lib/datadog_api_client/{v1/models/monitor_group_search_response_counts_type_item.rb → v2/models/metric_payload.rb} +27 -24
- data/lib/datadog_api_client/v2/models/metric_point.rb +122 -0
- data/lib/datadog_api_client/{v1/models/monitor_search_response_counts_type_item.rb → v2/models/metric_resource.rb} +21 -21
- data/lib/datadog_api_client/v2/models/metric_series.rb +220 -0
- data/lib/datadog_api_client/v2/models/relationship_to_saml_assertion_attribute_data.rb +1 -5
- data/lib/datadog_api_client/v2/models/saml_assertion_attribute.rb +1 -5
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_detection_method.rb +1 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_hardcoded_evaluator_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb +11 -1
- data/lib/datadog_api_client/{v1/models/monitor_group_search_response_counts_status_item.rb → v2/models/usage_application_security_monitoring_response.rb} +16 -24
- data/lib/datadog_api_client/{v1/models/monitor_search_response_counts_muted_item.rb → v2/models/usage_lambda_traced_invocations_response.rb} +16 -24
- data/lib/datadog_api_client/v2.rb +22 -0
- data/lib/datadog_api_client/version.rb +1 -1
- data/spec/v1/api_client_spec.rb +3 -3
- data/spec/v2/api_client_spec.rb +3 -3
- metadata +49 -11
- data/extract-code-blocks.awk +0 -81
- data/extract-code-blocks.sh +0 -3
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Datadog API V1 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::V1
|
|
20
|
+
# The description of a notebook cell create request.
|
|
21
|
+
class NotebookCellCreateRequest
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Whether the object has unparsed attributes
|
|
25
|
+
# @!visibility private
|
|
26
|
+
attr_accessor :_unparsed
|
|
27
|
+
|
|
28
|
+
# The attributes of a notebook cell in create cell request. Valid cell types are `markdown`, `timeseries`, `toplist`, `heatmap`, `distribution`,
|
|
29
|
+
# `log_stream`. [More information on each graph visualization type.](https://docs.datadoghq.com/dashboards/widgets/)
|
|
30
|
+
attr_accessor :attributes
|
|
31
|
+
|
|
32
|
+
# Type of the Notebook Cell resource.
|
|
33
|
+
attr_accessor :type
|
|
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
|
+
:'type' => :'type'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Returns all the JSON keys this model knows about
|
|
45
|
+
# @!visibility private
|
|
46
|
+
def self.acceptable_attributes
|
|
47
|
+
attribute_map.values
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Attribute type mapping.
|
|
51
|
+
# @!visibility private
|
|
52
|
+
def self.openapi_types
|
|
53
|
+
{
|
|
54
|
+
:'attributes' => :'NotebookCellCreateRequestAttributes',
|
|
55
|
+
:'type' => :'NotebookCellResourceType'
|
|
56
|
+
}
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# List of attributes with nullable: true
|
|
60
|
+
# @!visibility private
|
|
61
|
+
def self.openapi_nullable
|
|
62
|
+
Set.new([
|
|
63
|
+
])
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Initializes the object
|
|
67
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
|
68
|
+
# @!visibility private
|
|
69
|
+
def initialize(attributes = {})
|
|
70
|
+
if (!attributes.is_a?(Hash))
|
|
71
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::NotebookCellCreateRequest` initialize method"
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
75
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
76
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::NotebookCellCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
78
|
+
end
|
|
79
|
+
h[k.to_sym] = v
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'attributes')
|
|
83
|
+
self.attributes = attributes[:'attributes']
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'type')
|
|
87
|
+
self.type = attributes[:'type']
|
|
88
|
+
else
|
|
89
|
+
self.type = 'notebook_cells'
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Check to see if the all the properties in the model are valid
|
|
94
|
+
# @return true if the model is valid
|
|
95
|
+
# @!visibility private
|
|
96
|
+
def valid?
|
|
97
|
+
return false if @attributes.nil?
|
|
98
|
+
return false if @type.nil?
|
|
99
|
+
true
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Custom attribute writer method with validation
|
|
103
|
+
# @param attributes [Object] Object to be assigned
|
|
104
|
+
# @!visibility private
|
|
105
|
+
def attributes=(attributes)
|
|
106
|
+
if attributes.nil?
|
|
107
|
+
fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
|
|
108
|
+
end
|
|
109
|
+
@attributes = attributes
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Custom attribute writer method with validation
|
|
113
|
+
# @param type [Object] Object to be assigned
|
|
114
|
+
# @!visibility private
|
|
115
|
+
def type=(type)
|
|
116
|
+
if type.nil?
|
|
117
|
+
fail ArgumentError, 'invalid value for "type", type cannot be nil.'
|
|
118
|
+
end
|
|
119
|
+
@type = type
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Checks equality by comparing each attribute.
|
|
123
|
+
# @param o [Object] Object to be compared
|
|
124
|
+
# @!visibility private
|
|
125
|
+
def ==(o)
|
|
126
|
+
return true if self.equal?(o)
|
|
127
|
+
self.class == o.class &&
|
|
128
|
+
attributes == o.attributes &&
|
|
129
|
+
type == o.type
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# @see the `==` method
|
|
133
|
+
# @param o [Object] Object to be compared
|
|
134
|
+
# @!visibility private
|
|
135
|
+
def eql?(o)
|
|
136
|
+
self == o
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Calculates hash code according to all attributes.
|
|
140
|
+
# @return [Integer] Hash code
|
|
141
|
+
# @!visibility private
|
|
142
|
+
def hash
|
|
143
|
+
[attributes, type].hash
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
end
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Datadog API V1 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::V1
|
|
20
|
+
# The attributes of a notebook cell in create cell request. Valid cell types are `markdown`, `timeseries`, `toplist`, `heatmap`, `distribution`,
|
|
21
|
+
# `log_stream`. [More information on each graph visualization type.](https://docs.datadoghq.com/dashboards/widgets/)
|
|
22
|
+
module NotebookCellCreateRequestAttributes
|
|
23
|
+
class << self
|
|
24
|
+
include BaseOneOfModel
|
|
25
|
+
include BaseOneOfModelNoDiscriminator
|
|
26
|
+
|
|
27
|
+
# List of class defined in oneOf (OpenAPI v3)
|
|
28
|
+
def openapi_one_of
|
|
29
|
+
[
|
|
30
|
+
:'NotebookMarkdownCellAttributes',
|
|
31
|
+
:'NotebookTimeseriesCellAttributes',
|
|
32
|
+
:'NotebookToplistCellAttributes',
|
|
33
|
+
:'NotebookHeatMapCellAttributes',
|
|
34
|
+
:'NotebookDistributionCellAttributes',
|
|
35
|
+
:'NotebookLogStreamCellAttributes'
|
|
36
|
+
]
|
|
37
|
+
end
|
|
38
|
+
# Builds the object
|
|
39
|
+
# @param [Mixed] Data to be matched against the list of oneOf items
|
|
40
|
+
# @return [Object] Returns the model or the data itself
|
|
41
|
+
def build(data)
|
|
42
|
+
# Go through the list of oneOf items and attempt to identify the appropriate one.
|
|
43
|
+
# Note:
|
|
44
|
+
# - We do not attempt to check whether exactly one item matches.
|
|
45
|
+
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
|
|
46
|
+
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
|
|
47
|
+
# - TODO: scalar values are de facto behaving as if they were nullable.
|
|
48
|
+
# - TODO: logging when debugging is set.
|
|
49
|
+
openapi_one_of.each do |klass|
|
|
50
|
+
begin
|
|
51
|
+
next if klass == :AnyType # "nullable: true"
|
|
52
|
+
typed_data = find_and_cast_into_type(klass, data)
|
|
53
|
+
next if typed_data._unparsed
|
|
54
|
+
return typed_data if typed_data
|
|
55
|
+
rescue # rescue all errors so we keep iterating even if the current item lookup raises
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
if openapi_one_of.include?(:AnyType)
|
|
60
|
+
data
|
|
61
|
+
else
|
|
62
|
+
self._unparsed = true
|
|
63
|
+
DatadogAPIClient::V1::UnparsedObject.new(data)
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
@@ -41,7 +41,7 @@ module DatadogAPIClient::V1
|
|
|
41
41
|
# A list of tags associated with the metric.
|
|
42
42
|
attr_accessor :tags
|
|
43
43
|
|
|
44
|
-
# The type of the metric
|
|
44
|
+
# The type of the metric. Valid types are "",`count`, `gauge`, and `rate`.
|
|
45
45
|
attr_accessor :type
|
|
46
46
|
|
|
47
47
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -127,7 +127,7 @@ module DatadogAPIClient::V1
|
|
|
127
127
|
if attributes.key?(:'type')
|
|
128
128
|
self.type = attributes[:'type']
|
|
129
129
|
else
|
|
130
|
-
self.type = '
|
|
130
|
+
self.type = ''
|
|
131
131
|
end
|
|
132
132
|
end
|
|
133
133
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Datadog API V1 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::V1
|
|
20
|
+
# Reason why a signal has been archived.
|
|
21
|
+
class SignalArchiveReason
|
|
22
|
+
include BaseEnumModel
|
|
23
|
+
|
|
24
|
+
NONE = "none".freeze
|
|
25
|
+
FALSE_POSITIVE = "false_positive".freeze
|
|
26
|
+
TESTING_OR_MAINTENANCE = "testing_or_maintenance".freeze
|
|
27
|
+
OTHER = "other".freeze
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Datadog API V1 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::V1
|
|
20
|
+
# Attributes describing an assignee update operation over a security signal.
|
|
21
|
+
class SignalAssigneeUpdateRequest
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Whether the object has unparsed attributes
|
|
25
|
+
# @!visibility private
|
|
26
|
+
attr_accessor :_unparsed
|
|
27
|
+
|
|
28
|
+
# The UUID of the user being assigned. Use empty string to return signal to unassigned.
|
|
29
|
+
attr_accessor :assignee
|
|
30
|
+
|
|
31
|
+
# Version of the updated signal. If server side version is higher, update will be rejected.
|
|
32
|
+
attr_accessor :version
|
|
33
|
+
|
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
|
+
# @!visibility private
|
|
36
|
+
def self.attribute_map
|
|
37
|
+
{
|
|
38
|
+
:'assignee' => :'assignee',
|
|
39
|
+
:'version' => :'version'
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Returns all the JSON keys this model knows about
|
|
44
|
+
# @!visibility private
|
|
45
|
+
def self.acceptable_attributes
|
|
46
|
+
attribute_map.values
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Attribute type mapping.
|
|
50
|
+
# @!visibility private
|
|
51
|
+
def self.openapi_types
|
|
52
|
+
{
|
|
53
|
+
:'assignee' => :'String',
|
|
54
|
+
:'version' => :'Integer'
|
|
55
|
+
}
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# List of attributes with nullable: true
|
|
59
|
+
# @!visibility private
|
|
60
|
+
def self.openapi_nullable
|
|
61
|
+
Set.new([
|
|
62
|
+
])
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Initializes the object
|
|
66
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
|
67
|
+
# @!visibility private
|
|
68
|
+
def initialize(attributes = {})
|
|
69
|
+
if (!attributes.is_a?(Hash))
|
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SignalAssigneeUpdateRequest` initialize method"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
74
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
75
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
76
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SignalAssigneeUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
77
|
+
end
|
|
78
|
+
h[k.to_sym] = v
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'assignee')
|
|
82
|
+
self.assignee = attributes[:'assignee']
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
if attributes.key?(:'version')
|
|
86
|
+
self.version = attributes[:'version']
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Check to see if the all the properties in the model are valid
|
|
91
|
+
# @return true if the model is valid
|
|
92
|
+
# @!visibility private
|
|
93
|
+
def valid?
|
|
94
|
+
return false if @assignee.nil?
|
|
95
|
+
true
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Custom attribute writer method with validation
|
|
99
|
+
# @param assignee [Object] Object to be assigned
|
|
100
|
+
# @!visibility private
|
|
101
|
+
def assignee=(assignee)
|
|
102
|
+
if assignee.nil?
|
|
103
|
+
fail ArgumentError, 'invalid value for "assignee", assignee cannot be nil.'
|
|
104
|
+
end
|
|
105
|
+
@assignee = assignee
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Checks equality by comparing each attribute.
|
|
109
|
+
# @param o [Object] Object to be compared
|
|
110
|
+
# @!visibility private
|
|
111
|
+
def ==(o)
|
|
112
|
+
return true if self.equal?(o)
|
|
113
|
+
self.class == o.class &&
|
|
114
|
+
assignee == o.assignee &&
|
|
115
|
+
version == o.version
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# @see the `==` method
|
|
119
|
+
# @param o [Object] Object to be compared
|
|
120
|
+
# @!visibility private
|
|
121
|
+
def eql?(o)
|
|
122
|
+
self == o
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Calculates hash code according to all attributes.
|
|
126
|
+
# @return [Integer] Hash code
|
|
127
|
+
# @!visibility private
|
|
128
|
+
def hash
|
|
129
|
+
[assignee, version].hash
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
end
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Datadog API V1 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::V1
|
|
20
|
+
# Attributes describing the change of state for a given state.
|
|
21
|
+
class SignalStateUpdateRequest
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Whether the object has unparsed attributes
|
|
25
|
+
# @!visibility private
|
|
26
|
+
attr_accessor :_unparsed
|
|
27
|
+
|
|
28
|
+
# Optional comment to explain why a signal is being archived.
|
|
29
|
+
attr_accessor :archive_comment
|
|
30
|
+
|
|
31
|
+
# Reason why a signal has been archived.
|
|
32
|
+
attr_accessor :archive_reason
|
|
33
|
+
|
|
34
|
+
# The new triage state of the signal.
|
|
35
|
+
attr_accessor :state
|
|
36
|
+
|
|
37
|
+
# Version of the updated signal. If server side version is higher, update will be rejected.
|
|
38
|
+
attr_accessor :version
|
|
39
|
+
|
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
41
|
+
# @!visibility private
|
|
42
|
+
def self.attribute_map
|
|
43
|
+
{
|
|
44
|
+
:'archive_comment' => :'archiveComment',
|
|
45
|
+
:'archive_reason' => :'archiveReason',
|
|
46
|
+
:'state' => :'state',
|
|
47
|
+
:'version' => :'version'
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Returns all the JSON keys this model knows about
|
|
52
|
+
# @!visibility private
|
|
53
|
+
def self.acceptable_attributes
|
|
54
|
+
attribute_map.values
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Attribute type mapping.
|
|
58
|
+
# @!visibility private
|
|
59
|
+
def self.openapi_types
|
|
60
|
+
{
|
|
61
|
+
:'archive_comment' => :'String',
|
|
62
|
+
:'archive_reason' => :'SignalArchiveReason',
|
|
63
|
+
:'state' => :'SignalTriageState',
|
|
64
|
+
:'version' => :'Integer'
|
|
65
|
+
}
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# List of attributes with nullable: true
|
|
69
|
+
# @!visibility private
|
|
70
|
+
def self.openapi_nullable
|
|
71
|
+
Set.new([
|
|
72
|
+
])
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Initializes the object
|
|
76
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
|
77
|
+
# @!visibility private
|
|
78
|
+
def initialize(attributes = {})
|
|
79
|
+
if (!attributes.is_a?(Hash))
|
|
80
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SignalStateUpdateRequest` initialize method"
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
84
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
85
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
86
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SignalStateUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
87
|
+
end
|
|
88
|
+
h[k.to_sym] = v
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'archive_comment')
|
|
92
|
+
self.archive_comment = attributes[:'archive_comment']
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'archive_reason')
|
|
96
|
+
self.archive_reason = attributes[:'archive_reason']
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'state')
|
|
100
|
+
self.state = attributes[:'state']
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'version')
|
|
104
|
+
self.version = attributes[:'version']
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Check to see if the all the properties in the model are valid
|
|
109
|
+
# @return true if the model is valid
|
|
110
|
+
# @!visibility private
|
|
111
|
+
def valid?
|
|
112
|
+
return false if @state.nil?
|
|
113
|
+
true
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Custom attribute writer method with validation
|
|
117
|
+
# @param state [Object] Object to be assigned
|
|
118
|
+
# @!visibility private
|
|
119
|
+
def state=(state)
|
|
120
|
+
if state.nil?
|
|
121
|
+
fail ArgumentError, 'invalid value for "state", state cannot be nil.'
|
|
122
|
+
end
|
|
123
|
+
@state = state
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Checks equality by comparing each attribute.
|
|
127
|
+
# @param o [Object] Object to be compared
|
|
128
|
+
# @!visibility private
|
|
129
|
+
def ==(o)
|
|
130
|
+
return true if self.equal?(o)
|
|
131
|
+
self.class == o.class &&
|
|
132
|
+
archive_comment == o.archive_comment &&
|
|
133
|
+
archive_reason == o.archive_reason &&
|
|
134
|
+
state == o.state &&
|
|
135
|
+
version == o.version
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# @see the `==` method
|
|
139
|
+
# @param o [Object] Object to be compared
|
|
140
|
+
# @!visibility private
|
|
141
|
+
def eql?(o)
|
|
142
|
+
self == o
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Calculates hash code according to all attributes.
|
|
146
|
+
# @return [Integer] Hash code
|
|
147
|
+
# @!visibility private
|
|
148
|
+
def hash
|
|
149
|
+
[archive_comment, archive_reason, state, version].hash
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Datadog API V1 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::V1
|
|
20
|
+
# The new triage state of the signal.
|
|
21
|
+
class SignalTriageState
|
|
22
|
+
include BaseEnumModel
|
|
23
|
+
|
|
24
|
+
OPEN = "open".freeze
|
|
25
|
+
ARCHIVED = "archived".freeze
|
|
26
|
+
UNDER_REVIEW = "under_review".freeze
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -41,7 +41,7 @@ module DatadogAPIClient::V1
|
|
|
41
41
|
# are `FREQ`, `INTERVAL`, `COUNT` and `UNTIL`.
|
|
42
42
|
attr_accessor :rrule
|
|
43
43
|
|
|
44
|
-
# ID of the SLO that this correction
|
|
44
|
+
# ID of the SLO that this correction applies to.
|
|
45
45
|
attr_accessor :slo_id
|
|
46
46
|
|
|
47
47
|
# Starting time of the correction in epoch seconds.
|
|
@@ -28,7 +28,7 @@ module DatadogAPIClient::V1
|
|
|
28
28
|
# Category the SLO correction belongs to.
|
|
29
29
|
attr_accessor :category
|
|
30
30
|
|
|
31
|
-
# The epoch timestamp of when the correction was created at
|
|
31
|
+
# The epoch timestamp of when the correction was created at.
|
|
32
32
|
attr_accessor :created_at
|
|
33
33
|
|
|
34
34
|
# Object describing the creator of the shared element.
|
|
@@ -43,17 +43,17 @@ module DatadogAPIClient::V1
|
|
|
43
43
|
# Ending time of the correction in epoch seconds.
|
|
44
44
|
attr_accessor :_end
|
|
45
45
|
|
|
46
|
-
# The epoch timestamp of when the correction was modified at
|
|
46
|
+
# The epoch timestamp of when the correction was modified at.
|
|
47
47
|
attr_accessor :modified_at
|
|
48
48
|
|
|
49
49
|
# Modifier of the object.
|
|
50
50
|
attr_accessor :modifier
|
|
51
51
|
|
|
52
52
|
# The recurrence rules as defined in the iCalendar RFC 5545. The supported rules for SLO corrections
|
|
53
|
-
# are `FREQ`, `INTERVAL`, `COUNT
|
|
53
|
+
# are `FREQ`, `INTERVAL`, `COUNT`, and `UNTIL`.
|
|
54
54
|
attr_accessor :rrule
|
|
55
55
|
|
|
56
|
-
# ID of the SLO that this correction
|
|
56
|
+
# ID of the SLO that this correction applies to.
|
|
57
57
|
attr_accessor :slo_id
|
|
58
58
|
|
|
59
59
|
# Starting time of the correction in epoch seconds.
|
|
@@ -38,7 +38,7 @@ module DatadogAPIClient::V1
|
|
|
38
38
|
attr_accessor :_end
|
|
39
39
|
|
|
40
40
|
# The recurrence rules as defined in the iCalendar RFC 5545. The supported rules for SLO corrections
|
|
41
|
-
# are `FREQ`, `INTERVAL`, `COUNT
|
|
41
|
+
# are `FREQ`, `INTERVAL`, `COUNT`, and `UNTIL`.
|
|
42
42
|
attr_accessor :rrule
|
|
43
43
|
|
|
44
44
|
# Starting time of the correction in epoch seconds.
|