-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add customization to S3 ListParts Paginator
Adding new trait IsTruncatedPaginatorTrait that indicates the Paginator should use the value of the isTruncated field to indicate if the pagination has been exhausted.
- Loading branch information
1 parent
9c1ae5a
commit 6816dd8
Showing
3 changed files
with
76 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...lin/software/amazon/smithy/rust/codegen/client/smithy/traits/IsTruncatedPaginatorTrait.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package software.amazon.smithy.rust.codegen.client.smithy.traits | ||
|
||
import software.amazon.smithy.model.node.Node | ||
import software.amazon.smithy.model.shapes.ShapeId | ||
import software.amazon.smithy.model.traits.AnnotationTrait | ||
|
||
/** | ||
* Indicates that an operation should use the IsTruncated field for detecting the end of pagination. | ||
*/ | ||
class IsTruncatedPaginatorTrait : AnnotationTrait(ID, Node.objectNode()) { | ||
companion object { | ||
val ID: ShapeId = | ||
ShapeId.from("software.amazon.smithy.rust.codegen.client.smithy.traits#isTruncatedPaginatorTrait") | ||
} | ||
} |