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
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 @@ -59,7 +59,7 @@ def __init__(
:type filter: str, optional

:param scope: Recommendations scope. Defaults to ``ccm`` ; use ``experiment`` for experimental recommendations
or ``*`` for both.
or ``*`` for both. An empty value is treated as ``ccm``.
:type scope: RecommendationsFilterRequestScope, optional

:param sort: Ordered list of sort clauses applied to the result set.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,22 @@
class RecommendationsFilterRequestScope(ModelSimple):
"""
Recommendations scope. Defaults to `ccm`; use `experiment` for experimental recommendations
or `*` for both.
or `*` for both. An empty value is treated as `ccm`.

:param value: Must be one of ["ccm", "experiment", "*"].
:param value: Must be one of ["ccm", "experiment", "*", ""].
:type value: str
"""

allowed_values = {
"ccm",
"experiment",
"*",
"",
}
CCM: ClassVar["RecommendationsFilterRequestScope"]
EXPERIMENT: ClassVar["RecommendationsFilterRequestScope"]
ALL: ClassVar["RecommendationsFilterRequestScope"]
EMPTY: ClassVar["RecommendationsFilterRequestScope"]

@cached_property
def openapi_types(_):
Expand All @@ -40,3 +42,4 @@ def openapi_types(_):
RecommendationsFilterRequestScope.CCM = RecommendationsFilterRequestScope("ccm")
RecommendationsFilterRequestScope.EXPERIMENT = RecommendationsFilterRequestScope("experiment")
RecommendationsFilterRequestScope.ALL = RecommendationsFilterRequestScope("*")
RecommendationsFilterRequestScope.EMPTY = RecommendationsFilterRequestScope("")
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ def openapi_types(_):
"order": "order",
}

def __init__(self_, expression: Union[str, UnsetType] = unset, order: Union[str, UnsetType] = unset, **kwargs):
def __init__(self_, order: str, expression: Union[str, UnsetType] = unset, **kwargs):
"""
A single sort clause applied to the cost recommendations result set.

:param expression: Field to sort by (for example, ``@potential_daily_savings`` ).
:type expression: str, optional

:param order: Sort direction, either ``ASC`` or ``DESC``.
:type order: str, optional
:param order: Sort direction, either ``ASC`` or ``DESC`` (case-insensitive).
:type order: str
"""
if expression is not unset:
kwargs["expression"] = expression
if order is not unset:
kwargs["order"] = order
super().__init__(kwargs)

self_.order = order
Loading