datadog_api_client 2.1.0 → 2.2.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/poetry.lock +21 -14
- data/.generator/pyproject.toml +1 -1
- data/.generator/schemas/v1/openapi.yaml +558 -8
- data/.generator/schemas/v2/openapi.yaml +973 -253
- data/.generator/src/generator/templates/api_client.j2 +5 -1
- data/.generator/src/generator/templates/configuration.j2 +17 -0
- data/.github/workflows/test.yml +3 -0
- data/.pre-commit-config.yaml +1 -1
- data/CHANGELOG.md +26 -0
- data/README.md +11 -0
- data/examples/v1/dashboards/CreateDashboard_1423904722.rb +38 -0
- data/examples/v1/dashboards/CreateDashboard_2652180930.rb +43 -0
- data/examples/v1/dashboards/CreateDashboard_2850365602.rb +55 -0
- data/examples/v1/dashboards/CreateDashboard_3117424216.rb +33 -0
- data/examples/v1/dashboards/CreateDashboard_3669695268.rb +50 -0
- data/examples/v1/dashboards/CreateDashboard_858397694.rb +41 -0
- data/examples/v1/synthetics/CreateGlobalVariable_1068962881.rb +1 -1
- data/examples/v2/incidents/ListIncidentAttachments.rb +8 -0
- data/examples/v2/incidents/ListIncidentAttachments_2457735435.rb +11 -0
- data/examples/v2/incidents/UpdateIncidentAttachments.rb +38 -0
- data/examples/v2/incidents/UpdateIncidentAttachments_3881702075.rb +26 -0
- data/examples/v2/metrics/ListActiveMetricConfigurations.rb +5 -0
- data/examples/v2/metrics/ListTagConfigurations.rb +1 -1
- data/examples/v2/metrics/ListTagConfigurations_265033704.rb +8 -0
- data/examples/v2/metrics/{ListTagConfigurations_103226315.rb → ListTagConfigurations_2739018321.rb} +1 -1
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule.rb +3 -2
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_461183901.rb +2 -2
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_498211763.rb +2 -2
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_914562040.rb +50 -0
- data/examples/v2/security-monitoring/GetSecurityMonitoringSignal.rb +5 -0
- data/examples/v2/security-monitoring/UpdateSecurityMonitoringRule.rb +2 -1
- data/examples/v2/usage-metering/GetEstimatedCostByOrg.rb +1 -4
- data/examples/v2/usage-metering/GetEstimatedCostByOrg_2734954020.rb +2 -4
- data/examples/v2/usage-metering/GetEstimatedCostByOrg_3186693804.rb +2 -4
- data/examples/v2/usage-metering/GetHistoricalCostByOrg.rb +8 -0
- data/generate.sh +30 -0
- data/lib/datadog_api_client/api_client.rb +5 -1
- data/lib/datadog_api_client/configuration.rb +20 -1
- data/lib/datadog_api_client/inflector.rb +51 -1
- data/lib/datadog_api_client/v1/api/service_level_objectives_api.rb +3 -1
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +5 -5
- data/lib/datadog_api_client/v1/models/dashboard_template_variable.rb +14 -2
- data/lib/datadog_api_client/v1/models/dashboard_template_variable_preset_value.rb +28 -5
- data/lib/datadog_api_client/v1/models/formula_and_function_event_query_definition.rb +14 -4
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/list_stream_query.rb +14 -4
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +2 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +21 -1
- data/lib/datadog_api_client/v1/models/search_service_level_objective.rb +111 -0
- data/lib/datadog_api_client/v1/models/search_service_level_objective_attributes.rb +286 -0
- data/lib/datadog_api_client/v1/models/search_service_level_objective_data.rb +134 -0
- data/lib/datadog_api_client/v1/models/search_slo_query.rb +137 -0
- data/lib/datadog_api_client/v1/models/search_slo_response_data_attributes.rb +8 -8
- data/lib/datadog_api_client/v1/models/search_slo_response_links.rb +2 -0
- data/lib/datadog_api_client/v1/models/search_slo_threshold.rb +184 -0
- data/lib/datadog_api_client/v1/models/search_slo_timeframe.rb +28 -0
- data/lib/datadog_api_client/v1/models/slo_creator.rb +131 -0
- data/lib/datadog_api_client/v1/models/slo_list_widget_definition.rb +185 -0
- data/lib/datadog_api_client/v1/models/slo_list_widget_definition_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/slo_list_widget_query.rb +149 -0
- data/lib/datadog_api_client/v1/models/slo_list_widget_request.rb +143 -0
- data/lib/datadog_api_client/v1/models/slo_list_widget_request_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/slo_overall_statuses.rb +174 -0
- data/lib/datadog_api_client/v1/models/slo_raw_error_budget_remaining.rb +121 -0
- data/lib/datadog_api_client/v1/models/synthetics_assertion_operator.rb +1 -0
- data/lib/datadog_api_client/v1/models/topology_map_widget_definition.rb +193 -0
- data/lib/datadog_api_client/v1/models/topology_map_widget_definition_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/topology_query.rb +144 -0
- data/lib/datadog_api_client/v1/models/topology_query_data_source.rb +27 -0
- data/lib/datadog_api_client/v1/models/topology_request.rb +121 -0
- data/lib/datadog_api_client/v1/models/topology_request_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/usage_attribution_sort.rb +2 -0
- data/lib/datadog_api_client/v1/models/usage_attribution_supported_metrics.rb +2 -0
- data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +21 -1
- data/lib/datadog_api_client/v1/models/usage_fargate_hour.rb +11 -1
- 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/models/widget_definition.rb +3 -1
- data/lib/datadog_api_client/v2/api/incident_services_api.rb +2 -2
- data/lib/datadog_api_client/v2/api/incident_teams_api.rb +2 -2
- data/lib/datadog_api_client/v2/api/incidents_api.rb +155 -0
- data/lib/datadog_api_client/v2/api/metrics_api.rb +76 -8
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +65 -0
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +83 -17
- data/lib/datadog_api_client/v2/models/incident_attachment_attachment_type.rb +27 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_attributes.rb +63 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_data.rb +187 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_link_attachment_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_link_attributes.rb +145 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_link_attributes_attachment_object.rb +143 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_postmortem_attachment_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_postmortem_attributes.rb +145 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_related_object.rb +26 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_relationships.rb +111 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_update_attributes.rb +63 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_update_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_update_request.rb +127 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_update_response.rb +137 -0
- data/lib/datadog_api_client/v2/models/incident_attachments_postmortem_attributes_attachment_object.rb +143 -0
- data/lib/datadog_api_client/v2/models/incident_attachments_response.rb +136 -0
- data/lib/datadog_api_client/v2/models/incident_attachments_response_included_item.rb +62 -0
- data/lib/datadog_api_client/v2/models/incident_related_object.rb +1 -0
- data/lib/datadog_api_client/v2/models/incident_response_attributes.rb +1 -11
- data/lib/datadog_api_client/v2/models/incident_response_included_item.rb +2 -1
- data/lib/datadog_api_client/v2/models/incident_response_relationships.rb +14 -14
- data/lib/datadog_api_client/v2/models/metric_active_configuration_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/metric_suggested_tags_and_aggregations.rb +133 -0
- data/lib/datadog_api_client/v2/models/metric_suggested_tags_and_aggregations_response.rb +111 -0
- data/lib/datadog_api_client/v2/models/metric_suggested_tags_attributes.rb +125 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_attachment.rb +124 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_attachment_data.rb +145 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_create_payload.rb +36 -248
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_query.rb +36 -151
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_query_aggregation.rb +1 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_response.rb +37 -253
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_create_payload.rb +275 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_query.rb +187 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response.rb +279 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +275 -0
- data/lib/datadog_api_client/v2/models/{security_monitoring_rule_query_create.rb → security_monitoring_standard_rule_query.rb} +3 -3
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +279 -0
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +70 -6
- data/Makefile +0 -7
- data/examples/v2/metrics/ListTagConfigurations_1799362914.rb +0 -8
|
@@ -0,0 +1,127 @@
|
|
|
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 update request for an incident's attachments.
|
|
21
|
+
class IncidentAttachmentUpdateRequest
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Whether the object has unparsed attributes
|
|
25
|
+
# @!visibility private
|
|
26
|
+
attr_accessor :_unparsed
|
|
27
|
+
|
|
28
|
+
# An array of incident attachments. An attachment object without an "id" key indicates that you want to
|
|
29
|
+
# create that attachment. An attachment object without an "attributes" key indicates that you want to
|
|
30
|
+
# delete that attachment. An attachment object with both the "id" key and a populated "attributes" object
|
|
31
|
+
# indicates that you want to update that attachment.
|
|
32
|
+
attr_accessor :data
|
|
33
|
+
|
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
|
+
# @!visibility private
|
|
36
|
+
def self.attribute_map
|
|
37
|
+
{
|
|
38
|
+
:'data' => :'data'
|
|
39
|
+
}
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Returns all the JSON keys this model knows about
|
|
43
|
+
# @!visibility private
|
|
44
|
+
def self.acceptable_attributes
|
|
45
|
+
attribute_map.values
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Attribute type mapping.
|
|
49
|
+
# @!visibility private
|
|
50
|
+
def self.openapi_types
|
|
51
|
+
{
|
|
52
|
+
:'data' => :'Array<IncidentAttachmentUpdateData>'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# List of attributes with nullable: true
|
|
57
|
+
# @!visibility private
|
|
58
|
+
def self.openapi_nullable
|
|
59
|
+
Set.new([
|
|
60
|
+
])
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Initializes the object
|
|
64
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
|
65
|
+
# @!visibility private
|
|
66
|
+
def initialize(attributes = {})
|
|
67
|
+
if (!attributes.is_a?(Hash))
|
|
68
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentAttachmentUpdateRequest` initialize method"
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
72
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
73
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
74
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::IncidentAttachmentUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
75
|
+
end
|
|
76
|
+
h[k.to_sym] = v
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'data')
|
|
80
|
+
if (value = attributes[:'data']).is_a?(Array)
|
|
81
|
+
self.data = value
|
|
82
|
+
end
|
|
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 @data.nil?
|
|
91
|
+
true
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Custom attribute writer method with validation
|
|
95
|
+
# @param data [Object] Object to be assigned
|
|
96
|
+
# @!visibility private
|
|
97
|
+
def data=(data)
|
|
98
|
+
if data.nil?
|
|
99
|
+
fail ArgumentError, 'invalid value for "data", data cannot be nil.'
|
|
100
|
+
end
|
|
101
|
+
@data = data
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Checks equality by comparing each attribute.
|
|
105
|
+
# @param o [Object] Object to be compared
|
|
106
|
+
# @!visibility private
|
|
107
|
+
def ==(o)
|
|
108
|
+
return true if self.equal?(o)
|
|
109
|
+
self.class == o.class &&
|
|
110
|
+
data == o.data
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# @see the `==` method
|
|
114
|
+
# @param o [Object] Object to be compared
|
|
115
|
+
# @!visibility private
|
|
116
|
+
def eql?(o)
|
|
117
|
+
self == o
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Calculates hash code according to all attributes.
|
|
121
|
+
# @return [Integer] Hash code
|
|
122
|
+
# @!visibility private
|
|
123
|
+
def hash
|
|
124
|
+
[data].hash
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
end
|
|
@@ -0,0 +1,137 @@
|
|
|
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 response object containing the created or updated incident attachments.
|
|
21
|
+
class IncidentAttachmentUpdateResponse
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Whether the object has unparsed attributes
|
|
25
|
+
# @!visibility private
|
|
26
|
+
attr_accessor :_unparsed
|
|
27
|
+
|
|
28
|
+
# An array of incident attachments. Only the attachments that were created or updated by the request are
|
|
29
|
+
# returned.
|
|
30
|
+
attr_accessor :data
|
|
31
|
+
|
|
32
|
+
# Included related resources that the user requested.
|
|
33
|
+
attr_accessor :included
|
|
34
|
+
|
|
35
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
36
|
+
# @!visibility private
|
|
37
|
+
def self.attribute_map
|
|
38
|
+
{
|
|
39
|
+
:'data' => :'data',
|
|
40
|
+
:'included' => :'included'
|
|
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
|
+
:'data' => :'Array<IncidentAttachmentData>',
|
|
55
|
+
:'included' => :'Array<IncidentAttachmentsResponseIncludedItem>'
|
|
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::V2::IncidentAttachmentUpdateResponse` 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::V2::IncidentAttachmentUpdateResponse`. 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?(:'data')
|
|
83
|
+
if (value = attributes[:'data']).is_a?(Array)
|
|
84
|
+
self.data = value
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'included')
|
|
89
|
+
if (value = attributes[:'included']).is_a?(Array)
|
|
90
|
+
self.included = value
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Check to see if the all the properties in the model are valid
|
|
96
|
+
# @return true if the model is valid
|
|
97
|
+
# @!visibility private
|
|
98
|
+
def valid?
|
|
99
|
+
return false if @data.nil?
|
|
100
|
+
true
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Custom attribute writer method with validation
|
|
104
|
+
# @param data [Object] Object to be assigned
|
|
105
|
+
# @!visibility private
|
|
106
|
+
def data=(data)
|
|
107
|
+
if data.nil?
|
|
108
|
+
fail ArgumentError, 'invalid value for "data", data cannot be nil.'
|
|
109
|
+
end
|
|
110
|
+
@data = data
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Checks equality by comparing each attribute.
|
|
114
|
+
# @param o [Object] Object to be compared
|
|
115
|
+
# @!visibility private
|
|
116
|
+
def ==(o)
|
|
117
|
+
return true if self.equal?(o)
|
|
118
|
+
self.class == o.class &&
|
|
119
|
+
data == o.data &&
|
|
120
|
+
included == o.included
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# @see the `==` method
|
|
124
|
+
# @param o [Object] Object to be compared
|
|
125
|
+
# @!visibility private
|
|
126
|
+
def eql?(o)
|
|
127
|
+
self == o
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Calculates hash code according to all attributes.
|
|
131
|
+
# @return [Integer] Hash code
|
|
132
|
+
# @!visibility private
|
|
133
|
+
def hash
|
|
134
|
+
[data, included].hash
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
end
|
|
@@ -0,0 +1,143 @@
|
|
|
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 postmortem attachment.
|
|
21
|
+
class IncidentAttachmentsPostmortemAttributesAttachmentObject
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Whether the object has unparsed attributes
|
|
25
|
+
# @!visibility private
|
|
26
|
+
attr_accessor :_unparsed
|
|
27
|
+
|
|
28
|
+
# The URL of this notebook attachment.
|
|
29
|
+
attr_accessor :document_url
|
|
30
|
+
|
|
31
|
+
# The title of this postmortem attachment.
|
|
32
|
+
attr_accessor :title
|
|
33
|
+
|
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
|
+
# @!visibility private
|
|
36
|
+
def self.attribute_map
|
|
37
|
+
{
|
|
38
|
+
:'document_url' => :'documentUrl',
|
|
39
|
+
:'title' => :'title'
|
|
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
|
+
:'document_url' => :'String',
|
|
54
|
+
:'title' => :'String'
|
|
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::V2::IncidentAttachmentsPostmortemAttributesAttachmentObject` 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::V2::IncidentAttachmentsPostmortemAttributesAttachmentObject`. 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?(:'document_url')
|
|
82
|
+
self.document_url = attributes[:'document_url']
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
if attributes.key?(:'title')
|
|
86
|
+
self.title = attributes[:'title']
|
|
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 @document_url.nil?
|
|
95
|
+
return false if @title.nil?
|
|
96
|
+
true
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Custom attribute writer method with validation
|
|
100
|
+
# @param document_url [Object] Object to be assigned
|
|
101
|
+
# @!visibility private
|
|
102
|
+
def document_url=(document_url)
|
|
103
|
+
if document_url.nil?
|
|
104
|
+
fail ArgumentError, 'invalid value for "document_url", document_url cannot be nil.'
|
|
105
|
+
end
|
|
106
|
+
@document_url = document_url
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Custom attribute writer method with validation
|
|
110
|
+
# @param title [Object] Object to be assigned
|
|
111
|
+
# @!visibility private
|
|
112
|
+
def title=(title)
|
|
113
|
+
if title.nil?
|
|
114
|
+
fail ArgumentError, 'invalid value for "title", title cannot be nil.'
|
|
115
|
+
end
|
|
116
|
+
@title = title
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Checks equality by comparing each attribute.
|
|
120
|
+
# @param o [Object] Object to be compared
|
|
121
|
+
# @!visibility private
|
|
122
|
+
def ==(o)
|
|
123
|
+
return true if self.equal?(o)
|
|
124
|
+
self.class == o.class &&
|
|
125
|
+
document_url == o.document_url &&
|
|
126
|
+
title == o.title
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# @see the `==` method
|
|
130
|
+
# @param o [Object] Object to be compared
|
|
131
|
+
# @!visibility private
|
|
132
|
+
def eql?(o)
|
|
133
|
+
self == o
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Calculates hash code according to all attributes.
|
|
137
|
+
# @return [Integer] Hash code
|
|
138
|
+
# @!visibility private
|
|
139
|
+
def hash
|
|
140
|
+
[document_url, title].hash
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
end
|
|
@@ -0,0 +1,136 @@
|
|
|
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 response object containing an incident's attachments.
|
|
21
|
+
class IncidentAttachmentsResponse
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# Whether the object has unparsed attributes
|
|
25
|
+
# @!visibility private
|
|
26
|
+
attr_accessor :_unparsed
|
|
27
|
+
|
|
28
|
+
# An array of incident attachments.
|
|
29
|
+
attr_accessor :data
|
|
30
|
+
|
|
31
|
+
# Included related resources that the user requested.
|
|
32
|
+
attr_accessor :included
|
|
33
|
+
|
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
|
+
# @!visibility private
|
|
36
|
+
def self.attribute_map
|
|
37
|
+
{
|
|
38
|
+
:'data' => :'data',
|
|
39
|
+
:'included' => :'included'
|
|
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
|
+
:'data' => :'Array<IncidentAttachmentData>',
|
|
54
|
+
:'included' => :'Array<IncidentAttachmentsResponseIncludedItem>'
|
|
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::V2::IncidentAttachmentsResponse` 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::V2::IncidentAttachmentsResponse`. 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?(:'data')
|
|
82
|
+
if (value = attributes[:'data']).is_a?(Array)
|
|
83
|
+
self.data = value
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'included')
|
|
88
|
+
if (value = attributes[:'included']).is_a?(Array)
|
|
89
|
+
self.included = value
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Check to see if the all the properties in the model are valid
|
|
95
|
+
# @return true if the model is valid
|
|
96
|
+
# @!visibility private
|
|
97
|
+
def valid?
|
|
98
|
+
return false if @data.nil?
|
|
99
|
+
true
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Custom attribute writer method with validation
|
|
103
|
+
# @param data [Object] Object to be assigned
|
|
104
|
+
# @!visibility private
|
|
105
|
+
def data=(data)
|
|
106
|
+
if data.nil?
|
|
107
|
+
fail ArgumentError, 'invalid value for "data", data cannot be nil.'
|
|
108
|
+
end
|
|
109
|
+
@data = data
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Checks equality by comparing each attribute.
|
|
113
|
+
# @param o [Object] Object to be compared
|
|
114
|
+
# @!visibility private
|
|
115
|
+
def ==(o)
|
|
116
|
+
return true if self.equal?(o)
|
|
117
|
+
self.class == o.class &&
|
|
118
|
+
data == o.data &&
|
|
119
|
+
included == o.included
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# @see the `==` method
|
|
123
|
+
# @param o [Object] Object to be compared
|
|
124
|
+
# @!visibility private
|
|
125
|
+
def eql?(o)
|
|
126
|
+
self == o
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Calculates hash code according to all attributes.
|
|
130
|
+
# @return [Integer] Hash code
|
|
131
|
+
# @!visibility private
|
|
132
|
+
def hash
|
|
133
|
+
[data, included].hash
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
end
|
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
# An object related to an attachment that is included in the response.
|
|
21
|
+
module IncidentAttachmentsResponseIncludedItem
|
|
22
|
+
class << self
|
|
23
|
+
include BaseOneOfModel
|
|
24
|
+
include BaseOneOfModelNoDiscriminator
|
|
25
|
+
|
|
26
|
+
# List of class defined in oneOf (OpenAPI v3)
|
|
27
|
+
def openapi_one_of
|
|
28
|
+
[
|
|
29
|
+
:'User'
|
|
30
|
+
]
|
|
31
|
+
end
|
|
32
|
+
# Builds the object
|
|
33
|
+
# @param [Mixed] Data to be matched against the list of oneOf items
|
|
34
|
+
# @return [Object] Returns the model or the data itself
|
|
35
|
+
def build(data)
|
|
36
|
+
# Go through the list of oneOf items and attempt to identify the appropriate one.
|
|
37
|
+
# Note:
|
|
38
|
+
# - We do not attempt to check whether exactly one item matches.
|
|
39
|
+
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
|
|
40
|
+
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
|
|
41
|
+
# - TODO: scalar values are de facto behaving as if they were nullable.
|
|
42
|
+
# - TODO: logging when debugging is set.
|
|
43
|
+
openapi_one_of.each do |klass|
|
|
44
|
+
begin
|
|
45
|
+
next if klass == :AnyType # "nullable: true"
|
|
46
|
+
typed_data = find_and_cast_into_type(klass, data)
|
|
47
|
+
next if typed_data._unparsed
|
|
48
|
+
return typed_data if typed_data
|
|
49
|
+
rescue # rescue all errors so we keep iterating even if the current item lookup raises
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
if openapi_one_of.include?(:AnyType)
|
|
54
|
+
data
|
|
55
|
+
else
|
|
56
|
+
self._unparsed = true
|
|
57
|
+
DatadogAPIClient::UnparsedObject.new(data)
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -56,9 +56,6 @@ module DatadogAPIClient::V2
|
|
|
56
56
|
# Notification handles that will be notified of the incident during update.
|
|
57
57
|
attr_accessor :notification_handles
|
|
58
58
|
|
|
59
|
-
# The UUID of the postmortem object attached to the incident.
|
|
60
|
-
attr_accessor :postmortem_id
|
|
61
|
-
|
|
62
59
|
# The monotonically increasing integer ID for the incident.
|
|
63
60
|
attr_accessor :public_id
|
|
64
61
|
|
|
@@ -95,7 +92,6 @@ module DatadogAPIClient::V2
|
|
|
95
92
|
:'fields' => :'fields',
|
|
96
93
|
:'modified' => :'modified',
|
|
97
94
|
:'notification_handles' => :'notification_handles',
|
|
98
|
-
:'postmortem_id' => :'postmortem_id',
|
|
99
95
|
:'public_id' => :'public_id',
|
|
100
96
|
:'resolved' => :'resolved',
|
|
101
97
|
:'time_to_detect' => :'time_to_detect',
|
|
@@ -126,7 +122,6 @@ module DatadogAPIClient::V2
|
|
|
126
122
|
:'fields' => :'Hash<String, IncidentFieldAttributes>',
|
|
127
123
|
:'modified' => :'Time',
|
|
128
124
|
:'notification_handles' => :'Array<IncidentNotificationHandle>',
|
|
129
|
-
:'postmortem_id' => :'String',
|
|
130
125
|
:'public_id' => :'Integer',
|
|
131
126
|
:'resolved' => :'Time',
|
|
132
127
|
:'time_to_detect' => :'Integer',
|
|
@@ -208,10 +203,6 @@ module DatadogAPIClient::V2
|
|
|
208
203
|
end
|
|
209
204
|
end
|
|
210
205
|
|
|
211
|
-
if attributes.key?(:'postmortem_id')
|
|
212
|
-
self.postmortem_id = attributes[:'postmortem_id']
|
|
213
|
-
end
|
|
214
|
-
|
|
215
206
|
if attributes.key?(:'public_id')
|
|
216
207
|
self.public_id = attributes[:'public_id']
|
|
217
208
|
end
|
|
@@ -275,7 +266,6 @@ module DatadogAPIClient::V2
|
|
|
275
266
|
fields == o.fields &&
|
|
276
267
|
modified == o.modified &&
|
|
277
268
|
notification_handles == o.notification_handles &&
|
|
278
|
-
postmortem_id == o.postmortem_id &&
|
|
279
269
|
public_id == o.public_id &&
|
|
280
270
|
resolved == o.resolved &&
|
|
281
271
|
time_to_detect == o.time_to_detect &&
|
|
@@ -296,7 +286,7 @@ module DatadogAPIClient::V2
|
|
|
296
286
|
# @return [Integer] Hash code
|
|
297
287
|
# @!visibility private
|
|
298
288
|
def hash
|
|
299
|
-
[created, customer_impact_duration, customer_impact_end, customer_impact_scope, customer_impact_start, customer_impacted, detected, fields, modified, notification_handles,
|
|
289
|
+
[created, customer_impact_duration, customer_impact_end, customer_impact_scope, customer_impact_start, customer_impacted, detected, fields, modified, notification_handles, public_id, resolved, time_to_detect, time_to_internal_response, time_to_repair, time_to_resolve, title].hash
|
|
300
290
|
end
|
|
301
291
|
end
|
|
302
292
|
end
|