Skip to content

Commit

Permalink
Implement SortOptionsVariant in FieldSort
Browse files Browse the repository at this point in the history
Signed-off-by: Kosuke Suzuki <[email protected]>
  • Loading branch information
suzuki764 committed Nov 23, 2024
1 parent fea4138 commit 0ee9a52
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
// typedef: _types.FieldSort

@JsonpDeserializable
public class FieldSort implements PlainJsonSerializable {
public class FieldSort implements SortOptionsVariant, PlainJsonSerializable {
// Single key dictionary
private final String field;

Expand Down Expand Up @@ -94,6 +94,14 @@ public static FieldSort of(Function<Builder, ObjectBuilder<FieldSort>> fn) {
return fn.apply(new Builder()).build();
}

/**
* SortOptions variant kind.
*/
@Override
public SortOptions.Kind _sortOptionsKind() {
return SortOptions.Kind.Field;
}

/**
* Required - The target field
*/
Expand Down

0 comments on commit 0ee9a52

Please sign in to comment.