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
13 changes: 11 additions & 2 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105210,6 +105210,7 @@ components:
Filter expression applied to the recommendations when `attributes.filter` is omitted.
When supplied, `attributes.filter` overrides this value, including when empty. If the
resulting filter is empty, it defaults to `*`. Scope, view, and pagination still apply.
example: "@resource_table:aws_ec2_instance"
type: string
type:
$ref: "#/components/schemas/RecommendationsFilterRequestDataType"
Expand Down Expand Up @@ -105237,6 +105238,7 @@ components:
description: |-
Status view to return: `all`, `active` (not dismissed), `dismissed`, `open`, `in-progress`,
or `completed`. Defaults to `all`, which returns recommendations in every status.
example: active
type: string
type: object
RecommendationsFilterRequestDataType:
Expand All @@ -105251,25 +105253,32 @@ components:
RecommendationsFilterRequestScope:
description: |-
Recommendations scope. Defaults to `ccm`; use `experiment` for experimental recommendations
or `*` for both.
or `*` for both. An empty value is treated as `ccm`.
enum:
- ccm
- experiment
- "*"
- ""
example: ccm
type: string
x-enum-varnames:
- CCM
- EXPERIMENT
- ALL
- EMPTY
RecommendationsFilterRequestSortItems:
description: A single sort clause applied to the cost recommendations result set.
properties:
expression:
description: Field to sort by (for example, `@potential_daily_savings`).
example: "@potential_daily_savings"
type: string
order:
description: Sort direction, either `ASC` or `DESC`.
description: Sort direction, either `ASC` or `DESC` (case-insensitive).
example: DESC
type: string
required:
- order
type: object
RecommendationsPageMeta:
description: Top-level JSON:API meta object for paginated cost recommendation responses.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class RecommendationsFilterRequestDataAttributes
attr_accessor :filter

# Recommendations scope. Defaults to `ccm`; use `experiment` for experimental recommendations
# or `*` for both.
# or `*` for both. An empty value is treated as `ccm`.
attr_accessor :scope

# Ordered list of sort clauses applied to the result set.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@

module DatadogAPIClient::V2
# Recommendations scope. Defaults to `ccm`; use `experiment` for experimental recommendations
# or `*` for both.
# or `*` for both. An empty value is treated as `ccm`.
class RecommendationsFilterRequestScope
include BaseEnumModel

CCM = "ccm".freeze
EXPERIMENT = "experiment".freeze
ALL = "*".freeze
EMPTY = "".freeze
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class RecommendationsFilterRequestSortItems
# Field to sort by (for example, `@potential_daily_savings`).
attr_accessor :expression

# Sort direction, either `ASC` or `DESC`.
attr_accessor :order
# Sort direction, either `ASC` or `DESC` (case-insensitive).
attr_reader :order

attr_accessor :additional_properties

Expand Down Expand Up @@ -74,6 +74,24 @@ def initialize(attributes = {})
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 @order.nil?
true
end

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

# Returns the object in the form of hash, with additionalProperties support.
# @return [Hash] Returns the object in the form of hash
# @!visibility private
Expand Down
Loading