Skip to content
Open
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
32 changes: 29 additions & 3 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9117,6 +9117,10 @@ components:
$ref: '#/components/schemas/ServiceNowTicket'
status:
$ref: '#/components/schemas/CaseStatus'
status_group:
$ref: '#/components/schemas/CaseStatusGroup'
status_name:
$ref: '#/components/schemas/CaseStatusName'
title:
description: Title
example: Memory leak investigation on API
Expand Down Expand Up @@ -9183,6 +9187,8 @@ components:
type: string
priority:
$ref: '#/components/schemas/CasePriority'
status_name:
$ref: '#/components/schemas/CaseStatusName'
title:
description: Title
example: Security breach investigation
Expand Down Expand Up @@ -9351,7 +9357,9 @@ components:
- PRIORITY
- STATUS
CaseStatus:
description: Case status
deprecated: true
description: Deprecated way of representing the case status, which only supports
OPEN, IN_PROGRESS, and CLOSED statuses. Use `status_name` instead.
enum:
- OPEN
- IN_PROGRESS
Expand All @@ -9362,6 +9370,23 @@ components:
- OPEN
- IN_PROGRESS
- CLOSED
CaseStatusGroup:
description: Status group of the case.
enum:
- SG_OPEN
- SG_IN_PROGRESS
- SG_CLOSED
example: SG_OPEN
type: string
x-enum-varnames:
- SG_OPEN
- SG_IN_PROGRESS
- SG_CLOSED
CaseStatusName:
description: Status of the case. Must be one of the existing statuses for the
case's type.
example: Open
type: string
CaseTrigger:
description: Trigger a workflow from a Case. For automatic triggering a handle
must be configured and the workflow must be published.
Expand Down Expand Up @@ -9585,8 +9610,9 @@ components:
properties:
status:
$ref: '#/components/schemas/CaseStatus'
required:
- status
deprecated: true
status_name:
$ref: '#/components/schemas/CaseStatusName'
type: object
CaseUpdateStatusRequest:
description: Case update status request
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 @@ -1410,6 +1410,7 @@ def overrides
"v2.cases_response_meta" => "CasesResponseMeta",
"v2.cases_response_meta_pagination" => "CasesResponseMetaPagination",
"v2.case_status" => "CaseStatus",
"v2.case_status_group" => "CaseStatusGroup",
"v2.case_trigger" => "CaseTrigger",
"v2.case_trigger_wrapper" => "CaseTriggerWrapper",
"v2.case_type" => "CaseType",
Expand Down
24 changes: 22 additions & 2 deletions lib/datadog_api_client/v2/models/case_attributes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,15 @@ class CaseAttributes
# ServiceNow ticket attached to case
attr_accessor :service_now_ticket

# Case status
# Deprecated way of representing the case status, which only supports OPEN, IN_PROGRESS, and CLOSED statuses. Use `status_name` instead.
attr_accessor :status

# Status group of the case.
attr_accessor :status_group

# Status of the case. Must be one of the existing statuses for the case's type.
attr_accessor :status_name

# Title
attr_accessor :title

Expand Down Expand Up @@ -84,6 +90,8 @@ def self.attribute_map
:'priority' => :'priority',
:'service_now_ticket' => :'service_now_ticket',
:'status' => :'status',
:'status_group' => :'status_group',
:'status_name' => :'status_name',
:'title' => :'title',
:'type' => :'type',
:'type_id' => :'type_id'
Expand All @@ -106,6 +114,8 @@ def self.openapi_types
:'priority' => :'CasePriority',
:'service_now_ticket' => :'ServiceNowTicket',
:'status' => :'CaseStatus',
:'status_group' => :'CaseStatusGroup',
:'status_name' => :'String',
:'title' => :'String',
:'type' => :'CaseType',
:'type_id' => :'String'
Expand Down Expand Up @@ -190,6 +200,14 @@ def initialize(attributes = {})
self.status = attributes[:'status']
end

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

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

if attributes.key?(:'title')
self.title = attributes[:'title']
end
Expand Down Expand Up @@ -241,6 +259,8 @@ def ==(o)
priority == o.priority &&
service_now_ticket == o.service_now_ticket &&
status == o.status &&
status_group == o.status_group &&
status_name == o.status_name &&
title == o.title &&
type == o.type &&
type_id == o.type_id &&
Expand All @@ -251,7 +271,7 @@ def ==(o)
# @return [Integer] Hash code
# @!visibility private
def hash
[archived_at, attributes, closed_at, created_at, custom_attributes, description, jira_issue, key, modified_at, priority, service_now_ticket, status, title, type, type_id, additional_properties].hash
[archived_at, attributes, closed_at, created_at, custom_attributes, description, jira_issue, key, modified_at, priority, service_now_ticket, status, status_group, status_name, title, type, type_id, additional_properties].hash
end
end
end
12 changes: 11 additions & 1 deletion lib/datadog_api_client/v2/models/case_create_attributes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ class CaseCreateAttributes
# Case priority
attr_accessor :priority

# Status of the case. Must be one of the existing statuses for the case's type.
attr_accessor :status_name

# Title
attr_reader :title

Expand All @@ -45,6 +48,7 @@ def self.attribute_map
:'custom_attributes' => :'custom_attributes',
:'description' => :'description',
:'priority' => :'priority',
:'status_name' => :'status_name',
:'title' => :'title',
:'type_id' => :'type_id'
}
Expand All @@ -57,6 +61,7 @@ def self.openapi_types
:'custom_attributes' => :'Hash<String, CustomAttributeValue>',
:'description' => :'String',
:'priority' => :'CasePriority',
:'status_name' => :'String',
:'title' => :'String',
:'type_id' => :'String'
}
Expand Down Expand Up @@ -92,6 +97,10 @@ def initialize(attributes = {})
self.priority = attributes[:'priority']
end

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

if attributes.key?(:'title')
self.title = attributes[:'title']
end
Expand Down Expand Up @@ -159,6 +168,7 @@ def ==(o)
custom_attributes == o.custom_attributes &&
description == o.description &&
priority == o.priority &&
status_name == o.status_name &&
title == o.title &&
type_id == o.type_id &&
additional_properties == o.additional_properties
Expand All @@ -168,7 +178,7 @@ def ==(o)
# @return [Integer] Hash code
# @!visibility private
def hash
[custom_attributes, description, priority, title, type_id, additional_properties].hash
[custom_attributes, description, priority, status_name, title, type_id, additional_properties].hash
end
end
end
4 changes: 3 additions & 1 deletion lib/datadog_api_client/v2/models/case_status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
require 'time'

module DatadogAPIClient::V2
# Case status
# Deprecated way of representing the case status, which only supports OPEN, IN_PROGRESS, and CLOSED statuses. Use `status_name` instead.
#
# @deprecated This model is deprecated.
class CaseStatus
include BaseEnumModel

Expand Down
28 changes: 28 additions & 0 deletions lib/datadog_api_client/v2/models/case_status_group.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
=begin
#Datadog API V2 Collection

#Collection of all Datadog Public endpoints.

The version of the OpenAPI document: 1.0
Contact: [email protected]
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
# Status group of the case.
class CaseStatusGroup
include BaseEnumModel

SG_OPEN = "SG_OPEN".freeze
SG_IN_PROGRESS = "SG_IN_PROGRESS".freeze
SG_CLOSED = "SG_CLOSED".freeze
end
end
34 changes: 13 additions & 21 deletions lib/datadog_api_client/v2/models/case_update_status_attributes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,29 @@ module DatadogAPIClient::V2
class CaseUpdateStatusAttributes
include BaseGenericModel

# Case status
attr_reader :status
# Deprecated way of representing the case status, which only supports OPEN, IN_PROGRESS, and CLOSED statuses. Use `status_name` instead.
attr_accessor :status

# Status of the case. Must be one of the existing statuses for the case's type.
attr_accessor :status_name

attr_accessor :additional_properties

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

# Attribute type mapping.
# @!visibility private
def self.openapi_types
{
:'status' => :'CaseStatus'
:'status' => :'CaseStatus',
:'status_name' => :'String'
}
end

Expand All @@ -63,24 +68,10 @@ def initialize(attributes = {})
if attributes.key?(:'status')
self.status = attributes[:'status']
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 @status.nil?
true
end

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

# Returns the object in the form of hash, with additionalProperties support.
Expand Down Expand Up @@ -110,14 +101,15 @@ def ==(o)
return true if self.equal?(o)
self.class == o.class &&
status == o.status &&
status_name == o.status_name &&
additional_properties == o.additional_properties
end

# Calculates hash code according to all attributes.
# @return [Integer] Hash code
# @!visibility private
def hash
[status, additional_properties].hash
[status, status_name, additional_properties].hash
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class IssueCaseAttributes
# Case priority
attr_accessor :priority

# Case status
# Deprecated way of representing the case status, which only supports OPEN, IN_PROGRESS, and CLOSED statuses. Use `status_name` instead.
attr_accessor :status

# Title of the case.
Expand Down
Loading