diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 8a63ddc4ce88..b6fdda1e847b 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -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" @@ -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: @@ -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. diff --git a/lib/datadog_api_client/v2/models/recommendations_filter_request_data_attributes.rb b/lib/datadog_api_client/v2/models/recommendations_filter_request_data_attributes.rb index 1f05545e9805..bf34f6ed48bd 100644 --- a/lib/datadog_api_client/v2/models/recommendations_filter_request_data_attributes.rb +++ b/lib/datadog_api_client/v2/models/recommendations_filter_request_data_attributes.rb @@ -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. diff --git a/lib/datadog_api_client/v2/models/recommendations_filter_request_scope.rb b/lib/datadog_api_client/v2/models/recommendations_filter_request_scope.rb index c59e860a8bd7..422768c19801 100644 --- a/lib/datadog_api_client/v2/models/recommendations_filter_request_scope.rb +++ b/lib/datadog_api_client/v2/models/recommendations_filter_request_scope.rb @@ -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 diff --git a/lib/datadog_api_client/v2/models/recommendations_filter_request_sort_items.rb b/lib/datadog_api_client/v2/models/recommendations_filter_request_sort_items.rb index 7290fab6c473..8e4bc9e7b5dd 100644 --- a/lib/datadog_api_client/v2/models/recommendations_filter_request_sort_items.rb +++ b/lib/datadog_api_client/v2/models/recommendations_filter_request_sort_items.rb @@ -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 @@ -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