// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.

package apigateway_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/apigateway"
)

var _ time.Duration
var _ bytes.Buffer

func ExampleAPIGateway_CreateApiKey() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.CreateApiKeyInput{
		Description:        aws.String("String"),
		Enabled:            aws.Bool(true),
		GenerateDistinctId: aws.Bool(true),
		Name:               aws.String("String"),
		StageKeys: []*apigateway.StageKey{
			{ // Required
				RestApiId: aws.String("String"),
				StageName: aws.String("String"),
			},
			// More values...
		},
		Value: aws.String("String"),
	}
	resp, err := svc.CreateApiKey(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 ExampleAPIGateway_CreateAuthorizer() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.CreateAuthorizerInput{
		IdentitySource:               aws.String("String"),         // Required
		Name:                         aws.String("String"),         // Required
		RestApiId:                    aws.String("String"),         // Required
		Type:                         aws.String("AuthorizerType"), // Required
		AuthType:                     aws.String("String"),
		AuthorizerCredentials:        aws.String("String"),
		AuthorizerResultTtlInSeconds: aws.Int64(1),
		AuthorizerUri:                aws.String("String"),
		IdentityValidationExpression: aws.String("String"),
		ProviderARNs: []*string{
			aws.String("ProviderARN"), // Required
			// More values...
		},
	}
	resp, err := svc.CreateAuthorizer(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 ExampleAPIGateway_CreateBasePathMapping() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.CreateBasePathMappingInput{
		DomainName: aws.String("String"), // Required
		RestApiId:  aws.String("String"), // Required
		BasePath:   aws.String("String"),
		Stage:      aws.String("String"),
	}
	resp, err := svc.CreateBasePathMapping(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 ExampleAPIGateway_CreateDeployment() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.CreateDeploymentInput{
		RestApiId:           aws.String("String"), // Required
		StageName:           aws.String("String"), // Required
		CacheClusterEnabled: aws.Bool(true),
		CacheClusterSize:    aws.String("CacheClusterSize"),
		Description:         aws.String("String"),
		StageDescription:    aws.String("String"),
		Variables: map[string]*string{
			"Key": aws.String("String"), // Required
			// More values...
		},
	}
	resp, err := svc.CreateDeployment(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 ExampleAPIGateway_CreateDomainName() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.CreateDomainNameInput{
		CertificateBody:       aws.String("String"), // Required
		CertificateChain:      aws.String("String"), // Required
		CertificateName:       aws.String("String"), // Required
		CertificatePrivateKey: aws.String("String"), // Required
		DomainName:            aws.String("String"), // Required
	}
	resp, err := svc.CreateDomainName(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 ExampleAPIGateway_CreateModel() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.CreateModelInput{
		ContentType: aws.String("String"), // Required
		Name:        aws.String("String"), // Required
		RestApiId:   aws.String("String"), // Required
		Description: aws.String("String"),
		Schema:      aws.String("String"),
	}
	resp, err := svc.CreateModel(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 ExampleAPIGateway_CreateResource() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.CreateResourceInput{
		ParentId:  aws.String("String"), // Required
		PathPart:  aws.String("String"), // Required
		RestApiId: aws.String("String"), // Required
	}
	resp, err := svc.CreateResource(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 ExampleAPIGateway_CreateRestApi() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.CreateRestApiInput{
		Name:        aws.String("String"), // Required
		CloneFrom:   aws.String("String"),
		Description: aws.String("String"),
	}
	resp, err := svc.CreateRestApi(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 ExampleAPIGateway_CreateStage() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.CreateStageInput{
		DeploymentId:        aws.String("String"), // Required
		RestApiId:           aws.String("String"), // Required
		StageName:           aws.String("String"), // Required
		CacheClusterEnabled: aws.Bool(true),
		CacheClusterSize:    aws.String("CacheClusterSize"),
		Description:         aws.String("String"),
		Variables: map[string]*string{
			"Key": aws.String("String"), // Required
			// More values...
		},
	}
	resp, err := svc.CreateStage(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 ExampleAPIGateway_CreateUsagePlan() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.CreateUsagePlanInput{
		Name: aws.String("String"), // Required
		ApiStages: []*apigateway.ApiStage{
			{ // Required
				ApiId: aws.String("String"),
				Stage: aws.String("String"),
			},
			// More values...
		},
		Description: aws.String("String"),
		Quota: &apigateway.QuotaSettings{
			Limit:  aws.Int64(1),
			Offset: aws.Int64(1),
			Period: aws.String("QuotaPeriodType"),
		},
		Throttle: &apigateway.ThrottleSettings{
			BurstLimit: aws.Int64(1),
			RateLimit:  aws.Float64(1.0),
		},
	}
	resp, err := svc.CreateUsagePlan(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 ExampleAPIGateway_CreateUsagePlanKey() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.CreateUsagePlanKeyInput{
		KeyId:       aws.String("String"), // Required
		KeyType:     aws.String("String"), // Required
		UsagePlanId: aws.String("String"), // Required
	}
	resp, err := svc.CreateUsagePlanKey(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 ExampleAPIGateway_DeleteApiKey() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.DeleteApiKeyInput{
		ApiKey: aws.String("String"), // Required
	}
	resp, err := svc.DeleteApiKey(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 ExampleAPIGateway_DeleteAuthorizer() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.DeleteAuthorizerInput{
		AuthorizerId: aws.String("String"), // Required
		RestApiId:    aws.String("String"), // Required
	}
	resp, err := svc.DeleteAuthorizer(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 ExampleAPIGateway_DeleteBasePathMapping() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.DeleteBasePathMappingInput{
		BasePath:   aws.String("String"), // Required
		DomainName: aws.String("String"), // Required
	}
	resp, err := svc.DeleteBasePathMapping(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 ExampleAPIGateway_DeleteClientCertificate() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.DeleteClientCertificateInput{
		ClientCertificateId: aws.String("String"), // Required
	}
	resp, err := svc.DeleteClientCertificate(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 ExampleAPIGateway_DeleteDeployment() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.DeleteDeploymentInput{
		DeploymentId: aws.String("String"), // Required
		RestApiId:    aws.String("String"), // Required
	}
	resp, err := svc.DeleteDeployment(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 ExampleAPIGateway_DeleteDomainName() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.DeleteDomainNameInput{
		DomainName: aws.String("String"), // Required
	}
	resp, err := svc.DeleteDomainName(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 ExampleAPIGateway_DeleteIntegration() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.DeleteIntegrationInput{
		HttpMethod: aws.String("String"), // Required
		ResourceId: aws.String("String"), // Required
		RestApiId:  aws.String("String"), // Required
	}
	resp, err := svc.DeleteIntegration(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 ExampleAPIGateway_DeleteIntegrationResponse() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.DeleteIntegrationResponseInput{
		HttpMethod: aws.String("String"),     // Required
		ResourceId: aws.String("String"),     // Required
		RestApiId:  aws.String("String"),     // Required
		StatusCode: aws.String("StatusCode"), // Required
	}
	resp, err := svc.DeleteIntegrationResponse(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 ExampleAPIGateway_DeleteMethod() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.DeleteMethodInput{
		HttpMethod: aws.String("String"), // Required
		ResourceId: aws.String("String"), // Required
		RestApiId:  aws.String("String"), // Required
	}
	resp, err := svc.DeleteMethod(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 ExampleAPIGateway_DeleteMethodResponse() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.DeleteMethodResponseInput{
		HttpMethod: aws.String("String"),     // Required
		ResourceId: aws.String("String"),     // Required
		RestApiId:  aws.String("String"),     // Required
		StatusCode: aws.String("StatusCode"), // Required
	}
	resp, err := svc.DeleteMethodResponse(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 ExampleAPIGateway_DeleteModel() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.DeleteModelInput{
		ModelName: aws.String("String"), // Required
		RestApiId: aws.String("String"), // Required
	}
	resp, err := svc.DeleteModel(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 ExampleAPIGateway_DeleteResource() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.DeleteResourceInput{
		ResourceId: aws.String("String"), // Required
		RestApiId:  aws.String("String"), // Required
	}
	resp, err := svc.DeleteResource(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 ExampleAPIGateway_DeleteRestApi() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.DeleteRestApiInput{
		RestApiId: aws.String("String"), // Required
	}
	resp, err := svc.DeleteRestApi(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 ExampleAPIGateway_DeleteStage() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.DeleteStageInput{
		RestApiId: aws.String("String"), // Required
		StageName: aws.String("String"), // Required
	}
	resp, err := svc.DeleteStage(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 ExampleAPIGateway_DeleteUsagePlan() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.DeleteUsagePlanInput{
		UsagePlanId: aws.String("String"), // Required
	}
	resp, err := svc.DeleteUsagePlan(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 ExampleAPIGateway_DeleteUsagePlanKey() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.DeleteUsagePlanKeyInput{
		KeyId:       aws.String("String"), // Required
		UsagePlanId: aws.String("String"), // Required
	}
	resp, err := svc.DeleteUsagePlanKey(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 ExampleAPIGateway_FlushStageAuthorizersCache() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.FlushStageAuthorizersCacheInput{
		RestApiId: aws.String("String"), // Required
		StageName: aws.String("String"), // Required
	}
	resp, err := svc.FlushStageAuthorizersCache(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 ExampleAPIGateway_FlushStageCache() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.FlushStageCacheInput{
		RestApiId: aws.String("String"), // Required
		StageName: aws.String("String"), // Required
	}
	resp, err := svc.FlushStageCache(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 ExampleAPIGateway_GenerateClientCertificate() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GenerateClientCertificateInput{
		Description: aws.String("String"),
	}
	resp, err := svc.GenerateClientCertificate(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 ExampleAPIGateway_GetAccount() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	var params *apigateway.GetAccountInput
	resp, err := svc.GetAccount(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 ExampleAPIGateway_GetApiKey() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetApiKeyInput{
		ApiKey:       aws.String("String"), // Required
		IncludeValue: aws.Bool(true),
	}
	resp, err := svc.GetApiKey(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 ExampleAPIGateway_GetApiKeys() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetApiKeysInput{
		IncludeValues: aws.Bool(true),
		Limit:         aws.Int64(1),
		NameQuery:     aws.String("String"),
		Position:      aws.String("String"),
	}
	resp, err := svc.GetApiKeys(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 ExampleAPIGateway_GetAuthorizer() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetAuthorizerInput{
		AuthorizerId: aws.String("String"), // Required
		RestApiId:    aws.String("String"), // Required
	}
	resp, err := svc.GetAuthorizer(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 ExampleAPIGateway_GetAuthorizers() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetAuthorizersInput{
		RestApiId: aws.String("String"), // Required
		Limit:     aws.Int64(1),
		Position:  aws.String("String"),
	}
	resp, err := svc.GetAuthorizers(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 ExampleAPIGateway_GetBasePathMapping() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetBasePathMappingInput{
		BasePath:   aws.String("String"), // Required
		DomainName: aws.String("String"), // Required
	}
	resp, err := svc.GetBasePathMapping(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 ExampleAPIGateway_GetBasePathMappings() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetBasePathMappingsInput{
		DomainName: aws.String("String"), // Required
		Limit:      aws.Int64(1),
		Position:   aws.String("String"),
	}
	resp, err := svc.GetBasePathMappings(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 ExampleAPIGateway_GetClientCertificate() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetClientCertificateInput{
		ClientCertificateId: aws.String("String"), // Required
	}
	resp, err := svc.GetClientCertificate(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 ExampleAPIGateway_GetClientCertificates() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetClientCertificatesInput{
		Limit:    aws.Int64(1),
		Position: aws.String("String"),
	}
	resp, err := svc.GetClientCertificates(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 ExampleAPIGateway_GetDeployment() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetDeploymentInput{
		DeploymentId: aws.String("String"), // Required
		RestApiId:    aws.String("String"), // Required
	}
	resp, err := svc.GetDeployment(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 ExampleAPIGateway_GetDeployments() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetDeploymentsInput{
		RestApiId: aws.String("String"), // Required
		Limit:     aws.Int64(1),
		Position:  aws.String("String"),
	}
	resp, err := svc.GetDeployments(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 ExampleAPIGateway_GetDomainName() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetDomainNameInput{
		DomainName: aws.String("String"), // Required
	}
	resp, err := svc.GetDomainName(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 ExampleAPIGateway_GetDomainNames() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetDomainNamesInput{
		Limit:    aws.Int64(1),
		Position: aws.String("String"),
	}
	resp, err := svc.GetDomainNames(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 ExampleAPIGateway_GetExport() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetExportInput{
		ExportType: aws.String("String"), // Required
		RestApiId:  aws.String("String"), // Required
		StageName:  aws.String("String"), // Required
		Accepts:    aws.String("String"),
		Parameters: map[string]*string{
			"Key": aws.String("String"), // Required
			// More values...
		},
	}
	resp, err := svc.GetExport(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 ExampleAPIGateway_GetIntegration() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetIntegrationInput{
		HttpMethod: aws.String("String"), // Required
		ResourceId: aws.String("String"), // Required
		RestApiId:  aws.String("String"), // Required
	}
	resp, err := svc.GetIntegration(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 ExampleAPIGateway_GetIntegrationResponse() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetIntegrationResponseInput{
		HttpMethod: aws.String("String"),     // Required
		ResourceId: aws.String("String"),     // Required
		RestApiId:  aws.String("String"),     // Required
		StatusCode: aws.String("StatusCode"), // Required
	}
	resp, err := svc.GetIntegrationResponse(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 ExampleAPIGateway_GetMethod() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetMethodInput{
		HttpMethod: aws.String("String"), // Required
		ResourceId: aws.String("String"), // Required
		RestApiId:  aws.String("String"), // Required
	}
	resp, err := svc.GetMethod(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 ExampleAPIGateway_GetMethodResponse() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetMethodResponseInput{
		HttpMethod: aws.String("String"),     // Required
		ResourceId: aws.String("String"),     // Required
		RestApiId:  aws.String("String"),     // Required
		StatusCode: aws.String("StatusCode"), // Required
	}
	resp, err := svc.GetMethodResponse(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 ExampleAPIGateway_GetModel() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetModelInput{
		ModelName: aws.String("String"), // Required
		RestApiId: aws.String("String"), // Required
		Flatten:   aws.Bool(true),
	}
	resp, err := svc.GetModel(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 ExampleAPIGateway_GetModelTemplate() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetModelTemplateInput{
		ModelName: aws.String("String"), // Required
		RestApiId: aws.String("String"), // Required
	}
	resp, err := svc.GetModelTemplate(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 ExampleAPIGateway_GetModels() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetModelsInput{
		RestApiId: aws.String("String"), // Required
		Limit:     aws.Int64(1),
		Position:  aws.String("String"),
	}
	resp, err := svc.GetModels(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 ExampleAPIGateway_GetResource() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetResourceInput{
		ResourceId: aws.String("String"), // Required
		RestApiId:  aws.String("String"), // Required
	}
	resp, err := svc.GetResource(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 ExampleAPIGateway_GetResources() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetResourcesInput{
		RestApiId: aws.String("String"), // Required
		Limit:     aws.Int64(1),
		Position:  aws.String("String"),
	}
	resp, err := svc.GetResources(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 ExampleAPIGateway_GetRestApi() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetRestApiInput{
		RestApiId: aws.String("String"), // Required
	}
	resp, err := svc.GetRestApi(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 ExampleAPIGateway_GetRestApis() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetRestApisInput{
		Limit:    aws.Int64(1),
		Position: aws.String("String"),
	}
	resp, err := svc.GetRestApis(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 ExampleAPIGateway_GetSdk() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetSdkInput{
		RestApiId: aws.String("String"), // Required
		SdkType:   aws.String("String"), // Required
		StageName: aws.String("String"), // Required
		Parameters: map[string]*string{
			"Key": aws.String("String"), // Required
			// More values...
		},
	}
	resp, err := svc.GetSdk(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 ExampleAPIGateway_GetStage() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetStageInput{
		RestApiId: aws.String("String"), // Required
		StageName: aws.String("String"), // Required
	}
	resp, err := svc.GetStage(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 ExampleAPIGateway_GetStages() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetStagesInput{
		RestApiId:    aws.String("String"), // Required
		DeploymentId: aws.String("String"),
	}
	resp, err := svc.GetStages(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 ExampleAPIGateway_GetUsage() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetUsageInput{
		EndDate:     aws.String("String"), // Required
		StartDate:   aws.String("String"), // Required
		UsagePlanId: aws.String("String"), // Required
		KeyId:       aws.String("String"),
		Limit:       aws.Int64(1),
		Position:    aws.String("String"),
	}
	resp, err := svc.GetUsage(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 ExampleAPIGateway_GetUsagePlan() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetUsagePlanInput{
		UsagePlanId: aws.String("String"), // Required
	}
	resp, err := svc.GetUsagePlan(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 ExampleAPIGateway_GetUsagePlanKey() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetUsagePlanKeyInput{
		KeyId:       aws.String("String"), // Required
		UsagePlanId: aws.String("String"), // Required
	}
	resp, err := svc.GetUsagePlanKey(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 ExampleAPIGateway_GetUsagePlanKeys() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetUsagePlanKeysInput{
		UsagePlanId: aws.String("String"), // Required
		Limit:       aws.Int64(1),
		NameQuery:   aws.String("String"),
		Position:    aws.String("String"),
	}
	resp, err := svc.GetUsagePlanKeys(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 ExampleAPIGateway_GetUsagePlans() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.GetUsagePlansInput{
		KeyId:    aws.String("String"),
		Limit:    aws.Int64(1),
		Position: aws.String("String"),
	}
	resp, err := svc.GetUsagePlans(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 ExampleAPIGateway_ImportApiKeys() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.ImportApiKeysInput{
		Body:           []byte("PAYLOAD"),           // Required
		Format:         aws.String("ApiKeysFormat"), // Required
		FailOnWarnings: aws.Bool(true),
	}
	resp, err := svc.ImportApiKeys(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 ExampleAPIGateway_ImportRestApi() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.ImportRestApiInput{
		Body:           []byte("PAYLOAD"), // Required
		FailOnWarnings: aws.Bool(true),
		Parameters: map[string]*string{
			"Key": aws.String("String"), // Required
			// More values...
		},
	}
	resp, err := svc.ImportRestApi(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 ExampleAPIGateway_PutIntegration() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.PutIntegrationInput{
		HttpMethod: aws.String("String"),          // Required
		ResourceId: aws.String("String"),          // Required
		RestApiId:  aws.String("String"),          // Required
		Type:       aws.String("IntegrationType"), // Required
		CacheKeyParameters: []*string{
			aws.String("String"), // Required
			// More values...
		},
		CacheNamespace:        aws.String("String"),
		Credentials:           aws.String("String"),
		IntegrationHttpMethod: aws.String("String"),
		PassthroughBehavior:   aws.String("String"),
		RequestParameters: map[string]*string{
			"Key": aws.String("String"), // Required
			// More values...
		},
		RequestTemplates: map[string]*string{
			"Key": aws.String("String"), // Required
			// More values...
		},
		Uri: aws.String("String"),
	}
	resp, err := svc.PutIntegration(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 ExampleAPIGateway_PutIntegrationResponse() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.PutIntegrationResponseInput{
		HttpMethod: aws.String("String"),     // Required
		ResourceId: aws.String("String"),     // Required
		RestApiId:  aws.String("String"),     // Required
		StatusCode: aws.String("StatusCode"), // Required
		ResponseParameters: map[string]*string{
			"Key": aws.String("String"), // Required
			// More values...
		},
		ResponseTemplates: map[string]*string{
			"Key": aws.String("String"), // Required
			// More values...
		},
		SelectionPattern: aws.String("String"),
	}
	resp, err := svc.PutIntegrationResponse(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 ExampleAPIGateway_PutMethod() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.PutMethodInput{
		AuthorizationType: aws.String("String"), // Required
		HttpMethod:        aws.String("String"), // Required
		ResourceId:        aws.String("String"), // Required
		RestApiId:         aws.String("String"), // Required
		ApiKeyRequired:    aws.Bool(true),
		AuthorizerId:      aws.String("String"),
		RequestModels: map[string]*string{
			"Key": aws.String("String"), // Required
			// More values...
		},
		RequestParameters: map[string]*bool{
			"Key": aws.Bool(true), // Required
			// More values...
		},
	}
	resp, err := svc.PutMethod(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 ExampleAPIGateway_PutMethodResponse() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.PutMethodResponseInput{
		HttpMethod: aws.String("String"),     // Required
		ResourceId: aws.String("String"),     // Required
		RestApiId:  aws.String("String"),     // Required
		StatusCode: aws.String("StatusCode"), // Required
		ResponseModels: map[string]*string{
			"Key": aws.String("String"), // Required
			// More values...
		},
		ResponseParameters: map[string]*bool{
			"Key": aws.Bool(true), // Required
			// More values...
		},
	}
	resp, err := svc.PutMethodResponse(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 ExampleAPIGateway_PutRestApi() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.PutRestApiInput{
		Body:           []byte("PAYLOAD"),    // Required
		RestApiId:      aws.String("String"), // Required
		FailOnWarnings: aws.Bool(true),
		Mode:           aws.String("PutMode"),
		Parameters: map[string]*string{
			"Key": aws.String("String"), // Required
			// More values...
		},
	}
	resp, err := svc.PutRestApi(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 ExampleAPIGateway_TestInvokeAuthorizer() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.TestInvokeAuthorizerInput{
		AuthorizerId: aws.String("String"), // Required
		RestApiId:    aws.String("String"), // Required
		AdditionalContext: map[string]*string{
			"Key": aws.String("String"), // Required
			// More values...
		},
		Body: aws.String("String"),
		Headers: map[string]*string{
			"Key": aws.String("String"), // Required
			// More values...
		},
		PathWithQueryString: aws.String("String"),
		StageVariables: map[string]*string{
			"Key": aws.String("String"), // Required
			// More values...
		},
	}
	resp, err := svc.TestInvokeAuthorizer(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 ExampleAPIGateway_TestInvokeMethod() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.TestInvokeMethodInput{
		HttpMethod:          aws.String("String"), // Required
		ResourceId:          aws.String("String"), // Required
		RestApiId:           aws.String("String"), // Required
		Body:                aws.String("String"),
		ClientCertificateId: aws.String("String"),
		Headers: map[string]*string{
			"Key": aws.String("String"), // Required
			// More values...
		},
		PathWithQueryString: aws.String("String"),
		StageVariables: map[string]*string{
			"Key": aws.String("String"), // Required
			// More values...
		},
	}
	resp, err := svc.TestInvokeMethod(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 ExampleAPIGateway_UpdateAccount() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.UpdateAccountInput{
		PatchOperations: []*apigateway.PatchOperation{
			{ // Required
				From:  aws.String("String"),
				Op:    aws.String("Op"),
				Path:  aws.String("String"),
				Value: aws.String("String"),
			},
			// More values...
		},
	}
	resp, err := svc.UpdateAccount(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 ExampleAPIGateway_UpdateApiKey() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.UpdateApiKeyInput{
		ApiKey: aws.String("String"), // Required
		PatchOperations: []*apigateway.PatchOperation{
			{ // Required
				From:  aws.String("String"),
				Op:    aws.String("Op"),
				Path:  aws.String("String"),
				Value: aws.String("String"),
			},
			// More values...
		},
	}
	resp, err := svc.UpdateApiKey(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 ExampleAPIGateway_UpdateAuthorizer() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.UpdateAuthorizerInput{
		AuthorizerId: aws.String("String"), // Required
		RestApiId:    aws.String("String"), // Required
		PatchOperations: []*apigateway.PatchOperation{
			{ // Required
				From:  aws.String("String"),
				Op:    aws.String("Op"),
				Path:  aws.String("String"),
				Value: aws.String("String"),
			},
			// More values...
		},
	}
	resp, err := svc.UpdateAuthorizer(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 ExampleAPIGateway_UpdateBasePathMapping() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.UpdateBasePathMappingInput{
		BasePath:   aws.String("String"), // Required
		DomainName: aws.String("String"), // Required
		PatchOperations: []*apigateway.PatchOperation{
			{ // Required
				From:  aws.String("String"),
				Op:    aws.String("Op"),
				Path:  aws.String("String"),
				Value: aws.String("String"),
			},
			// More values...
		},
	}
	resp, err := svc.UpdateBasePathMapping(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 ExampleAPIGateway_UpdateClientCertificate() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.UpdateClientCertificateInput{
		ClientCertificateId: aws.String("String"), // Required
		PatchOperations: []*apigateway.PatchOperation{
			{ // Required
				From:  aws.String("String"),
				Op:    aws.String("Op"),
				Path:  aws.String("String"),
				Value: aws.String("String"),
			},
			// More values...
		},
	}
	resp, err := svc.UpdateClientCertificate(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 ExampleAPIGateway_UpdateDeployment() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.UpdateDeploymentInput{
		DeploymentId: aws.String("String"), // Required
		RestApiId:    aws.String("String"), // Required
		PatchOperations: []*apigateway.PatchOperation{
			{ // Required
				From:  aws.String("String"),
				Op:    aws.String("Op"),
				Path:  aws.String("String"),
				Value: aws.String("String"),
			},
			// More values...
		},
	}
	resp, err := svc.UpdateDeployment(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 ExampleAPIGateway_UpdateDomainName() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.UpdateDomainNameInput{
		DomainName: aws.String("String"), // Required
		PatchOperations: []*apigateway.PatchOperation{
			{ // Required
				From:  aws.String("String"),
				Op:    aws.String("Op"),
				Path:  aws.String("String"),
				Value: aws.String("String"),
			},
			// More values...
		},
	}
	resp, err := svc.UpdateDomainName(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 ExampleAPIGateway_UpdateIntegration() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.UpdateIntegrationInput{
		HttpMethod: aws.String("String"), // Required
		ResourceId: aws.String("String"), // Required
		RestApiId:  aws.String("String"), // Required
		PatchOperations: []*apigateway.PatchOperation{
			{ // Required
				From:  aws.String("String"),
				Op:    aws.String("Op"),
				Path:  aws.String("String"),
				Value: aws.String("String"),
			},
			// More values...
		},
	}
	resp, err := svc.UpdateIntegration(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 ExampleAPIGateway_UpdateIntegrationResponse() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.UpdateIntegrationResponseInput{
		HttpMethod: aws.String("String"),     // Required
		ResourceId: aws.String("String"),     // Required
		RestApiId:  aws.String("String"),     // Required
		StatusCode: aws.String("StatusCode"), // Required
		PatchOperations: []*apigateway.PatchOperation{
			{ // Required
				From:  aws.String("String"),
				Op:    aws.String("Op"),
				Path:  aws.String("String"),
				Value: aws.String("String"),
			},
			// More values...
		},
	}
	resp, err := svc.UpdateIntegrationResponse(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 ExampleAPIGateway_UpdateMethod() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.UpdateMethodInput{
		HttpMethod: aws.String("String"), // Required
		ResourceId: aws.String("String"), // Required
		RestApiId:  aws.String("String"), // Required
		PatchOperations: []*apigateway.PatchOperation{
			{ // Required
				From:  aws.String("String"),
				Op:    aws.String("Op"),
				Path:  aws.String("String"),
				Value: aws.String("String"),
			},
			// More values...
		},
	}
	resp, err := svc.UpdateMethod(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 ExampleAPIGateway_UpdateMethodResponse() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.UpdateMethodResponseInput{
		HttpMethod: aws.String("String"),     // Required
		ResourceId: aws.String("String"),     // Required
		RestApiId:  aws.String("String"),     // Required
		StatusCode: aws.String("StatusCode"), // Required
		PatchOperations: []*apigateway.PatchOperation{
			{ // Required
				From:  aws.String("String"),
				Op:    aws.String("Op"),
				Path:  aws.String("String"),
				Value: aws.String("String"),
			},
			// More values...
		},
	}
	resp, err := svc.UpdateMethodResponse(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 ExampleAPIGateway_UpdateModel() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.UpdateModelInput{
		ModelName: aws.String("String"), // Required
		RestApiId: aws.String("String"), // Required
		PatchOperations: []*apigateway.PatchOperation{
			{ // Required
				From:  aws.String("String"),
				Op:    aws.String("Op"),
				Path:  aws.String("String"),
				Value: aws.String("String"),
			},
			// More values...
		},
	}
	resp, err := svc.UpdateModel(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 ExampleAPIGateway_UpdateResource() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.UpdateResourceInput{
		ResourceId: aws.String("String"), // Required
		RestApiId:  aws.String("String"), // Required
		PatchOperations: []*apigateway.PatchOperation{
			{ // Required
				From:  aws.String("String"),
				Op:    aws.String("Op"),
				Path:  aws.String("String"),
				Value: aws.String("String"),
			},
			// More values...
		},
	}
	resp, err := svc.UpdateResource(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 ExampleAPIGateway_UpdateRestApi() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.UpdateRestApiInput{
		RestApiId: aws.String("String"), // Required
		PatchOperations: []*apigateway.PatchOperation{
			{ // Required
				From:  aws.String("String"),
				Op:    aws.String("Op"),
				Path:  aws.String("String"),
				Value: aws.String("String"),
			},
			// More values...
		},
	}
	resp, err := svc.UpdateRestApi(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 ExampleAPIGateway_UpdateStage() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.UpdateStageInput{
		RestApiId: aws.String("String"), // Required
		StageName: aws.String("String"), // Required
		PatchOperations: []*apigateway.PatchOperation{
			{ // Required
				From:  aws.String("String"),
				Op:    aws.String("Op"),
				Path:  aws.String("String"),
				Value: aws.String("String"),
			},
			// More values...
		},
	}
	resp, err := svc.UpdateStage(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 ExampleAPIGateway_UpdateUsage() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.UpdateUsageInput{
		KeyId:       aws.String("String"), // Required
		UsagePlanId: aws.String("String"), // Required
		PatchOperations: []*apigateway.PatchOperation{
			{ // Required
				From:  aws.String("String"),
				Op:    aws.String("Op"),
				Path:  aws.String("String"),
				Value: aws.String("String"),
			},
			// More values...
		},
	}
	resp, err := svc.UpdateUsage(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 ExampleAPIGateway_UpdateUsagePlan() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := apigateway.New(sess)

	params := &apigateway.UpdateUsagePlanInput{
		UsagePlanId: aws.String("String"), // Required
		PatchOperations: []*apigateway.PatchOperation{
			{ // Required
				From:  aws.String("String"),
				Op:    aws.String("Op"),
				Path:  aws.String("String"),
				Value: aws.String("String"),
			},
			// More values...
		},
	}
	resp, err := svc.UpdateUsagePlan(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)
}
