-
Notifications
You must be signed in to change notification settings - Fork 653
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
212 additions
and
1 deletion.
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
176 changes: 176 additions & 0 deletions
176
service/smithyprototype/lexruntimeservice/api_op_ListSessons.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
35 changes: 35 additions & 0 deletions
35
service/smithyprototype/lexruntimeservice/api_op_ListSessons_example_test.go
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,35 @@ | ||
package lexruntimeservice_test | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
"log" | ||
|
||
"github.com/aws/aws-sdk-go-v2/aws" | ||
"github.com/aws/aws-sdk-go-v2/service/smithyprototype/lexruntimeservice" | ||
lexruntime "github.com/aws/aws-sdk-go-v2/service/smithyprototype/lexruntimeservice" | ||
) | ||
|
||
func ExampleListSessions_pagination() { | ||
cfg, err := external.LoadDefaultAWSConfig() | ||
if err != nil { | ||
log.Fatalf("unable to load configuration, %v", err) | ||
} | ||
|
||
client := lexruntimeservice.NewClient(cfg) | ||
|
||
// Create a paginator with the client and input parameters. | ||
p := lexruntime.NewListSessionsPaginator(client, &lexruntime.ListSessions{ | ||
BotAlias: aws.String("botAlias"), | ||
BotName: aws.String("botName"), | ||
UserId: aws.String("userID"), | ||
}) | ||
|
||
for p.HasMorePages() { | ||
o, err := p.NextPage(context.TODO()) | ||
if err != nil { | ||
log.Fatalf("failed to get next page, %v", err) | ||
} | ||
fmt.Println("Page:", o) | ||
} | ||
} |