Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
433 changes: 257 additions & 176 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1985,21 +1985,27 @@ def overrides
"v2.domain_allowlist_response_data" => "DomainAllowlistResponseData",
"v2.domain_allowlist_response_data_attributes" => "DomainAllowlistResponseDataAttributes",
"v2.domain_allowlist_type" => "DomainAllowlistType",
"v2.dora_deployment_fetch_response" => "DORADeploymentFetchResponse",
"v2.dora_deployment_object" => "DORADeploymentObject",
"v2.dora_deployment_object_attributes" => "DORADeploymentObjectAttributes",
"v2.dora_deployment_request" => "DORADeploymentRequest",
"v2.dora_deployment_request_attributes" => "DORADeploymentRequestAttributes",
"v2.dora_deployment_request_data" => "DORADeploymentRequestData",
"v2.dora_deployment_response" => "DORADeploymentResponse",
"v2.dora_deployment_response_data" => "DORADeploymentResponseData",
"v2.dora_deployments_list_response" => "DORADeploymentsListResponse",
"v2.dora_deployment_type" => "DORADeploymentType",
"v2.dora_event" => "DORAEvent",
"v2.dora_failure_fetch_response" => "DORAFailureFetchResponse",
"v2.dora_failure_request" => "DORAFailureRequest",
"v2.dora_failure_request_attributes" => "DORAFailureRequestAttributes",
"v2.dora_failure_request_data" => "DORAFailureRequestData",
"v2.dora_failure_response" => "DORAFailureResponse",
"v2.dora_failure_response_data" => "DORAFailureResponseData",
"v2.dora_failures_list_response" => "DORAFailuresListResponse",
"v2.dora_failure_type" => "DORAFailureType",
"v2.dora_fetch_response" => "DORAFetchResponse",
"v2.dora_git_info" => "DORAGitInfo",
"v2.dora_incident_object" => "DORAIncidentObject",
"v2.dora_incident_object_attributes" => "DORAIncidentObjectAttributes",
"v2.dora_list_deployments_request" => "DORAListDeploymentsRequest",
"v2.dora_list_deployments_request_attributes" => "DORAListDeploymentsRequestAttributes",
"v2.dora_list_deployments_request_data" => "DORAListDeploymentsRequestData",
Expand All @@ -2008,7 +2014,6 @@ def overrides
"v2.dora_list_failures_request_attributes" => "DORAListFailuresRequestAttributes",
"v2.dora_list_failures_request_data" => "DORAListFailuresRequestData",
"v2.dora_list_failures_request_data_type" => "DORAListFailuresRequestDataType",
"v2.dora_list_response" => "DORAListResponse",
"v2.downtime_create_request" => "DowntimeCreateRequest",
"v2.downtime_create_request_attributes" => "DowntimeCreateRequestAttributes",
"v2.downtime_create_request_data" => "DowntimeCreateRequestData",
Expand Down
16 changes: 8 additions & 8 deletions lib/datadog_api_client/v2/api/dora_metrics_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ def get_dora_deployment(deployment_id, opts = {})
#
# @param deployment_id [String] The ID of the deployment event.
# @param opts [Hash] the optional parameters
# @return [Array<(DORAFetchResponse, Integer, Hash)>] DORAFetchResponse data, response status code and response headers
# @return [Array<(DORADeploymentFetchResponse, Integer, Hash)>] DORADeploymentFetchResponse data, response status code and response headers
def get_dora_deployment_with_http_info(deployment_id, opts = {})

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

# return_type
return_type = opts[:debug_return_type] || 'DORAFetchResponse'
return_type = opts[:debug_return_type] || 'DORADeploymentFetchResponse'

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

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

# return_type
return_type = opts[:debug_return_type] || 'DORAFetchResponse'
return_type = opts[:debug_return_type] || 'DORAFailureFetchResponse'

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

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

# return_type
return_type = opts[:debug_return_type] || 'DORAListResponse'
return_type = opts[:debug_return_type] || 'DORADeploymentsListResponse'

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

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

# return_type
return_type = opts[:debug_return_type] || 'DORAListResponse'
return_type = opts[:debug_return_type] || 'DORAFailuresListResponse'

# auth_names
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
Expand Down
105 changes: 105 additions & 0 deletions lib/datadog_api_client/v2/models/dora_deployment_fetch_response.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
=begin
#Datadog API V2 Collection

#Collection of all Datadog Public endpoints.

The version of the OpenAPI document: 1.0
Contact: support@datadoghq.com
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator

Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
This product includes software developed at Datadog (https://www.datadoghq.com/).
Copyright 2020-Present Datadog, Inc.

=end

require 'date'
require 'time'

module DatadogAPIClient::V2
# Response for fetching a single deployment event.
class DORADeploymentFetchResponse
include BaseGenericModel

# A DORA deployment event.
attr_accessor :data

attr_accessor :additional_properties

# Attribute mapping from ruby-style variable name to JSON key.
# @!visibility private
def self.attribute_map
{
:'data' => :'data'
}
end

# Attribute type mapping.
# @!visibility private
def self.openapi_types
{
:'data' => :'DORADeploymentObject'
}
end

# Initializes the object
# @param attributes [Hash] Model attributes in the form of hash
# @!visibility private
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORADeploymentFetchResponse` initialize method"
end

self.additional_properties = {}
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
self.additional_properties[k.to_sym] = v
else
h[k.to_sym] = v
end
}

if attributes.key?(:'data')
self.data = attributes[:'data']
end
end

# Returns the object in the form of hash, with additionalProperties support.
# @return [Hash] Returns the object in the form of hash
# @!visibility private
def to_hash
hash = {}
self.class.attribute_map.each_pair do |attr, param|
value = self.send(attr)
if value.nil?
is_nullable = self.class.openapi_nullable.include?(attr)
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
end

hash[param] = _to_hash(value)
end
self.additional_properties.each_pair do |attr, value|
hash[attr] = value
end
hash
end

# Checks equality by comparing each attribute.
# @param o [Object] Object to be compared
# @!visibility private
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
data == o.data &&
additional_properties == o.additional_properties
end

# Calculates hash code according to all attributes.
# @return [Integer] Hash code
# @!visibility private
def hash
[data, additional_properties].hash
end
end
end
125 changes: 125 additions & 0 deletions lib/datadog_api_client/v2/models/dora_deployment_object.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
=begin
#Datadog API V2 Collection

#Collection of all Datadog Public endpoints.

The version of the OpenAPI document: 1.0
Contact: support@datadoghq.com
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator

Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
This product includes software developed at Datadog (https://www.datadoghq.com/).
Copyright 2020-Present Datadog, Inc.

=end

require 'date'
require 'time'

module DatadogAPIClient::V2
# A DORA deployment event.
class DORADeploymentObject
include BaseGenericModel

# The attributes of the deployment event.
attr_accessor :attributes

# The ID of the deployment event.
attr_accessor :id

# JSON:API type for DORA deployment events.
attr_accessor :type

attr_accessor :additional_properties

# Attribute mapping from ruby-style variable name to JSON key.
# @!visibility private
def self.attribute_map
{
:'attributes' => :'attributes',
:'id' => :'id',
:'type' => :'type'
}
end

# Attribute type mapping.
# @!visibility private
def self.openapi_types
{
:'attributes' => :'DORADeploymentObjectAttributes',
:'id' => :'String',
:'type' => :'DORADeploymentType'
}
end

# Initializes the object
# @param attributes [Hash] Model attributes in the form of hash
# @!visibility private
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORADeploymentObject` initialize method"
end

self.additional_properties = {}
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
self.additional_properties[k.to_sym] = v
else
h[k.to_sym] = v
end
}

if attributes.key?(:'attributes')
self.attributes = attributes[:'attributes']
end

if attributes.key?(:'id')
self.id = attributes[:'id']
end

if attributes.key?(:'type')
self.type = attributes[:'type']
end
end

# Returns the object in the form of hash, with additionalProperties support.
# @return [Hash] Returns the object in the form of hash
# @!visibility private
def to_hash
hash = {}
self.class.attribute_map.each_pair do |attr, param|
value = self.send(attr)
if value.nil?
is_nullable = self.class.openapi_nullable.include?(attr)
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
end

hash[param] = _to_hash(value)
end
self.additional_properties.each_pair do |attr, value|
hash[attr] = value
end
hash
end

# Checks equality by comparing each attribute.
# @param o [Object] Object to be compared
# @!visibility private
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
attributes == o.attributes &&
id == o.id &&
type == o.type &&
additional_properties == o.additional_properties
end

# Calculates hash code according to all attributes.
# @return [Integer] Hash code
# @!visibility private
def hash
[attributes, id, type, additional_properties].hash
end
end
end
Loading
Loading