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 @@ -73,7 +73,8 @@ public RecommendationsFilterRequestDataAttributes scope(RecommendationsFilterReq

/**
* Recommendations scope. Defaults to <code>ccm</code>; use <code>experiment</code> for
* experimental recommendations or <code>*</code> for both.
* experimental recommendations or <code>*</code> for both. An empty value is treated as <code>ccm
* </code>.
*
* @return scope
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,23 @@

/**
* Recommendations scope. Defaults to <code>ccm</code>; use <code>experiment</code> for experimental
* recommendations or <code>*</code> for both.
* recommendations or <code>*</code> for both. An empty value is treated as <code>ccm</code>.
*/
@JsonSerialize(
using = RecommendationsFilterRequestScope.RecommendationsFilterRequestScopeSerializer.class)
public class RecommendationsFilterRequestScope extends ModelEnum<String> {

private static final Set<String> allowedValues =
new HashSet<String>(Arrays.asList("ccm", "experiment", "*"));
new HashSet<String>(Arrays.asList("ccm", "experiment", "*", ""));

public static final RecommendationsFilterRequestScope CCM =
new RecommendationsFilterRequestScope("ccm");
public static final RecommendationsFilterRequestScope EXPERIMENT =
new RecommendationsFilterRequestScope("experiment");
public static final RecommendationsFilterRequestScope ALL =
new RecommendationsFilterRequestScope("*");
public static final RecommendationsFilterRequestScope EMPTY =
new RecommendationsFilterRequestScope("");

RecommendationsFilterRequestScope(String value) {
super(value, allowedValues);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
Expand All @@ -31,6 +32,14 @@ public class RecommendationsFilterRequestSortItems {
public static final String JSON_PROPERTY_ORDER = "order";
private String order;

public RecommendationsFilterRequestSortItems() {}

@JsonCreator
public RecommendationsFilterRequestSortItems(
@JsonProperty(required = true, value = JSON_PROPERTY_ORDER) String order) {
this.order = order;
}

public RecommendationsFilterRequestSortItems expression(String expression) {
this.expression = expression;
return this;
Expand Down Expand Up @@ -58,13 +67,12 @@ public RecommendationsFilterRequestSortItems order(String order) {
}

/**
* Sort direction, either <code>ASC</code> or <code>DESC</code>.
* Sort direction, either <code>ASC</code> or <code>DESC</code> (case-insensitive).
*
* @return order
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ORDER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getOrder() {
return order;
}
Expand Down
Loading