Switch to using the dep tool and update all the dependencies
This commit is contained in:
+9373
File diff suppressed because it is too large
Load Diff
+82
@@ -0,0 +1,82 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package lexmodelbuildingservice provides the client and types for making API
|
||||
// requests to Amazon Lex Model Building Service.
|
||||
//
|
||||
// Amazon Lex is an AWS service for building conversational voice and text interfaces.
|
||||
// Use these actions to create, update, and delete conversational bots for new
|
||||
// and existing client applications.
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19 for more information on this service.
|
||||
//
|
||||
// See lexmodelbuildingservice package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/lexmodelbuildingservice/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To use the client for Amazon Lex Model Building Service you will first need
|
||||
// to create a new instance of it.
|
||||
//
|
||||
// When creating a client for an AWS service you'll first need to have a Session
|
||||
// already created. The Session provides configuration that can be shared
|
||||
// between multiple service clients. Additional configuration can be applied to
|
||||
// the Session and service's client when they are constructed. The aws package's
|
||||
// Config type contains several fields such as Region for the AWS Region the
|
||||
// client should make API requests too. The optional Config value can be provided
|
||||
// as the variadic argument for Sessions and client creation.
|
||||
//
|
||||
// Once the service's client is created you can use it to make API requests the
|
||||
// AWS service. These clients are safe to use concurrently.
|
||||
//
|
||||
// // Create a session to share configuration, and load external configuration.
|
||||
// sess := session.Must(session.NewSession())
|
||||
//
|
||||
// // Create the service's client with the session.
|
||||
// svc := lexmodelbuildingservice.New(sess)
|
||||
//
|
||||
// See the SDK's documentation for more information on how to use service clients.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/
|
||||
//
|
||||
// See aws package's Config type for more information on configuration options.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
|
||||
//
|
||||
// See the Amazon Lex Model Building Service client LexModelBuildingService for more
|
||||
// information on creating the service's client.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/lexmodelbuildingservice/#New
|
||||
//
|
||||
// Once the client is created you can make an API request to the service.
|
||||
// Each API method takes a input parameter, and returns the service response
|
||||
// and an error.
|
||||
//
|
||||
// The API method will document which error codes the service can be returned
|
||||
// by the operation if the service models the API operation's errors. These
|
||||
// errors will also be available as const strings prefixed with "ErrCode".
|
||||
//
|
||||
// result, err := svc.CreateBotVersion(params)
|
||||
// if err != nil {
|
||||
// // Cast err to awserr.Error to handle specific error codes.
|
||||
// aerr, ok := err.(awserr.Error)
|
||||
// if ok && aerr.Code() == <error code to check for> {
|
||||
// // Specific error code handling
|
||||
// }
|
||||
// return err
|
||||
// }
|
||||
//
|
||||
// fmt.Println("CreateBotVersion result:")
|
||||
// fmt.Println(result)
|
||||
//
|
||||
// Using the Client with Context
|
||||
//
|
||||
// The service's client also provides methods to make API requests with a Context
|
||||
// value. This allows you to control the timeout, and cancellation of pending
|
||||
// requests. These methods also take request Option as variadic parameter to apply
|
||||
// additional configuration to the API request.
|
||||
//
|
||||
// ctx := context.Background()
|
||||
//
|
||||
// result, err := svc.CreateBotVersionWithContext(ctx, params)
|
||||
//
|
||||
// See the request package documentation for more information on using Context pattern
|
||||
// with the SDK.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/aws/request/
|
||||
package lexmodelbuildingservice
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package lexmodelbuildingservice
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeBadRequestException for service response error code
|
||||
// "BadRequestException".
|
||||
//
|
||||
// The request is not well formed. For example, a value is invalid or a required
|
||||
// field is missing. Check the field values, and try again.
|
||||
ErrCodeBadRequestException = "BadRequestException"
|
||||
|
||||
// ErrCodeConflictException for service response error code
|
||||
// "ConflictException".
|
||||
//
|
||||
// There was a conflict processing the request. Try your request again.
|
||||
ErrCodeConflictException = "ConflictException"
|
||||
|
||||
// ErrCodeInternalFailureException for service response error code
|
||||
// "InternalFailureException".
|
||||
//
|
||||
// An internal Amazon Lex error occurred. Try your request again.
|
||||
ErrCodeInternalFailureException = "InternalFailureException"
|
||||
|
||||
// ErrCodeLimitExceededException for service response error code
|
||||
// "LimitExceededException".
|
||||
//
|
||||
// The request exceeded a limit. Try your request again.
|
||||
ErrCodeLimitExceededException = "LimitExceededException"
|
||||
|
||||
// ErrCodeNotFoundException for service response error code
|
||||
// "NotFoundException".
|
||||
//
|
||||
// The resource specified in the request was not found. Check the resource and
|
||||
// try again.
|
||||
ErrCodeNotFoundException = "NotFoundException"
|
||||
|
||||
// ErrCodePreconditionFailedException for service response error code
|
||||
// "PreconditionFailedException".
|
||||
//
|
||||
// The checksum of the resource that you are trying to change does not match
|
||||
// the checksum in the request. Check the resource's checksum and try again.
|
||||
ErrCodePreconditionFailedException = "PreconditionFailedException"
|
||||
|
||||
// ErrCodeResourceInUseException for service response error code
|
||||
// "ResourceInUseException".
|
||||
//
|
||||
// The resource that you are attempting to delete is referred to by another
|
||||
// resource. Use this information to remove references to the resource that
|
||||
// you are trying to delete.
|
||||
//
|
||||
// The body of the exception contains a JSON object that describes the resource.
|
||||
//
|
||||
// { "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT,
|
||||
//
|
||||
// "resourceReference": {
|
||||
//
|
||||
// "name": string, "version": string } }
|
||||
ErrCodeResourceInUseException = "ResourceInUseException"
|
||||
)
|
||||
Generated
Vendored
+838
@@ -0,0 +1,838 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package lexmodelbuildingservice_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/session"
|
||||
"github.com/aws/aws-sdk-go/service/lexmodelbuildingservice"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ bytes.Buffer
|
||||
|
||||
func ExampleLexModelBuildingService_CreateBotVersion() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := lexmodelbuildingservice.New(sess)
|
||||
|
||||
params := &lexmodelbuildingservice.CreateBotVersionInput{
|
||||
Name: aws.String("BotName"), // Required
|
||||
Checksum: aws.String("String"),
|
||||
}
|
||||
resp, err := svc.CreateBotVersion(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleLexModelBuildingService_CreateIntentVersion() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := lexmodelbuildingservice.New(sess)
|
||||
|
||||
params := &lexmodelbuildingservice.CreateIntentVersionInput{
|
||||
Name: aws.String("IntentName"), // Required
|
||||
Checksum: aws.String("String"),
|
||||
}
|
||||
resp, err := svc.CreateIntentVersion(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleLexModelBuildingService_CreateSlotTypeVersion() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := lexmodelbuildingservice.New(sess)
|
||||
|
||||
params := &lexmodelbuildingservice.CreateSlotTypeVersionInput{
|
||||
Name: aws.String("SlotTypeName"), // Required
|
||||
Checksum: aws.String("String"),
|
||||
}
|
||||
resp, err := svc.CreateSlotTypeVersion(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleLexModelBuildingService_DeleteBot() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := lexmodelbuildingservice.New(sess)
|
||||
|
||||
params := &lexmodelbuildingservice.DeleteBotInput{
|
||||
Name: aws.String("BotName"), // Required
|
||||
Version: aws.String("Version"),
|
||||
}
|
||||
resp, err := svc.DeleteBot(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleLexModelBuildingService_DeleteBotAlias() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := lexmodelbuildingservice.New(sess)
|
||||
|
||||
params := &lexmodelbuildingservice.DeleteBotAliasInput{
|
||||
BotName: aws.String("BotName"), // Required
|
||||
Name: aws.String("AliasName"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteBotAlias(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleLexModelBuildingService_DeleteBotChannelAssociation() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := lexmodelbuildingservice.New(sess)
|
||||
|
||||
params := &lexmodelbuildingservice.DeleteBotChannelAssociationInput{
|
||||
BotAlias: aws.String("AliasName"), // Required
|
||||
BotName: aws.String("BotName"), // Required
|
||||
Name: aws.String("BotChannelName"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteBotChannelAssociation(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleLexModelBuildingService_DeleteIntent() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := lexmodelbuildingservice.New(sess)
|
||||
|
||||
params := &lexmodelbuildingservice.DeleteIntentInput{
|
||||
Name: aws.String("IntentName"), // Required
|
||||
Version: aws.String("Version"),
|
||||
}
|
||||
resp, err := svc.DeleteIntent(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleLexModelBuildingService_DeleteSlotType() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := lexmodelbuildingservice.New(sess)
|
||||
|
||||
params := &lexmodelbuildingservice.DeleteSlotTypeInput{
|
||||
Name: aws.String("SlotTypeName"), // Required
|
||||
Version: aws.String("Version"),
|
||||
}
|
||||
resp, err := svc.DeleteSlotType(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleLexModelBuildingService_DeleteUtterances() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := lexmodelbuildingservice.New(sess)
|
||||
|
||||
params := &lexmodelbuildingservice.DeleteUtterancesInput{
|
||||
BotName: aws.String("BotName"), // Required
|
||||
UserId: aws.String("UserId"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteUtterances(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleLexModelBuildingService_GetBot() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := lexmodelbuildingservice.New(sess)
|
||||
|
||||
params := &lexmodelbuildingservice.GetBotInput{
|
||||
Name: aws.String("BotName"), // Required
|
||||
VersionOrAlias: aws.String("String"), // Required
|
||||
}
|
||||
resp, err := svc.GetBot(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleLexModelBuildingService_GetBotAlias() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := lexmodelbuildingservice.New(sess)
|
||||
|
||||
params := &lexmodelbuildingservice.GetBotAliasInput{
|
||||
BotName: aws.String("BotName"), // Required
|
||||
Name: aws.String("AliasName"), // Required
|
||||
}
|
||||
resp, err := svc.GetBotAlias(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleLexModelBuildingService_GetBotAliases() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := lexmodelbuildingservice.New(sess)
|
||||
|
||||
params := &lexmodelbuildingservice.GetBotAliasesInput{
|
||||
BotName: aws.String("BotName"), // Required
|
||||
MaxResults: aws.Int64(1),
|
||||
NameContains: aws.String("AliasName"),
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.GetBotAliases(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleLexModelBuildingService_GetBotChannelAssociation() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := lexmodelbuildingservice.New(sess)
|
||||
|
||||
params := &lexmodelbuildingservice.GetBotChannelAssociationInput{
|
||||
BotAlias: aws.String("AliasName"), // Required
|
||||
BotName: aws.String("BotName"), // Required
|
||||
Name: aws.String("BotChannelName"), // Required
|
||||
}
|
||||
resp, err := svc.GetBotChannelAssociation(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleLexModelBuildingService_GetBotChannelAssociations() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := lexmodelbuildingservice.New(sess)
|
||||
|
||||
params := &lexmodelbuildingservice.GetBotChannelAssociationsInput{
|
||||
BotAlias: aws.String("AliasNameOrListAll"), // Required
|
||||
BotName: aws.String("BotName"), // Required
|
||||
MaxResults: aws.Int64(1),
|
||||
NameContains: aws.String("BotChannelName"),
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.GetBotChannelAssociations(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleLexModelBuildingService_GetBotVersions() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := lexmodelbuildingservice.New(sess)
|
||||
|
||||
params := &lexmodelbuildingservice.GetBotVersionsInput{
|
||||
Name: aws.String("BotName"), // Required
|
||||
MaxResults: aws.Int64(1),
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.GetBotVersions(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleLexModelBuildingService_GetBots() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := lexmodelbuildingservice.New(sess)
|
||||
|
||||
params := &lexmodelbuildingservice.GetBotsInput{
|
||||
MaxResults: aws.Int64(1),
|
||||
NameContains: aws.String("BotName"),
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.GetBots(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleLexModelBuildingService_GetBuiltinIntent() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := lexmodelbuildingservice.New(sess)
|
||||
|
||||
params := &lexmodelbuildingservice.GetBuiltinIntentInput{
|
||||
Signature: aws.String("BuiltinIntentSignature"), // Required
|
||||
}
|
||||
resp, err := svc.GetBuiltinIntent(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleLexModelBuildingService_GetBuiltinIntents() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := lexmodelbuildingservice.New(sess)
|
||||
|
||||
params := &lexmodelbuildingservice.GetBuiltinIntentsInput{
|
||||
Locale: aws.String("Locale"),
|
||||
MaxResults: aws.Int64(1),
|
||||
NextToken: aws.String("NextToken"),
|
||||
SignatureContains: aws.String("String"),
|
||||
}
|
||||
resp, err := svc.GetBuiltinIntents(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleLexModelBuildingService_GetBuiltinSlotTypes() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := lexmodelbuildingservice.New(sess)
|
||||
|
||||
params := &lexmodelbuildingservice.GetBuiltinSlotTypesInput{
|
||||
Locale: aws.String("Locale"),
|
||||
MaxResults: aws.Int64(1),
|
||||
NextToken: aws.String("NextToken"),
|
||||
SignatureContains: aws.String("String"),
|
||||
}
|
||||
resp, err := svc.GetBuiltinSlotTypes(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleLexModelBuildingService_GetIntent() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := lexmodelbuildingservice.New(sess)
|
||||
|
||||
params := &lexmodelbuildingservice.GetIntentInput{
|
||||
Name: aws.String("IntentName"), // Required
|
||||
Version: aws.String("Version"), // Required
|
||||
}
|
||||
resp, err := svc.GetIntent(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleLexModelBuildingService_GetIntentVersions() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := lexmodelbuildingservice.New(sess)
|
||||
|
||||
params := &lexmodelbuildingservice.GetIntentVersionsInput{
|
||||
Name: aws.String("IntentName"), // Required
|
||||
MaxResults: aws.Int64(1),
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.GetIntentVersions(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleLexModelBuildingService_GetIntents() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := lexmodelbuildingservice.New(sess)
|
||||
|
||||
params := &lexmodelbuildingservice.GetIntentsInput{
|
||||
MaxResults: aws.Int64(1),
|
||||
NameContains: aws.String("IntentName"),
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.GetIntents(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleLexModelBuildingService_GetSlotType() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := lexmodelbuildingservice.New(sess)
|
||||
|
||||
params := &lexmodelbuildingservice.GetSlotTypeInput{
|
||||
Name: aws.String("SlotTypeName"), // Required
|
||||
Version: aws.String("Version"), // Required
|
||||
}
|
||||
resp, err := svc.GetSlotType(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleLexModelBuildingService_GetSlotTypeVersions() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := lexmodelbuildingservice.New(sess)
|
||||
|
||||
params := &lexmodelbuildingservice.GetSlotTypeVersionsInput{
|
||||
Name: aws.String("SlotTypeName"), // Required
|
||||
MaxResults: aws.Int64(1),
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.GetSlotTypeVersions(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleLexModelBuildingService_GetSlotTypes() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := lexmodelbuildingservice.New(sess)
|
||||
|
||||
params := &lexmodelbuildingservice.GetSlotTypesInput{
|
||||
MaxResults: aws.Int64(1),
|
||||
NameContains: aws.String("SlotTypeName"),
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.GetSlotTypes(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleLexModelBuildingService_GetUtterancesView() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := lexmodelbuildingservice.New(sess)
|
||||
|
||||
params := &lexmodelbuildingservice.GetUtterancesViewInput{
|
||||
BotName: aws.String("BotName"), // Required
|
||||
BotVersions: []*string{ // Required
|
||||
aws.String("Version"), // Required
|
||||
// More values...
|
||||
},
|
||||
StatusType: aws.String("StatusType"), // Required
|
||||
}
|
||||
resp, err := svc.GetUtterancesView(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleLexModelBuildingService_PutBot() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := lexmodelbuildingservice.New(sess)
|
||||
|
||||
params := &lexmodelbuildingservice.PutBotInput{
|
||||
ChildDirected: aws.Bool(true), // Required
|
||||
Locale: aws.String("Locale"), // Required
|
||||
Name: aws.String("BotName"), // Required
|
||||
AbortStatement: &lexmodelbuildingservice.Statement{
|
||||
Messages: []*lexmodelbuildingservice.Message{ // Required
|
||||
{ // Required
|
||||
Content: aws.String("ContentString"), // Required
|
||||
ContentType: aws.String("ContentType"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
ResponseCard: aws.String("ResponseCard"),
|
||||
},
|
||||
Checksum: aws.String("String"),
|
||||
ClarificationPrompt: &lexmodelbuildingservice.Prompt{
|
||||
MaxAttempts: aws.Int64(1), // Required
|
||||
Messages: []*lexmodelbuildingservice.Message{ // Required
|
||||
{ // Required
|
||||
Content: aws.String("ContentString"), // Required
|
||||
ContentType: aws.String("ContentType"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
ResponseCard: aws.String("ResponseCard"),
|
||||
},
|
||||
Description: aws.String("Description"),
|
||||
IdleSessionTTLInSeconds: aws.Int64(1),
|
||||
Intents: []*lexmodelbuildingservice.Intent{
|
||||
{ // Required
|
||||
IntentName: aws.String("IntentName"), // Required
|
||||
IntentVersion: aws.String("Version"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
ProcessBehavior: aws.String("ProcessBehavior"),
|
||||
VoiceId: aws.String("String"),
|
||||
}
|
||||
resp, err := svc.PutBot(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleLexModelBuildingService_PutBotAlias() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := lexmodelbuildingservice.New(sess)
|
||||
|
||||
params := &lexmodelbuildingservice.PutBotAliasInput{
|
||||
BotName: aws.String("BotName"), // Required
|
||||
BotVersion: aws.String("Version"), // Required
|
||||
Name: aws.String("AliasName"), // Required
|
||||
Checksum: aws.String("String"),
|
||||
Description: aws.String("Description"),
|
||||
}
|
||||
resp, err := svc.PutBotAlias(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleLexModelBuildingService_PutIntent() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := lexmodelbuildingservice.New(sess)
|
||||
|
||||
params := &lexmodelbuildingservice.PutIntentInput{
|
||||
Name: aws.String("IntentName"), // Required
|
||||
Checksum: aws.String("String"),
|
||||
ConclusionStatement: &lexmodelbuildingservice.Statement{
|
||||
Messages: []*lexmodelbuildingservice.Message{ // Required
|
||||
{ // Required
|
||||
Content: aws.String("ContentString"), // Required
|
||||
ContentType: aws.String("ContentType"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
ResponseCard: aws.String("ResponseCard"),
|
||||
},
|
||||
ConfirmationPrompt: &lexmodelbuildingservice.Prompt{
|
||||
MaxAttempts: aws.Int64(1), // Required
|
||||
Messages: []*lexmodelbuildingservice.Message{ // Required
|
||||
{ // Required
|
||||
Content: aws.String("ContentString"), // Required
|
||||
ContentType: aws.String("ContentType"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
ResponseCard: aws.String("ResponseCard"),
|
||||
},
|
||||
Description: aws.String("Description"),
|
||||
DialogCodeHook: &lexmodelbuildingservice.CodeHook{
|
||||
MessageVersion: aws.String("MessageVersion"), // Required
|
||||
Uri: aws.String("LambdaARN"), // Required
|
||||
},
|
||||
FollowUpPrompt: &lexmodelbuildingservice.FollowUpPrompt{
|
||||
Prompt: &lexmodelbuildingservice.Prompt{ // Required
|
||||
MaxAttempts: aws.Int64(1), // Required
|
||||
Messages: []*lexmodelbuildingservice.Message{ // Required
|
||||
{ // Required
|
||||
Content: aws.String("ContentString"), // Required
|
||||
ContentType: aws.String("ContentType"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
ResponseCard: aws.String("ResponseCard"),
|
||||
},
|
||||
RejectionStatement: &lexmodelbuildingservice.Statement{ // Required
|
||||
Messages: []*lexmodelbuildingservice.Message{ // Required
|
||||
{ // Required
|
||||
Content: aws.String("ContentString"), // Required
|
||||
ContentType: aws.String("ContentType"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
ResponseCard: aws.String("ResponseCard"),
|
||||
},
|
||||
},
|
||||
FulfillmentActivity: &lexmodelbuildingservice.FulfillmentActivity{
|
||||
Type: aws.String("FulfillmentActivityType"), // Required
|
||||
CodeHook: &lexmodelbuildingservice.CodeHook{
|
||||
MessageVersion: aws.String("MessageVersion"), // Required
|
||||
Uri: aws.String("LambdaARN"), // Required
|
||||
},
|
||||
},
|
||||
ParentIntentSignature: aws.String("BuiltinIntentSignature"),
|
||||
RejectionStatement: &lexmodelbuildingservice.Statement{
|
||||
Messages: []*lexmodelbuildingservice.Message{ // Required
|
||||
{ // Required
|
||||
Content: aws.String("ContentString"), // Required
|
||||
ContentType: aws.String("ContentType"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
ResponseCard: aws.String("ResponseCard"),
|
||||
},
|
||||
SampleUtterances: []*string{
|
||||
aws.String("Utterance"), // Required
|
||||
// More values...
|
||||
},
|
||||
Slots: []*lexmodelbuildingservice.Slot{
|
||||
{ // Required
|
||||
Name: aws.String("SlotName"), // Required
|
||||
SlotConstraint: aws.String("SlotConstraint"), // Required
|
||||
Description: aws.String("Description"),
|
||||
Priority: aws.Int64(1),
|
||||
ResponseCard: aws.String("ResponseCard"),
|
||||
SampleUtterances: []*string{
|
||||
aws.String("Utterance"), // Required
|
||||
// More values...
|
||||
},
|
||||
SlotType: aws.String("CustomOrBuiltinSlotTypeName"),
|
||||
SlotTypeVersion: aws.String("Version"),
|
||||
ValueElicitationPrompt: &lexmodelbuildingservice.Prompt{
|
||||
MaxAttempts: aws.Int64(1), // Required
|
||||
Messages: []*lexmodelbuildingservice.Message{ // Required
|
||||
{ // Required
|
||||
Content: aws.String("ContentString"), // Required
|
||||
ContentType: aws.String("ContentType"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
ResponseCard: aws.String("ResponseCard"),
|
||||
},
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.PutIntent(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleLexModelBuildingService_PutSlotType() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := lexmodelbuildingservice.New(sess)
|
||||
|
||||
params := &lexmodelbuildingservice.PutSlotTypeInput{
|
||||
Name: aws.String("SlotTypeName"), // Required
|
||||
Checksum: aws.String("String"),
|
||||
Description: aws.String("Description"),
|
||||
EnumerationValues: []*lexmodelbuildingservice.EnumerationValue{
|
||||
{ // Required
|
||||
Value: aws.String("Value"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.PutSlotType(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
Generated
Vendored
+214
@@ -0,0 +1,214 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package lexmodelbuildingserviceiface provides an interface to enable mocking the Amazon Lex Model Building Service service client
|
||||
// for testing your code.
|
||||
//
|
||||
// It is important to note that this interface will have breaking changes
|
||||
// when the service model is updated and adds new API operations, paginators,
|
||||
// and waiters.
|
||||
package lexmodelbuildingserviceiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/lexmodelbuildingservice"
|
||||
)
|
||||
|
||||
// LexModelBuildingServiceAPI provides an interface to enable mocking the
|
||||
// lexmodelbuildingservice.LexModelBuildingService service client's API operation,
|
||||
// paginators, and waiters. This make unit testing your code that calls out
|
||||
// to the SDK's service client's calls easier.
|
||||
//
|
||||
// The best way to use this interface is so the SDK's service client's calls
|
||||
// can be stubbed out for unit testing your code with the SDK without needing
|
||||
// to inject custom request handlers into the the SDK's request pipeline.
|
||||
//
|
||||
// // myFunc uses an SDK service client to make a request to
|
||||
// // Amazon Lex Model Building Service.
|
||||
// func myFunc(svc lexmodelbuildingserviceiface.LexModelBuildingServiceAPI) bool {
|
||||
// // Make svc.CreateBotVersion request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := lexmodelbuildingservice.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockLexModelBuildingServiceClient struct {
|
||||
// lexmodelbuildingserviceiface.LexModelBuildingServiceAPI
|
||||
// }
|
||||
// func (m *mockLexModelBuildingServiceClient) CreateBotVersion(input *lexmodelbuildingservice.CreateBotVersionInput) (*lexmodelbuildingservice.CreateBotVersionOutput, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockLexModelBuildingServiceClient{}
|
||||
//
|
||||
// myfunc(mockSvc)
|
||||
//
|
||||
// // Verify myFunc's functionality
|
||||
// }
|
||||
//
|
||||
// It is important to note that this interface will have breaking changes
|
||||
// when the service model is updated and adds new API operations, paginators,
|
||||
// and waiters. Its suggested to use the pattern above for testing, or using
|
||||
// tooling to generate mocks to satisfy the interfaces.
|
||||
type LexModelBuildingServiceAPI interface {
|
||||
CreateBotVersion(*lexmodelbuildingservice.CreateBotVersionInput) (*lexmodelbuildingservice.CreateBotVersionOutput, error)
|
||||
CreateBotVersionWithContext(aws.Context, *lexmodelbuildingservice.CreateBotVersionInput, ...request.Option) (*lexmodelbuildingservice.CreateBotVersionOutput, error)
|
||||
CreateBotVersionRequest(*lexmodelbuildingservice.CreateBotVersionInput) (*request.Request, *lexmodelbuildingservice.CreateBotVersionOutput)
|
||||
|
||||
CreateIntentVersion(*lexmodelbuildingservice.CreateIntentVersionInput) (*lexmodelbuildingservice.CreateIntentVersionOutput, error)
|
||||
CreateIntentVersionWithContext(aws.Context, *lexmodelbuildingservice.CreateIntentVersionInput, ...request.Option) (*lexmodelbuildingservice.CreateIntentVersionOutput, error)
|
||||
CreateIntentVersionRequest(*lexmodelbuildingservice.CreateIntentVersionInput) (*request.Request, *lexmodelbuildingservice.CreateIntentVersionOutput)
|
||||
|
||||
CreateSlotTypeVersion(*lexmodelbuildingservice.CreateSlotTypeVersionInput) (*lexmodelbuildingservice.CreateSlotTypeVersionOutput, error)
|
||||
CreateSlotTypeVersionWithContext(aws.Context, *lexmodelbuildingservice.CreateSlotTypeVersionInput, ...request.Option) (*lexmodelbuildingservice.CreateSlotTypeVersionOutput, error)
|
||||
CreateSlotTypeVersionRequest(*lexmodelbuildingservice.CreateSlotTypeVersionInput) (*request.Request, *lexmodelbuildingservice.CreateSlotTypeVersionOutput)
|
||||
|
||||
DeleteBot(*lexmodelbuildingservice.DeleteBotInput) (*lexmodelbuildingservice.DeleteBotOutput, error)
|
||||
DeleteBotWithContext(aws.Context, *lexmodelbuildingservice.DeleteBotInput, ...request.Option) (*lexmodelbuildingservice.DeleteBotOutput, error)
|
||||
DeleteBotRequest(*lexmodelbuildingservice.DeleteBotInput) (*request.Request, *lexmodelbuildingservice.DeleteBotOutput)
|
||||
|
||||
DeleteBotAlias(*lexmodelbuildingservice.DeleteBotAliasInput) (*lexmodelbuildingservice.DeleteBotAliasOutput, error)
|
||||
DeleteBotAliasWithContext(aws.Context, *lexmodelbuildingservice.DeleteBotAliasInput, ...request.Option) (*lexmodelbuildingservice.DeleteBotAliasOutput, error)
|
||||
DeleteBotAliasRequest(*lexmodelbuildingservice.DeleteBotAliasInput) (*request.Request, *lexmodelbuildingservice.DeleteBotAliasOutput)
|
||||
|
||||
DeleteBotChannelAssociation(*lexmodelbuildingservice.DeleteBotChannelAssociationInput) (*lexmodelbuildingservice.DeleteBotChannelAssociationOutput, error)
|
||||
DeleteBotChannelAssociationWithContext(aws.Context, *lexmodelbuildingservice.DeleteBotChannelAssociationInput, ...request.Option) (*lexmodelbuildingservice.DeleteBotChannelAssociationOutput, error)
|
||||
DeleteBotChannelAssociationRequest(*lexmodelbuildingservice.DeleteBotChannelAssociationInput) (*request.Request, *lexmodelbuildingservice.DeleteBotChannelAssociationOutput)
|
||||
|
||||
DeleteIntent(*lexmodelbuildingservice.DeleteIntentInput) (*lexmodelbuildingservice.DeleteIntentOutput, error)
|
||||
DeleteIntentWithContext(aws.Context, *lexmodelbuildingservice.DeleteIntentInput, ...request.Option) (*lexmodelbuildingservice.DeleteIntentOutput, error)
|
||||
DeleteIntentRequest(*lexmodelbuildingservice.DeleteIntentInput) (*request.Request, *lexmodelbuildingservice.DeleteIntentOutput)
|
||||
|
||||
DeleteSlotType(*lexmodelbuildingservice.DeleteSlotTypeInput) (*lexmodelbuildingservice.DeleteSlotTypeOutput, error)
|
||||
DeleteSlotTypeWithContext(aws.Context, *lexmodelbuildingservice.DeleteSlotTypeInput, ...request.Option) (*lexmodelbuildingservice.DeleteSlotTypeOutput, error)
|
||||
DeleteSlotTypeRequest(*lexmodelbuildingservice.DeleteSlotTypeInput) (*request.Request, *lexmodelbuildingservice.DeleteSlotTypeOutput)
|
||||
|
||||
DeleteUtterances(*lexmodelbuildingservice.DeleteUtterancesInput) (*lexmodelbuildingservice.DeleteUtterancesOutput, error)
|
||||
DeleteUtterancesWithContext(aws.Context, *lexmodelbuildingservice.DeleteUtterancesInput, ...request.Option) (*lexmodelbuildingservice.DeleteUtterancesOutput, error)
|
||||
DeleteUtterancesRequest(*lexmodelbuildingservice.DeleteUtterancesInput) (*request.Request, *lexmodelbuildingservice.DeleteUtterancesOutput)
|
||||
|
||||
GetBot(*lexmodelbuildingservice.GetBotInput) (*lexmodelbuildingservice.GetBotOutput, error)
|
||||
GetBotWithContext(aws.Context, *lexmodelbuildingservice.GetBotInput, ...request.Option) (*lexmodelbuildingservice.GetBotOutput, error)
|
||||
GetBotRequest(*lexmodelbuildingservice.GetBotInput) (*request.Request, *lexmodelbuildingservice.GetBotOutput)
|
||||
|
||||
GetBotAlias(*lexmodelbuildingservice.GetBotAliasInput) (*lexmodelbuildingservice.GetBotAliasOutput, error)
|
||||
GetBotAliasWithContext(aws.Context, *lexmodelbuildingservice.GetBotAliasInput, ...request.Option) (*lexmodelbuildingservice.GetBotAliasOutput, error)
|
||||
GetBotAliasRequest(*lexmodelbuildingservice.GetBotAliasInput) (*request.Request, *lexmodelbuildingservice.GetBotAliasOutput)
|
||||
|
||||
GetBotAliases(*lexmodelbuildingservice.GetBotAliasesInput) (*lexmodelbuildingservice.GetBotAliasesOutput, error)
|
||||
GetBotAliasesWithContext(aws.Context, *lexmodelbuildingservice.GetBotAliasesInput, ...request.Option) (*lexmodelbuildingservice.GetBotAliasesOutput, error)
|
||||
GetBotAliasesRequest(*lexmodelbuildingservice.GetBotAliasesInput) (*request.Request, *lexmodelbuildingservice.GetBotAliasesOutput)
|
||||
|
||||
GetBotAliasesPages(*lexmodelbuildingservice.GetBotAliasesInput, func(*lexmodelbuildingservice.GetBotAliasesOutput, bool) bool) error
|
||||
GetBotAliasesPagesWithContext(aws.Context, *lexmodelbuildingservice.GetBotAliasesInput, func(*lexmodelbuildingservice.GetBotAliasesOutput, bool) bool, ...request.Option) error
|
||||
|
||||
GetBotChannelAssociation(*lexmodelbuildingservice.GetBotChannelAssociationInput) (*lexmodelbuildingservice.GetBotChannelAssociationOutput, error)
|
||||
GetBotChannelAssociationWithContext(aws.Context, *lexmodelbuildingservice.GetBotChannelAssociationInput, ...request.Option) (*lexmodelbuildingservice.GetBotChannelAssociationOutput, error)
|
||||
GetBotChannelAssociationRequest(*lexmodelbuildingservice.GetBotChannelAssociationInput) (*request.Request, *lexmodelbuildingservice.GetBotChannelAssociationOutput)
|
||||
|
||||
GetBotChannelAssociations(*lexmodelbuildingservice.GetBotChannelAssociationsInput) (*lexmodelbuildingservice.GetBotChannelAssociationsOutput, error)
|
||||
GetBotChannelAssociationsWithContext(aws.Context, *lexmodelbuildingservice.GetBotChannelAssociationsInput, ...request.Option) (*lexmodelbuildingservice.GetBotChannelAssociationsOutput, error)
|
||||
GetBotChannelAssociationsRequest(*lexmodelbuildingservice.GetBotChannelAssociationsInput) (*request.Request, *lexmodelbuildingservice.GetBotChannelAssociationsOutput)
|
||||
|
||||
GetBotChannelAssociationsPages(*lexmodelbuildingservice.GetBotChannelAssociationsInput, func(*lexmodelbuildingservice.GetBotChannelAssociationsOutput, bool) bool) error
|
||||
GetBotChannelAssociationsPagesWithContext(aws.Context, *lexmodelbuildingservice.GetBotChannelAssociationsInput, func(*lexmodelbuildingservice.GetBotChannelAssociationsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
GetBotVersions(*lexmodelbuildingservice.GetBotVersionsInput) (*lexmodelbuildingservice.GetBotVersionsOutput, error)
|
||||
GetBotVersionsWithContext(aws.Context, *lexmodelbuildingservice.GetBotVersionsInput, ...request.Option) (*lexmodelbuildingservice.GetBotVersionsOutput, error)
|
||||
GetBotVersionsRequest(*lexmodelbuildingservice.GetBotVersionsInput) (*request.Request, *lexmodelbuildingservice.GetBotVersionsOutput)
|
||||
|
||||
GetBotVersionsPages(*lexmodelbuildingservice.GetBotVersionsInput, func(*lexmodelbuildingservice.GetBotVersionsOutput, bool) bool) error
|
||||
GetBotVersionsPagesWithContext(aws.Context, *lexmodelbuildingservice.GetBotVersionsInput, func(*lexmodelbuildingservice.GetBotVersionsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
GetBots(*lexmodelbuildingservice.GetBotsInput) (*lexmodelbuildingservice.GetBotsOutput, error)
|
||||
GetBotsWithContext(aws.Context, *lexmodelbuildingservice.GetBotsInput, ...request.Option) (*lexmodelbuildingservice.GetBotsOutput, error)
|
||||
GetBotsRequest(*lexmodelbuildingservice.GetBotsInput) (*request.Request, *lexmodelbuildingservice.GetBotsOutput)
|
||||
|
||||
GetBotsPages(*lexmodelbuildingservice.GetBotsInput, func(*lexmodelbuildingservice.GetBotsOutput, bool) bool) error
|
||||
GetBotsPagesWithContext(aws.Context, *lexmodelbuildingservice.GetBotsInput, func(*lexmodelbuildingservice.GetBotsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
GetBuiltinIntent(*lexmodelbuildingservice.GetBuiltinIntentInput) (*lexmodelbuildingservice.GetBuiltinIntentOutput, error)
|
||||
GetBuiltinIntentWithContext(aws.Context, *lexmodelbuildingservice.GetBuiltinIntentInput, ...request.Option) (*lexmodelbuildingservice.GetBuiltinIntentOutput, error)
|
||||
GetBuiltinIntentRequest(*lexmodelbuildingservice.GetBuiltinIntentInput) (*request.Request, *lexmodelbuildingservice.GetBuiltinIntentOutput)
|
||||
|
||||
GetBuiltinIntents(*lexmodelbuildingservice.GetBuiltinIntentsInput) (*lexmodelbuildingservice.GetBuiltinIntentsOutput, error)
|
||||
GetBuiltinIntentsWithContext(aws.Context, *lexmodelbuildingservice.GetBuiltinIntentsInput, ...request.Option) (*lexmodelbuildingservice.GetBuiltinIntentsOutput, error)
|
||||
GetBuiltinIntentsRequest(*lexmodelbuildingservice.GetBuiltinIntentsInput) (*request.Request, *lexmodelbuildingservice.GetBuiltinIntentsOutput)
|
||||
|
||||
GetBuiltinIntentsPages(*lexmodelbuildingservice.GetBuiltinIntentsInput, func(*lexmodelbuildingservice.GetBuiltinIntentsOutput, bool) bool) error
|
||||
GetBuiltinIntentsPagesWithContext(aws.Context, *lexmodelbuildingservice.GetBuiltinIntentsInput, func(*lexmodelbuildingservice.GetBuiltinIntentsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
GetBuiltinSlotTypes(*lexmodelbuildingservice.GetBuiltinSlotTypesInput) (*lexmodelbuildingservice.GetBuiltinSlotTypesOutput, error)
|
||||
GetBuiltinSlotTypesWithContext(aws.Context, *lexmodelbuildingservice.GetBuiltinSlotTypesInput, ...request.Option) (*lexmodelbuildingservice.GetBuiltinSlotTypesOutput, error)
|
||||
GetBuiltinSlotTypesRequest(*lexmodelbuildingservice.GetBuiltinSlotTypesInput) (*request.Request, *lexmodelbuildingservice.GetBuiltinSlotTypesOutput)
|
||||
|
||||
GetBuiltinSlotTypesPages(*lexmodelbuildingservice.GetBuiltinSlotTypesInput, func(*lexmodelbuildingservice.GetBuiltinSlotTypesOutput, bool) bool) error
|
||||
GetBuiltinSlotTypesPagesWithContext(aws.Context, *lexmodelbuildingservice.GetBuiltinSlotTypesInput, func(*lexmodelbuildingservice.GetBuiltinSlotTypesOutput, bool) bool, ...request.Option) error
|
||||
|
||||
GetIntent(*lexmodelbuildingservice.GetIntentInput) (*lexmodelbuildingservice.GetIntentOutput, error)
|
||||
GetIntentWithContext(aws.Context, *lexmodelbuildingservice.GetIntentInput, ...request.Option) (*lexmodelbuildingservice.GetIntentOutput, error)
|
||||
GetIntentRequest(*lexmodelbuildingservice.GetIntentInput) (*request.Request, *lexmodelbuildingservice.GetIntentOutput)
|
||||
|
||||
GetIntentVersions(*lexmodelbuildingservice.GetIntentVersionsInput) (*lexmodelbuildingservice.GetIntentVersionsOutput, error)
|
||||
GetIntentVersionsWithContext(aws.Context, *lexmodelbuildingservice.GetIntentVersionsInput, ...request.Option) (*lexmodelbuildingservice.GetIntentVersionsOutput, error)
|
||||
GetIntentVersionsRequest(*lexmodelbuildingservice.GetIntentVersionsInput) (*request.Request, *lexmodelbuildingservice.GetIntentVersionsOutput)
|
||||
|
||||
GetIntentVersionsPages(*lexmodelbuildingservice.GetIntentVersionsInput, func(*lexmodelbuildingservice.GetIntentVersionsOutput, bool) bool) error
|
||||
GetIntentVersionsPagesWithContext(aws.Context, *lexmodelbuildingservice.GetIntentVersionsInput, func(*lexmodelbuildingservice.GetIntentVersionsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
GetIntents(*lexmodelbuildingservice.GetIntentsInput) (*lexmodelbuildingservice.GetIntentsOutput, error)
|
||||
GetIntentsWithContext(aws.Context, *lexmodelbuildingservice.GetIntentsInput, ...request.Option) (*lexmodelbuildingservice.GetIntentsOutput, error)
|
||||
GetIntentsRequest(*lexmodelbuildingservice.GetIntentsInput) (*request.Request, *lexmodelbuildingservice.GetIntentsOutput)
|
||||
|
||||
GetIntentsPages(*lexmodelbuildingservice.GetIntentsInput, func(*lexmodelbuildingservice.GetIntentsOutput, bool) bool) error
|
||||
GetIntentsPagesWithContext(aws.Context, *lexmodelbuildingservice.GetIntentsInput, func(*lexmodelbuildingservice.GetIntentsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
GetSlotType(*lexmodelbuildingservice.GetSlotTypeInput) (*lexmodelbuildingservice.GetSlotTypeOutput, error)
|
||||
GetSlotTypeWithContext(aws.Context, *lexmodelbuildingservice.GetSlotTypeInput, ...request.Option) (*lexmodelbuildingservice.GetSlotTypeOutput, error)
|
||||
GetSlotTypeRequest(*lexmodelbuildingservice.GetSlotTypeInput) (*request.Request, *lexmodelbuildingservice.GetSlotTypeOutput)
|
||||
|
||||
GetSlotTypeVersions(*lexmodelbuildingservice.GetSlotTypeVersionsInput) (*lexmodelbuildingservice.GetSlotTypeVersionsOutput, error)
|
||||
GetSlotTypeVersionsWithContext(aws.Context, *lexmodelbuildingservice.GetSlotTypeVersionsInput, ...request.Option) (*lexmodelbuildingservice.GetSlotTypeVersionsOutput, error)
|
||||
GetSlotTypeVersionsRequest(*lexmodelbuildingservice.GetSlotTypeVersionsInput) (*request.Request, *lexmodelbuildingservice.GetSlotTypeVersionsOutput)
|
||||
|
||||
GetSlotTypeVersionsPages(*lexmodelbuildingservice.GetSlotTypeVersionsInput, func(*lexmodelbuildingservice.GetSlotTypeVersionsOutput, bool) bool) error
|
||||
GetSlotTypeVersionsPagesWithContext(aws.Context, *lexmodelbuildingservice.GetSlotTypeVersionsInput, func(*lexmodelbuildingservice.GetSlotTypeVersionsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
GetSlotTypes(*lexmodelbuildingservice.GetSlotTypesInput) (*lexmodelbuildingservice.GetSlotTypesOutput, error)
|
||||
GetSlotTypesWithContext(aws.Context, *lexmodelbuildingservice.GetSlotTypesInput, ...request.Option) (*lexmodelbuildingservice.GetSlotTypesOutput, error)
|
||||
GetSlotTypesRequest(*lexmodelbuildingservice.GetSlotTypesInput) (*request.Request, *lexmodelbuildingservice.GetSlotTypesOutput)
|
||||
|
||||
GetSlotTypesPages(*lexmodelbuildingservice.GetSlotTypesInput, func(*lexmodelbuildingservice.GetSlotTypesOutput, bool) bool) error
|
||||
GetSlotTypesPagesWithContext(aws.Context, *lexmodelbuildingservice.GetSlotTypesInput, func(*lexmodelbuildingservice.GetSlotTypesOutput, bool) bool, ...request.Option) error
|
||||
|
||||
GetUtterancesView(*lexmodelbuildingservice.GetUtterancesViewInput) (*lexmodelbuildingservice.GetUtterancesViewOutput, error)
|
||||
GetUtterancesViewWithContext(aws.Context, *lexmodelbuildingservice.GetUtterancesViewInput, ...request.Option) (*lexmodelbuildingservice.GetUtterancesViewOutput, error)
|
||||
GetUtterancesViewRequest(*lexmodelbuildingservice.GetUtterancesViewInput) (*request.Request, *lexmodelbuildingservice.GetUtterancesViewOutput)
|
||||
|
||||
PutBot(*lexmodelbuildingservice.PutBotInput) (*lexmodelbuildingservice.PutBotOutput, error)
|
||||
PutBotWithContext(aws.Context, *lexmodelbuildingservice.PutBotInput, ...request.Option) (*lexmodelbuildingservice.PutBotOutput, error)
|
||||
PutBotRequest(*lexmodelbuildingservice.PutBotInput) (*request.Request, *lexmodelbuildingservice.PutBotOutput)
|
||||
|
||||
PutBotAlias(*lexmodelbuildingservice.PutBotAliasInput) (*lexmodelbuildingservice.PutBotAliasOutput, error)
|
||||
PutBotAliasWithContext(aws.Context, *lexmodelbuildingservice.PutBotAliasInput, ...request.Option) (*lexmodelbuildingservice.PutBotAliasOutput, error)
|
||||
PutBotAliasRequest(*lexmodelbuildingservice.PutBotAliasInput) (*request.Request, *lexmodelbuildingservice.PutBotAliasOutput)
|
||||
|
||||
PutIntent(*lexmodelbuildingservice.PutIntentInput) (*lexmodelbuildingservice.PutIntentOutput, error)
|
||||
PutIntentWithContext(aws.Context, *lexmodelbuildingservice.PutIntentInput, ...request.Option) (*lexmodelbuildingservice.PutIntentOutput, error)
|
||||
PutIntentRequest(*lexmodelbuildingservice.PutIntentInput) (*request.Request, *lexmodelbuildingservice.PutIntentOutput)
|
||||
|
||||
PutSlotType(*lexmodelbuildingservice.PutSlotTypeInput) (*lexmodelbuildingservice.PutSlotTypeOutput, error)
|
||||
PutSlotTypeWithContext(aws.Context, *lexmodelbuildingservice.PutSlotTypeInput, ...request.Option) (*lexmodelbuildingservice.PutSlotTypeOutput, error)
|
||||
PutSlotTypeRequest(*lexmodelbuildingservice.PutSlotTypeInput) (*request.Request, *lexmodelbuildingservice.PutSlotTypeOutput)
|
||||
}
|
||||
|
||||
var _ LexModelBuildingServiceAPI = (*lexmodelbuildingservice.LexModelBuildingService)(nil)
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package lexmodelbuildingservice
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/client"
|
||||
"github.com/aws/aws-sdk-go/aws/client/metadata"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go/private/protocol/restjson"
|
||||
)
|
||||
|
||||
// LexModelBuildingService provides the API operation methods for making requests to
|
||||
// Amazon Lex Model Building Service. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// LexModelBuildingService methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type LexModelBuildingService struct {
|
||||
*client.Client
|
||||
}
|
||||
|
||||
// Used for custom client initialization logic
|
||||
var initClient func(*client.Client)
|
||||
|
||||
// Used for custom request initialization logic
|
||||
var initRequest func(*request.Request)
|
||||
|
||||
// Service information constants
|
||||
const (
|
||||
ServiceName = "models.lex" // Service endpoint prefix API calls made to.
|
||||
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
|
||||
)
|
||||
|
||||
// New creates a new instance of the LexModelBuildingService client with a session.
|
||||
// If additional configuration is needed for the client instance use the optional
|
||||
// aws.Config parameter to add your extra config.
|
||||
//
|
||||
// Example:
|
||||
// // Create a LexModelBuildingService client from just a session.
|
||||
// svc := lexmodelbuildingservice.New(mySession)
|
||||
//
|
||||
// // Create a LexModelBuildingService client with additional configuration
|
||||
// svc := lexmodelbuildingservice.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *LexModelBuildingService {
|
||||
c := p.ClientConfig(EndpointsID, cfgs...)
|
||||
return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
|
||||
}
|
||||
|
||||
// newClient creates, initializes and returns a new service client instance.
|
||||
func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *LexModelBuildingService {
|
||||
if len(signingName) == 0 {
|
||||
signingName = "lex"
|
||||
}
|
||||
svc := &LexModelBuildingService{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2017-04-19",
|
||||
JSONVersion: "1.1",
|
||||
},
|
||||
handlers,
|
||||
),
|
||||
}
|
||||
|
||||
// Handlers
|
||||
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
|
||||
svc.Handlers.Build.PushBackNamed(restjson.BuildHandler)
|
||||
svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler)
|
||||
svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler)
|
||||
svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler)
|
||||
|
||||
// Run custom client initialization if present
|
||||
if initClient != nil {
|
||||
initClient(svc.Client)
|
||||
}
|
||||
|
||||
return svc
|
||||
}
|
||||
|
||||
// newRequest creates a new request for a LexModelBuildingService operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *LexModelBuildingService) newRequest(op *request.Operation, params, data interface{}) *request.Request {
|
||||
req := c.NewRequest(op, params, data)
|
||||
|
||||
// Run custom request initialization if present
|
||||
if initRequest != nil {
|
||||
initRequest(req)
|
||||
}
|
||||
|
||||
return req
|
||||
}
|
||||
Reference in New Issue
Block a user