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
23 changes: 23 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37090,6 +37090,8 @@ components:
type: string
platform:
$ref: "#/components/schemas/IssuePlatform"
regression:
$ref: "#/components/schemas/IssueRegression"
service:
description: Service name.
example: "email-api-py"
Expand Down Expand Up @@ -37360,6 +37362,27 @@ components:
- id
- type
type: object
IssueRegression:
description: Regression information for an issue that was previously resolved and then reopened.
properties:
regressed_at:
description: Timestamp when the issue was reopened (regressed).
example: "2024-01-03T08:00:00Z"
format: date-time
type: string
regressed_at_version:
description: Application version where the regression was observed.
example: "v2.5.2"
type: string
resolved_at:
description: Timestamp when the issue was resolved before the regression.
example: "2024-01-01T10:00:00Z"
format: date-time
type: string
required:
- resolved_at
- regressed_at
type: object
IssueRelationships:
description: Relationship between the issue and an assignee, case and/or teams.
properties:
Expand Down
1 change: 1 addition & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3331,6 +3331,7 @@ def overrides
"v2.issue_language" => "IssueLanguage",
"v2.issue_platform" => "IssuePlatform",
"v2.issue_reference" => "IssueReference",
"v2.issue_regression" => "IssueRegression",
"v2.issue_relationships" => "IssueRelationships",
"v2.issue_response" => "IssueResponse",
"v2.issues_search_request" => "IssuesSearchRequest",
Expand Down
12 changes: 11 additions & 1 deletion lib/datadog_api_client/v2/models/issue_attributes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ class IssueAttributes
# Platform associated with the issue.
attr_accessor :platform

# Regression information for an issue that was previously resolved and then reopened.
attr_accessor :regression

# Service name.
attr_accessor :service

Expand All @@ -77,6 +80,7 @@ def self.attribute_map
:'last_seen' => :'last_seen',
:'last_seen_version' => :'last_seen_version',
:'platform' => :'platform',
:'regression' => :'regression',
:'service' => :'service',
:'state' => :'state'
}
Expand All @@ -97,6 +101,7 @@ def self.openapi_types
:'last_seen' => :'Integer',
:'last_seen_version' => :'String',
:'platform' => :'IssuePlatform',
:'regression' => :'IssueRegression',
:'service' => :'String',
:'state' => :'IssueState'
}
Expand Down Expand Up @@ -166,6 +171,10 @@ def initialize(attributes = {})
self.platform = attributes[:'platform']
end

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

if attributes.key?(:'service')
self.service = attributes[:'service']
end
Expand Down Expand Up @@ -212,6 +221,7 @@ def ==(o)
last_seen == o.last_seen &&
last_seen_version == o.last_seen_version &&
platform == o.platform &&
regression == o.regression &&
service == o.service &&
state == o.state &&
additional_properties == o.additional_properties
Expand All @@ -221,7 +231,7 @@ def ==(o)
# @return [Integer] Hash code
# @!visibility private
def hash
[error_message, error_type, file_path, first_seen, first_seen_version, function_name, is_crash, languages, last_seen, last_seen_version, platform, service, state, additional_properties].hash
[error_message, error_type, file_path, first_seen, first_seen_version, function_name, is_crash, languages, last_seen, last_seen_version, platform, regression, service, state, additional_properties].hash
end
end
end
154 changes: 154 additions & 0 deletions lib/datadog_api_client/v2/models/issue_regression.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
=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
# Regression information for an issue that was previously resolved and then reopened.
class IssueRegression
include BaseGenericModel

# Timestamp when the issue was reopened (regressed).
attr_reader :regressed_at

# Application version where the regression was observed.
attr_accessor :regressed_at_version

# Timestamp when the issue was resolved before the regression.
attr_reader :resolved_at

attr_accessor :additional_properties

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

# Attribute type mapping.
# @!visibility private
def self.openapi_types
{
:'regressed_at' => :'Time',
:'regressed_at_version' => :'String',
:'resolved_at' => :'Time'
}
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::IssueRegression` 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?(:'regressed_at')
self.regressed_at = attributes[:'regressed_at']
end

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

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

# Check to see if the all the properties in the model are valid
# @return true if the model is valid
# @!visibility private
def valid?
return false if @regressed_at.nil?
return false if @resolved_at.nil?
true
end

# Custom attribute writer method with validation
# @param regressed_at [Object] Object to be assigned
# @!visibility private
def regressed_at=(regressed_at)
if regressed_at.nil?
fail ArgumentError, 'invalid value for "regressed_at", regressed_at cannot be nil.'
end
@regressed_at = regressed_at
end

# Custom attribute writer method with validation
# @param resolved_at [Object] Object to be assigned
# @!visibility private
def resolved_at=(resolved_at)
if resolved_at.nil?
fail ArgumentError, 'invalid value for "resolved_at", resolved_at cannot be nil.'
end
@resolved_at = resolved_at
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 &&
regressed_at == o.regressed_at &&
regressed_at_version == o.regressed_at_version &&
resolved_at == o.resolved_at &&
additional_properties == o.additional_properties
end

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