Skip to content

Commit 0208cc9

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit e516a02 of spec repo
1 parent 5a3696d commit 0208cc9

13 files changed

+1140
-201
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 266 additions & 173 deletions
Large diffs are not rendered by default.

lib/datadog_api_client/inflector.rb

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1985,21 +1985,29 @@ def overrides
19851985
"v2.domain_allowlist_response_data" => "DomainAllowlistResponseData",
19861986
"v2.domain_allowlist_response_data_attributes" => "DomainAllowlistResponseDataAttributes",
19871987
"v2.domain_allowlist_type" => "DomainAllowlistType",
1988+
"v2.dora_deployment_fetch_response" => "DORADeploymentFetchResponse",
1989+
"v2.dora_deployment_object" => "DORADeploymentObject",
1990+
"v2.dora_deployment_object_attributes" => "DORADeploymentObjectAttributes",
1991+
"v2.dora_deployment_object_type" => "DORADeploymentObjectType",
19881992
"v2.dora_deployment_request" => "DORADeploymentRequest",
19891993
"v2.dora_deployment_request_attributes" => "DORADeploymentRequestAttributes",
19901994
"v2.dora_deployment_request_data" => "DORADeploymentRequestData",
19911995
"v2.dora_deployment_response" => "DORADeploymentResponse",
19921996
"v2.dora_deployment_response_data" => "DORADeploymentResponseData",
1997+
"v2.dora_deployments_list_response" => "DORADeploymentsListResponse",
19931998
"v2.dora_deployment_type" => "DORADeploymentType",
1994-
"v2.dora_event" => "DORAEvent",
1999+
"v2.dora_failure_fetch_response" => "DORAFailureFetchResponse",
19952000
"v2.dora_failure_request" => "DORAFailureRequest",
19962001
"v2.dora_failure_request_attributes" => "DORAFailureRequestAttributes",
19972002
"v2.dora_failure_request_data" => "DORAFailureRequestData",
19982003
"v2.dora_failure_response" => "DORAFailureResponse",
19992004
"v2.dora_failure_response_data" => "DORAFailureResponseData",
2005+
"v2.dora_failures_list_response" => "DORAFailuresListResponse",
20002006
"v2.dora_failure_type" => "DORAFailureType",
2001-
"v2.dora_fetch_response" => "DORAFetchResponse",
20022007
"v2.dora_git_info" => "DORAGitInfo",
2008+
"v2.dora_incident_object" => "DORAIncidentObject",
2009+
"v2.dora_incident_object_attributes" => "DORAIncidentObjectAttributes",
2010+
"v2.dora_incident_object_type" => "DORAIncidentObjectType",
20032011
"v2.dora_list_deployments_request" => "DORAListDeploymentsRequest",
20042012
"v2.dora_list_deployments_request_attributes" => "DORAListDeploymentsRequestAttributes",
20052013
"v2.dora_list_deployments_request_data" => "DORAListDeploymentsRequestData",
@@ -2008,7 +2016,6 @@ def overrides
20082016
"v2.dora_list_failures_request_attributes" => "DORAListFailuresRequestAttributes",
20092017
"v2.dora_list_failures_request_data" => "DORAListFailuresRequestData",
20102018
"v2.dora_list_failures_request_data_type" => "DORAListFailuresRequestDataType",
2011-
"v2.dora_list_response" => "DORAListResponse",
20122019
"v2.downtime_create_request" => "DowntimeCreateRequest",
20132020
"v2.downtime_create_request_attributes" => "DowntimeCreateRequestAttributes",
20142021
"v2.downtime_create_request_data" => "DowntimeCreateRequestData",

lib/datadog_api_client/v2/api/dora_metrics_api.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ def get_dora_deployment(deployment_id, opts = {})
386386
#
387387
# @param deployment_id [String] The ID of the deployment event.
388388
# @param opts [Hash] the optional parameters
389-
# @return [Array<(DORAFetchResponse, Integer, Hash)>] DORAFetchResponse data, response status code and response headers
389+
# @return [Array<(DORADeploymentFetchResponse, Integer, Hash)>] DORADeploymentFetchResponse data, response status code and response headers
390390
def get_dora_deployment_with_http_info(deployment_id, opts = {})
391391

392392
if @api_client.config.debugging
@@ -414,7 +414,7 @@ def get_dora_deployment_with_http_info(deployment_id, opts = {})
414414
post_body = opts[:debug_body]
415415

416416
# return_type
417-
return_type = opts[:debug_return_type] || 'DORAFetchResponse'
417+
return_type = opts[:debug_return_type] || 'DORADeploymentFetchResponse'
418418

419419
# auth_names
420420
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
@@ -451,7 +451,7 @@ def get_dora_failure(failure_id, opts = {})
451451
#
452452
# @param failure_id [String] The ID of the failure event.
453453
# @param opts [Hash] the optional parameters
454-
# @return [Array<(DORAFetchResponse, Integer, Hash)>] DORAFetchResponse data, response status code and response headers
454+
# @return [Array<(DORAFailureFetchResponse, Integer, Hash)>] DORAFailureFetchResponse data, response status code and response headers
455455
def get_dora_failure_with_http_info(failure_id, opts = {})
456456

457457
if @api_client.config.debugging
@@ -479,7 +479,7 @@ def get_dora_failure_with_http_info(failure_id, opts = {})
479479
post_body = opts[:debug_body]
480480

481481
# return_type
482-
return_type = opts[:debug_return_type] || 'DORAFetchResponse'
482+
return_type = opts[:debug_return_type] || 'DORAFailureFetchResponse'
483483

484484
# auth_names
485485
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
@@ -516,7 +516,7 @@ def list_dora_deployments(body, opts = {})
516516
#
517517
# @param body [DORAListDeploymentsRequest]
518518
# @param opts [Hash] the optional parameters
519-
# @return [Array<(DORAListResponse, Integer, Hash)>] DORAListResponse data, response status code and response headers
519+
# @return [Array<(DORADeploymentsListResponse, Integer, Hash)>] DORADeploymentsListResponse data, response status code and response headers
520520
def list_dora_deployments_with_http_info(body, opts = {})
521521

522522
if @api_client.config.debugging
@@ -546,7 +546,7 @@ def list_dora_deployments_with_http_info(body, opts = {})
546546
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
547547

548548
# return_type
549-
return_type = opts[:debug_return_type] || 'DORAListResponse'
549+
return_type = opts[:debug_return_type] || 'DORADeploymentsListResponse'
550550

551551
# auth_names
552552
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
@@ -583,7 +583,7 @@ def list_dora_failures(body, opts = {})
583583
#
584584
# @param body [DORAListFailuresRequest]
585585
# @param opts [Hash] the optional parameters
586-
# @return [Array<(DORAListResponse, Integer, Hash)>] DORAListResponse data, response status code and response headers
586+
# @return [Array<(DORAFailuresListResponse, Integer, Hash)>] DORAFailuresListResponse data, response status code and response headers
587587
def list_dora_failures_with_http_info(body, opts = {})
588588

589589
if @api_client.config.debugging
@@ -613,7 +613,7 @@ def list_dora_failures_with_http_info(body, opts = {})
613613
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
614614

615615
# return_type
616-
return_type = opts[:debug_return_type] || 'DORAListResponse'
616+
return_type = opts[:debug_return_type] || 'DORAFailuresListResponse'
617617

618618
# auth_names
619619
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
=begin
2+
#Datadog API V2 Collection
3+
4+
#Collection of all Datadog Public endpoints.
5+
6+
The version of the OpenAPI document: 1.0
7+
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+
# Response for fetching a single deployment event.
21+
class DORADeploymentFetchResponse
22+
include BaseGenericModel
23+
24+
# A DORA deployment event.
25+
attr_accessor :data
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+
:'data' => :'data'
34+
}
35+
end
36+
37+
# Attribute type mapping.
38+
# @!visibility private
39+
def self.openapi_types
40+
{
41+
:'data' => :'DORADeploymentObject'
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::DORADeploymentFetchResponse` 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?(:'data')
64+
self.data = attributes[:'data']
65+
end
66+
end
67+
68+
# Returns the object in the form of hash, with additionalProperties support.
69+
# @return [Hash] Returns the object in the form of hash
70+
# @!visibility private
71+
def to_hash
72+
hash = {}
73+
self.class.attribute_map.each_pair do |attr, param|
74+
value = self.send(attr)
75+
if value.nil?
76+
is_nullable = self.class.openapi_nullable.include?(attr)
77+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
78+
end
79+
80+
hash[param] = _to_hash(value)
81+
end
82+
self.additional_properties.each_pair do |attr, value|
83+
hash[attr] = value
84+
end
85+
hash
86+
end
87+
88+
# Checks equality by comparing each attribute.
89+
# @param o [Object] Object to be compared
90+
# @!visibility private
91+
def ==(o)
92+
return true if self.equal?(o)
93+
self.class == o.class &&
94+
data == o.data &&
95+
additional_properties == o.additional_properties
96+
end
97+
98+
# Calculates hash code according to all attributes.
99+
# @return [Integer] Hash code
100+
# @!visibility private
101+
def hash
102+
[data, additional_properties].hash
103+
end
104+
end
105+
end
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
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+
8+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9+
10+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11+
This product includes software developed at Datadog (https://www.datadoghq.com/).
12+
Copyright 2020-Present Datadog, Inc.
13+
14+
=end
15+
16+
require 'date'
17+
require 'time'
18+
19+
module DatadogAPIClient::V2
20+
# A DORA deployment event.
21+
class DORADeploymentObject
22+
include BaseGenericModel
23+
24+
# The attributes of the deployment event.
25+
attr_accessor :attributes
26+
27+
# The ID of the deployment event.
28+
attr_accessor :id
29+
30+
# The type of the event.
31+
attr_accessor :type
32+
33+
attr_accessor :additional_properties
34+
35+
# Attribute mapping from ruby-style variable name to JSON key.
36+
# @!visibility private
37+
def self.attribute_map
38+
{
39+
:'attributes' => :'attributes',
40+
:'id' => :'id',
41+
:'type' => :'type'
42+
}
43+
end
44+
45+
# Attribute type mapping.
46+
# @!visibility private
47+
def self.openapi_types
48+
{
49+
:'attributes' => :'DORADeploymentObjectAttributes',
50+
:'id' => :'String',
51+
:'type' => :'DORADeploymentObjectType'
52+
}
53+
end
54+
55+
# Initializes the object
56+
# @param attributes [Hash] Model attributes in the form of hash
57+
# @!visibility private
58+
def initialize(attributes = {})
59+
if (!attributes.is_a?(Hash))
60+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORADeploymentObject` initialize method"
61+
end
62+
63+
self.additional_properties = {}
64+
# check to see if the attribute exists and convert string to symbol for hash key
65+
attributes = attributes.each_with_object({}) { |(k, v), h|
66+
if (!self.class.attribute_map.key?(k.to_sym))
67+
self.additional_properties[k.to_sym] = v
68+
else
69+
h[k.to_sym] = v
70+
end
71+
}
72+
73+
if attributes.key?(:'attributes')
74+
self.attributes = attributes[:'attributes']
75+
end
76+
77+
if attributes.key?(:'id')
78+
self.id = attributes[:'id']
79+
end
80+
81+
if attributes.key?(:'type')
82+
self.type = attributes[:'type']
83+
end
84+
end
85+
86+
# 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+
attributes == o.attributes &&
113+
id == o.id &&
114+
type == o.type &&
115+
additional_properties == o.additional_properties
116+
end
117+
118+
# Calculates hash code according to all attributes.
119+
# @return [Integer] Hash code
120+
# @!visibility private
121+
def hash
122+
[attributes, id, type, additional_properties].hash
123+
end
124+
end
125+
end

0 commit comments

Comments
 (0)