diff --git a/.changelog/2d40dbd634014279907ca6e53656a60b.json b/.changelog/2d40dbd634014279907ca6e53656a60b.json new file mode 100644 index 00000000000..4c7a1713888 --- /dev/null +++ b/.changelog/2d40dbd634014279907ca6e53656a60b.json @@ -0,0 +1,8 @@ +{ + "id": "2d40dbd6-3401-4279-907c-a6e53656a60b", + "type": "feature", + "description": "Add support for Python 3.9 AWS Glue Python Shell jobs", + "modules": [ + "service/glue" + ] +} \ No newline at end of file diff --git a/.changelog/41575353444b40ffbf474f4155544f00.json b/.changelog/41575353444b40ffbf474f4155544f00.json new file mode 100644 index 00000000000..80daef64dd4 --- /dev/null +++ b/.changelog/41575353444b40ffbf474f4155544f00.json @@ -0,0 +1,9 @@ +{ + "id": "41575353-444b-40ff-bf47-4f4155544f00", + "type": "release", + "description": "New AWS service client module", + "modules": [ + "service/backupstorage", + "service/privatenetworks" + ] +} \ No newline at end of file diff --git a/.changelog/5bb06b934db14c4894308deb7017ca78.json b/.changelog/5bb06b934db14c4894308deb7017ca78.json new file mode 100644 index 00000000000..7cbc327e3c9 --- /dev/null +++ b/.changelog/5bb06b934db14c4894308deb7017ca78.json @@ -0,0 +1,8 @@ +{ + "id": "5bb06b93-4db1-4c48-9430-8deb7017ca78", + "type": "feature", + "description": "This is the first public release of AWS Backup Storage. We are exposing some previously-internal APIs for use by external services. These APIs are not meant to be used directly by customers.", + "modules": [ + "service/backupstorage" + ] +} \ No newline at end of file diff --git a/.changelog/cfa30d3346204765b4d972260058653b.json b/.changelog/cfa30d3346204765b4d972260058653b.json new file mode 100644 index 00000000000..db30cf48314 --- /dev/null +++ b/.changelog/cfa30d3346204765b4d972260058653b.json @@ -0,0 +1,8 @@ +{ + "id": "cfa30d33-4620-4765-b4d9-72260058653b", + "type": "feature", + "description": "This is the initial SDK release for AWS Private 5G. AWS Private 5G is a managed service that makes it easy to deploy, operate, and scale your own private mobile network at your on-premises location.", + "modules": [ + "service/privatenetworks" + ] +} \ No newline at end of file diff --git a/aws/credential_cache.go b/aws/credential_cache.go index dfd2b1ddbff..9e9525231c5 100644 --- a/aws/credential_cache.go +++ b/aws/credential_cache.go @@ -46,14 +46,14 @@ type CredentialsCacheOptions struct { // CredentialsCache will look for optional interfaces on the Provider to adjust // how the credential cache handles credentials caching. // -// * HandleFailRefreshCredentialsCacheStrategy - Allows provider to handle -// credential refresh failures. This could return an updated Credentials -// value, or attempt another means of retrieving credentials. +// - HandleFailRefreshCredentialsCacheStrategy - Allows provider to handle +// credential refresh failures. This could return an updated Credentials +// value, or attempt another means of retrieving credentials. // -// * AdjustExpiresByCredentialsCacheStrategy - Allows provider to adjust how -// credentials Expires is modified. This could modify how the Credentials -// Expires is adjusted based on the CredentialsCache ExpiryWindow option. -// Such as providing a floor not to reduce the Expires below. +// - AdjustExpiresByCredentialsCacheStrategy - Allows provider to adjust how +// credentials Expires is modified. This could modify how the Credentials +// Expires is adjusted based on the CredentialsCache ExpiryWindow option. +// Such as providing a floor not to reduce the Expires below. type CredentialsCache struct { provider CredentialsProvider diff --git a/aws/credentials.go b/aws/credentials.go index 0fffc53e671..24c8ce4a73f 100644 --- a/aws/credentials.go +++ b/aws/credentials.go @@ -23,41 +23,41 @@ import ( // The following example demonstrates using the AnonymousCredentials to prevent // SDK's external config loading attempt to resolve credentials. // -// cfg, err := config.LoadDefaultConfig(context.TODO(), -// config.WithCredentialsProvider(aws.AnonymousCredentials{}), -// ) -// if err != nil { -// log.Fatalf("failed to load config, %v", err) -// } +// cfg, err := config.LoadDefaultConfig(context.TODO(), +// config.WithCredentialsProvider(aws.AnonymousCredentials{}), +// ) +// if err != nil { +// log.Fatalf("failed to load config, %v", err) +// } // -// client := s3.NewFromConfig(cfg) +// client := s3.NewFromConfig(cfg) // // Alternatively you can leave the API client Option's `Credential` member to // nil. If using the `NewFromConfig` constructor you'll need to explicitly set // the `Credentials` member to nil, if the external config resolved a // credential provider. // -// client := s3.New(s3.Options{ -// // Credentials defaults to a nil value. -// }) +// client := s3.New(s3.Options{ +// // Credentials defaults to a nil value. +// }) // // This can also be configured for specific operations calls too. // -// cfg, err := config.LoadDefaultConfig(context.TODO()) -// if err != nil { -// log.Fatalf("failed to load config, %v", err) -// } +// cfg, err := config.LoadDefaultConfig(context.TODO()) +// if err != nil { +// log.Fatalf("failed to load config, %v", err) +// } // -// client := s3.NewFromConfig(config) +// client := s3.NewFromConfig(config) // -// result, err := client.GetObject(context.TODO(), s3.GetObject{ -// Bucket: aws.String("example-bucket"), -// Key: aws.String("example-key"), -// }, func(o *s3.Options) { -// o.Credentials = nil -// // Or -// o.Credentials = aws.AnonymousCredentials{} -// }) +// result, err := client.GetObject(context.TODO(), s3.GetObject{ +// Bucket: aws.String("example-bucket"), +// Key: aws.String("example-key"), +// }, func(o *s3.Options) { +// o.Credentials = nil +// // Or +// o.Credentials = aws.AnonymousCredentials{} +// }) type AnonymousCredentials struct{} // Retrieve implements the CredentialsProvider interface, but will always diff --git a/aws/doc.go b/aws/doc.go index befc3bee1a7..d8b6e09e593 100644 --- a/aws/doc.go +++ b/aws/doc.go @@ -1,7 +1,7 @@ // Package aws provides the core SDK's utilities and shared types. Use this package's // utilities to simplify setting and reading API operations parameters. // -// Value and Pointer Conversion Utilities +// # Value and Pointer Conversion Utilities // // This package includes a helper conversion utility for each scalar type the SDK's // API use. These utilities make getting a pointer of the scalar, and dereferencing @@ -16,33 +16,33 @@ // to get pointer of a literal string value, because getting the address of a // literal requires assigning the value to a variable first. // -// var strPtr *string +// var strPtr *string // -// // Without the SDK's conversion functions -// str := "my string" -// strPtr = &str +// // Without the SDK's conversion functions +// str := "my string" +// strPtr = &str // -// // With the SDK's conversion functions -// strPtr = aws.String("my string") +// // With the SDK's conversion functions +// strPtr = aws.String("my string") // -// // Convert *string to string value -// str = aws.ToString(strPtr) +// // Convert *string to string value +// str = aws.ToString(strPtr) // // In addition to scalars the aws package also includes conversion utilities for // map and slice for commonly types used in API parameters. The map and slice // conversion functions use similar naming pattern as the scalar conversion // functions. // -// var strPtrs []*string -// var strs []string = []string{"Go", "Gophers", "Go"} +// var strPtrs []*string +// var strs []string = []string{"Go", "Gophers", "Go"} // -// // Convert []string to []*string -// strPtrs = aws.StringSlice(strs) +// // Convert []string to []*string +// strPtrs = aws.StringSlice(strs) // -// // Convert []*string to []string -// strs = aws.ToStringSlice(strPtrs) +// // Convert []*string to []string +// strs = aws.ToStringSlice(strPtrs) // -// SDK Default HTTP Client +// # SDK Default HTTP Client // // The SDK will use the http.DefaultClient if a HTTP client is not provided to // the SDK's Session, or service client constructor. This means that if the diff --git a/aws/logging.go b/aws/logging.go index 9e34d26f215..91c94d987b1 100644 --- a/aws/logging.go +++ b/aws/logging.go @@ -7,10 +7,12 @@ package aws // The entire 64-bit group is reserved for later expansion by the SDK. // // Example: Setting ClientLogMode to enable logging of retries and requests -// clientLogMode := aws.LogRetries | aws.LogRequest +// +// clientLogMode := aws.LogRetries | aws.LogRequest // // Example: Adding an additional log mode to an existing ClientLogMode value -// clientLogMode |= aws.LogResponse +// +// clientLogMode |= aws.LogResponse type ClientLogMode uint64 // Supported ClientLogMode bits that can be configured to toggle logging of specific SDK events. diff --git a/aws/middleware/user_agent.go b/aws/middleware/user_agent.go index d5adfec90bd..285b2bba897 100644 --- a/aws/middleware/user_agent.go +++ b/aws/middleware/user_agent.go @@ -68,10 +68,12 @@ type requestUserAgent struct { // request. // // User-Agent example: -// aws-sdk-go-v2/1.2.3 +// +// aws-sdk-go-v2/1.2.3 // // X-Amz-User-Agent example: -// aws-sdk-go-v2/1.2.3 md/GOOS/linux md/GOARCH/amd64 lang/go/1.15 +// +// aws-sdk-go-v2/1.2.3 md/GOOS/linux md/GOARCH/amd64 lang/go/1.15 func newRequestUserAgent() *requestUserAgent { userAgent, sdkAgent := smithyhttp.NewUserAgentBuilder(), smithyhttp.NewUserAgentBuilder() addProductName(userAgent) diff --git a/aws/protocol/query/array.go b/aws/protocol/query/array.go index 77dd4d8db8f..9d7d3a0cb5e 100644 --- a/aws/protocol/query/array.go +++ b/aws/protocol/query/array.go @@ -9,9 +9,9 @@ import ( // representation of a list of values of a fixed type. A serialized array might // look like the following: // -// ListName.member.1=foo -// &ListName.member.2=bar -// &Listname.member.3=baz +// ListName.member.1=foo +// &ListName.member.2=bar +// &Listname.member.3=baz type Array struct { // The query values to add the array to. values url.Values diff --git a/aws/protocol/query/map.go b/aws/protocol/query/map.go index ab91e357bc9..dea242b8b6d 100644 --- a/aws/protocol/query/map.go +++ b/aws/protocol/query/map.go @@ -11,10 +11,10 @@ import ( // the values must all be of the same type, and that map entries are ordered. // A serialized map might look like the following: // -// MapName.entry.1.key=Foo -// &MapName.entry.1.value=spam -// &MapName.entry.2.key=Bar -// &MapName.entry.2.value=eggs +// MapName.entry.1.key=Foo +// &MapName.entry.1.value=spam +// &MapName.entry.2.key=Bar +// &MapName.entry.2.value=eggs type Map struct { // The query values to add the map to. values url.Values diff --git a/aws/protocol/query/object.go b/aws/protocol/query/object.go index debb413dec9..6a99d4ea8f6 100644 --- a/aws/protocol/query/object.go +++ b/aws/protocol/query/object.go @@ -10,8 +10,8 @@ import ( // values where there is a fixed set of keys whose values each have their // own known type. A serialized object might look like the following: // -// ObjectName.Foo=value -// &ObjectName.Bar=5 +// ObjectName.Foo=value +// &ObjectName.Bar=5 type Object struct { // The query values to add the object to. values url.Values diff --git a/aws/retry/doc.go b/aws/retry/doc.go index 1d019ca61bf..3a08ebe0a72 100644 --- a/aws/retry/doc.go +++ b/aws/retry/doc.go @@ -1,12 +1,12 @@ // Package retry provides interfaces and implementations for SDK request retry behavior. // -// Retryer Interface and Implementations +// # Retryer Interface and Implementations // // This package defines Retryer interface that is used to either implement custom retry behavior // or to extend the existing retry implementations provided by the SDK. This package provides a single // retry implementation: Standard. // -// Standard +// # Standard // // Standard is the default retryer implementation used by service clients. The standard retryer is a rate limited // retryer that has a configurable max attempts to limit the number of retry attempts when a retryable error occurs. @@ -15,18 +15,18 @@ // // By default the standard retryer uses the DefaultRetryables slice of IsErrorRetryable types to determine whether // a given error is retryable. By default this list of retryables includes the following: -// - Retrying errors that implement the RetryableError method, and return true. -// - Connection Errors -// - Errors that implement a ConnectionError, Temporary, or Timeout method that return true. -// - Connection Reset Errors. -// - net.OpErr types that are dialing errors or are temporary. -// - HTTP Status Codes: 500, 502, 503, and 504. -// - API Error Codes -// - RequestTimeout, RequestTimeoutException -// - Throttling, ThrottlingException, ThrottledException, RequestThrottledException, TooManyRequestsException, -// RequestThrottled, SlowDown, EC2ThrottledException -// - ProvisionedThroughputExceededException, RequestLimitExceeded, BandwidthLimitExceeded, LimitExceededException -// - TransactionInProgressException, PriorRequestNotComplete +// - Retrying errors that implement the RetryableError method, and return true. +// - Connection Errors +// - Errors that implement a ConnectionError, Temporary, or Timeout method that return true. +// - Connection Reset Errors. +// - net.OpErr types that are dialing errors or are temporary. +// - HTTP Status Codes: 500, 502, 503, and 504. +// - API Error Codes +// - RequestTimeout, RequestTimeoutException +// - Throttling, ThrottlingException, ThrottledException, RequestThrottledException, TooManyRequestsException, +// RequestThrottled, SlowDown, EC2ThrottledException +// - ProvisionedThroughputExceededException, RequestLimitExceeded, BandwidthLimitExceeded, LimitExceededException +// - TransactionInProgressException, PriorRequestNotComplete // // The standard retryer will not retry a request in the event if the context associated with the request // has been cancelled. Applications must handle this case explicitly if they wish to retry with a different context @@ -39,42 +39,42 @@ // // For example to modify the default retry attempts for the standard retryer: // -// // configure the custom retryer -// customRetry := retry.NewStandard(func(o *retry.StandardOptions) { -// o.MaxAttempts = 5 -// }) +// // configure the custom retryer +// customRetry := retry.NewStandard(func(o *retry.StandardOptions) { +// o.MaxAttempts = 5 +// }) // -// // create a service client with the retryer -// s3.NewFromConfig(cfg, func(o *s3.Options) { -// o.Retryer = customRetry -// }) +// // create a service client with the retryer +// s3.NewFromConfig(cfg, func(o *s3.Options) { +// o.Retryer = customRetry +// }) // -// Utilities +// # Utilities // // A number of package functions have been provided to easily wrap retryer implementations in an implementation agnostic // way. These are: // -// AddWithErrorCodes - Provides the ability to add additional API error codes that should be considered retryable -// in addition to those considered retryable by the provided retryer. +// AddWithErrorCodes - Provides the ability to add additional API error codes that should be considered retryable +// in addition to those considered retryable by the provided retryer. // -// AddWithMaxAttempts - Provides the ability to set the max number of attempts for retrying a request by wrapping -// a retryer implementation. +// AddWithMaxAttempts - Provides the ability to set the max number of attempts for retrying a request by wrapping +// a retryer implementation. // -// AddWithMaxBackoffDelay - Provides the ability to set the max back off delay that can occur before retrying a -// request by wrapping a retryer implementation. +// AddWithMaxBackoffDelay - Provides the ability to set the max back off delay that can occur before retrying a +// request by wrapping a retryer implementation. // // The following package functions have been provided to easily satisfy different retry interfaces to further customize // a given retryer's behavior: // -// BackoffDelayerFunc - Can be used to wrap a function to satisfy the BackoffDelayer interface. For example, -// you can use this method to easily create custom back off policies to be used with the -// standard retryer. +// BackoffDelayerFunc - Can be used to wrap a function to satisfy the BackoffDelayer interface. For example, +// you can use this method to easily create custom back off policies to be used with the +// standard retryer. // -// IsErrorRetryableFunc - Can be used to wrap a function to satisfy the IsErrorRetryable interface. For example, -// this can be used to extend the standard retryer to add additional logic to determine if an -// error should be retried. +// IsErrorRetryableFunc - Can be used to wrap a function to satisfy the IsErrorRetryable interface. For example, +// this can be used to extend the standard retryer to add additional logic to determine if an +// error should be retried. // -// IsErrorTimeoutFunc - Can be used to wrap a function to satisfy IsErrorTimeout interface. For example, -// this can be used to extend the standard retryer to add additional logic to determine if an -// error should be considered a timeout. +// IsErrorTimeoutFunc - Can be used to wrap a function to satisfy IsErrorTimeout interface. For example, +// this can be used to extend the standard retryer to add additional logic to determine if an +// error should be considered a timeout. package retry diff --git a/aws/signer/v4/v4.go b/aws/signer/v4/v4.go index 7fa8a09fd4a..afd069c1f39 100644 --- a/aws/signer/v4/v4.go +++ b/aws/signer/v4/v4.go @@ -3,20 +3,22 @@ // Provides request signing for request that need to be signed with // AWS V4 Signatures. // -// Standalone Signer +// # Standalone Signer // // Generally using the signer outside of the SDK should not require any additional -// The signer does this by taking advantage of the URL.EscapedPath method. If your request URI requires +// +// The signer does this by taking advantage of the URL.EscapedPath method. If your request URI requires +// // additional escaping you many need to use the URL.Opaque to define what the raw URI should be sent // to the service as. // // The signer will first check the URL.Opaque field, and use its value if set. // The signer does require the URL.Opaque field to be set in the form of: // -// "///" +// "///" // -// // e.g. -// "//example.com/some/path" +// // e.g. +// "//example.com/some/path" // // The leading "//" and hostname are required or the URL.Opaque escaping will // not work correctly. @@ -252,7 +254,7 @@ func buildAuthorizationHeader(credentialStr, signedHeadersStr, signingSignature // request has no payload you should use the hex encoded SHA-256 of an empty // string as the payloadHash value. // -// "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" +// "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" // // Some services such as Amazon S3 accept alternative values for the payload // hash, such as "UNSIGNED-PAYLOAD" for requests where the body will not be @@ -311,7 +313,7 @@ func (s Signer) SignHTTP(ctx context.Context, credentials aws.Credentials, r *ht // request has no payload you should use the hex encoded SHA-256 of an empty // string as the payloadHash value. // -// "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" +// "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" // // Some services such as Amazon S3 accept alternative values for the payload // hash, such as "UNSIGNED-PAYLOAD" for requests where the body will not be @@ -331,10 +333,10 @@ func (s Signer) SignHTTP(ctx context.Context, credentials aws.Credentials, r *ht // parameter is not used by all AWS services, and is most notable used by // Amazon S3 APIs. // -// expires := 20 * time.Minute -// query := req.URL.Query() -// query.Set("X-Amz-Expires", strconv.FormatInt(int64(expires/time.Second), 10) -// req.URL.RawQuery = query.Encode() +// expires := 20 * time.Minute +// query := req.URL.Query() +// query.Set("X-Amz-Expires", strconv.FormatInt(int64(expires/time.Second), 10) +// req.URL.RawQuery = query.Encode() // // This method does not modify the provided request. func (s *Signer) PresignHTTP( diff --git a/config/config.go b/config/config.go index 3e9c20009fe..a7c1bb9ad07 100644 --- a/config/config.go +++ b/config/config.go @@ -162,13 +162,12 @@ func (cs configs) ResolveConfig(f func(configs []interface{}) error) error { // The custom configurations must satisfy the respective providers for their data // or the custom data will be ignored by the resolvers and config loaders. // -// cfg, err := config.LoadDefaultConfig( context.TODO(), -// WithSharedConfigProfile("test-profile"), -// ) -// if err != nil { -// panic(fmt.Sprintf("failed loading config, %v", err)) -// } -// +// cfg, err := config.LoadDefaultConfig( context.TODO(), +// WithSharedConfigProfile("test-profile"), +// ) +// if err != nil { +// panic(fmt.Sprintf("failed loading config, %v", err)) +// } // // The default configuration sources are: // * Environment Variables diff --git a/config/doc.go b/config/doc.go index 31648ffb574..aab7164e283 100644 --- a/config/doc.go +++ b/config/doc.go @@ -15,6 +15,6 @@ // take precedence over the default environment and shared config sources used by the SDK. If one or more Config sources // implement the same provider interface, priority will be handled by the order in which the sources were passed in. // -// A number of helpers (prefixed by ``With``) are provided in this package that implement their respective provider +// A number of helpers (prefixed by “With“) are provided in this package that implement their respective provider // interface. These helpers should be used for overriding configuration programmatically at runtime. package config diff --git a/credentials/ec2rolecreds/doc.go b/credentials/ec2rolecreds/doc.go index ae25c3a489c..72214bf4053 100644 --- a/credentials/ec2rolecreds/doc.go +++ b/credentials/ec2rolecreds/doc.go @@ -1,14 +1,14 @@ // Package ec2rolecreds provides the credentials provider implementation for // retrieving AWS credentials from Amazon EC2 Instance Roles via Amazon EC2 IMDS. // -// Concurrency and caching +// # Concurrency and caching // // The Provider is not safe to be used concurrently, and does not provide any // caching of credentials retrieved. You should wrap the Provider with a // `aws.CredentialsCache` to provide concurrency safety, and caching of // credentials. // -// Loading credentials with the SDK's AWS Config +// # Loading credentials with the SDK's AWS Config // // The EC2 Instance role credentials provider will automatically be the resolved // credential provider int he credential chain if no other credential provider is @@ -18,10 +18,10 @@ // role for credentials, you specify a `credentials_source` property in the config // profile the SDK will load. // -// [default] -// credential_source = Ec2InstanceMetadata +// [default] +// credential_source = Ec2InstanceMetadata // -// Loading credentials with the Provider directly +// # Loading credentials with the Provider directly // // Another way to use the EC2 Instance role credentials provider is to create it // directly and assign it as the credentials provider for an API client. @@ -30,28 +30,28 @@ // it with the CredentialsCache before assigning the provider to the Amazon S3 API // client's Credentials option. // -// provider := imds.New(imds.Options{}) +// provider := imds.New(imds.Options{}) // -// // Create the service client value configured for credentials. -// svc := s3.New(s3.Options{ -// Credentials: aws.NewCredentialsCache(provider), -// }) +// // Create the service client value configured for credentials. +// svc := s3.New(s3.Options{ +// Credentials: aws.NewCredentialsCache(provider), +// }) // // If you need more control, you can set the configuration options on the // credentials provider using the imds.Options type to configure the EC2 IMDS // API Client and ExpiryWindow of the retrieved credentials. // -// provider := imds.New(imds.Options{ -// // See imds.Options type's documentation for more options available. -// Client: imds.New(Options{ -// HTTPClient: customHTTPClient, -// }), +// provider := imds.New(imds.Options{ +// // See imds.Options type's documentation for more options available. +// Client: imds.New(Options{ +// HTTPClient: customHTTPClient, +// }), // -// // Modify how soon credentials expire prior to their original expiry time. -// ExpiryWindow: 5 * time.Minute, -// }) +// // Modify how soon credentials expire prior to their original expiry time. +// ExpiryWindow: 5 * time.Minute, +// }) // -// EC2 IMDS API Client +// # EC2 IMDS API Client // // See the github.com/aws/aws-sdk-go-v2/feature/ec2/imds module for more details on // configuring the client, and options available. diff --git a/credentials/ec2rolecreds/provider.go b/credentials/ec2rolecreds/provider.go index aeb79ac3c97..5c699f16650 100644 --- a/credentials/ec2rolecreds/provider.go +++ b/credentials/ec2rolecreds/provider.go @@ -33,9 +33,9 @@ type GetMetadataAPIClient interface { // // The New function must be used to create the with a custom EC2 IMDS client. // -// p := &ec2rolecreds.New(func(o *ec2rolecreds.Options{ -// o.Client = imds.New(imds.Options{/* custom options */}) -// }) +// p := &ec2rolecreds.New(func(o *ec2rolecreds.Options{ +// o.Client = imds.New(imds.Options{/* custom options */}) +// }) type Provider struct { options Options } diff --git a/credentials/endpointcreds/provider.go b/credentials/endpointcreds/provider.go index 40cd7addb37..adc7fc6b000 100644 --- a/credentials/endpointcreds/provider.go +++ b/credentials/endpointcreds/provider.go @@ -7,26 +7,29 @@ // // Static credentials will never expire once they have been retrieved. The format // of the static credentials response: -// { -// "AccessKeyId" : "MUA...", -// "SecretAccessKey" : "/7PC5om....", -// } +// +// { +// "AccessKeyId" : "MUA...", +// "SecretAccessKey" : "/7PC5om....", +// } // // Refreshable credentials will expire within the "ExpiryWindow" of the Expiration // value in the response. The format of the refreshable credentials response: -// { -// "AccessKeyId" : "MUA...", -// "SecretAccessKey" : "/7PC5om....", -// "Token" : "AQoDY....=", -// "Expiration" : "2016-02-25T06:03:31Z" -// } +// +// { +// "AccessKeyId" : "MUA...", +// "SecretAccessKey" : "/7PC5om....", +// "Token" : "AQoDY....=", +// "Expiration" : "2016-02-25T06:03:31Z" +// } // // Errors should be returned in the following format and only returned with 400 // or 500 HTTP status codes. -// { -// "code": "ErrorCode", -// "message": "Helpful error message." -// } +// +// { +// "code": "ErrorCode", +// "message": "Helpful error message." +// } package endpointcreds import ( diff --git a/credentials/processcreds/doc.go b/credentials/processcreds/doc.go index d56dd8260d7..a3137b8fa9b 100644 --- a/credentials/processcreds/doc.go +++ b/credentials/processcreds/doc.go @@ -7,14 +7,14 @@ // option, you should make sure that the config file is as locked down as possible // using security best practices for your operating system. // -// Concurrency and caching +// # Concurrency and caching // // The Provider is not safe to be used concurrently, and does not provide any // caching of credentials retrieved. You should wrap the Provider with a // `aws.CredentialsCache` to provide concurrency safety, and caching of // credentials. // -// Loading credentials with the SDKs AWS Config +// # Loading credentials with the SDKs AWS Config // // You can use credentials from a AWS shared config `credential_process` in a // variety of ways. @@ -24,20 +24,20 @@ // called. You also need to set the AWS_SDK_LOAD_CONFIG environment variable // (e.g., `export AWS_SDK_LOAD_CONFIG=1`) to use the shared config file. // -// [default] -// credential_process = /command/to/call +// [default] +// credential_process = /command/to/call // // Loading configuration using external will use the credential process to // retrieve credentials. NOTE: If there are credentials in the profile you are // using, the credential process will not be used. // -// // Initialize a session to load credentials. -// cfg, _ := config.LoadDefaultConfig(context.TODO()) +// // Initialize a session to load credentials. +// cfg, _ := config.LoadDefaultConfig(context.TODO()) // -// // Create S3 service client to use the credentials. -// svc := s3.NewFromConfig(cfg) +// // Create S3 service client to use the credentials. +// svc := s3.NewFromConfig(cfg) // -// Loading credentials with the Provider directly +// # Loading credentials with the Provider directly // // Another way to use the credentials process provider is by using the // `NewProvider` constructor to create the provider and providing a it with a @@ -47,46 +47,46 @@ // it with the CredentialsCache before assigning the provider to the Amazon S3 API // client's Credentials option. // -// // Create credentials using the Provider. -// provider := processcreds.NewProvider("/path/to/command") +// // Create credentials using the Provider. +// provider := processcreds.NewProvider("/path/to/command") // -// // Create the service client value configured for credentials. -// svc := s3.New(s3.Options{ -// Credentials: aws.NewCredentialsCache(provider), -// }) +// // Create the service client value configured for credentials. +// svc := s3.New(s3.Options{ +// Credentials: aws.NewCredentialsCache(provider), +// }) // // If you need more control, you can set any configurable options in the // credentials using one or more option functions. // -// provider := processcreds.NewProvider("/path/to/command", -// func(o *processcreds.Options) { -// // Override the provider's default timeout -// o.Timeout = 2 * time.Minute -// }) +// provider := processcreds.NewProvider("/path/to/command", +// func(o *processcreds.Options) { +// // Override the provider's default timeout +// o.Timeout = 2 * time.Minute +// }) // // You can also use your own `exec.Cmd` value by satisfying a value that satisfies // the `NewCommandBuilder` interface and use the `NewProviderCommand` constructor. // -// // Create an exec.Cmd -// cmdBuilder := processcreds.NewCommandBuilderFunc( -// func(ctx context.Context) (*exec.Cmd, error) { -// cmd := exec.CommandContext(ctx, -// "customCLICommand", -// "-a", "argument", -// ) -// cmd.Env = []string{ -// "ENV_VAR_FOO=value", -// "ENV_VAR_BAR=other_value", -// } -// -// return cmd, nil -// }, -// ) -// -// // Create credentials using your exec.Cmd and custom timeout -// provider := processcreds.NewProviderCommand(cmdBuilder, -// func(opt *processcreds.Provider) { -// // optionally override the provider's default timeout -// opt.Timeout = 1 * time.Second -// }) +// // Create an exec.Cmd +// cmdBuilder := processcreds.NewCommandBuilderFunc( +// func(ctx context.Context) (*exec.Cmd, error) { +// cmd := exec.CommandContext(ctx, +// "customCLICommand", +// "-a", "argument", +// ) +// cmd.Env = []string{ +// "ENV_VAR_FOO=value", +// "ENV_VAR_BAR=other_value", +// } +// +// return cmd, nil +// }, +// ) +// +// // Create credentials using your exec.Cmd and custom timeout +// provider := processcreds.NewProviderCommand(cmdBuilder, +// func(opt *processcreds.Provider) { +// // optionally override the provider's default timeout +// opt.Timeout = 1 * time.Second +// }) package processcreds diff --git a/credentials/ssocreds/doc.go b/credentials/ssocreds/doc.go index 2f396c0a118..cc0d44aeef4 100644 --- a/credentials/ssocreds/doc.go +++ b/credentials/ssocreds/doc.go @@ -5,57 +5,57 @@ // some other mechanism. The provider must find a valid non-expired access token for the AWS SSO user portal URL in // ~/.aws/sso/cache. If a cached token is not found, it is expired, or the file is malformed an error will be returned. // -// Loading AWS SSO credentials with the AWS shared configuration file +// # Loading AWS SSO credentials with the AWS shared configuration file // // You can use configure AWS SSO credentials from the AWS shared configuration file by // providing the specifying the required keys in the profile: // -// sso_account_id -// sso_region -// sso_role_name -// sso_start_url +// sso_account_id +// sso_region +// sso_role_name +// sso_start_url // // For example, the following defines a profile "devsso" and specifies the AWS SSO parameters that defines the target // account, role, sign-on portal, and the region where the user portal is located. Note: all SSO arguments must be // provided, or an error will be returned. // -// [profile devsso] -// sso_start_url = https://my-sso-portal.awsapps.com/start -// sso_role_name = SSOReadOnlyRole -// sso_region = us-east-1 -// sso_account_id = 123456789012 +// [profile devsso] +// sso_start_url = https://my-sso-portal.awsapps.com/start +// sso_role_name = SSOReadOnlyRole +// sso_region = us-east-1 +// sso_account_id = 123456789012 // // Using the config module, you can load the AWS SDK shared configuration, and specify that this profile be used to // retrieve credentials. For example: // -// config, err := config.LoadDefaultConfig(context.TODO(), config.WithSharedConfigProfile("devsso")) -// if err != nil { -// return err -// } +// config, err := config.LoadDefaultConfig(context.TODO(), config.WithSharedConfigProfile("devsso")) +// if err != nil { +// return err +// } // -// Programmatically loading AWS SSO credentials directly +// # Programmatically loading AWS SSO credentials directly // // You can programmatically construct the AWS SSO Provider in your application, and provide the necessary information // to load and retrieve temporary credentials using an access token from ~/.aws/sso/cache. // -// client := sso.NewFromConfig(cfg) +// client := sso.NewFromConfig(cfg) // -// var provider aws.CredentialsProvider -// provider = ssocreds.New(client, "123456789012", "SSOReadOnlyRole", "us-east-1", "https://my-sso-portal.awsapps.com/start") +// var provider aws.CredentialsProvider +// provider = ssocreds.New(client, "123456789012", "SSOReadOnlyRole", "us-east-1", "https://my-sso-portal.awsapps.com/start") // -// // Wrap the provider with aws.CredentialsCache to cache the credentials until their expire time -// provider = aws.NewCredentialsCache(provider) +// // Wrap the provider with aws.CredentialsCache to cache the credentials until their expire time +// provider = aws.NewCredentialsCache(provider) // -// credentials, err := provider.Retrieve(context.TODO()) -// if err != nil { -// return err -// } +// credentials, err := provider.Retrieve(context.TODO()) +// if err != nil { +// return err +// } // // It is important that you wrap the Provider with aws.CredentialsCache if you are programmatically constructing the // provider directly. This prevents your application from accessing the cached access token and requesting new // credentials each time the credentials are used. // -// Additional Resources +// # Additional Resources // // Configuring the AWS CLI to use AWS Single Sign-On: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html // diff --git a/credentials/stscreds/assume_role_provider.go b/credentials/stscreds/assume_role_provider.go index 314fbd8bc4d..289707b6de4 100644 --- a/credentials/stscreds/assume_role_provider.go +++ b/credentials/stscreds/assume_role_provider.go @@ -8,31 +8,31 @@ // ensure synchronous usage of the AssumeRoleProvider if the value is shared // between multiple Credentials or service clients. // -// Assume Role +// # Assume Role // // To assume an IAM role using STS with the SDK you can create a new Credentials // with the SDKs's stscreds package. // -// // Initial credentials loaded from SDK's default credential chain. Such as -// // the environment, shared credentials (~/.aws/credentials), or EC2 Instance -// // Role. These credentials will be used to to make the STS Assume Role API. -// cfg, err := config.LoadDefaultConfig(context.TODO()) -// if err != nil { -// panic(err) -// } +// // Initial credentials loaded from SDK's default credential chain. Such as +// // the environment, shared credentials (~/.aws/credentials), or EC2 Instance +// // Role. These credentials will be used to to make the STS Assume Role API. +// cfg, err := config.LoadDefaultConfig(context.TODO()) +// if err != nil { +// panic(err) +// } // -// // Create the credentials from AssumeRoleProvider to assume the role -// // referenced by the "myRoleARN" ARN. -// stsSvc := sts.NewFromConfig(cfg) -// creds := stscreds.NewAssumeRoleProvider(stsSvc, "myRoleArn") +// // Create the credentials from AssumeRoleProvider to assume the role +// // referenced by the "myRoleARN" ARN. +// stsSvc := sts.NewFromConfig(cfg) +// creds := stscreds.NewAssumeRoleProvider(stsSvc, "myRoleArn") // -// cfg.Credentials = aws.NewCredentialsCache(creds) +// cfg.Credentials = aws.NewCredentialsCache(creds) // -// // Create service client value configured for credentials -// // from assumed role. -// svc := s3.NewFromConfig(cfg) +// // Create service client value configured for credentials +// // from assumed role. +// svc := s3.NewFromConfig(cfg) // -// Assume Role with custom MFA Token provider +// # Assume Role with custom MFA Token provider // // To assume an IAM role with a MFA token you can either specify a custom MFA // token provider or use the SDK's built in StdinTokenProvider that will prompt @@ -43,29 +43,29 @@ // With a custom token provider, the provider is responsible for refreshing the // token code when called. // -// cfg, err := config.LoadDefaultConfig(context.TODO()) -// if err != nil { -// panic(err) -// } +// cfg, err := config.LoadDefaultConfig(context.TODO()) +// if err != nil { +// panic(err) +// } // -// staticTokenProvider := func() (string, error) { -// return someTokenCode, nil -// } +// staticTokenProvider := func() (string, error) { +// return someTokenCode, nil +// } // -// // Create the credentials from AssumeRoleProvider to assume the role -// // referenced by the "myRoleARN" ARN using the MFA token code provided. -// creds := stscreds.NewAssumeRoleProvider(sts.NewFromConfig(cfg), "myRoleArn", func(o *stscreds.AssumeRoleOptions) { -// o.SerialNumber = aws.String("myTokenSerialNumber") -// o.TokenProvider = staticTokenProvider -// }) +// // Create the credentials from AssumeRoleProvider to assume the role +// // referenced by the "myRoleARN" ARN using the MFA token code provided. +// creds := stscreds.NewAssumeRoleProvider(sts.NewFromConfig(cfg), "myRoleArn", func(o *stscreds.AssumeRoleOptions) { +// o.SerialNumber = aws.String("myTokenSerialNumber") +// o.TokenProvider = staticTokenProvider +// }) // -// cfg.Credentials = aws.NewCredentialsCache(creds) +// cfg.Credentials = aws.NewCredentialsCache(creds) // -// // Create service client value configured for credentials -// // from assumed role. -// svc := s3.NewFromConfig(cfg) +// // Create service client value configured for credentials +// // from assumed role. +// svc := s3.NewFromConfig(cfg) // -// Assume Role with MFA Token Provider +// # Assume Role with MFA Token Provider // // To assume an IAM role with MFA for longer running tasks where the credentials // may need to be refreshed setting the TokenProvider field of AssumeRoleProvider @@ -80,23 +80,23 @@ // have undesirable results as the StdinTokenProvider will not be synchronized. A // single Credentials with an AssumeRoleProvider can be shared safely. // -// cfg, err := config.LoadDefaultConfig(context.TODO()) -// if err != nil { -// panic(err) -// } +// cfg, err := config.LoadDefaultConfig(context.TODO()) +// if err != nil { +// panic(err) +// } // -// // Create the credentials from AssumeRoleProvider to assume the role -// // referenced by the "myRoleARN" ARN using the MFA token code provided. -// creds := stscreds.NewAssumeRoleProvider(sts.NewFromConfig(cfg), "myRoleArn", func(o *stscreds.AssumeRoleOptions) { -// o.SerialNumber = aws.String("myTokenSerialNumber") -// o.TokenProvider = stscreds.StdinTokenProvider -// }) +// // Create the credentials from AssumeRoleProvider to assume the role +// // referenced by the "myRoleARN" ARN using the MFA token code provided. +// creds := stscreds.NewAssumeRoleProvider(sts.NewFromConfig(cfg), "myRoleArn", func(o *stscreds.AssumeRoleOptions) { +// o.SerialNumber = aws.String("myTokenSerialNumber") +// o.TokenProvider = stscreds.StdinTokenProvider +// }) // -// cfg.Credentials = aws.NewCredentialsCache(creds) +// cfg.Credentials = aws.NewCredentialsCache(creds) // -// // Create service client value configured for credentials -// // from assumed role. -// svc := s3.NewFromConfig(cfg) +// // Create service client value configured for credentials +// // from assumed role. +// svc := s3.NewFromConfig(cfg) package stscreds import ( diff --git a/doc.go b/doc.go index 81644bf8b7a..944feac5531 100644 --- a/doc.go +++ b/doc.go @@ -2,16 +2,16 @@ // // aws-sdk-go-v2 is the the v2 of the AWS SDK for the Go programming language. // -// Getting started +// # Getting started // // The best way to get started working with the SDK is to use `go get` to add the // SDK and desired service clients to your Go dependencies explicitly. // -// go get github.com/aws/aws-sdk-go-v2 +// go get github.com/aws/aws-sdk-go-v2 // go get github.com/aws/aws-sdk-go-v2/config // go get github.com/aws/aws-sdk-go-v2/service/dynamodb // -// Hello AWS +// # Hello AWS // // This example shows how you can use the v2 SDK to make an API request using the // SDK's Amazon DynamoDB client. diff --git a/feature/cloudfront/sign/sign_cookie.go b/feature/cloudfront/sign/sign_cookie.go index 5ff497622f8..3c0cf3ac6d3 100644 --- a/feature/cloudfront/sign/sign_cookie.go +++ b/feature/cloudfront/sign/sign_cookie.go @@ -81,37 +81,38 @@ func NewCookieSigner(keyID string, privKey *rsa.PrivateKey, opts ...func(*Cookie // server's response. // // Example: -// s := sign.NewCookieSigner(keyID, privKey) -// -// // Get Signed cookies for a resource that will expire in 1 hour -// cookies, err := s.Sign("*", time.Now().Add(1 * time.Hour)) -// if err != nil { -// fmt.Println("failed to create signed cookies", err) -// return -// } -// -// // Or get Signed cookies for a resource that will expire in 1 hour -// // and set path and domain of cookies -// cookies, err := s.Sign("*", time.Now().Add(1 * time.Hour), func(o *sign.CookieOptions) { -// o.Path = "/" -// o.Domain = ".example.com" -// }) -// if err != nil { -// fmt.Println("failed to create signed cookies", err) -// return -// } -// -// // Server Response via http.ResponseWriter -// for _, c := range cookies { -// http.SetCookie(w, c) -// } -// -// // Client request via the cookie jar -// if client.CookieJar != nil { -// for _, c := range cookies { -// client.Cookie(w, c) -// } -// } +// +// s := sign.NewCookieSigner(keyID, privKey) +// +// // Get Signed cookies for a resource that will expire in 1 hour +// cookies, err := s.Sign("*", time.Now().Add(1 * time.Hour)) +// if err != nil { +// fmt.Println("failed to create signed cookies", err) +// return +// } +// +// // Or get Signed cookies for a resource that will expire in 1 hour +// // and set path and domain of cookies +// cookies, err := s.Sign("*", time.Now().Add(1 * time.Hour), func(o *sign.CookieOptions) { +// o.Path = "/" +// o.Domain = ".example.com" +// }) +// if err != nil { +// fmt.Println("failed to create signed cookies", err) +// return +// } +// +// // Server Response via http.ResponseWriter +// for _, c := range cookies { +// http.SetCookie(w, c) +// } +// +// // Client request via the cookie jar +// if client.CookieJar != nil { +// for _, c := range cookies { +// client.Cookie(w, c) +// } +// } func (s CookieSigner) Sign(u string, expires time.Time, opts ...func(*CookieOptions)) ([]*http.Cookie, error) { scheme, err := cookieURLScheme(u) if err != nil { @@ -150,55 +151,56 @@ func cookieURLScheme(u string) (string, error) { // server's response. // // Example: -// s := sign.NewCookieSigner(keyID, privKey) -// -// policy := &sign.Policy{ -// Statements: []sign.Statement{ -// { -// // Read the provided documentation on how to set this -// // correctly, you'll probably want to use wildcards. -// Resource: rawCloudFrontURL, -// Condition: sign.Condition{ -// // Optional IP source address range -// IPAddress: &sign.IPAddress{SourceIP: "192.0.2.0/24"}, -// // Optional date URL is not valid until -// DateGreaterThan: &sign.AWSEpochTime{time.Now().Add(30 * time.Minute)}, -// // Required date the URL will expire after -// DateLessThan: &sign.AWSEpochTime{time.Now().Add(1 * time.Hour)}, -// }, -// }, -// }, -// } -// -// // Get Signed cookies for a resource that will expire in 1 hour -// cookies, err := s.SignWithPolicy(policy) -// if err != nil { -// fmt.Println("failed to create signed cookies", err) -// return -// } -// -// // Or get Signed cookies for a resource that will expire in 1 hour -// // and set path and domain of cookies -// cookies, err := s.SignWithPolicy(policy, func(o *sign.CookieOptions) { -// o.Path = "/" -// o.Domain = ".example.com" -// }) -// if err != nil { -// fmt.Println("failed to create signed cookies", err) -// return -// } -// -// // Server Response via http.ResponseWriter -// for _, c := range cookies { -// http.SetCookie(w, c) -// } -// -// // Client request via the cookie jar -// if client.CookieJar != nil { -// for _, c := range cookies { -// client.Cookie(w, c) -// } -// } +// +// s := sign.NewCookieSigner(keyID, privKey) +// +// policy := &sign.Policy{ +// Statements: []sign.Statement{ +// { +// // Read the provided documentation on how to set this +// // correctly, you'll probably want to use wildcards. +// Resource: rawCloudFrontURL, +// Condition: sign.Condition{ +// // Optional IP source address range +// IPAddress: &sign.IPAddress{SourceIP: "192.0.2.0/24"}, +// // Optional date URL is not valid until +// DateGreaterThan: &sign.AWSEpochTime{time.Now().Add(30 * time.Minute)}, +// // Required date the URL will expire after +// DateLessThan: &sign.AWSEpochTime{time.Now().Add(1 * time.Hour)}, +// }, +// }, +// }, +// } +// +// // Get Signed cookies for a resource that will expire in 1 hour +// cookies, err := s.SignWithPolicy(policy) +// if err != nil { +// fmt.Println("failed to create signed cookies", err) +// return +// } +// +// // Or get Signed cookies for a resource that will expire in 1 hour +// // and set path and domain of cookies +// cookies, err := s.SignWithPolicy(policy, func(o *sign.CookieOptions) { +// o.Path = "/" +// o.Domain = ".example.com" +// }) +// if err != nil { +// fmt.Println("failed to create signed cookies", err) +// return +// } +// +// // Server Response via http.ResponseWriter +// for _, c := range cookies { +// http.SetCookie(w, c) +// } +// +// // Client request via the cookie jar +// if client.CookieJar != nil { +// for _, c := range cookies { +// client.Cookie(w, c) +// } +// } func (s CookieSigner) SignWithPolicy(p *Policy, opts ...func(*CookieOptions)) ([]*http.Cookie, error) { return createCookies(p, s.keyID, s.privKey, s.Opts.apply(opts...)) } diff --git a/feature/cloudfront/sign/sign_url.go b/feature/cloudfront/sign/sign_url.go index ba56b4a78dd..80c427e76e8 100644 --- a/feature/cloudfront/sign/sign_url.go +++ b/feature/cloudfront/sign/sign_url.go @@ -9,13 +9,12 @@ // // Example: // -// // Sign URL to be valid for 1 hour from now. -// signer := sign.NewURLSigner(keyID, privKey) -// signedURL, err := signer.Sign(rawURL, time.Now().Add(1*time.Hour)) -// if err != nil { -// log.Fatalf("Failed to sign url, err: %s\n", err.Error()) -// } -// +// // Sign URL to be valid for 1 hour from now. +// signer := sign.NewURLSigner(keyID, privKey) +// signedURL, err := signer.Sign(rawURL, time.Now().Add(1*time.Hour)) +// if err != nil { +// log.Fatalf("Failed to sign url, err: %s\n", err.Error()) +// } package sign import ( @@ -54,13 +53,12 @@ func NewURLSigner(keyID string, privKey *rsa.PrivateKey) *URLSigner { // // Example: // -// // Sign URL to be valid for 1 hour from now. -// signer := sign.NewURLSigner(keyID, privKey) -// signedURL, err := signer.Sign(rawURL, time.Now().Add(1*time.Hour)) -// if err != nil { -// log.Fatalf("Failed to sign url, err: %s\n", err.Error()) -// } -// +// // Sign URL to be valid for 1 hour from now. +// signer := sign.NewURLSigner(keyID, privKey) +// signedURL, err := signer.Sign(rawURL, time.Now().Add(1*time.Hour)) +// if err != nil { +// log.Fatalf("Failed to sign url, err: %s\n", err.Error()) +// } func (s URLSigner) Sign(url string, expires time.Time) (string, error) { scheme, cleanedURL, err := cleanURLScheme(url) if err != nil { @@ -87,30 +85,29 @@ func (s URLSigner) Sign(url string, expires time.Time) (string, error) { // // Example: // -// // Sign URL to be valid for 30 minutes from now, expires one hour from now, and -// // restricted to the 192.0.2.0/24 IP address range. -// policy := &sign.Policy{ -// Statements: []sign.Statement{ -// { -// Resource: rawURL, -// Condition: sign.Condition{ -// // Optional IP source address range -// IPAddress: &sign.IPAddress{SourceIP: "192.0.2.0/24"}, -// // Optional date URL is not valid until -// DateGreaterThan: &sign.AWSEpochTime{time.Now().Add(30 * time.Minute)}, -// // Required date the URL will expire after -// DateLessThan: &sign.AWSEpochTime{time.Now().Add(1 * time.Hour)}, -// }, -// }, -// }, -// } -// -// signer := sign.NewURLSigner(keyID, privKey) -// signedURL, err := signer.SignWithPolicy(rawURL, policy) -// if err != nil { -// log.Fatalf("Failed to sign url, err: %s\n", err.Error()) -// } -// +// // Sign URL to be valid for 30 minutes from now, expires one hour from now, and +// // restricted to the 192.0.2.0/24 IP address range. +// policy := &sign.Policy{ +// Statements: []sign.Statement{ +// { +// Resource: rawURL, +// Condition: sign.Condition{ +// // Optional IP source address range +// IPAddress: &sign.IPAddress{SourceIP: "192.0.2.0/24"}, +// // Optional date URL is not valid until +// DateGreaterThan: &sign.AWSEpochTime{time.Now().Add(30 * time.Minute)}, +// // Required date the URL will expire after +// DateLessThan: &sign.AWSEpochTime{time.Now().Add(1 * time.Hour)}, +// }, +// }, +// }, +// } +// +// signer := sign.NewURLSigner(keyID, privKey) +// signedURL, err := signer.SignWithPolicy(rawURL, policy) +// if err != nil { +// log.Fatalf("Failed to sign url, err: %s\n", err.Error()) +// } func (s URLSigner) SignWithPolicy(url string, p *Policy) (string, error) { scheme, cleanedURL, err := cleanURLScheme(url) if err != nil { diff --git a/feature/dynamodb/attributevalue/decode.go b/feature/dynamodb/attributevalue/decode.go index 3b024f2e834..a0a8b53f76f 100644 --- a/feature/dynamodb/attributevalue/decode.go +++ b/feature/dynamodb/attributevalue/decode.go @@ -13,24 +13,25 @@ import ( // An Unmarshaler is an interface to provide custom unmarshaling of // AttributeValues. Use this to provide custom logic determining // how AttributeValues should be unmarshaled. -// type ExampleUnmarshaler struct { -// Value int -// } -// -// func (u *ExampleUnmarshaler) UnmarshalDynamoDBAttributeValue(av types.AttributeValue) error { -// avN, ok := av.(*types.AttributeValueMemberN) -// if !ok { -// return nil -// } -// -// n, err := strconv.ParseInt(avN.Value, 10, 0) -// if err != nil { -// return err -// } -// -// u.Value = int(n) -// return nil -// } +// +// type ExampleUnmarshaler struct { +// Value int +// } +// +// func (u *ExampleUnmarshaler) UnmarshalDynamoDBAttributeValue(av types.AttributeValue) error { +// avN, ok := av.(*types.AttributeValueMemberN) +// if !ok { +// return nil +// } +// +// n, err := strconv.ParseInt(avN.Value, 10, 0) +// if err != nil { +// return err +// } +// +// u.Value = int(n) +// return nil +// } type Unmarshaler interface { UnmarshalDynamoDBAttributeValue(types.AttributeValue) error } @@ -54,17 +55,17 @@ type Unmarshaler interface { // When decoding AttributeValues to interfaces Unmarshal will use the // following types. // -// []byte, AV Binary (B) -// [][]byte, AV Binary Set (BS) -// bool, AV Boolean (BOOL) -// []interface{}, AV List (L) -// map[string]interface{}, AV Map (M) -// float64, AV Number (N) -// Number, AV Number (N) with UseNumber set -// []float64, AV Number Set (NS) -// []Number, AV Number Set (NS) with UseNumber set -// string, AV String (S) -// []string, AV String Set (SS) +// []byte, AV Binary (B) +// [][]byte, AV Binary Set (BS) +// bool, AV Boolean (BOOL) +// []interface{}, AV List (L) +// map[string]interface{}, AV Map (M) +// float64, AV Number (N) +// Number, AV Number (N) with UseNumber set +// []float64, AV Number Set (NS) +// []Number, AV Number Set (NS) with UseNumber set +// string, AV String (S) +// []string, AV String Set (SS) // // If the Decoder option, UseNumber is set numbers will be unmarshaled // as Number values instead of float64. Use this to maintain the original @@ -101,17 +102,17 @@ func Unmarshal(av types.AttributeValue, out interface{}) error { // When decoding AttributeValues to interfaces Unmarshal will use the // following types. // -// []byte, AV Binary (B) -// [][]byte, AV Binary Set (BS) -// bool, AV Boolean (BOOL) -// []interface{}, AV List (L) -// map[string]interface{}, AV Map (M) -// float64, AV Number (N) -// Number, AV Number (N) with UseNumber set -// []float64, AV Number Set (NS) -// []Number, AV Number Set (NS) with UseNumber set -// string, AV String (S) -// []string, AV String Set (SS) +// []byte, AV Binary (B) +// [][]byte, AV Binary Set (BS) +// bool, AV Boolean (BOOL) +// []interface{}, AV List (L) +// map[string]interface{}, AV Map (M) +// float64, AV Number (N) +// Number, AV Number (N) with UseNumber set +// []float64, AV Number Set (NS) +// []Number, AV Number Set (NS) with UseNumber set +// string, AV String (S) +// []string, AV String Set (SS) // // If the Decoder option, UseNumber is set numbers will be unmarshaled // as Number values instead of float64. Use this to maintain the original diff --git a/feature/dynamodb/attributevalue/doc.go b/feature/dynamodb/attributevalue/doc.go index 25b4020e5b7..7a740f3587f 100644 --- a/feature/dynamodb/attributevalue/doc.go +++ b/feature/dynamodb/attributevalue/doc.go @@ -10,14 +10,14 @@ // the feature/dynamodbstreams/attributevalue package for converting to // DynamoDBStreams AttributeValue types. // -// Converting AttributeValue between DynamoDB and DynamoDBStreams +// # Converting AttributeValue between DynamoDB and DynamoDBStreams // // The FromDynamoStreamsDBMap, FromDynamoStreamsDBList, and FromDynamoDBStreams // functions provide the conversion utilities to convert a DynamoDBStreams // AttributeValue type to a DynamoDB AttributeValue type. Use these utilities // when you need to convert the AttributeValue type between the two APIs. // -// AttributeValue Marshaling +// # AttributeValue Marshaling // // To marshal a Go type to an AttributeValue you can use the Marshal, // MarshalList, and MarshalMap functions. The List and Map functions are @@ -28,34 +28,34 @@ // AttributeValue. The AttributeValue value is then used as input to the // PutItem operation call. // -// type Record struct { -// ID string -// URLs []string -// } -// -// //... -// -// r := Record{ -// ID: "ABC123", -// URLs: []string{ -// "https://example.com/first/link", -// "https://example.com/second/url", -// }, -// } -// av, err := attributevalue.MarshalMap(r) -// if err != nil { -// return fmt.Errorf("failed to marshal Record, %w", err) -// } -// -// _, err = client.PutItem(context.TODO(), &dynamodb.PutItemInput{ -// TableName: aws.String(myTableName), -// Item: av, -// }) -// if err != nil { -// return fmt.Errorf("failed to put Record, %w", err) -// } -// -// AttributeValue Unmarshaling +// type Record struct { +// ID string +// URLs []string +// } +// +// //... +// +// r := Record{ +// ID: "ABC123", +// URLs: []string{ +// "https://example.com/first/link", +// "https://example.com/second/url", +// }, +// } +// av, err := attributevalue.MarshalMap(r) +// if err != nil { +// return fmt.Errorf("failed to marshal Record, %w", err) +// } +// +// _, err = client.PutItem(context.TODO(), &dynamodb.PutItemInput{ +// TableName: aws.String(myTableName), +// Item: av, +// }) +// if err != nil { +// return fmt.Errorf("failed to put Record, %w", err) +// } +// +// # AttributeValue Unmarshaling // // To unmarshal an AttributeValue to a Go type you can use the Unmarshal, // UnmarshalList, UnmarshalMap, and UnmarshalListOfMaps functions. The List and @@ -66,27 +66,27 @@ // Scan API operation. The Items returned will be unmarshaled into the slice of // the Records struct. // -// type Record struct { -// ID string -// URLs []string -// } +// type Record struct { +// ID string +// URLs []string +// } // -// //... +// //... // -// result, err := client.Scan(context.Context(), &dynamodb.ScanInput{ -// TableName: aws.String(myTableName), -// }) -// if err != nil { -// return fmt.Errorf("failed to scan table, %w", err) -// } +// result, err := client.Scan(context.Context(), &dynamodb.ScanInput{ +// TableName: aws.String(myTableName), +// }) +// if err != nil { +// return fmt.Errorf("failed to scan table, %w", err) +// } // -// var records []Record -// err := attributevalue.UnmarshalListOfMaps(results.Items, &records) -// if err != nil { -// return fmt.Errorf("failed to unmarshal Items, %w", err)) -// } +// var records []Record +// err := attributevalue.UnmarshalListOfMaps(results.Items, &records) +// if err != nil { +// return fmt.Errorf("failed to unmarshal Items, %w", err)) +// } // -// Struct tags +// # Struct tags // // The AttributeValue Marshal and Unmarshal functions support the `dynamodbav` // struct tag by default. Additional tags can be enabled with the diff --git a/feature/dynamodb/attributevalue/encode.go b/feature/dynamodb/attributevalue/encode.go index 19f395cb777..1b10d95bacb 100644 --- a/feature/dynamodb/attributevalue/encode.go +++ b/feature/dynamodb/attributevalue/encode.go @@ -66,15 +66,14 @@ func (e *UnixTime) UnmarshalDynamoDBAttributeValue(av types.AttributeValue) erro // to AttributeValues. Use this to provide custom logic determining how a // Go Value type should be marshaled. // -// type CustomIntType struct { -// Value Int -// } -// func (m *CustomIntType) MarshalDynamoDBAttributeValue() (types.AttributeValue, error) { -// return &types.AttributeValueMemberN{ -// Value: strconv.Itoa(m.Value), -// }, nil -// } -// +// type CustomIntType struct { +// Value Int +// } +// func (m *CustomIntType) MarshalDynamoDBAttributeValue() (types.AttributeValue, error) { +// return &types.AttributeValueMemberN{ +// Value: strconv.Itoa(m.Value), +// }, nil +// } type Marshaler interface { MarshalDynamoDBAttributeValue() (types.AttributeValue, error) } @@ -98,51 +97,51 @@ type Marshaler interface { // `dynamodbav` struct tag can be used to control how the value will be // marshaled into a AttributeValue. // -// // Field is ignored -// Field int `dynamodbav:"-"` +// // Field is ignored +// Field int `dynamodbav:"-"` // -// // Field AttributeValue map key "myName" -// Field int `dynamodbav:"myName"` +// // Field AttributeValue map key "myName" +// Field int `dynamodbav:"myName"` // -// // Field AttributeValue map key "myName", and -// // Field is omitted if the field is a zero value for the type. -// Field int `dynamodbav:"myName,omitempty"` +// // Field AttributeValue map key "myName", and +// // Field is omitted if the field is a zero value for the type. +// Field int `dynamodbav:"myName,omitempty"` // -// // Field AttributeValue map key "Field", and -// // Field is omitted if the field is a zero value for the type. -// Field int `dynamodbav:",omitempty"` +// // Field AttributeValue map key "Field", and +// // Field is omitted if the field is a zero value for the type. +// Field int `dynamodbav:",omitempty"` // -// // Field's elems will be omitted if the elem's value is empty. -// // only valid for slices, and maps. -// Field []string `dynamodbav:",omitemptyelem"` +// // Field's elems will be omitted if the elem's value is empty. +// // only valid for slices, and maps. +// Field []string `dynamodbav:",omitemptyelem"` // -// // Field AttributeValue map key "Field", and -// // Field is sent as NULL if the field is a zero value for the type. -// Field int `dynamodbav:",nullempty"` +// // Field AttributeValue map key "Field", and +// // Field is sent as NULL if the field is a zero value for the type. +// Field int `dynamodbav:",nullempty"` // -// // Field's elems will be sent as NULL if the elem's value a zero value -// // for the type. Only valid for slices, and maps. -// Field []string `dynamodbav:",nullemptyelem"` +// // Field's elems will be sent as NULL if the elem's value a zero value +// // for the type. Only valid for slices, and maps. +// Field []string `dynamodbav:",nullemptyelem"` // -// // Field will be marshaled as a AttributeValue string -// // only value for number types, (int,uint,float) -// Field int `dynamodbav:",string"` +// // Field will be marshaled as a AttributeValue string +// // only value for number types, (int,uint,float) +// Field int `dynamodbav:",string"` // -// // Field will be marshaled as a binary set -// Field [][]byte `dynamodbav:",binaryset"` +// // Field will be marshaled as a binary set +// Field [][]byte `dynamodbav:",binaryset"` // -// // Field will be marshaled as a number set -// Field []int `dynamodbav:",numberset"` +// // Field will be marshaled as a number set +// Field []int `dynamodbav:",numberset"` // -// // Field will be marshaled as a string set -// Field []string `dynamodbav:",stringset"` +// // Field will be marshaled as a string set +// Field []string `dynamodbav:",stringset"` // -// // Field will be marshaled as Unix time number in seconds. -// // This tag is only valid with time.Time typed struct fields. -// // Important to note that zero value time as unixtime is not 0 seconds -// // from January 1, 1970 UTC, but -62135596800. Which is seconds between -// // January 1, 0001 UTC, and January 1, 0001 UTC. -// Field time.Time `dynamodbav:",unixtime"` +// // Field will be marshaled as Unix time number in seconds. +// // This tag is only valid with time.Time typed struct fields. +// // Important to note that zero value time as unixtime is not 0 seconds +// // from January 1, 1970 UTC, but -62135596800. Which is seconds between +// // January 1, 0001 UTC, and January 1, 0001 UTC. +// Field time.Time `dynamodbav:",unixtime"` // // The omitempty tag is only used during Marshaling and is ignored for // Unmarshal. omitempty will skip any member if the Go value of the member is @@ -160,9 +159,9 @@ type Marshaler interface { // All struct fields and with anonymous fields, are marshaled unless the // any of the following conditions are meet. // -// - the field is not exported -// - json or dynamodbav field tag is "-" -// - json or dynamodbav field tag specifies "omitempty", and is a zero value. +// - the field is not exported +// - json or dynamodbav field tag is "-" +// - json or dynamodbav field tag specifies "omitempty", and is a zero value. // // Pointer and interfaces values are encoded as the value pointed to or // contained in the interface. A nil value encodes as the AttributeValue NULL @@ -201,51 +200,51 @@ func Marshal(in interface{}) (types.AttributeValue, error) { // `dynamodbav` struct tag can be used to control how the value will be // marshaled into a AttributeValue. // -// // Field is ignored -// Field int `dynamodbav:"-"` +// // Field is ignored +// Field int `dynamodbav:"-"` // -// // Field AttributeValue map key "myName" -// Field int `dynamodbav:"myName"` +// // Field AttributeValue map key "myName" +// Field int `dynamodbav:"myName"` // -// // Field AttributeValue map key "myName", and -// // Field is omitted if the field is a zero value for the type. -// Field int `dynamodbav:"myName,omitempty"` +// // Field AttributeValue map key "myName", and +// // Field is omitted if the field is a zero value for the type. +// Field int `dynamodbav:"myName,omitempty"` // -// // Field AttributeValue map key "Field", and -// // Field is omitted if the field is a zero value for the type. -// Field int `dynamodbav:",omitempty"` +// // Field AttributeValue map key "Field", and +// // Field is omitted if the field is a zero value for the type. +// Field int `dynamodbav:",omitempty"` // -// // Field's elems will be omitted if the elem's value is empty. -// // only valid for slices, and maps. -// Field []string `dynamodbav:",omitemptyelem"` +// // Field's elems will be omitted if the elem's value is empty. +// // only valid for slices, and maps. +// Field []string `dynamodbav:",omitemptyelem"` // -// // Field AttributeValue map key "Field", and -// // Field is sent as NULL if the field is a zero value for the type. -// Field int `dynamodbav:",nullempty"` +// // Field AttributeValue map key "Field", and +// // Field is sent as NULL if the field is a zero value for the type. +// Field int `dynamodbav:",nullempty"` // -// // Field's elems will be sent as NULL if the elem's value a zero value -// // for the type. Only valid for slices, and maps. -// Field []string `dynamodbav:",nullemptyelem"` +// // Field's elems will be sent as NULL if the elem's value a zero value +// // for the type. Only valid for slices, and maps. +// Field []string `dynamodbav:",nullemptyelem"` // -// // Field will be marshaled as a AttributeValue string -// // only value for number types, (int,uint,float) -// Field int `dynamodbav:",string"` +// // Field will be marshaled as a AttributeValue string +// // only value for number types, (int,uint,float) +// Field int `dynamodbav:",string"` // -// // Field will be marshaled as a binary set -// Field [][]byte `dynamodbav:",binaryset"` +// // Field will be marshaled as a binary set +// Field [][]byte `dynamodbav:",binaryset"` // -// // Field will be marshaled as a number set -// Field []int `dynamodbav:",numberset"` +// // Field will be marshaled as a number set +// Field []int `dynamodbav:",numberset"` // -// // Field will be marshaled as a string set -// Field []string `dynamodbav:",stringset"` +// // Field will be marshaled as a string set +// Field []string `dynamodbav:",stringset"` // -// // Field will be marshaled as Unix time number in seconds. -// // This tag is only valid with time.Time typed struct fields. -// // Important to note that zero value time as unixtime is not 0 seconds -// // from January 1, 1970 UTC, but -62135596800. Which is seconds between -// // January 1, 0001 UTC, and January 1, 0001 UTC. -// Field time.Time `dynamodbav:",unixtime"` +// // Field will be marshaled as Unix time number in seconds. +// // This tag is only valid with time.Time typed struct fields. +// // Important to note that zero value time as unixtime is not 0 seconds +// // from January 1, 1970 UTC, but -62135596800. Which is seconds between +// // January 1, 0001 UTC, and January 1, 0001 UTC. +// Field time.Time `dynamodbav:",unixtime"` // // The omitempty tag is only used during Marshaling and is ignored for // Unmarshal. omitempty will skip any member if the Go value of the member is @@ -263,9 +262,9 @@ func Marshal(in interface{}) (types.AttributeValue, error) { // All struct fields and with anonymous fields, are marshaled unless the // any of the following conditions are meet. // -// - the field is not exported -// - json or dynamodbav field tag is "-" -// - json or dynamodbav field tag specifies "omitempty", and is a zero value. +// - the field is not exported +// - json or dynamodbav field tag is "-" +// - json or dynamodbav field tag specifies "omitempty", and is a zero value. // // Pointer and interfaces values are encoded as the value pointed to or // contained in the interface. A nil value encodes as the AttributeValue NULL diff --git a/feature/dynamodb/expression/condition.go b/feature/dynamodb/expression/condition.go index 1bb1dec8336..fd18e70877c 100644 --- a/feature/dynamodb/expression/condition.go +++ b/feature/dynamodb/expression/condition.go @@ -93,11 +93,11 @@ type ConditionBuilder struct { // // Example: // -// var condition expression.ConditionBuilder -// condition.IsSet() // returns false +// var condition expression.ConditionBuilder +// condition.IsSet() // returns false // -// condition := expression.Equal(expression.Name("foo"), expression.Value(5)) -// condition.IsSet() // returns true +// condition := expression.Equal(expression.Name("foo"), expression.Value(5)) +// condition.IsSet() // returns true func (cb ConditionBuilder) IsSet() bool { return cb.mode != unsetCond } @@ -109,20 +109,20 @@ func (cb ConditionBuilder) IsSet() bool { // // Example: // -// // condition represents the equal clause of the item attribute "foo" and -// // the value 5 -// condition := expression.Equal(expression.Name("foo"), expression.Value(5)) +// // condition represents the equal clause of the item attribute "foo" and +// // the value 5 +// condition := expression.Equal(expression.Name("foo"), expression.Value(5)) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Equal(expression.Name("foo"), expression.Value(5)) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// "foo = :five" +// expression.Equal(expression.Name("foo"), expression.Value(5)) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// "foo = :five" func Equal(left, right OperandBuilder) ConditionBuilder { return ConditionBuilder{ operandList: []OperandBuilder{left, right}, @@ -137,20 +137,20 @@ func Equal(left, right OperandBuilder) ConditionBuilder { // // Example: // -// // condition represents the equal clause of the item attribute "foo" and -// // the value 5 -// condition := expression.Name("foo").Equal(expression.Value(5)) +// // condition represents the equal clause of the item attribute "foo" and +// // the value 5 +// condition := expression.Name("foo").Equal(expression.Value(5)) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Name("foo").Equal(expression.Value(5)) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// "foo = :five" +// expression.Name("foo").Equal(expression.Value(5)) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// "foo = :five" func (nb NameBuilder) Equal(right OperandBuilder) ConditionBuilder { return Equal(nb, right) } @@ -162,20 +162,20 @@ func (nb NameBuilder) Equal(right OperandBuilder) ConditionBuilder { // // Example: // -// // condition represents the equal clause of the item attribute "foo" and -// // the value 5 -// condition := expression.Value(5).Equal(expression.Name("foo")) +// // condition represents the equal clause of the item attribute "foo" and +// // the value 5 +// condition := expression.Value(5).Equal(expression.Name("foo")) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Value(5).Equal(expression.Name("foo")) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// ":five = foo" +// expression.Value(5).Equal(expression.Name("foo")) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// ":five = foo" func (vb ValueBuilder) Equal(right OperandBuilder) ConditionBuilder { return Equal(vb, right) } @@ -187,20 +187,20 @@ func (vb ValueBuilder) Equal(right OperandBuilder) ConditionBuilder { // // Example: // -// // condition represents the equal clause of the size of the item -// // attribute "foo" and the value 5 -// condition := expression.Size(expression.Name("foo")).Equal(expression.Value(5)) +// // condition represents the equal clause of the size of the item +// // attribute "foo" and the value 5 +// condition := expression.Size(expression.Name("foo")).Equal(expression.Value(5)) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Size(expression.Name("foo")).Equal(expression.Value(5)) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// "size (foo) = :five" +// expression.Size(expression.Name("foo")).Equal(expression.Value(5)) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// "size (foo) = :five" func (sb SizeBuilder) Equal(right OperandBuilder) ConditionBuilder { return Equal(sb, right) } @@ -212,20 +212,20 @@ func (sb SizeBuilder) Equal(right OperandBuilder) ConditionBuilder { // // Example: // -// // condition represents the not equal clause of the item attribute "foo" -// // and the value 5 -// condition := expression.NotEqual(expression.Name("foo"), expression.Value(5)) +// // condition represents the not equal clause of the item attribute "foo" +// // and the value 5 +// condition := expression.NotEqual(expression.Name("foo"), expression.Value(5)) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.NotEqual(expression.Name("foo"), expression.Value(5)) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// "foo <> :five" +// expression.NotEqual(expression.Name("foo"), expression.Value(5)) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// "foo <> :five" func NotEqual(left, right OperandBuilder) ConditionBuilder { return ConditionBuilder{ operandList: []OperandBuilder{left, right}, @@ -240,20 +240,20 @@ func NotEqual(left, right OperandBuilder) ConditionBuilder { // // Example: // -// // condition represents the not equal clause of the item attribute "foo" -// // and the value 5 -// condition := expression.Name("foo").NotEqual(expression.Value(5)) +// // condition represents the not equal clause of the item attribute "foo" +// // and the value 5 +// condition := expression.Name("foo").NotEqual(expression.Value(5)) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Name("foo").NotEqual(expression.Value(5)) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// "foo <> :five" +// expression.Name("foo").NotEqual(expression.Value(5)) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// "foo <> :five" func (nb NameBuilder) NotEqual(right OperandBuilder) ConditionBuilder { return NotEqual(nb, right) } @@ -265,20 +265,20 @@ func (nb NameBuilder) NotEqual(right OperandBuilder) ConditionBuilder { // // Example: // -// // condition represents the not equal clause of the item attribute "foo" -// // and the value 5 -// condition := expression.Value(5).NotEqual(expression.Name("foo")) +// // condition represents the not equal clause of the item attribute "foo" +// // and the value 5 +// condition := expression.Value(5).NotEqual(expression.Name("foo")) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Value(5).NotEqual(expression.Name("foo")) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// ":five <> foo" +// expression.Value(5).NotEqual(expression.Name("foo")) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// ":five <> foo" func (vb ValueBuilder) NotEqual(right OperandBuilder) ConditionBuilder { return NotEqual(vb, right) } @@ -290,20 +290,20 @@ func (vb ValueBuilder) NotEqual(right OperandBuilder) ConditionBuilder { // // Example: // -// // condition represents the not equal clause of the size of the item -// // attribute "foo" and the value 5 -// condition := expression.Size(expression.Name("foo")).NotEqual(expression.Value(5)) +// // condition represents the not equal clause of the size of the item +// // attribute "foo" and the value 5 +// condition := expression.Size(expression.Name("foo")).NotEqual(expression.Value(5)) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Size(expression.Name("foo")).NotEqual(expression.Value(5)) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// "size (foo) <> :five" +// expression.Size(expression.Name("foo")).NotEqual(expression.Value(5)) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// "size (foo) <> :five" func (sb SizeBuilder) NotEqual(right OperandBuilder) ConditionBuilder { return NotEqual(sb, right) } @@ -315,20 +315,20 @@ func (sb SizeBuilder) NotEqual(right OperandBuilder) ConditionBuilder { // // Example: // -// // condition represents the less than clause of the item attribute "foo" -// // and the value 5 -// condition := expression.LessThan(expression.Name("foo"), expression.Value(5)) +// // condition represents the less than clause of the item attribute "foo" +// // and the value 5 +// condition := expression.LessThan(expression.Name("foo"), expression.Value(5)) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.LessThan(expression.Name("foo"), expression.Value(5)) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// "foo < :five" +// expression.LessThan(expression.Name("foo"), expression.Value(5)) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// "foo < :five" func LessThan(left, right OperandBuilder) ConditionBuilder { return ConditionBuilder{ operandList: []OperandBuilder{left, right}, @@ -343,20 +343,20 @@ func LessThan(left, right OperandBuilder) ConditionBuilder { // // Example: // -// // condition represents the less than clause of the item attribute "foo" -// // and the value 5 -// condition := expression.Name("foo").LessThan(expression.Value(5)) +// // condition represents the less than clause of the item attribute "foo" +// // and the value 5 +// condition := expression.Name("foo").LessThan(expression.Value(5)) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Name("foo").LessThan(expression.Value(5)) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// "foo < :five" +// expression.Name("foo").LessThan(expression.Value(5)) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// "foo < :five" func (nb NameBuilder) LessThan(right OperandBuilder) ConditionBuilder { return LessThan(nb, right) } @@ -368,20 +368,20 @@ func (nb NameBuilder) LessThan(right OperandBuilder) ConditionBuilder { // // Example: // -// // condition represents the less than clause of the item attribute "foo" -// // and the value 5 -// condition := expression.Value(5).LessThan(expression.Name("foo")) +// // condition represents the less than clause of the item attribute "foo" +// // and the value 5 +// condition := expression.Value(5).LessThan(expression.Name("foo")) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Value(5).LessThan(expression.Name("foo")) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// ":five < foo" +// expression.Value(5).LessThan(expression.Name("foo")) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// ":five < foo" func (vb ValueBuilder) LessThan(right OperandBuilder) ConditionBuilder { return LessThan(vb, right) } @@ -393,20 +393,20 @@ func (vb ValueBuilder) LessThan(right OperandBuilder) ConditionBuilder { // // Example: // -// // condition represents the less than clause of the size of the item -// // attribute "foo" and the value 5 -// condition := expression.Size(expression.Name("foo")).LessThan(expression.Value(5)) +// // condition represents the less than clause of the size of the item +// // attribute "foo" and the value 5 +// condition := expression.Size(expression.Name("foo")).LessThan(expression.Value(5)) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Size(expression.Name("foo")).LessThan(expression.Value(5)) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// "size (foo) < :five" +// expression.Size(expression.Name("foo")).LessThan(expression.Value(5)) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// "size (foo) < :five" func (sb SizeBuilder) LessThan(right OperandBuilder) ConditionBuilder { return LessThan(sb, right) } @@ -418,20 +418,20 @@ func (sb SizeBuilder) LessThan(right OperandBuilder) ConditionBuilder { // // Example: // -// // condition represents the less than equal to clause of the item -// // attribute "foo" and the value 5 -// condition := expression.LessThanEqual(expression.Name("foo"), expression.Value(5)) +// // condition represents the less than equal to clause of the item +// // attribute "foo" and the value 5 +// condition := expression.LessThanEqual(expression.Name("foo"), expression.Value(5)) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.LessThanEqual(expression.Name("foo"), expression.Value(5)) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// "foo <= :five" +// expression.LessThanEqual(expression.Name("foo"), expression.Value(5)) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// "foo <= :five" func LessThanEqual(left, right OperandBuilder) ConditionBuilder { return ConditionBuilder{ operandList: []OperandBuilder{left, right}, @@ -446,20 +446,20 @@ func LessThanEqual(left, right OperandBuilder) ConditionBuilder { // // Example: // -// // condition represents the less than equal to clause of the item -// // attribute "foo" and the value 5 -// condition := expression.Name("foo").LessThanEqual(expression.Value(5)) +// // condition represents the less than equal to clause of the item +// // attribute "foo" and the value 5 +// condition := expression.Name("foo").LessThanEqual(expression.Value(5)) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Name("foo").LessThanEqual(expression.Value(5)) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// "foo <= :five" +// expression.Name("foo").LessThanEqual(expression.Value(5)) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// "foo <= :five" func (nb NameBuilder) LessThanEqual(right OperandBuilder) ConditionBuilder { return LessThanEqual(nb, right) } @@ -471,20 +471,20 @@ func (nb NameBuilder) LessThanEqual(right OperandBuilder) ConditionBuilder { // // Example: // -// // condition represents the less than equal to clause of the item -// // attribute "foo" and the value 5 -// condition := expression.Value(5).LessThanEqual(expression.Name("foo")) +// // condition represents the less than equal to clause of the item +// // attribute "foo" and the value 5 +// condition := expression.Value(5).LessThanEqual(expression.Name("foo")) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Value(5).LessThanEqual(expression.Name("foo")) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// ":five <= foo" +// expression.Value(5).LessThanEqual(expression.Name("foo")) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// ":five <= foo" func (vb ValueBuilder) LessThanEqual(right OperandBuilder) ConditionBuilder { return LessThanEqual(vb, right) } @@ -496,20 +496,20 @@ func (vb ValueBuilder) LessThanEqual(right OperandBuilder) ConditionBuilder { // // Example: // -// // condition represents the less than equal to clause of the size of the -// // item attribute "foo" and the value 5 -// condition := expression.Size(expression.Name("foo")).LessThanEqual(expression.Value(5)) +// // condition represents the less than equal to clause of the size of the +// // item attribute "foo" and the value 5 +// condition := expression.Size(expression.Name("foo")).LessThanEqual(expression.Value(5)) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Size(expression.Name("foo")).LessThanEqual(expression.Value(5)) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// "size (foo) <= :five" +// expression.Size(expression.Name("foo")).LessThanEqual(expression.Value(5)) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// "size (foo) <= :five" func (sb SizeBuilder) LessThanEqual(right OperandBuilder) ConditionBuilder { return LessThanEqual(sb, right) } @@ -521,20 +521,20 @@ func (sb SizeBuilder) LessThanEqual(right OperandBuilder) ConditionBuilder { // // Example: // -// // condition represents the greater than clause of the item attribute -// // "foo" and the value 5 -// condition := expression.GreaterThan(expression.Name("foo"), expression.Value(5)) +// // condition represents the greater than clause of the item attribute +// // "foo" and the value 5 +// condition := expression.GreaterThan(expression.Name("foo"), expression.Value(5)) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.GreaterThan(expression.Name("foo"), expression.Value(5)) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// "foo > :five" +// expression.GreaterThan(expression.Name("foo"), expression.Value(5)) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// "foo > :five" func GreaterThan(left, right OperandBuilder) ConditionBuilder { return ConditionBuilder{ operandList: []OperandBuilder{left, right}, @@ -549,20 +549,20 @@ func GreaterThan(left, right OperandBuilder) ConditionBuilder { // // Example: // -// // condition represents the greater than clause of the item attribute -// // "foo" and the value 5 -// condition := expression.Name("foo").GreaterThan(expression.Value(5)) +// // condition represents the greater than clause of the item attribute +// // "foo" and the value 5 +// condition := expression.Name("foo").GreaterThan(expression.Value(5)) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Name("foo").GreaterThan(expression.Value(5)) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// "foo > :five" +// expression.Name("foo").GreaterThan(expression.Value(5)) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// "foo > :five" func (nb NameBuilder) GreaterThan(right OperandBuilder) ConditionBuilder { return GreaterThan(nb, right) } @@ -574,20 +574,20 @@ func (nb NameBuilder) GreaterThan(right OperandBuilder) ConditionBuilder { // // Example: // -// // condition represents the greater than clause of the item attribute -// // "foo" and the value 5 -// condition := expression.Value(5).GreaterThan(expression.Name("foo")) +// // condition represents the greater than clause of the item attribute +// // "foo" and the value 5 +// condition := expression.Value(5).GreaterThan(expression.Name("foo")) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Value(5).GreaterThan(expression.Name("foo")) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// ":five > foo" +// expression.Value(5).GreaterThan(expression.Name("foo")) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// ":five > foo" func (vb ValueBuilder) GreaterThan(right OperandBuilder) ConditionBuilder { return GreaterThan(vb, right) } @@ -599,20 +599,20 @@ func (vb ValueBuilder) GreaterThan(right OperandBuilder) ConditionBuilder { // // Example: // -// // condition represents the greater than clause of the size of the item -// // attribute "foo" and the value 5 -// condition := expression.Size(expression.Name("foo")).GreaterThan(expression.Value(5)) +// // condition represents the greater than clause of the size of the item +// // attribute "foo" and the value 5 +// condition := expression.Size(expression.Name("foo")).GreaterThan(expression.Value(5)) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Size(expression.Name("foo")).GreaterThan(expression.Value(5)) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// "size (foo) > :five" +// expression.Size(expression.Name("foo")).GreaterThan(expression.Value(5)) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// "size (foo) > :five" func (sb SizeBuilder) GreaterThan(right OperandBuilder) ConditionBuilder { return GreaterThan(sb, right) } @@ -624,20 +624,20 @@ func (sb SizeBuilder) GreaterThan(right OperandBuilder) ConditionBuilder { // // Example: // -// // condition represents the greater than equal to clause of the item -// // attribute "foo" and the value 5 -// condition := expression.GreaterThanEqual(expression.Name("foo"), expression.Value(5)) +// // condition represents the greater than equal to clause of the item +// // attribute "foo" and the value 5 +// condition := expression.GreaterThanEqual(expression.Name("foo"), expression.Value(5)) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.GreaterThanEqual(expression.Name("foo"), expression.Value(5)) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// "foo >= :five" +// expression.GreaterThanEqual(expression.Name("foo"), expression.Value(5)) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// "foo >= :five" func GreaterThanEqual(left, right OperandBuilder) ConditionBuilder { return ConditionBuilder{ operandList: []OperandBuilder{left, right}, @@ -652,20 +652,20 @@ func GreaterThanEqual(left, right OperandBuilder) ConditionBuilder { // // Example: // -// // condition represents the greater than equal to clause of the item -// // attribute "foo" and the value 5 -// condition := expression.Name("foo").GreaterThanEqual(expression.Value(5)) +// // condition represents the greater than equal to clause of the item +// // attribute "foo" and the value 5 +// condition := expression.Name("foo").GreaterThanEqual(expression.Value(5)) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Name("foo").GreaterThanEqual(expression.Value(5)) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// "foo >= :five" +// expression.Name("foo").GreaterThanEqual(expression.Value(5)) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// "foo >= :five" func (nb NameBuilder) GreaterThanEqual(right OperandBuilder) ConditionBuilder { return GreaterThanEqual(nb, right) } @@ -677,20 +677,20 @@ func (nb NameBuilder) GreaterThanEqual(right OperandBuilder) ConditionBuilder { // // Example: // -// // condition represents the greater than equal to clause of the item -// // attribute "foo" and the value 5 -// condition := expression.Value(5).GreaterThanEqual(expression.Name("foo")) +// // condition represents the greater than equal to clause of the item +// // attribute "foo" and the value 5 +// condition := expression.Value(5).GreaterThanEqual(expression.Name("foo")) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Value(5).GreaterThanEqual(expression.Name("foo")) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// ":five >= foo" +// expression.Value(5).GreaterThanEqual(expression.Name("foo")) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// ":five >= foo" func (vb ValueBuilder) GreaterThanEqual(right OperandBuilder) ConditionBuilder { return GreaterThanEqual(vb, right) } @@ -702,20 +702,20 @@ func (vb ValueBuilder) GreaterThanEqual(right OperandBuilder) ConditionBuilder { // // Example: // -// // condition represents the greater than equal to clause of the size of -// // the item attribute "foo" and the value 5 -// condition := expression.Size(expression.Name("foo")).GreaterThanEqual(expression.Value(5)) +// // condition represents the greater than equal to clause of the size of +// // the item attribute "foo" and the value 5 +// condition := expression.Size(expression.Name("foo")).GreaterThanEqual(expression.Value(5)) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Size(expression.Name("foo")).GreaterThanEqual(expression.Value(5)) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// "size (foo) >= :five" +// expression.Size(expression.Name("foo")).GreaterThanEqual(expression.Value(5)) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// "size (foo) >= :five" func (sb SizeBuilder) GreaterThanEqual(right OperandBuilder) ConditionBuilder { return GreaterThanEqual(sb, right) } @@ -728,23 +728,23 @@ func (sb SizeBuilder) GreaterThanEqual(right OperandBuilder) ConditionBuilder { // // Example: // -// // condition represents the condition where the item attribute "Name" is -// // equal to value "Generic Name" AND the item attribute "Age" is less -// // than value 40 -// condition := expression.And(expression.Name("Name").Equal(expression.Value("Generic Name")), expression.Name("Age").LessThan(expression.Value(40))) +// // condition represents the condition where the item attribute "Name" is +// // equal to value "Generic Name" AND the item attribute "Age" is less +// // than value 40 +// condition := expression.And(expression.Name("Name").Equal(expression.Value("Generic Name")), expression.Name("Age").LessThan(expression.Value(40))) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.And(expression.Name("Name").Equal(expression.Value("Generic Name")), expression.Name("Age").LessThan(expression.Value(40))) -// // Let #NAME, :name, and :forty be ExpressionAttributeName and -// // ExpressionAttributeValues representing the item attribute "Name", the -// // value "Generic Name", and the value 40 -// "(#NAME = :name) AND (Age < :forty)" +// expression.And(expression.Name("Name").Equal(expression.Value("Generic Name")), expression.Name("Age").LessThan(expression.Value(40))) +// // Let #NAME, :name, and :forty be ExpressionAttributeName and +// // ExpressionAttributeValues representing the item attribute "Name", the +// // value "Generic Name", and the value 40 +// "(#NAME = :name) AND (Age < :forty)" func And(left, right ConditionBuilder, other ...ConditionBuilder) ConditionBuilder { other = append([]ConditionBuilder{left, right}, other...) return ConditionBuilder{ @@ -761,23 +761,23 @@ func And(left, right ConditionBuilder, other ...ConditionBuilder) ConditionBuild // // Example: // -// // condition represents the condition where the item attribute "Name" is -// // equal to value "Generic Name" AND the item attribute "Age" is less -// // than value 40 -// condition := expression.Name("Name").Equal(expression.Value("Generic Name")).And(expression.Name("Age").LessThan(expression.Value(40))) +// // condition represents the condition where the item attribute "Name" is +// // equal to value "Generic Name" AND the item attribute "Age" is less +// // than value 40 +// condition := expression.Name("Name").Equal(expression.Value("Generic Name")).And(expression.Name("Age").LessThan(expression.Value(40))) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Name("Name").Equal(expression.Value("Generic Name")).And(expression.Name("Age").LessThan(expression.Value(40))) -// // Let #NAME, :name, and :forty be ExpressionAttributeName and -// // ExpressionAttributeValues representing the item attribute "Name", the -// // value "Generic Name", and the value 40 -// "(#NAME = :name) AND (Age < :forty)" +// expression.Name("Name").Equal(expression.Value("Generic Name")).And(expression.Name("Age").LessThan(expression.Value(40))) +// // Let #NAME, :name, and :forty be ExpressionAttributeName and +// // ExpressionAttributeValues representing the item attribute "Name", the +// // value "Generic Name", and the value 40 +// "(#NAME = :name) AND (Age < :forty)" func (cb ConditionBuilder) And(right ConditionBuilder, other ...ConditionBuilder) ConditionBuilder { return And(cb, right, other...) } @@ -790,22 +790,22 @@ func (cb ConditionBuilder) And(right ConditionBuilder, other ...ConditionBuilder // // Example: // -// // condition represents the condition where the item attribute "Price" is -// // equal to the value 100 OR the item attribute "Rating" is less than the -// // value 8 -// condition := expression.Or(expression.Name("Price").Equal(expression.Value(100)), expression.Name("Rating").LessThan(expression.Value(8))) +// // condition represents the condition where the item attribute "Price" is +// // equal to the value 100 OR the item attribute "Rating" is less than the +// // value 8 +// condition := expression.Or(expression.Name("Price").Equal(expression.Value(100)), expression.Name("Rating").LessThan(expression.Value(8))) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Or(expression.Name("Price").Equal(expression.Value(100)), expression.Name("Rating").LessThan(expression.Value(8))) -// // Let :price and :rating be ExpressionAttributeValues representing the -// // the value 100 and value 8 respectively -// "(Price = :price) OR (Rating < :rating)" +// expression.Or(expression.Name("Price").Equal(expression.Value(100)), expression.Name("Rating").LessThan(expression.Value(8))) +// // Let :price and :rating be ExpressionAttributeValues representing the +// // the value 100 and value 8 respectively +// "(Price = :price) OR (Rating < :rating)" func Or(left, right ConditionBuilder, other ...ConditionBuilder) ConditionBuilder { other = append([]ConditionBuilder{left, right}, other...) return ConditionBuilder{ @@ -822,22 +822,22 @@ func Or(left, right ConditionBuilder, other ...ConditionBuilder) ConditionBuilde // // Example: // -// // condition represents the condition where the item attribute "Price" is -// // equal to the value 100 OR the item attribute "Rating" is less than the -// // value 8 -// condition := expression.Name("Price").Equal(expression.Value(100)).Or(expression.Name("Rating").LessThan(expression.Value(8))) +// // condition represents the condition where the item attribute "Price" is +// // equal to the value 100 OR the item attribute "Rating" is less than the +// // value 8 +// condition := expression.Name("Price").Equal(expression.Value(100)).Or(expression.Name("Rating").LessThan(expression.Value(8))) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Name("Price").Equal(expression.Value(100)).Or(expression.Name("Rating").LessThan(expression.Value(8))) -// // Let :price and :rating be ExpressionAttributeValues representing the -// // the value 100 and value 8 respectively -// "(Price = :price) OR (Rating < :rating)" +// expression.Name("Price").Equal(expression.Value(100)).Or(expression.Name("Rating").LessThan(expression.Value(8))) +// // Let :price and :rating be ExpressionAttributeValues representing the +// // the value 100 and value 8 respectively +// "(Price = :price) OR (Rating < :rating)" func (cb ConditionBuilder) Or(right ConditionBuilder, other ...ConditionBuilder) ConditionBuilder { return Or(cb, right, other...) } @@ -849,21 +849,21 @@ func (cb ConditionBuilder) Or(right ConditionBuilder, other ...ConditionBuilder) // // Example: // -// // condition represents the condition where the item attribute "Name" -// // does not begin with "test" -// condition := expression.Not(expression.Name("Name").BeginsWith("test")) +// // condition represents the condition where the item attribute "Name" +// // does not begin with "test" +// condition := expression.Not(expression.Name("Name").BeginsWith("test")) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Not(expression.Name("Name").BeginsWith("test")) -// // Let :prefix be an ExpressionAttributeValue representing the value -// // "test" -// "NOT (begins_with (:prefix))" +// expression.Not(expression.Name("Name").BeginsWith("test")) +// // Let :prefix be an ExpressionAttributeValue representing the value +// // "test" +// "NOT (begins_with (:prefix))" func Not(conditionBuilder ConditionBuilder) ConditionBuilder { return ConditionBuilder{ conditionList: []ConditionBuilder{conditionBuilder}, @@ -878,21 +878,21 @@ func Not(conditionBuilder ConditionBuilder) ConditionBuilder { // // Example: // -// // condition represents the condition where the item attribute "Name" -// // does not begin with "test" -// condition := expression.Name("Name").BeginsWith("test").Not() +// // condition represents the condition where the item attribute "Name" +// // does not begin with "test" +// condition := expression.Name("Name").BeginsWith("test").Not() // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Name("Name").BeginsWith("test").Not() -// // Let :prefix be an ExpressionAttributeValue representing the value -// // "test" -// "NOT (begins_with (:prefix))" +// expression.Name("Name").BeginsWith("test").Not() +// // Let :prefix be an ExpressionAttributeValue representing the value +// // "test" +// "NOT (begins_with (:prefix))" func (cb ConditionBuilder) Not() ConditionBuilder { return Not(cb) } @@ -904,21 +904,21 @@ func (cb ConditionBuilder) Not() ConditionBuilder { // // Example: // -// // condition represents the condition where the value of the item -// // attribute "Rating" is between values 5 and 10 -// condition := expression.Between(expression.Name("Rating"), expression.Value(5), expression.Value(10)) +// // condition represents the condition where the value of the item +// // attribute "Rating" is between values 5 and 10 +// condition := expression.Between(expression.Name("Rating"), expression.Value(5), expression.Value(10)) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Between(expression.Name("Rating"), expression.Value(5), expression.Value(10)) -// // Let :five and :ten be ExpressionAttributeValues representing the value -// // 5 and the value 10 -// "Rating BETWEEN :five AND :ten" +// expression.Between(expression.Name("Rating"), expression.Value(5), expression.Value(10)) +// // Let :five and :ten be ExpressionAttributeValues representing the value +// // 5 and the value 10 +// "Rating BETWEEN :five AND :ten" func Between(op, lower, upper OperandBuilder) ConditionBuilder { return ConditionBuilder{ operandList: []OperandBuilder{op, lower, upper}, @@ -933,21 +933,21 @@ func Between(op, lower, upper OperandBuilder) ConditionBuilder { // // Example: // -// // condition represents the condition where the value of the item -// // attribute "Rating" is between values 5 and 10 -// condition := expression.Name("Rating").Between(expression.Value(5), expression.Value(10)) +// // condition represents the condition where the value of the item +// // attribute "Rating" is between values 5 and 10 +// condition := expression.Name("Rating").Between(expression.Value(5), expression.Value(10)) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Name("Rating").Between(expression.Value(5), expression.Value(10)) -// // Let :five and :ten be ExpressionAttributeValues representing the value -// // 5 and the value 10 -// "Rating BETWEEN :five AND :ten" +// expression.Name("Rating").Between(expression.Value(5), expression.Value(10)) +// // Let :five and :ten be ExpressionAttributeValues representing the value +// // 5 and the value 10 +// "Rating BETWEEN :five AND :ten" func (nb NameBuilder) Between(lower, upper OperandBuilder) ConditionBuilder { return Between(nb, lower, upper) } @@ -959,21 +959,21 @@ func (nb NameBuilder) Between(lower, upper OperandBuilder) ConditionBuilder { // // Example: // -// // condition represents the condition where the value 6 is between values -// // 5 and 10 -// condition := expression.Value(6).Between(expression.Value(5), expression.Value(10)) +// // condition represents the condition where the value 6 is between values +// // 5 and 10 +// condition := expression.Value(6).Between(expression.Value(5), expression.Value(10)) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Value(6).Between(expression.Value(5), expression.Value(10)) -// // Let :six, :five and :ten be ExpressionAttributeValues representing the -// // values 6, 5, and 10 respectively -// ":six BETWEEN :five AND :ten" +// expression.Value(6).Between(expression.Value(5), expression.Value(10)) +// // Let :six, :five and :ten be ExpressionAttributeValues representing the +// // values 6, 5, and 10 respectively +// ":six BETWEEN :five AND :ten" func (vb ValueBuilder) Between(lower, upper OperandBuilder) ConditionBuilder { return Between(vb, lower, upper) } @@ -985,21 +985,21 @@ func (vb ValueBuilder) Between(lower, upper OperandBuilder) ConditionBuilder { // // Example: // -// // condition represents the condition where the size of the item -// // attribute "InviteList" is between values 5 and 10 -// condition := expression.Size(expression.Name("InviteList")).Between(expression.Value(5), expression.Value(10)) +// // condition represents the condition where the size of the item +// // attribute "InviteList" is between values 5 and 10 +// condition := expression.Size(expression.Name("InviteList")).Between(expression.Value(5), expression.Value(10)) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Size(expression.Name("InviteList")).Between(expression.Value(5), expression.Value(10)) -// // Let :five and :ten be ExpressionAttributeValues representing the value -// // 5 and the value 10 -// "size (InviteList) BETWEEN :five AND :ten" +// expression.Size(expression.Name("InviteList")).Between(expression.Value(5), expression.Value(10)) +// // Let :five and :ten be ExpressionAttributeValues representing the value +// // 5 and the value 10 +// "size (InviteList) BETWEEN :five AND :ten" func (sb SizeBuilder) Between(lower, upper OperandBuilder) ConditionBuilder { return Between(sb, lower, upper) } @@ -1011,22 +1011,22 @@ func (sb SizeBuilder) Between(lower, upper OperandBuilder) ConditionBuilder { // // Example: // -// // condition represents the condition where the value of the item -// // attribute "Color" is checked against the list of colors "red", -// // "green", and "blue". -// condition := expression.In(expression.Name("Color"), expression.Value("red"), expression.Value("green"), expression.Value("blue")) +// // condition represents the condition where the value of the item +// // attribute "Color" is checked against the list of colors "red", +// // "green", and "blue". +// condition := expression.In(expression.Name("Color"), expression.Value("red"), expression.Value("green"), expression.Value("blue")) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.In(expression.Name("Color"), expression.Value("red"), expression.Value("green"), expression.Value("blue")) -// // Let :red, :green, :blue be ExpressionAttributeValues representing the -// // values "red", "green", and "blue" respectively -// "Color IN (:red, :green, :blue)" +// expression.In(expression.Name("Color"), expression.Value("red"), expression.Value("green"), expression.Value("blue")) +// // Let :red, :green, :blue be ExpressionAttributeValues representing the +// // values "red", "green", and "blue" respectively +// "Color IN (:red, :green, :blue)" func In(left, right OperandBuilder, other ...OperandBuilder) ConditionBuilder { other = append([]OperandBuilder{left, right}, other...) return ConditionBuilder{ @@ -1042,22 +1042,22 @@ func In(left, right OperandBuilder, other ...OperandBuilder) ConditionBuilder { // // Example: // -// // condition represents the condition where the value of the item -// // attribute "Color" is checked against the list of colors "red", -// // "green", and "blue". -// condition := expression.Name("Color").In(expression.Value("red"), expression.Value("green"), expression.Value("blue")) +// // condition represents the condition where the value of the item +// // attribute "Color" is checked against the list of colors "red", +// // "green", and "blue". +// condition := expression.Name("Color").In(expression.Value("red"), expression.Value("green"), expression.Value("blue")) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Name("Color").In(expression.Value("red"), expression.Value("green"), expression.Value("blue")) -// // Let :red, :green, :blue be ExpressionAttributeValues representing the -// // values "red", "green", and "blue" respectively -// "Color IN (:red, :green, :blue)" +// expression.Name("Color").In(expression.Value("red"), expression.Value("green"), expression.Value("blue")) +// // Let :red, :green, :blue be ExpressionAttributeValues representing the +// // values "red", "green", and "blue" respectively +// "Color IN (:red, :green, :blue)" func (nb NameBuilder) In(right OperandBuilder, other ...OperandBuilder) ConditionBuilder { return In(nb, right, other...) } @@ -1070,22 +1070,22 @@ func (nb NameBuilder) In(right OperandBuilder, other ...OperandBuilder) Conditio // // Example: // -// // condition represents the condition where the value "yellow" is checked -// // against the list of colors "red", "green", and "blue". -// condition := expression.Value("yellow").In(expression.Value("red"), expression.Value("green"), expression.Value("blue")) +// // condition represents the condition where the value "yellow" is checked +// // against the list of colors "red", "green", and "blue". +// condition := expression.Value("yellow").In(expression.Value("red"), expression.Value("green"), expression.Value("blue")) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Value("yellow").In(expression.Value("red"), expression.Value("green"), expression.Value("blue")) -// // Let :yellow, :red, :green, :blue be ExpressionAttributeValues -// // representing the values "yellow", "red", "green", and "blue" -// // respectively -// ":yellow IN (:red, :green, :blue)" +// expression.Value("yellow").In(expression.Value("red"), expression.Value("green"), expression.Value("blue")) +// // Let :yellow, :red, :green, :blue be ExpressionAttributeValues +// // representing the values "yellow", "red", "green", and "blue" +// // respectively +// ":yellow IN (:red, :green, :blue)" func (vb ValueBuilder) In(right OperandBuilder, other ...OperandBuilder) ConditionBuilder { return In(vb, right, other...) } @@ -1097,22 +1097,22 @@ func (vb ValueBuilder) In(right OperandBuilder, other ...OperandBuilder) Conditi // // Example: // -// // condition represents the condition where the size of the item -// // attribute "Donuts" is checked against the list of numbers 12, 24, and -// // 36. -// condition := expression.Size(expression.Name("Donuts")).In(expression.Value(12), expression.Value(24), expression.Value(36)) +// // condition represents the condition where the size of the item +// // attribute "Donuts" is checked against the list of numbers 12, 24, and +// // 36. +// condition := expression.Size(expression.Name("Donuts")).In(expression.Value(12), expression.Value(24), expression.Value(36)) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Size(expression.Name("Donuts")).In(expression.Value(12), expression.Value(24), expression.Value(36)) -// // Let :dozen, :twoDozen, :threeDozen be ExpressionAttributeValues -// // representing the values 12, 24, and 36 respectively -// "size (Donuts) IN (12, 24, 36)" +// expression.Size(expression.Name("Donuts")).In(expression.Value(12), expression.Value(24), expression.Value(36)) +// // Let :dozen, :twoDozen, :threeDozen be ExpressionAttributeValues +// // representing the values 12, 24, and 36 respectively +// "size (Donuts) IN (12, 24, 36)" func (sb SizeBuilder) In(right OperandBuilder, other ...OperandBuilder) ConditionBuilder { return In(sb, right, other...) } @@ -1124,19 +1124,19 @@ func (sb SizeBuilder) In(right OperandBuilder, other ...OperandBuilder) Conditio // // Example: // -// // condition represents the boolean condition of whether the item -// // attribute "Age" exists or not -// condition := expression.AttributeExists(expression.Name("Age")) +// // condition represents the boolean condition of whether the item +// // attribute "Age" exists or not +// condition := expression.AttributeExists(expression.Name("Age")) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.AttributeExists(expression.Name("Age")) -// "attribute_exists (Age))" +// expression.AttributeExists(expression.Name("Age")) +// "attribute_exists (Age))" func AttributeExists(nameBuilder NameBuilder) ConditionBuilder { return ConditionBuilder{ operandList: []OperandBuilder{nameBuilder}, @@ -1151,19 +1151,19 @@ func AttributeExists(nameBuilder NameBuilder) ConditionBuilder { // // Example: // -// // condition represents the boolean condition of whether the item -// // attribute "Age" exists or not -// condition := expression.Name("Age").AttributeExists() +// // condition represents the boolean condition of whether the item +// // attribute "Age" exists or not +// condition := expression.Name("Age").AttributeExists() // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Name("Age").AttributeExists() -// "attribute_exists (Age))" +// expression.Name("Age").AttributeExists() +// "attribute_exists (Age))" func (nb NameBuilder) AttributeExists() ConditionBuilder { return AttributeExists(nb) } @@ -1176,19 +1176,19 @@ func (nb NameBuilder) AttributeExists() ConditionBuilder { // // Example: // -// // condition represents the boolean condition of whether the item -// // attribute "Age" exists or not -// condition := expression.AttributeNotExists(expression.Name("Age")) +// // condition represents the boolean condition of whether the item +// // attribute "Age" exists or not +// condition := expression.AttributeNotExists(expression.Name("Age")) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.AttributeNotExists(expression.Name("Age")) -// "attribute_not_exists (Age))" +// expression.AttributeNotExists(expression.Name("Age")) +// "attribute_not_exists (Age))" func AttributeNotExists(nameBuilder NameBuilder) ConditionBuilder { return ConditionBuilder{ operandList: []OperandBuilder{nameBuilder}, @@ -1204,19 +1204,19 @@ func AttributeNotExists(nameBuilder NameBuilder) ConditionBuilder { // // Example: // -// // condition represents the boolean condition of whether the item -// // attribute "Age" exists or not -// condition := expression.Name("Age").AttributeNotExists() +// // condition represents the boolean condition of whether the item +// // attribute "Age" exists or not +// condition := expression.Name("Age").AttributeNotExists() // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Name("Age").AttributeNotExists() -// "attribute_not_exists (Age))" +// expression.Name("Age").AttributeNotExists() +// "attribute_not_exists (Age))" func (nb NameBuilder) AttributeNotExists() ConditionBuilder { return AttributeNotExists(nb) } @@ -1229,20 +1229,20 @@ func (nb NameBuilder) AttributeNotExists() ConditionBuilder { // // Example: // -// // condition represents the boolean condition of whether the item -// // attribute "Age" has the DynamoDB type Number or not -// condition := expression.AttributeType(expression.Name("Age"), expression.Number) +// // condition represents the boolean condition of whether the item +// // attribute "Age" has the DynamoDB type Number or not +// condition := expression.AttributeType(expression.Name("Age"), expression.Number) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.AttributeType(expression.Name("Age"), expression.Number) -// // Let :type be an ExpressionAttributeValue representing the value "N" -// "attribute_type (Age, :type)" +// expression.AttributeType(expression.Name("Age"), expression.Number) +// // Let :type be an ExpressionAttributeValue representing the value "N" +// "attribute_type (Age, :type)" func AttributeType(nameBuilder NameBuilder, attributeType DynamoDBAttributeType) ConditionBuilder { v := ValueBuilder{ value: string(attributeType), @@ -1261,20 +1261,20 @@ func AttributeType(nameBuilder NameBuilder, attributeType DynamoDBAttributeType) // // Example: // -// // condition represents the boolean condition of whether the item -// // attribute "Age" has the DynamoDB type Number or not -// condition := expression.Name("Age").AttributeType(expression.Number) +// // condition represents the boolean condition of whether the item +// // attribute "Age" has the DynamoDB type Number or not +// condition := expression.Name("Age").AttributeType(expression.Number) // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Name("Age").AttributeType(expression.Number) -// // Let :type be an ExpressionAttributeValue representing the value "N" -// "attribute_type (Age, :type)" +// expression.Name("Age").AttributeType(expression.Number) +// // Let :type be an ExpressionAttributeValue representing the value "N" +// "attribute_type (Age, :type)" func (nb NameBuilder) AttributeType(attributeType DynamoDBAttributeType) ConditionBuilder { return AttributeType(nb, attributeType) } @@ -1286,20 +1286,20 @@ func (nb NameBuilder) AttributeType(attributeType DynamoDBAttributeType) Conditi // // Example: // -// // condition represents the boolean condition of whether the item -// // attribute "CodeName" starts with the substring "Ben" -// condition := expression.BeginsWith(expression.Name("CodeName"), "Ben") +// // condition represents the boolean condition of whether the item +// // attribute "CodeName" starts with the substring "Ben" +// condition := expression.BeginsWith(expression.Name("CodeName"), "Ben") // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.BeginsWith(expression.Name("CodeName"), "Ben") -// // Let :ben be an ExpressionAttributeValue representing the value "Ben" -// "begins_with (CodeName, :ben)" +// expression.BeginsWith(expression.Name("CodeName"), "Ben") +// // Let :ben be an ExpressionAttributeValue representing the value "Ben" +// "begins_with (CodeName, :ben)" func BeginsWith(nameBuilder NameBuilder, prefix string) ConditionBuilder { v := ValueBuilder{ value: prefix, @@ -1317,20 +1317,20 @@ func BeginsWith(nameBuilder NameBuilder, prefix string) ConditionBuilder { // // Example: // -// // condition represents the boolean condition of whether the item -// // attribute "CodeName" starts with the substring "Ben" -// condition := expression.Name("CodeName").BeginsWith("Ben") +// // condition represents the boolean condition of whether the item +// // attribute "CodeName" starts with the substring "Ben" +// condition := expression.Name("CodeName").BeginsWith("Ben") // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Name("CodeName").BeginsWith("Ben") -// // Let :ben be an ExpressionAttributeValue representing the value "Ben" -// "begins_with (CodeName, :ben)" +// expression.Name("CodeName").BeginsWith("Ben") +// // Let :ben be an ExpressionAttributeValue representing the value "Ben" +// "begins_with (CodeName, :ben)" func (nb NameBuilder) BeginsWith(prefix string) ConditionBuilder { return BeginsWith(nb, prefix) } @@ -1342,20 +1342,20 @@ func (nb NameBuilder) BeginsWith(prefix string) ConditionBuilder { // // Example: // -// // condition represents the boolean condition of whether the item -// // attribute "InviteList" has the value "Ben" -// condition := expression.Contains(expression.Name("InviteList"), "Ben") +// // condition represents the boolean condition of whether the item +// // attribute "InviteList" has the value "Ben" +// condition := expression.Contains(expression.Name("InviteList"), "Ben") // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Contains(expression.Name("InviteList"), "Ben") -// // Let :ben be an ExpressionAttributeValue representing the value "Ben" -// "contains (InviteList, :ben)" +// expression.Contains(expression.Name("InviteList"), "Ben") +// // Let :ben be an ExpressionAttributeValue representing the value "Ben" +// "contains (InviteList, :ben)" func Contains(nameBuilder NameBuilder, substr string) ConditionBuilder { v := ValueBuilder{ value: substr, @@ -1373,20 +1373,20 @@ func Contains(nameBuilder NameBuilder, substr string) ConditionBuilder { // // Example: // -// // condition represents the boolean condition of whether the item -// // attribute "InviteList" has the value "Ben" -// condition := expression.Name("InviteList").Contains("Ben") +// // condition represents the boolean condition of whether the item +// // attribute "InviteList" has the value "Ben" +// condition := expression.Name("InviteList").Contains("Ben") // -// // Used in another Condition Expression -// anotherCondition := expression.Not(condition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithCondition(condition) +// // Used in another Condition Expression +// anotherCondition := expression.Not(condition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithCondition(condition) // // Expression Equivalent: // -// expression.Name("InviteList").Contains("Ben") -// // Let :ben be an ExpressionAttributeValue representing the value "Ben" -// "contains (InviteList, :ben)" +// expression.Name("InviteList").Contains("Ben") +// // Let :ben be an ExpressionAttributeValue representing the value "Ben" +// "contains (InviteList, :ben)" func (nb NameBuilder) Contains(substr string) ConditionBuilder { return Contains(nb, substr) } diff --git a/feature/dynamodb/expression/condition_test.go b/feature/dynamodb/expression/condition_test.go index 8e799333ed3..714040e830f 100644 --- a/feature/dynamodb/expression/condition_test.go +++ b/feature/dynamodb/expression/condition_test.go @@ -21,7 +21,7 @@ const ( invalidConditionOperand = "BuildOperand error" ) -//IsSet +// IsSet func TestIsSet(t *testing.T) { cases := []struct { name string @@ -48,7 +48,7 @@ func TestIsSet(t *testing.T) { } } -//Compare +// Compare func TestCompare(t *testing.T) { cases := []struct { name string diff --git a/feature/dynamodb/expression/doc.go b/feature/dynamodb/expression/doc.go index 7c1dc413d4c..8ae133a7793 100644 --- a/feature/dynamodb/expression/doc.go +++ b/feature/dynamodb/expression/doc.go @@ -3,7 +3,7 @@ Package expression provides types and functions to create Amazon DynamoDB Expression strings, ExpressionAttributeNames maps, and ExpressionAttributeValues maps. -Using the Package +# Using the Package The package represents the various DynamoDB Expressions as structs named accordingly. For example, ConditionBuilder represents a DynamoDB Condition @@ -11,9 +11,9 @@ Expression, an UpdateBuilder represents a DynamoDB Update Expression, and so on. The following example shows a sample ConditionExpression and how to build an equivalent ConditionBuilder - // Let :a be an ExpressionAttributeValue representing the string "No One You Know" - condExpr := "Artist = :a" - condBuilder := expression.Name("Artist").Equal(expression.Value("No One You Know")) + // Let :a be an ExpressionAttributeValue representing the string "No One You Know" + condExpr := "Artist = :a" + condBuilder := expression.Name("Artist").Equal(expression.Value("No One You Know")) In order to retrieve the formatted DynamoDB Expression strings, call the getter methods on the Expression struct. To create the Expression struct, call the @@ -22,20 +22,20 @@ QueryInput, can have multiple DynamoDB Expressions, multiple structs representing various DynamoDB Expressions can be added to the Builder struct. The following example shows a generic usage of the whole package. - filt := expression.Name("Artist").Equal(expression.Value("No One You Know")) - proj := expression.NamesList(expression.Name("SongTitle"), expression.Name("AlbumTitle")) - expr, err := expression.NewBuilder().WithFilter(filt).WithProjection(proj).Build() - if err != nil { - fmt.Println(err) - } + filt := expression.Name("Artist").Equal(expression.Value("No One You Know")) + proj := expression.NamesList(expression.Name("SongTitle"), expression.Name("AlbumTitle")) + expr, err := expression.NewBuilder().WithFilter(filt).WithProjection(proj).Build() + if err != nil { + fmt.Println(err) + } - input := &dynamodb.ScanInput{ - ExpressionAttributeNames: expr.Names(), - ExpressionAttributeValues: expr.Values(), - FilterExpression: expr.Filter(), - ProjectionExpression: expr.Projection(), - TableName: aws.String("Music"), - } + input := &dynamodb.ScanInput{ + ExpressionAttributeNames: expr.Names(), + ExpressionAttributeValues: expr.Values(), + FilterExpression: expr.Filter(), + ProjectionExpression: expr.Projection(), + TableName: aws.String("Music"), + } The ExpressionAttributeNames and ExpressionAttributeValues member of the input struct must always be assigned when using the Expression struct because all item diff --git a/feature/dynamodb/expression/error.go b/feature/dynamodb/expression/error.go index 7378d7e219a..3229686f1fa 100644 --- a/feature/dynamodb/expression/error.go +++ b/feature/dynamodb/expression/error.go @@ -12,8 +12,8 @@ import ( // // Example: // -// // err is of type InvalidParameterError -// _, err := expression.Name("foo..bar").BuildOperand() +// // err is of type InvalidParameterError +// _, err := expression.Name("foo..bar").BuildOperand() type InvalidParameterError struct { parameterType string functionName string @@ -37,11 +37,11 @@ func newInvalidParameterError(funcName, paramType string) InvalidParameterError // // Example: // -// // err is of type UnsetParameterError -// _, err := expression.Builder{}.Build() -// _, err := expression.NewBuilder(). -// WithCondition(expression.ConditionBuilder{}). -// Build() +// // err is of type UnsetParameterError +// _, err := expression.Builder{}.Build() +// _, err := expression.NewBuilder(). +// WithCondition(expression.ConditionBuilder{}). +// Build() type UnsetParameterError struct { parameterType string functionName string diff --git a/feature/dynamodb/expression/expression.go b/feature/dynamodb/expression/expression.go index f6fd3201f77..5de9c132bf5 100644 --- a/feature/dynamodb/expression/expression.go +++ b/feature/dynamodb/expression/expression.go @@ -41,19 +41,19 @@ func (l typeList) Swap(i, j int) { // // Example: // -// keyCond := expression.Key("someKey").Equal(expression.Value("someValue")) -// proj := expression.NamesList(expression.Name("aName"), expression.Name("anotherName"), expression.Name("oneOtherName")) -// -// builder := expression.NewBuilder().WithKeyCondition(keyCond).WithProjection(proj) -// expr := builder.Build() -// -// queryInput := dynamodb.QueryInput{ -// KeyConditionExpression: expr.KeyCondition(), -// ProjectionExpression: expr.Projection(), -// ExpressionAttributeNames: expr.Names(), -// ExpressionAttributeValues: expr.Values(), -// TableName: aws.String("SomeTable"), -// } +// keyCond := expression.Key("someKey").Equal(expression.Value("someValue")) +// proj := expression.NamesList(expression.Name("aName"), expression.Name("anotherName"), expression.Name("oneOtherName")) +// +// builder := expression.NewBuilder().WithKeyCondition(keyCond).WithProjection(proj) +// expr := builder.Build() +// +// queryInput := dynamodb.QueryInput{ +// KeyConditionExpression: expr.KeyCondition(), +// ProjectionExpression: expr.Projection(), +// ExpressionAttributeNames: expr.Names(), +// ExpressionAttributeValues: expr.Values(), +// TableName: aws.String("SomeTable"), +// } type Builder struct { expressionMap map[expressionType]treeBuilder } @@ -65,9 +65,9 @@ type Builder struct { // // Example: // -// keyCond := expression.Key("someKey").Equal(expression.Value("someValue")) -// proj := expression.NamesList(expression.Name("aName"), expression.Name("anotherName"), expression.Name("oneOtherName")) -// builder := expression.NewBuilder().WithKeyCondition(keyCond).WithProjection(proj) +// keyCond := expression.Key("someKey").Equal(expression.Value("someValue")) +// proj := expression.NamesList(expression.Name("aName"), expression.Name("anotherName"), expression.Name("oneOtherName")) +// builder := expression.NewBuilder().WithKeyCondition(keyCond).WithProjection(proj) func NewBuilder() Builder { return Builder{} } @@ -80,23 +80,23 @@ func NewBuilder() Builder { // // Example: // -// // keyCond represents the Key Condition Expression -// keyCond := expression.Key("someKey").Equal(expression.Value("someValue")) -// // proj represents the Projection Expression -// proj := expression.NamesList(expression.Name("aName"), expression.Name("anotherName"), expression.Name("oneOtherName")) -// -// // Add keyCond and proj to builder as a Key Condition and Projection -// // respectively -// builder := expression.NewBuilder().WithKeyCondition(keyCond).WithProjection(proj) -// expr := builder.Build() -// -// queryInput := dynamodb.QueryInput{ -// KeyConditionExpression: expr.KeyCondition(), -// ProjectionExpression: expr.Projection(), -// ExpressionAttributeNames: expr.Names(), -// ExpressionAttributeValues: expr.Values(), -// TableName: aws.String("SomeTable"), -// } +// // keyCond represents the Key Condition Expression +// keyCond := expression.Key("someKey").Equal(expression.Value("someValue")) +// // proj represents the Projection Expression +// proj := expression.NamesList(expression.Name("aName"), expression.Name("anotherName"), expression.Name("oneOtherName")) +// +// // Add keyCond and proj to builder as a Key Condition and Projection +// // respectively +// builder := expression.NewBuilder().WithKeyCondition(keyCond).WithProjection(proj) +// expr := builder.Build() +// +// queryInput := dynamodb.QueryInput{ +// KeyConditionExpression: expr.KeyCondition(), +// ProjectionExpression: expr.Projection(), +// ExpressionAttributeNames: expr.Names(), +// ExpressionAttributeValues: expr.Values(), +// TableName: aws.String("SomeTable"), +// } func (b Builder) Build() (Expression, error) { if b.expressionMap == nil { return Expression{}, newUnsetParameterError("Build", "Builder") @@ -168,15 +168,15 @@ func (b Builder) buildChildTrees() (aliasList, map[expressionType]string, error) // // Example: // -// // let builder be an existing Builder{} and cond be an existing -// // ConditionBuilder{} -// builder = builder.WithCondition(cond) +// // let builder be an existing Builder{} and cond be an existing +// // ConditionBuilder{} +// builder = builder.WithCondition(cond) // -// // add other DynamoDB Expressions to the builder. let proj be an already -// // existing ProjectionBuilder -// builder = builder.WithProjection(proj) -// // create an Expression struct -// expr := builder.Build() +// // add other DynamoDB Expressions to the builder. let proj be an already +// // existing ProjectionBuilder +// builder = builder.WithProjection(proj) +// // create an Expression struct +// expr := builder.Build() func (b Builder) WithCondition(conditionBuilder ConditionBuilder) Builder { if b.expressionMap == nil { b.expressionMap = map[expressionType]treeBuilder{} @@ -192,15 +192,15 @@ func (b Builder) WithCondition(conditionBuilder ConditionBuilder) Builder { // // Example: // -// // let builder be an existing Builder{} and proj be an existing -// // ProjectionBuilder{} -// builder = builder.WithProjection(proj) +// // let builder be an existing Builder{} and proj be an existing +// // ProjectionBuilder{} +// builder = builder.WithProjection(proj) // -// // add other DynamoDB Expressions to the builder. let cond be an already -// // existing ConditionBuilder -// builder = builder.WithCondition(cond) -// // create an Expression struct -// expr := builder.Build() +// // add other DynamoDB Expressions to the builder. let cond be an already +// // existing ConditionBuilder +// builder = builder.WithCondition(cond) +// // create an Expression struct +// expr := builder.Build() func (b Builder) WithProjection(projectionBuilder ProjectionBuilder) Builder { if b.expressionMap == nil { b.expressionMap = map[expressionType]treeBuilder{} @@ -216,15 +216,15 @@ func (b Builder) WithProjection(projectionBuilder ProjectionBuilder) Builder { // // Example: // -// // let builder be an existing Builder{} and keyCond be an existing -// // KeyConditionBuilder{} -// builder = builder.WithKeyCondition(keyCond) +// // let builder be an existing Builder{} and keyCond be an existing +// // KeyConditionBuilder{} +// builder = builder.WithKeyCondition(keyCond) // -// // add other DynamoDB Expressions to the builder. let cond be an already -// // existing ConditionBuilder -// builder = builder.WithCondition(cond) -// // create an Expression struct -// expr := builder.Build() +// // add other DynamoDB Expressions to the builder. let cond be an already +// // existing ConditionBuilder +// builder = builder.WithCondition(cond) +// // create an Expression struct +// expr := builder.Build() func (b Builder) WithKeyCondition(keyConditionBuilder KeyConditionBuilder) Builder { if b.expressionMap == nil { b.expressionMap = map[expressionType]treeBuilder{} @@ -240,15 +240,15 @@ func (b Builder) WithKeyCondition(keyConditionBuilder KeyConditionBuilder) Build // // Example: // -// // let builder be an existing Builder{} and filt be an existing -// // ConditionBuilder{} -// builder = builder.WithFilter(filt) +// // let builder be an existing Builder{} and filt be an existing +// // ConditionBuilder{} +// builder = builder.WithFilter(filt) // -// // add other DynamoDB Expressions to the builder. let cond be an already -// // existing ConditionBuilder -// builder = builder.WithCondition(cond) -// // create an Expression struct -// expr := builder.Build() +// // add other DynamoDB Expressions to the builder. let cond be an already +// // existing ConditionBuilder +// builder = builder.WithCondition(cond) +// // create an Expression struct +// expr := builder.Build() func (b Builder) WithFilter(filterBuilder ConditionBuilder) Builder { if b.expressionMap == nil { b.expressionMap = map[expressionType]treeBuilder{} @@ -264,15 +264,15 @@ func (b Builder) WithFilter(filterBuilder ConditionBuilder) Builder { // // Example: // -// // let builder be an existing Builder{} and update be an existing -// // UpdateBuilder{} -// builder = builder.WithUpdate(update) +// // let builder be an existing Builder{} and update be an existing +// // UpdateBuilder{} +// builder = builder.WithUpdate(update) // -// // add other DynamoDB Expressions to the builder. let cond be an already -// // existing ConditionBuilder -// builder = builder.WithCondition(cond) -// // create an Expression struct -// expr := builder.Build() +// // add other DynamoDB Expressions to the builder. let cond be an already +// // existing ConditionBuilder +// builder = builder.WithCondition(cond) +// // create an Expression struct +// expr := builder.Build() func (b Builder) WithUpdate(updateBuilder UpdateBuilder) Builder { if b.expressionMap == nil { b.expressionMap = map[expressionType]treeBuilder{} @@ -287,23 +287,23 @@ func (b Builder) WithUpdate(updateBuilder UpdateBuilder) Builder { // // Example: // -// // keyCond represents the Key Condition Expression -// keyCond := expression.Key("someKey").Equal(expression.Value("someValue")) -// // proj represents the Projection Expression -// proj := expression.NamesList(expression.Name("aName"), expression.Name("anotherName"), expression.Name("oneOtherName")) -// -// // Add keyCond and proj to builder as a Key Condition and Projection -// // respectively -// builder := expression.NewBuilder().WithKeyCondition(keyCond).WithProjection(proj) -// expr := builder.Build() -// -// queryInput := dynamodb.QueryInput{ -// KeyConditionExpression: expr.KeyCondition(), -// ProjectionExpression: expr.Projection(), -// ExpressionAttributeNames: expr.Names(), -// ExpressionAttributeValues: expr.Values(), -// TableName: aws.String("SomeTable"), -// } +// // keyCond represents the Key Condition Expression +// keyCond := expression.Key("someKey").Equal(expression.Value("someValue")) +// // proj represents the Projection Expression +// proj := expression.NamesList(expression.Name("aName"), expression.Name("anotherName"), expression.Name("oneOtherName")) +// +// // Add keyCond and proj to builder as a Key Condition and Projection +// // respectively +// builder := expression.NewBuilder().WithKeyCondition(keyCond).WithProjection(proj) +// expr := builder.Build() +// +// queryInput := dynamodb.QueryInput{ +// KeyConditionExpression: expr.KeyCondition(), +// ProjectionExpression: expr.Projection(), +// ExpressionAttributeNames: expr.Names(), +// ExpressionAttributeValues: expr.Values(), +// TableName: aws.String("SomeTable"), +// } type Expression struct { expressionMap map[expressionType]string namesMap map[string]string @@ -327,17 +327,17 @@ type treeBuilder interface { // // Example: // -// // let expression be an instance of Expression{} -// -// deleteInput := dynamodb.DeleteItemInput{ -// ConditionExpression: expression.Condition(), -// ExpressionAttributeNames: expression.Names(), -// ExpressionAttributeValues: expression.Values(), -// Key: map[string]types.AttributeValue{ -// "PartitionKey": &types.AttributeValueMemberS{Value: "SomeKey"}, -// }, -// TableName: aws.String("SomeTable"), -// } +// // let expression be an instance of Expression{} +// +// deleteInput := dynamodb.DeleteItemInput{ +// ConditionExpression: expression.Condition(), +// ExpressionAttributeNames: expression.Names(), +// ExpressionAttributeValues: expression.Values(), +// Key: map[string]types.AttributeValue{ +// "PartitionKey": &types.AttributeValueMemberS{Value: "SomeKey"}, +// }, +// TableName: aws.String("SomeTable"), +// } func (e Expression) Condition() *string { return e.returnExpression(condition) } @@ -349,15 +349,15 @@ func (e Expression) Condition() *string { // // Example: // -// // let expression be an instance of Expression{} +// // let expression be an instance of Expression{} // -// queryInput := dynamodb.QueryInput{ -// KeyConditionExpression: expression.KeyCondition(), -// FilterExpression: expression.Filter(), -// ExpressionAttributeNames: expression.Names(), -// ExpressionAttributeValues: expression.Values(), -// TableName: aws.String("SomeTable"), -// } +// queryInput := dynamodb.QueryInput{ +// KeyConditionExpression: expression.KeyCondition(), +// FilterExpression: expression.Filter(), +// ExpressionAttributeNames: expression.Names(), +// ExpressionAttributeValues: expression.Values(), +// TableName: aws.String("SomeTable"), +// } func (e Expression) Filter() *string { return e.returnExpression(filter) } @@ -369,15 +369,15 @@ func (e Expression) Filter() *string { // // Example: // -// // let expression be an instance of Expression{} +// // let expression be an instance of Expression{} // -// queryInput := dynamodb.QueryInput{ -// KeyConditionExpression: expression.KeyCondition(), -// ProjectionExpression: expression.Projection(), -// ExpressionAttributeNames: expression.Names(), -// ExpressionAttributeValues: expression.Values(), -// TableName: aws.String("SomeTable"), -// } +// queryInput := dynamodb.QueryInput{ +// KeyConditionExpression: expression.KeyCondition(), +// ProjectionExpression: expression.Projection(), +// ExpressionAttributeNames: expression.Names(), +// ExpressionAttributeValues: expression.Values(), +// TableName: aws.String("SomeTable"), +// } func (e Expression) Projection() *string { return e.returnExpression(projection) } @@ -389,15 +389,15 @@ func (e Expression) Projection() *string { // // Example: // -// // let expression be an instance of Expression{} +// // let expression be an instance of Expression{} // -// queryInput := dynamodb.QueryInput{ -// KeyConditionExpression: expression.KeyCondition(), -// ProjectionExpression: expression.Projection(), -// ExpressionAttributeNames: expression.Names(), -// ExpressionAttributeValues: expression.Values(), -// TableName: aws.String("SomeTable"), -// } +// queryInput := dynamodb.QueryInput{ +// KeyConditionExpression: expression.KeyCondition(), +// ProjectionExpression: expression.Projection(), +// ExpressionAttributeNames: expression.Names(), +// ExpressionAttributeValues: expression.Values(), +// TableName: aws.String("SomeTable"), +// } func (e Expression) KeyCondition() *string { return e.returnExpression(keyCondition) } @@ -409,17 +409,17 @@ func (e Expression) KeyCondition() *string { // // Example: // -// // let expression be an instance of Expression{} -// -// updateInput := dynamodb.UpdateInput{ -// Key: map[string]types.AttributeValue{ -// "PartitionKey": &types.AttributeValueMemberS{Value: "someKey"}, -// }, -// UpdateExpression: expression.Update(), -// ExpressionAttributeNames: expression.Names(), -// ExpressionAttributeValues: expression.Values(), -// TableName: aws.String("SomeTable"), -// } +// // let expression be an instance of Expression{} +// +// updateInput := dynamodb.UpdateInput{ +// Key: map[string]types.AttributeValue{ +// "PartitionKey": &types.AttributeValueMemberS{Value: "someKey"}, +// }, +// UpdateExpression: expression.Update(), +// ExpressionAttributeNames: expression.Names(), +// ExpressionAttributeValues: expression.Values(), +// TableName: aws.String("SomeTable"), +// } func (e Expression) Update() *string { return e.returnExpression(update) } @@ -437,15 +437,15 @@ func (e Expression) Update() *string { // // Example: // -// // let expression be an instance of Expression{} +// // let expression be an instance of Expression{} // -// queryInput := dynamodb.QueryInput{ -// KeyConditionExpression: expression.KeyCondition(), -// ProjectionExpression: expression.Projection(), -// ExpressionAttributeNames: expression.Names(), -// ExpressionAttributeValues: expression.Values(), -// TableName: aws.String("SomeTable"), -// } +// queryInput := dynamodb.QueryInput{ +// KeyConditionExpression: expression.KeyCondition(), +// ProjectionExpression: expression.Projection(), +// ExpressionAttributeNames: expression.Names(), +// ExpressionAttributeValues: expression.Values(), +// TableName: aws.String("SomeTable"), +// } func (e Expression) Names() map[string]string { return e.namesMap } @@ -463,15 +463,15 @@ func (e Expression) Names() map[string]string { // // Example: // -// // let expression be an instance of Expression{} +// // let expression be an instance of Expression{} // -// queryInput := dynamodb.QueryInput{ -// KeyConditionExpression: expression.KeyCondition(), -// ProjectionExpression: expression.Projection(), -// ExpressionAttributeNames: expression.Names(), -// ExpressionAttributeValues: expression.Values(), -// TableName: aws.String("SomeTable"), -// } +// queryInput := dynamodb.QueryInput{ +// KeyConditionExpression: expression.KeyCondition(), +// ProjectionExpression: expression.Projection(), +// ExpressionAttributeNames: expression.Names(), +// ExpressionAttributeValues: expression.Values(), +// TableName: aws.String("SomeTable"), +// } func (e Expression) Values() map[string]types.AttributeValue { return e.valuesMap } @@ -496,12 +496,13 @@ func (e Expression) returnExpression(expressionType expressionType) *string { // fmtExpr is a string that has escaped characters to refer to // names/values/children which needs to be aliased at runtime in order to avoid // duplicate values. The rules are as follows: -// $n: Indicates that an alias of a name needs to be inserted. The -// corresponding name to be alias is in the []names slice. -// $v: Indicates that an alias of a value needs to be inserted. The -// corresponding value to be alias is in the []values slice. -// $c: Indicates that the fmtExpr of a child exprNode needs to be inserted. -// The corresponding child node is in the []children slice. +// +// $n: Indicates that an alias of a name needs to be inserted. The +// corresponding name to be alias is in the []names slice. +// $v: Indicates that an alias of a value needs to be inserted. The +// corresponding value to be alias is in the []values slice. +// $c: Indicates that the fmtExpr of a child exprNode needs to be inserted. +// The corresponding child node is in the []children slice. type exprNode struct { names []string values []types.AttributeValue diff --git a/feature/dynamodb/expression/key_condition.go b/feature/dynamodb/expression/key_condition.go index c913684d0f1..ad52671fbfc 100644 --- a/feature/dynamodb/expression/key_condition.go +++ b/feature/dynamodb/expression/key_condition.go @@ -47,20 +47,20 @@ type KeyConditionBuilder struct { // // Example: // -// // keyCondition represents the equal clause of the key "foo" and the -// // value 5 -// keyCondition := expression.KeyEqual(expression.Key("foo"), expression.Value(5)) +// // keyCondition represents the equal clause of the key "foo" and the +// // value 5 +// keyCondition := expression.KeyEqual(expression.Key("foo"), expression.Value(5)) // -// // Used in another Key Condition Expression -// anotherKeyCondition := expression.Key("partitionKey").Equal(expression.Value("aValue")).And(keyCondition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithKeyCondition(keyCondition) +// // Used in another Key Condition Expression +// anotherKeyCondition := expression.Key("partitionKey").Equal(expression.Value("aValue")).And(keyCondition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithKeyCondition(keyCondition) // // Expression Equivalent: // -// expression.KeyEqual(expression.Key("foo"), expression.Value(5)) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// "foo = :five" +// expression.KeyEqual(expression.Key("foo"), expression.Value(5)) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// "foo = :five" func KeyEqual(keyBuilder KeyBuilder, valueBuilder ValueBuilder) KeyConditionBuilder { return KeyConditionBuilder{ operandList: []OperandBuilder{keyBuilder, valueBuilder}, @@ -73,11 +73,11 @@ func KeyEqual(keyBuilder KeyBuilder, valueBuilder ValueBuilder) KeyConditionBuil // // Example: // -// var keyCondition expression.KeyConditionBuilder -// keyCondition.IsSet() // returns false +// var keyCondition expression.KeyConditionBuilder +// keyCondition.IsSet() // returns false // -// keyCondition := expression.KeyEqual(expression.Key("foo"), expression.Value(5)) -// keyCondition.IsSet() // returns true +// keyCondition := expression.KeyEqual(expression.Key("foo"), expression.Value(5)) +// keyCondition.IsSet() // returns true func (kcb KeyConditionBuilder) IsSet() bool { return kcb.mode != unsetKeyCond } @@ -89,20 +89,20 @@ func (kcb KeyConditionBuilder) IsSet() bool { // // Example: // -// // keyCondition represents the equal clause of the key "foo" and the -// // value 5 -// keyCondition := expression.Key("foo").Equal(expression.Value(5)) +// // keyCondition represents the equal clause of the key "foo" and the +// // value 5 +// keyCondition := expression.Key("foo").Equal(expression.Value(5)) // -// // Used in another Key Condition Expression -// anotherKeyCondition := expression.Key("partitionKey").Equal(expression.Value("aValue")).And(keyCondition) -// // Used to make an Builder -// builder := expression.NewBuilder().WithKeyCondition(keyCondition) +// // Used in another Key Condition Expression +// anotherKeyCondition := expression.Key("partitionKey").Equal(expression.Value("aValue")).And(keyCondition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithKeyCondition(keyCondition) // // Expression Equivalent: // -// expression.Key("foo").Equal(expression.Value(5)) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// "foo = :five" +// expression.Key("foo").Equal(expression.Value(5)) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// "foo = :five" func (kb KeyBuilder) Equal(valueBuilder ValueBuilder) KeyConditionBuilder { return KeyEqual(kb, valueBuilder) } @@ -113,18 +113,18 @@ func (kb KeyBuilder) Equal(valueBuilder ValueBuilder) KeyConditionBuilder { // // Example: // -// // keyCondition represents the less than clause of the key "foo" and the -// // value 5 -// keyCondition := expression.KeyLessThan(expression.Key("foo"), expression.Value(5)) +// // keyCondition represents the less than clause of the key "foo" and the +// // value 5 +// keyCondition := expression.KeyLessThan(expression.Key("foo"), expression.Value(5)) // -// // Used in another Key Condition Expression -// anotherKeyCondition := expression.Key("partitionKey").Equal(expression.Value("aValue")).And(keyCondition) +// // Used in another Key Condition Expression +// anotherKeyCondition := expression.Key("partitionKey").Equal(expression.Value("aValue")).And(keyCondition) // // Expression Equivalent: // -// expression.KeyLessThan(expression.Key("foo"), expression.Value(5)) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// "foo < :five" +// expression.KeyLessThan(expression.Key("foo"), expression.Value(5)) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// "foo < :five" func KeyLessThan(keyBuilder KeyBuilder, valueBuilder ValueBuilder) KeyConditionBuilder { return KeyConditionBuilder{ operandList: []OperandBuilder{keyBuilder, valueBuilder}, @@ -138,18 +138,18 @@ func KeyLessThan(keyBuilder KeyBuilder, valueBuilder ValueBuilder) KeyConditionB // // Example: // -// // keyCondition represents the less than clause of the key "foo" and the -// // value 5 -// keyCondition := expression.Key("foo").LessThan(expression.Value(5)) +// // keyCondition represents the less than clause of the key "foo" and the +// // value 5 +// keyCondition := expression.Key("foo").LessThan(expression.Value(5)) // -// // Used in another Key Condition Expression -// anotherKeyCondition := expression.Key("partitionKey").Equal(expression.Value("aValue")).And(keyCondition) +// // Used in another Key Condition Expression +// anotherKeyCondition := expression.Key("partitionKey").Equal(expression.Value("aValue")).And(keyCondition) // // Expression Equivalent: // -// expression.Key("foo").LessThan(expression.Value(5)) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// "foo < :five" +// expression.Key("foo").LessThan(expression.Value(5)) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// "foo < :five" func (kb KeyBuilder) LessThan(valueBuilder ValueBuilder) KeyConditionBuilder { return KeyLessThan(kb, valueBuilder) } @@ -160,18 +160,18 @@ func (kb KeyBuilder) LessThan(valueBuilder ValueBuilder) KeyConditionBuilder { // // Example: // -// // keyCondition represents the less than equal to clause of the key -// // "foo" and the value 5 -// keyCondition := expression.KeyLessThanEqual(expression.Key("foo"), expression.Value(5)) +// // keyCondition represents the less than equal to clause of the key +// // "foo" and the value 5 +// keyCondition := expression.KeyLessThanEqual(expression.Key("foo"), expression.Value(5)) // -// // Used in another Key Condition Expression -// anotherKeyCondition := expression.Key("partitionKey").Equal(expression.Value("aValue")).And(keyCondition) +// // Used in another Key Condition Expression +// anotherKeyCondition := expression.Key("partitionKey").Equal(expression.Value("aValue")).And(keyCondition) // // Expression Equivalent: // -// expression.KeyLessThanEqual(expression.Key("foo"), expression.Value(5)) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// "foo <= :five" +// expression.KeyLessThanEqual(expression.Key("foo"), expression.Value(5)) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// "foo <= :five" func KeyLessThanEqual(keyBuilder KeyBuilder, valueBuilder ValueBuilder) KeyConditionBuilder { return KeyConditionBuilder{ operandList: []OperandBuilder{keyBuilder, valueBuilder}, @@ -185,18 +185,18 @@ func KeyLessThanEqual(keyBuilder KeyBuilder, valueBuilder ValueBuilder) KeyCondi // // Example: // -// // keyCondition represents the less than equal to clause of the key -// // "foo" and the value 5 -// keyCondition := expression.Key("foo").LessThanEqual(expression.Value(5)) +// // keyCondition represents the less than equal to clause of the key +// // "foo" and the value 5 +// keyCondition := expression.Key("foo").LessThanEqual(expression.Value(5)) // -// // Used in another Key Condition Expression -// anotherKeyCondition := expression.Key("partitionKey").Equal(expression.Value("aValue")).And(keyCondition) +// // Used in another Key Condition Expression +// anotherKeyCondition := expression.Key("partitionKey").Equal(expression.Value("aValue")).And(keyCondition) // // Expression Equivalent: // -// expression.Key("foo").LessThanEqual(expression.Value(5)) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// "foo <= :five" +// expression.Key("foo").LessThanEqual(expression.Value(5)) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// "foo <= :five" func (kb KeyBuilder) LessThanEqual(valueBuilder ValueBuilder) KeyConditionBuilder { return KeyLessThanEqual(kb, valueBuilder) } @@ -207,18 +207,18 @@ func (kb KeyBuilder) LessThanEqual(valueBuilder ValueBuilder) KeyConditionBuilde // // Example: // -// // keyCondition represents the greater than clause of the key "foo" and -// // the value 5 -// keyCondition := expression.KeyGreaterThan(expression.Key("foo"), expression.Value(5)) +// // keyCondition represents the greater than clause of the key "foo" and +// // the value 5 +// keyCondition := expression.KeyGreaterThan(expression.Key("foo"), expression.Value(5)) // -// // Used in another Key Condition Expression -// anotherKeyCondition := expression.Key("partitionKey").Equal(expression.Value("aValue")).And(keyCondition) +// // Used in another Key Condition Expression +// anotherKeyCondition := expression.Key("partitionKey").Equal(expression.Value("aValue")).And(keyCondition) // // Expression Equivalent: // -// expression.KeyGreaterThan(expression.Key("foo"), expression.Value(5)) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// "foo > :five" +// expression.KeyGreaterThan(expression.Key("foo"), expression.Value(5)) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// "foo > :five" func KeyGreaterThan(keyBuilder KeyBuilder, valueBuilder ValueBuilder) KeyConditionBuilder { return KeyConditionBuilder{ operandList: []OperandBuilder{keyBuilder, valueBuilder}, @@ -232,18 +232,18 @@ func KeyGreaterThan(keyBuilder KeyBuilder, valueBuilder ValueBuilder) KeyConditi // // Example: // -// // key condition represents the greater than clause of the key "foo" and -// // the value 5 -// keyCondition := expression.Key("foo").GreaterThan(expression.Value(5)) +// // key condition represents the greater than clause of the key "foo" and +// // the value 5 +// keyCondition := expression.Key("foo").GreaterThan(expression.Value(5)) // -// // Used in another Key Condition Expression -// anotherKeyCondition := expression.Key("partitionKey").Equal(expression.Value("aValue")).And(keyCondition) +// // Used in another Key Condition Expression +// anotherKeyCondition := expression.Key("partitionKey").Equal(expression.Value("aValue")).And(keyCondition) // // Expression Equivalent: // -// expression.Key("foo").GreaterThan(expression.Value(5)) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// "foo > :five" +// expression.Key("foo").GreaterThan(expression.Value(5)) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// "foo > :five" func (kb KeyBuilder) GreaterThan(valueBuilder ValueBuilder) KeyConditionBuilder { return KeyGreaterThan(kb, valueBuilder) } @@ -255,18 +255,18 @@ func (kb KeyBuilder) GreaterThan(valueBuilder ValueBuilder) KeyConditionBuilder // // Example: // -// // keyCondition represents the greater than equal to clause of the key -// // "foo" and the value 5 -// keyCondition := expression.KeyGreaterThanEqual(expression.Key("foo"), expression.Value(5)) +// // keyCondition represents the greater than equal to clause of the key +// // "foo" and the value 5 +// keyCondition := expression.KeyGreaterThanEqual(expression.Key("foo"), expression.Value(5)) // -// // Used in another Key Condition Expression -// anotherKeyCondition := expression.Key("partitionKey").Equal(expression.Value("aValue")).And(keyCondition) +// // Used in another Key Condition Expression +// anotherKeyCondition := expression.Key("partitionKey").Equal(expression.Value("aValue")).And(keyCondition) // // Expression Equivalent: // -// expression.KeyGreaterThanEqual(expression.Key("foo"), expression.Value(5)) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// "foo >= :five" +// expression.KeyGreaterThanEqual(expression.Key("foo"), expression.Value(5)) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// "foo >= :five" func KeyGreaterThanEqual(keyBuilder KeyBuilder, valueBuilder ValueBuilder) KeyConditionBuilder { return KeyConditionBuilder{ operandList: []OperandBuilder{keyBuilder, valueBuilder}, @@ -280,18 +280,18 @@ func KeyGreaterThanEqual(keyBuilder KeyBuilder, valueBuilder ValueBuilder) KeyCo // // Example: // -// // keyCondition represents the greater than equal to clause of the key -// // "foo" and the value 5 -// keyCondition := expression.Key("foo").GreaterThanEqual(expression.Value(5)) +// // keyCondition represents the greater than equal to clause of the key +// // "foo" and the value 5 +// keyCondition := expression.Key("foo").GreaterThanEqual(expression.Value(5)) // -// // Used in another Key Condition Expression -// anotherKeyCondition := expression.Key("partitionKey").Equal(expression.Value("aValue")).And(keyCondition) +// // Used in another Key Condition Expression +// anotherKeyCondition := expression.Key("partitionKey").Equal(expression.Value("aValue")).And(keyCondition) // // Expression Equivalent: // -// expression.Key("foo").GreaterThanEqual(expression.Value(5)) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// "foo >= :five" +// expression.Key("foo").GreaterThanEqual(expression.Value(5)) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// "foo >= :five" func (kb KeyBuilder) GreaterThanEqual(valueBuilder ValueBuilder) KeyConditionBuilder { return KeyGreaterThanEqual(kb, valueBuilder) } @@ -303,21 +303,21 @@ func (kb KeyBuilder) GreaterThanEqual(valueBuilder ValueBuilder) KeyConditionBui // // Example: // -// // keyCondition represents the key condition where the partition key -// // "TeamName" is equal to value "Wildcats" and sort key "Number" is equal -// // to value 1 -// keyCondition := expression.KeyAnd(expression.Key("TeamName").Equal(expression.Value("Wildcats")), expression.Key("Number").Equal(expression.Value(1))) +// // keyCondition represents the key condition where the partition key +// // "TeamName" is equal to value "Wildcats" and sort key "Number" is equal +// // to value 1 +// keyCondition := expression.KeyAnd(expression.Key("TeamName").Equal(expression.Value("Wildcats")), expression.Key("Number").Equal(expression.Value(1))) // -// // Used to make an Builder -// builder := expression.NewBuilder().WithKeyCondition(keyCondition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithKeyCondition(keyCondition) // // Expression Equivalent: // -// expression.KeyAnd(expression.Key("TeamName").Equal(expression.Value("Wildcats")), expression.Key("Number").Equal(expression.Value(1))) -// // Let #NUMBER, :teamName, and :one be ExpressionAttributeName and -// // ExpressionAttributeValues representing the item attribute "Number", -// // the value "Wildcats", and the value 1 -// "(TeamName = :teamName) AND (#NUMBER = :one)" +// expression.KeyAnd(expression.Key("TeamName").Equal(expression.Value("Wildcats")), expression.Key("Number").Equal(expression.Value(1))) +// // Let #NUMBER, :teamName, and :one be ExpressionAttributeName and +// // ExpressionAttributeValues representing the item attribute "Number", +// // the value "Wildcats", and the value 1 +// "(TeamName = :teamName) AND (#NUMBER = :one)" func KeyAnd(left, right KeyConditionBuilder) KeyConditionBuilder { if left.mode != equalKeyCond { return KeyConditionBuilder{ @@ -342,21 +342,21 @@ func KeyAnd(left, right KeyConditionBuilder) KeyConditionBuilder { // // Example: // -// // keyCondition represents the key condition where the partition key -// // "TeamName" is equal to value "Wildcats" and sort key "Number" is equal -// // to value 1 -// keyCondition := expression.Key("TeamName").Equal(expression.Value("Wildcats")).And(expression.Key("Number").Equal(expression.Value(1))) +// // keyCondition represents the key condition where the partition key +// // "TeamName" is equal to value "Wildcats" and sort key "Number" is equal +// // to value 1 +// keyCondition := expression.Key("TeamName").Equal(expression.Value("Wildcats")).And(expression.Key("Number").Equal(expression.Value(1))) // -// // Used to make an Builder -// builder := expression.NewBuilder().WithKeyCondition(keyCondition) +// // Used to make an Builder +// builder := expression.NewBuilder().WithKeyCondition(keyCondition) // // Expression Equivalent: // -// expression.Key("TeamName").Equal(expression.Value("Wildcats")).And(expression.Key("Number").Equal(expression.Value(1))) -// // Let #NUMBER, :teamName, and :one be ExpressionAttributeName and -// // ExpressionAttributeValues representing the item attribute "Number", -// // the value "Wildcats", and the value 1 -// "(TeamName = :teamName) AND (#NUMBER = :one)" +// expression.Key("TeamName").Equal(expression.Value("Wildcats")).And(expression.Key("Number").Equal(expression.Value(1))) +// // Let #NUMBER, :teamName, and :one be ExpressionAttributeName and +// // ExpressionAttributeValues representing the item attribute "Number", +// // the value "Wildcats", and the value 1 +// "(TeamName = :teamName) AND (#NUMBER = :one)" func (kcb KeyConditionBuilder) And(right KeyConditionBuilder) KeyConditionBuilder { return KeyAnd(kcb, right) } @@ -367,19 +367,19 @@ func (kcb KeyConditionBuilder) And(right KeyConditionBuilder) KeyConditionBuilde // // Example: // -// // keyCondition represents the boolean key condition of whether the value -// // of the key "foo" is between values 5 and 10 -// keyCondition := expression.KeyBetween(expression.Key("foo"), expression.Value(5), expression.Value(10)) +// // keyCondition represents the boolean key condition of whether the value +// // of the key "foo" is between values 5 and 10 +// keyCondition := expression.KeyBetween(expression.Key("foo"), expression.Value(5), expression.Value(10)) // -// // Used in another Key Condition Expression -// anotherKeyCondition := expression.Key("partitionKey").Equal(expression.Value("aValue")).And(keyCondition) +// // Used in another Key Condition Expression +// anotherKeyCondition := expression.Key("partitionKey").Equal(expression.Value("aValue")).And(keyCondition) // // Expression Equivalent: // -// expression.KeyBetween(expression.Key("foo"), expression.Value(5), expression.Value(10)) -// // Let :five and :ten be ExpressionAttributeValues representing the -// // values 5 and 10 respectively -// "foo BETWEEN :five AND :ten" +// expression.KeyBetween(expression.Key("foo"), expression.Value(5), expression.Value(10)) +// // Let :five and :ten be ExpressionAttributeValues representing the +// // values 5 and 10 respectively +// "foo BETWEEN :five AND :ten" func KeyBetween(keyBuilder KeyBuilder, lower, upper ValueBuilder) KeyConditionBuilder { return KeyConditionBuilder{ operandList: []OperandBuilder{keyBuilder, lower, upper}, @@ -393,19 +393,19 @@ func KeyBetween(keyBuilder KeyBuilder, lower, upper ValueBuilder) KeyConditionBu // // Example: // -// // keyCondition represents the boolean key condition of whether the value -// // of the key "foo" is between values 5 and 10 -// keyCondition := expression.Key("foo").Between(expression.Value(5), expression.Value(10)) +// // keyCondition represents the boolean key condition of whether the value +// // of the key "foo" is between values 5 and 10 +// keyCondition := expression.Key("foo").Between(expression.Value(5), expression.Value(10)) // -// // Used in another Key Condition Expression -// anotherKeyCondition := expression.Key("partitionKey").Equal(expression.Value("aValue")).And(keyCondition) +// // Used in another Key Condition Expression +// anotherKeyCondition := expression.Key("partitionKey").Equal(expression.Value("aValue")).And(keyCondition) // // Expression Equivalent: // -// expression.Key("foo").Between(expression.Value(5), expression.Value(10)) -// // Let :five and :ten be ExpressionAttributeValues representing the -// // values 5 and 10 respectively -// "foo BETWEEN :five AND :ten" +// expression.Key("foo").Between(expression.Value(5), expression.Value(10)) +// // Let :five and :ten be ExpressionAttributeValues representing the +// // values 5 and 10 respectively +// "foo BETWEEN :five AND :ten" func (kb KeyBuilder) Between(lower, upper ValueBuilder) KeyConditionBuilder { return KeyBetween(kb, lower, upper) } @@ -416,18 +416,18 @@ func (kb KeyBuilder) Between(lower, upper ValueBuilder) KeyConditionBuilder { // // Example: // -// // keyCondition represents the boolean key condition of whether the value -// // of the key "foo" is begins with the prefix "bar" -// keyCondition := expression.KeyBeginsWith(expression.Key("foo"), "bar") +// // keyCondition represents the boolean key condition of whether the value +// // of the key "foo" is begins with the prefix "bar" +// keyCondition := expression.KeyBeginsWith(expression.Key("foo"), "bar") // -// // Used in another Key Condition Expression -// anotherKeyCondition := expression.Key("partitionKey").Equal(expression.Value("aValue")).And(keyCondition) +// // Used in another Key Condition Expression +// anotherKeyCondition := expression.Key("partitionKey").Equal(expression.Value("aValue")).And(keyCondition) // // Expression Equivalent: // -// expression.KeyBeginsWith(expression.Key("foo"), "bar") -// // Let :bar be an ExpressionAttributeValue representing the value "bar" -// "begins_with(foo, :bar)" +// expression.KeyBeginsWith(expression.Key("foo"), "bar") +// // Let :bar be an ExpressionAttributeValue representing the value "bar" +// "begins_with(foo, :bar)" func KeyBeginsWith(keyBuilder KeyBuilder, prefix string) KeyConditionBuilder { valueBuilder := ValueBuilder{ value: prefix, @@ -444,18 +444,18 @@ func KeyBeginsWith(keyBuilder KeyBuilder, prefix string) KeyConditionBuilder { // // Example: // -// // keyCondition represents the boolean key condition of whether the value -// // of the key "foo" is begins with the prefix "bar" -// keyCondition := expression.Key("foo").BeginsWith("bar") +// // keyCondition represents the boolean key condition of whether the value +// // of the key "foo" is begins with the prefix "bar" +// keyCondition := expression.Key("foo").BeginsWith("bar") // -// // Used in another Key Condition Expression -// anotherKeyCondition := expression.Key("partitionKey").Equal(expression.Value("aValue")).And(keyCondition) +// // Used in another Key Condition Expression +// anotherKeyCondition := expression.Key("partitionKey").Equal(expression.Value("aValue")).And(keyCondition) // // Expression Equivalent: // -// expression.Key("foo").BeginsWith("bar") -// // Let :bar be an ExpressionAttributeValue representing the value "bar" -// "begins_with(foo, :bar)" +// expression.Key("foo").BeginsWith("bar") +// // Let :bar be an ExpressionAttributeValue representing the value "bar" +// "begins_with(foo, :bar)" func (kb KeyBuilder) BeginsWith(prefix string) KeyConditionBuilder { return KeyBeginsWith(kb, prefix) } diff --git a/feature/dynamodb/expression/key_condition_test.go b/feature/dynamodb/expression/key_condition_test.go index da80d0ea34b..58235f42493 100644 --- a/feature/dynamodb/expression/key_condition_test.go +++ b/feature/dynamodb/expression/key_condition_test.go @@ -24,7 +24,7 @@ const ( invalidKeyConditionFormat = "buildKeyCondition error: invalid key condition constructed" ) -//IsSet +// IsSet func TestKeyIsSet(t *testing.T) { cases := []struct { name string diff --git a/feature/dynamodb/expression/operand.go b/feature/dynamodb/expression/operand.go index 7eabc00a663..caf47ed6db7 100644 --- a/feature/dynamodb/expression/operand.go +++ b/feature/dynamodb/expression/operand.go @@ -15,8 +15,8 @@ import ( // // Example: // -// // Create a ValueBuilder representing the string "aValue" -// valueBuilder := expression.Value("aValue") +// // Create a ValueBuilder representing the string "aValue" +// valueBuilder := expression.Value("aValue") type ValueBuilder struct { value interface{} options ValueBuilderOptions @@ -38,8 +38,8 @@ type ValueBuilderOptions struct { // // Example: // -// // Create a NameBuilder representing the item attribute "aName" -// nameBuilder := expression.Name("aName") +// // Create a NameBuilder representing the item attribute "aName" +// nameBuilder := expression.Name("aName") type NameBuilder struct { names []string } @@ -53,9 +53,9 @@ type NameBuilder struct { // // Example: // -// // Create a SizeBuilder representing the size of the item attribute -// // "aName" -// sizeBuilder := expression.Name("aName").Size() +// // Create a SizeBuilder representing the size of the item attribute +// // "aName" +// sizeBuilder := expression.Name("aName").Size() type SizeBuilder struct { nameBuilder NameBuilder } @@ -70,8 +70,8 @@ type SizeBuilder struct { // // Example: // -// // Create a KeyBuilder representing the item key "aKey" -// keyBuilder := expression.Key("aKey") +// // Create a KeyBuilder representing the item key "aKey" +// keyBuilder := expression.Key("aKey") type KeyBuilder struct { key string } @@ -91,10 +91,12 @@ const ( // SetValueBuilder represents the outcome of operator functions supported by the // DynamoDB Set operation. The operator functions are the following: -// Plus() // Represents the "+" operator -// Minus() // Represents the "-" operator -// ListAppend() -// IfNotExists() +// +// Plus() // Represents the "+" operator +// Minus() // Represents the "-" operator +// ListAppend() +// IfNotExists() +// // For documentation on the above functions, // see: http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.UpdateExpressions.html#Expressions.UpdateExpressions.SET // Since SetValueBuilder represents an operand, it implements the OperandBuilder @@ -134,12 +136,12 @@ type OperandBuilder interface { // // Example: // -// // Specify a top-level attribute -// name := expression.Name("TopLevel") -// // Specify a nested attribute -// nested := expression.Name("Record[6].SongList") -// // Use Name() to create a condition expression -// condition := expression.Name("foo").Equal(expression.Name("bar")) +// // Specify a top-level attribute +// name := expression.Name("TopLevel") +// // Specify a nested attribute +// nested := expression.Name("Record[6].SongList") +// // Use Name() to create a condition expression +// condition := expression.Name("foo").Equal(expression.Name("bar")) func Name(name string) NameBuilder { if len(name) == 0 { return NameBuilder{} @@ -200,13 +202,13 @@ func (nb NameBuilder) AppendName(field NameBuilder) NameBuilder { // // Example: // -// // Specify a name containing dots, and should not be split. -// name := expression.NameLiteral("Top.Level") +// // Specify a name containing dots, and should not be split. +// name := expression.NameLiteral("Top.Level") // -// // Specify a nested attribute -// nested := expression.Name("Record[6].SongList") -// // Use Name() to create a condition expression -// condition := expression.Name("foo").Equal(expression.Name("bar")) +// // Specify a nested attribute +// nested := expression.Name("Record[6].SongList") +// // Use Name() to create a condition expression +// condition := expression.Name("foo").Equal(expression.Name("bar")) func NameNoDotSplit(name string) NameBuilder { return NameBuilder{ names: []string{name}, @@ -223,10 +225,10 @@ func NameNoDotSplit(name string) NameBuilder { // // Example: // -// // Use Value() to create a condition expression -// condition := expression.Name("foo").Equal(expression.Value(10)) -// // Use Value() to set the value of a set expression. -// update := Set(expression.Name("greets"), expression.Value(&types.AttributeValueMemberS{Value: "hello"})) +// // Use Value() to create a condition expression +// condition := expression.Name("foo").Equal(expression.Value(10)) +// // Use Value() to set the value of a set expression. +// update := Set(expression.Name("greets"), expression.Value(&types.AttributeValueMemberS{Value: "hello"})) func Value(value interface{}) ValueBuilder { return ValueBuilder{ value: value, @@ -248,10 +250,10 @@ func Value(value interface{}) ValueBuilder { // // Example: // -// // Use Value() to create a condition expression -// condition := expression.Name("foo").Equal(expression.Value(10)) -// // Use Value() to set the value of a set expression. -// update := Set(expression.Name("greets"), expression.Value(&types.AttributeValueMemberS{Value: "hello"})) +// // Use Value() to create a condition expression +// condition := expression.Name("foo").Equal(expression.Value(10)) +// // Use Value() to set the value of a set expression. +// update := Set(expression.Name("greets"), expression.Value(&types.AttributeValueMemberS{Value: "hello"})) func ValueWithOptions(value interface{}, optFns ...func(*ValueBuilderOptions)) ValueBuilder { var options ValueBuilderOptions for _, fn := range optFns { @@ -273,13 +275,13 @@ func ValueWithOptions(value interface{}, optFns ...func(*ValueBuilderOptions)) V // // Example: // -// // Use Size() to create a condition expression -// condition := expression.Name("foo").Size().Equal(expression.Value(10)) +// // Use Size() to create a condition expression +// condition := expression.Name("foo").Size().Equal(expression.Value(10)) // // Expression Equivalent: // -// expression.Name("aName").Size() -// "size (aName)" +// expression.Name("aName").Size() +// "size (aName)" func (nb NameBuilder) Size() SizeBuilder { return SizeBuilder{ nameBuilder: nb, @@ -295,13 +297,13 @@ func (nb NameBuilder) Size() SizeBuilder { // // Example: // -// // Use Size() to create a condition expression -// condition := expression.Size(expression.Name("foo")).Equal(expression.Value(10)) +// // Use Size() to create a condition expression +// condition := expression.Size(expression.Name("foo")).Equal(expression.Value(10)) // // Expression Equivalent: // -// expression.Size(expression.Name("aName")) -// "size (aName)" +// expression.Size(expression.Name("aName")) +// "size (aName)" func Size(nameBuilder NameBuilder) SizeBuilder { return nameBuilder.Size() } @@ -313,8 +315,8 @@ func Size(nameBuilder NameBuilder) SizeBuilder { // // Example: // -// // Use Key() to create a key condition expression -// keyCondition := expression.Key("foo").Equal(expression.Value("bar")) +// // Use Key() to create a key condition expression +// keyCondition := expression.Key("foo").Equal(expression.Value("bar")) func Key(key string) KeyBuilder { return KeyBuilder{ key: key, @@ -329,15 +331,15 @@ func Key(key string) KeyBuilder { // // Example: // -// // Use Plus() to set the value of the item attribute "someName" to 5 + 10 -// update, err := expression.Set(expression.Name("someName"), expression.Plus(expression.Value(5), expression.Value(10))) +// // Use Plus() to set the value of the item attribute "someName" to 5 + 10 +// update, err := expression.Set(expression.Name("someName"), expression.Plus(expression.Value(5), expression.Value(10))) // // Expression Equivalent: // -// expression.Plus(expression.Value(5), expression.Value(10)) -// // let :five and :ten be ExpressionAttributeValues for the values 5 and -// // 10 respectively. -// ":five + :ten" +// expression.Plus(expression.Value(5), expression.Value(10)) +// // let :five and :ten be ExpressionAttributeValues for the values 5 and +// // 10 respectively. +// ":five + :ten" func Plus(leftOperand, rightOperand OperandBuilder) SetValueBuilder { return SetValueBuilder{ leftOperand: leftOperand, @@ -354,15 +356,15 @@ func Plus(leftOperand, rightOperand OperandBuilder) SetValueBuilder { // // Example: // -// // Use Plus() to set the value of the item attribute "someName" to the -// // numeric value of item attribute "aName" incremented by 10 -// update, err := expression.Set(expression.Name("someName"), expression.Name("aName").Plus(expression.Value(10))) +// // Use Plus() to set the value of the item attribute "someName" to the +// // numeric value of item attribute "aName" incremented by 10 +// update, err := expression.Set(expression.Name("someName"), expression.Name("aName").Plus(expression.Value(10))) // // Expression Equivalent: // -// expression.Name("aName").Plus(expression.Value(10)) -// // let :ten be ExpressionAttributeValues representing the value 10 -// "aName + :ten" +// expression.Name("aName").Plus(expression.Value(10)) +// // let :ten be ExpressionAttributeValues representing the value 10 +// "aName + :ten" func (nb NameBuilder) Plus(rightOperand OperandBuilder) SetValueBuilder { return Plus(nb, rightOperand) } @@ -375,15 +377,15 @@ func (nb NameBuilder) Plus(rightOperand OperandBuilder) SetValueBuilder { // // Example: // -// // Use Plus() to set the value of the item attribute "someName" to 5 + 10 -// update, err := expression.Set(expression.Name("someName"), expression.Value(5).Plus(expression.Value(10))) +// // Use Plus() to set the value of the item attribute "someName" to 5 + 10 +// update, err := expression.Set(expression.Name("someName"), expression.Value(5).Plus(expression.Value(10))) // // Expression Equivalent: // -// expression.Value(5).Plus(expression.Value(10)) -// // let :five and :ten be ExpressionAttributeValues representing the value -// // 5 and 10 respectively -// ":five + :ten" +// expression.Value(5).Plus(expression.Value(10)) +// // let :five and :ten be ExpressionAttributeValues representing the value +// // 5 and 10 respectively +// ":five + :ten" func (vb ValueBuilder) Plus(rightOperand OperandBuilder) SetValueBuilder { return Plus(vb, rightOperand) } @@ -396,15 +398,15 @@ func (vb ValueBuilder) Plus(rightOperand OperandBuilder) SetValueBuilder { // // Example: // -// // Use Minus() to set the value of item attribute "someName" to 5 - 10 -// update, err := expression.Set(expression.Name("someName"), expression.Minus(expression.Value(5), expression.Value(10))) +// // Use Minus() to set the value of item attribute "someName" to 5 - 10 +// update, err := expression.Set(expression.Name("someName"), expression.Minus(expression.Value(5), expression.Value(10))) // // Expression Equivalent: // -// expression.Minus(expression.Value(5), expression.Value(10)) -// // let :five and :ten be ExpressionAttributeValues for the values 5 and -// // 10 respectively. -// ":five - :ten" +// expression.Minus(expression.Value(5), expression.Value(10)) +// // let :five and :ten be ExpressionAttributeValues for the values 5 and +// // 10 respectively. +// ":five - :ten" func Minus(leftOperand, rightOperand OperandBuilder) SetValueBuilder { return SetValueBuilder{ leftOperand: leftOperand, @@ -421,15 +423,15 @@ func Minus(leftOperand, rightOperand OperandBuilder) SetValueBuilder { // // Example: // -// // Use Minus() to set the value of item attribute "someName" to the -// // numeric value of "aName" decremented by 10 -// update, err := expression.Set(expression.Name("someName"), expression.Name("aName").Minus(expression.Value(10))) +// // Use Minus() to set the value of item attribute "someName" to the +// // numeric value of "aName" decremented by 10 +// update, err := expression.Set(expression.Name("someName"), expression.Name("aName").Minus(expression.Value(10))) // // Expression Equivalent: // -// expression.Name("aName").Minus(expression.Value(10))) -// // let :ten be ExpressionAttributeValues represent the value 10 -// "aName - :ten" +// expression.Name("aName").Minus(expression.Value(10))) +// // let :ten be ExpressionAttributeValues represent the value 10 +// "aName - :ten" func (nb NameBuilder) Minus(rightOperand OperandBuilder) SetValueBuilder { return Minus(nb, rightOperand) } @@ -442,15 +444,15 @@ func (nb NameBuilder) Minus(rightOperand OperandBuilder) SetValueBuilder { // // Example: // -// // Use Minus() to set the value of item attribute "someName" to 5 - 10 -// update, err := expression.Set(expression.Name("someName"), expression.Value(5).Minus(expression.Value(10))) +// // Use Minus() to set the value of item attribute "someName" to 5 - 10 +// update, err := expression.Set(expression.Name("someName"), expression.Value(5).Minus(expression.Value(10))) // // Expression Equivalent: // -// expression.Value(5).Minus(expression.Value(10)) -// // let :five and :ten be ExpressionAttributeValues for the values 5 and -// // 10 respectively. -// ":five - :ten" +// expression.Value(5).Minus(expression.Value(10)) +// // let :five and :ten be ExpressionAttributeValues for the values 5 and +// // 10 respectively. +// ":five - :ten" func (vb ValueBuilder) Minus(rightOperand OperandBuilder) SetValueBuilder { return Minus(vb, rightOperand) } @@ -463,16 +465,16 @@ func (vb ValueBuilder) Minus(rightOperand OperandBuilder) SetValueBuilder { // // Example: // -// // Use ListAppend() to set item attribute "someName" to the item -// // attribute "nameOfList" with "some" and "list" appended to it -// update, err := expression.Set(expression.Name("someName"), expression.ListAppend(expression.Name("nameOfList"), expression.Value([]string{"some", "list"}))) +// // Use ListAppend() to set item attribute "someName" to the item +// // attribute "nameOfList" with "some" and "list" appended to it +// update, err := expression.Set(expression.Name("someName"), expression.ListAppend(expression.Name("nameOfList"), expression.Value([]string{"some", "list"}))) // // Expression Equivalent: // -// expression.ListAppend(expression.Name("nameOfList"), expression.Value([]string{"some", "list"}) -// // let :list be a ExpressionAttributeValue representing the list -// // containing "some" and "list". -// "list_append (nameOfList, :list)" +// expression.ListAppend(expression.Name("nameOfList"), expression.Value([]string{"some", "list"}) +// // let :list be a ExpressionAttributeValue representing the list +// // containing "some" and "list". +// "list_append (nameOfList, :list)" func ListAppend(leftOperand, rightOperand OperandBuilder) SetValueBuilder { return SetValueBuilder{ leftOperand: leftOperand, @@ -489,16 +491,16 @@ func ListAppend(leftOperand, rightOperand OperandBuilder) SetValueBuilder { // // Example: // -// // Use ListAppend() to set item attribute "someName" to the item -// // attribute "nameOfList" with "some" and "list" appended to it -// update, err := expression.Set(expression.Name("someName"), expression.Name("nameOfList").ListAppend(expression.Value([]string{"some", "list"}))) +// // Use ListAppend() to set item attribute "someName" to the item +// // attribute "nameOfList" with "some" and "list" appended to it +// update, err := expression.Set(expression.Name("someName"), expression.Name("nameOfList").ListAppend(expression.Value([]string{"some", "list"}))) // // Expression Equivalent: // -// expression.Name("nameOfList").ListAppend(expression.Value([]string{"some", "list"}) -// // let :list be a ExpressionAttributeValue representing the list -// // containing "some" and "list". -// "list_append (nameOfList, :list)" +// expression.Name("nameOfList").ListAppend(expression.Value([]string{"some", "list"}) +// // let :list be a ExpressionAttributeValue representing the list +// // containing "some" and "list". +// "list_append (nameOfList, :list)" func (nb NameBuilder) ListAppend(rightOperand OperandBuilder) SetValueBuilder { return ListAppend(nb, rightOperand) } @@ -511,16 +513,16 @@ func (nb NameBuilder) ListAppend(rightOperand OperandBuilder) SetValueBuilder { // // Example: // -// // Use ListAppend() to set item attribute "someName" to a string list -// // equal to {"a", "list", "some", "list"} -// update, err := expression.Set(expression.Name("someName"), expression.Value([]string{"a", "list"}).ListAppend(expression.Value([]string{"some", "list"}))) +// // Use ListAppend() to set item attribute "someName" to a string list +// // equal to {"a", "list", "some", "list"} +// update, err := expression.Set(expression.Name("someName"), expression.Value([]string{"a", "list"}).ListAppend(expression.Value([]string{"some", "list"}))) // // Expression Equivalent: // -// expression.Name([]string{"a", "list"}).ListAppend(expression.Value([]string{"some", "list"}) -// // let :list1 and :list2 be a ExpressionAttributeValue representing the -// // list {"a", "list"} and {"some", "list"} respectively -// "list_append (:list1, :list2)" +// expression.Name([]string{"a", "list"}).ListAppend(expression.Value([]string{"some", "list"}) +// // let :list1 and :list2 be a ExpressionAttributeValue representing the +// // list {"a", "list"} and {"some", "list"} respectively +// "list_append (:list1, :list2)" func (vb ValueBuilder) ListAppend(rightOperand OperandBuilder) SetValueBuilder { return ListAppend(vb, rightOperand) } @@ -534,15 +536,15 @@ func (vb ValueBuilder) ListAppend(rightOperand OperandBuilder) SetValueBuilder { // // Example: // -// // Use IfNotExists() to set item attribute "someName" to value 5 if -// // "someName" does not exist yet. (Prevents overwrite) -// update, err := expression.Set(expression.Name("someName"), expression.IfNotExists(expression.Name("someName"), expression.Value(5))) +// // Use IfNotExists() to set item attribute "someName" to value 5 if +// // "someName" does not exist yet. (Prevents overwrite) +// update, err := expression.Set(expression.Name("someName"), expression.IfNotExists(expression.Name("someName"), expression.Value(5))) // // Expression Equivalent: // -// expression.IfNotExists(expression.Name("someName"), expression.Value(5)) -// // let :five be a ExpressionAttributeValue representing the value 5 -// "if_not_exists (someName, :five)" +// expression.IfNotExists(expression.Name("someName"), expression.Value(5)) +// // let :five be a ExpressionAttributeValue representing the value 5 +// "if_not_exists (someName, :five)" func IfNotExists(name NameBuilder, setValue OperandBuilder) SetValueBuilder { return SetValueBuilder{ leftOperand: name, @@ -560,18 +562,18 @@ func IfNotExists(name NameBuilder, setValue OperandBuilder) SetValueBuilder { // // Example: // -// // Use IfNotExists() to set item attribute "someName" to value 5 if -// // "someName" does not exist yet. (Prevents overwrite) -// update, err := expression.Set( -// expression.Name("someName"), -// expression.Name("someName").IfNotExists(expression.Value(5)), -// ) +// // Use IfNotExists() to set item attribute "someName" to value 5 if +// // "someName" does not exist yet. (Prevents overwrite) +// update, err := expression.Set( +// expression.Name("someName"), +// expression.Name("someName").IfNotExists(expression.Value(5)), +// ) // // Expression Equivalent: // -// expression.Name("someName").IfNotExists(expression.Value(5)) -// // let :five be a ExpressionAttributeValue representing the value 5 -// "if_not_exists (someName, :five)" +// expression.Name("someName").IfNotExists(expression.Value(5)) +// // let :five be a ExpressionAttributeValue representing the value 5 +// "if_not_exists (someName, :five)" func (nb NameBuilder) IfNotExists(rightOperand OperandBuilder) SetValueBuilder { return IfNotExists(nb, rightOperand) } diff --git a/feature/dynamodb/expression/projection.go b/feature/dynamodb/expression/projection.go index 059bcf1ee53..4cdf83e7900 100644 --- a/feature/dynamodb/expression/projection.go +++ b/feature/dynamodb/expression/projection.go @@ -18,19 +18,19 @@ type ProjectionBuilder struct { // // Example: // -// // projection represents the list of names {"foo", "bar"} -// projection := expression.NamesList(expression.Name("foo"), expression.Name("bar")) +// // projection represents the list of names {"foo", "bar"} +// projection := expression.NamesList(expression.Name("foo"), expression.Name("bar")) // -// // Used in another Projection Expression -// anotherProjection := expression.AddNames(projection, expression.Name("baz")) +// // Used in another Projection Expression +// anotherProjection := expression.AddNames(projection, expression.Name("baz")) // -// // Used to make an Builder -// builder := expression.NewBuilder().WithProjection(anotherProjection) +// // Used to make an Builder +// builder := expression.NewBuilder().WithProjection(anotherProjection) // // Expression Equivalent: // -// expression.NamesList(expression.Name("foo"), expression.Name("bar")) -// "foo, bar" +// expression.NamesList(expression.Name("foo"), expression.Name("bar")) +// "foo, bar" func NamesList(nameBuilder NameBuilder, namesList ...NameBuilder) ProjectionBuilder { namesList = append([]NameBuilder{nameBuilder}, namesList...) return ProjectionBuilder{ @@ -45,18 +45,18 @@ func NamesList(nameBuilder NameBuilder, namesList ...NameBuilder) ProjectionBuil // // Example: // -// // projection represents the list of names {"foo", "bar"} -// projection := expression.Name("foo").NamesList(expression.Name("bar")) +// // projection represents the list of names {"foo", "bar"} +// projection := expression.Name("foo").NamesList(expression.Name("bar")) // -// // Used in another Projection Expression -// anotherProjection := expression.AddNames(projection, expression.Name("baz")) -// // Used to make an Builder -// builder := expression.NewBuilder().WithProjection(newProjection) +// // Used in another Projection Expression +// anotherProjection := expression.AddNames(projection, expression.Name("baz")) +// // Used to make an Builder +// builder := expression.NewBuilder().WithProjection(newProjection) // // Expression Equivalent: // -// expression.Name("foo").NamesList(expression.Name("bar")) -// "foo, bar" +// expression.Name("foo").NamesList(expression.Name("bar")) +// "foo, bar" func (nb NameBuilder) NamesList(namesList ...NameBuilder) ProjectionBuilder { return NamesList(nb, namesList...) } @@ -69,19 +69,19 @@ func (nb NameBuilder) NamesList(namesList ...NameBuilder) ProjectionBuilder { // // Example: // -// // projection represents the list of names {"foo", "bar", "baz", "qux"} -// oldProj := expression.NamesList(expression.Name("foo"), expression.Name("bar")) -// projection := expression.AddNames(oldProj, expression.Name("baz"), expression.Name("qux")) +// // projection represents the list of names {"foo", "bar", "baz", "qux"} +// oldProj := expression.NamesList(expression.Name("foo"), expression.Name("bar")) +// projection := expression.AddNames(oldProj, expression.Name("baz"), expression.Name("qux")) // -// // Used in another Projection Expression -// anotherProjection := expression.AddNames(projection, expression.Name("quux")) -// // Used to make an Builder -// builder := expression.NewBuilder().WithProjection(newProjection) +// // Used in another Projection Expression +// anotherProjection := expression.AddNames(projection, expression.Name("quux")) +// // Used to make an Builder +// builder := expression.NewBuilder().WithProjection(newProjection) // // Expression Equivalent: // -// expression.AddNames(expression.NamesList(expression.Name("foo"), expression.Name("bar")), expression.Name("baz"), expression.Name("qux")) -// "foo, bar, baz, qux" +// expression.AddNames(expression.NamesList(expression.Name("foo"), expression.Name("bar")), expression.Name("baz"), expression.Name("qux")) +// "foo, bar, baz, qux" func AddNames(projectionBuilder ProjectionBuilder, namesList ...NameBuilder) ProjectionBuilder { projectionBuilder.names = append(projectionBuilder.names, namesList...) return projectionBuilder @@ -95,19 +95,19 @@ func AddNames(projectionBuilder ProjectionBuilder, namesList ...NameBuilder) Pro // // Example: // -// // projection represents the list of names {"foo", "bar", "baz", "qux"} -// oldProj := expression.NamesList(expression.Name("foo"), expression.Name("bar")) -// projection := oldProj.AddNames(expression.Name("baz"), expression.Name("qux")) +// // projection represents the list of names {"foo", "bar", "baz", "qux"} +// oldProj := expression.NamesList(expression.Name("foo"), expression.Name("bar")) +// projection := oldProj.AddNames(expression.Name("baz"), expression.Name("qux")) // -// // Used in another Projection Expression -// anotherProjection := expression.AddNames(projection, expression.Name("quux")) -// // Used to make an Builder -// builder := expression.NewBuilder().WithProjection(newProjection) +// // Used in another Projection Expression +// anotherProjection := expression.AddNames(projection, expression.Name("quux")) +// // Used to make an Builder +// builder := expression.NewBuilder().WithProjection(newProjection) // // Expression Equivalent: // -// expression.NamesList(expression.Name("foo"), expression.Name("bar")).AddNames(expression.Name("baz"), expression.Name("qux")) -// "foo, bar, baz, qux" +// expression.NamesList(expression.Name("foo"), expression.Name("bar")).AddNames(expression.Name("baz"), expression.Name("qux")) +// "foo, bar, baz, qux" func (pb ProjectionBuilder) AddNames(namesList ...NameBuilder) ProjectionBuilder { return AddNames(pb, namesList...) } diff --git a/feature/dynamodb/expression/update.go b/feature/dynamodb/expression/update.go index b82d3d4f523..1a9e807a5fd 100644 --- a/feature/dynamodb/expression/update.go +++ b/feature/dynamodb/expression/update.go @@ -97,21 +97,21 @@ func (ob operationBuilder) buildOperation() (exprNode, error) { // // Example: // -// // update represents the delete operation to delete the string value -// // "subsetToDelete" from the item attribute "pathToList" -// update := expression.Delete(expression.Name("pathToList"), expression.Value("subsetToDelete")) +// // update represents the delete operation to delete the string value +// // "subsetToDelete" from the item attribute "pathToList" +// update := expression.Delete(expression.Name("pathToList"), expression.Value("subsetToDelete")) // -// // Adding more update methods -// anotherUpdate := update.Remove(expression.Name("someName")) -// // Creating a Builder -// builder := Update(update) +// // Adding more update methods +// anotherUpdate := update.Remove(expression.Name("someName")) +// // Creating a Builder +// builder := Update(update) // // Expression Equivalent: // -// expression.Delete(expression.Name("pathToList"), expression.Value("subsetToDelete")) -// // let :del be an ExpressionAttributeValue representing the value -// // "subsetToDelete" -// "DELETE pathToList :del" +// expression.Delete(expression.Name("pathToList"), expression.Value("subsetToDelete")) +// // let :del be an ExpressionAttributeValue representing the value +// // "subsetToDelete" +// "DELETE pathToList :del" func Delete(name NameBuilder, value ValueBuilder) UpdateBuilder { emptyUpdateBuilder := UpdateBuilder{} return emptyUpdateBuilder.Delete(name, value) @@ -124,22 +124,22 @@ func Delete(name NameBuilder, value ValueBuilder) UpdateBuilder { // // Example: // -// // Let update represent an already existing update expression. Delete() -// // adds the operation to delete the value "subsetToDelete" from the item -// // attribute "pathToList" -// update := update.Delete(expression.Name("pathToList"), expression.Value("subsetToDelete")) +// // Let update represent an already existing update expression. Delete() +// // adds the operation to delete the value "subsetToDelete" from the item +// // attribute "pathToList" +// update := update.Delete(expression.Name("pathToList"), expression.Value("subsetToDelete")) // -// // Adding more update methods -// anotherUpdate := update.Remove(expression.Name("someName")) -// // Creating a Builder -// builder := Update(update) +// // Adding more update methods +// anotherUpdate := update.Remove(expression.Name("someName")) +// // Creating a Builder +// builder := Update(update) // // Expression Equivalent: // -// Delete(expression.Name("pathToList"), expression.Value("subsetToDelete")) -// // let :del be an ExpressionAttributeValue representing the value -// // "subsetToDelete" -// "DELETE pathToList :del" +// Delete(expression.Name("pathToList"), expression.Value("subsetToDelete")) +// // let :del be an ExpressionAttributeValue representing the value +// // "subsetToDelete" +// "DELETE pathToList :del" func (ub UpdateBuilder) Delete(name NameBuilder, value ValueBuilder) UpdateBuilder { if ub.operationList == nil { ub.operationList = map[operationMode][]operationBuilder{} @@ -160,20 +160,20 @@ func (ub UpdateBuilder) Delete(name NameBuilder, value ValueBuilder) UpdateBuild // // Example: // -// // update represents the add operation to add the value 5 to the item -// // attribute "aPath" -// update := expression.Add(expression.Name("aPath"), expression.Value(5)) +// // update represents the add operation to add the value 5 to the item +// // attribute "aPath" +// update := expression.Add(expression.Name("aPath"), expression.Value(5)) // -// // Adding more update methods -// anotherUpdate := update.Remove(expression.Name("someName")) -// // Creating a Builder -// builder := Update(update) +// // Adding more update methods +// anotherUpdate := update.Remove(expression.Name("someName")) +// // Creating a Builder +// builder := Update(update) // // Expression Equivalent: // -// expression.Add(expression.Name("aPath"), expression.Value(5)) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// "ADD aPath :5" +// expression.Add(expression.Name("aPath"), expression.Value(5)) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// "ADD aPath :5" func Add(name NameBuilder, value ValueBuilder) UpdateBuilder { emptyUpdateBuilder := UpdateBuilder{} return emptyUpdateBuilder.Add(name, value) @@ -186,20 +186,20 @@ func Add(name NameBuilder, value ValueBuilder) UpdateBuilder { // // Example: // -// // Let update represent an already existing update expression. Add() adds -// // the operation to add the value 5 to the item attribute "aPath" -// update := update.Add(expression.Name("aPath"), expression.Value(5)) +// // Let update represent an already existing update expression. Add() adds +// // the operation to add the value 5 to the item attribute "aPath" +// update := update.Add(expression.Name("aPath"), expression.Value(5)) // -// // Adding more update methods -// anotherUpdate := update.Remove(expression.Name("someName")) -// // Creating a Builder -// builder := Update(update) +// // Adding more update methods +// anotherUpdate := update.Remove(expression.Name("someName")) +// // Creating a Builder +// builder := Update(update) // // Expression Equivalent: // -// Add(expression.Name("aPath"), expression.Value(5)) -// // Let :five be an ExpressionAttributeValue representing the value 5 -// "ADD aPath :5" +// Add(expression.Name("aPath"), expression.Value(5)) +// // Let :five be an ExpressionAttributeValue representing the value 5 +// "ADD aPath :5" func (ub UpdateBuilder) Add(name NameBuilder, value ValueBuilder) UpdateBuilder { if ub.operationList == nil { ub.operationList = map[operationMode][]operationBuilder{} @@ -219,19 +219,19 @@ func (ub UpdateBuilder) Add(name NameBuilder, value ValueBuilder) UpdateBuilder // // Example: // -// // update represents the remove operation to remove the item attribute -// // "itemToRemove" -// update := expression.Remove(expression.Name("itemToRemove")) +// // update represents the remove operation to remove the item attribute +// // "itemToRemove" +// update := expression.Remove(expression.Name("itemToRemove")) // -// // Adding more update methods -// anotherUpdate := update.Remove(expression.Name("someName")) -// // Creating a Builder -// builder := Update(update) +// // Adding more update methods +// anotherUpdate := update.Remove(expression.Name("someName")) +// // Creating a Builder +// builder := Update(update) // // Expression Equivalent: // -// expression.Remove(expression.Name("itemToRemove")) -// "REMOVE itemToRemove" +// expression.Remove(expression.Name("itemToRemove")) +// "REMOVE itemToRemove" func Remove(name NameBuilder) UpdateBuilder { emptyUpdateBuilder := UpdateBuilder{} return emptyUpdateBuilder.Remove(name) @@ -244,19 +244,19 @@ func Remove(name NameBuilder) UpdateBuilder { // // Example: // -// // Let update represent an already existing update expression. Remove() -// // adds the operation to remove the item attribute "itemToRemove" -// update := update.Remove(expression.Name("itemToRemove")) +// // Let update represent an already existing update expression. Remove() +// // adds the operation to remove the item attribute "itemToRemove" +// update := update.Remove(expression.Name("itemToRemove")) // -// // Adding more update methods -// anotherUpdate := update.Remove(expression.Name("someName")) -// // Creating a Builder -// builder := Update(update) +// // Adding more update methods +// anotherUpdate := update.Remove(expression.Name("someName")) +// // Creating a Builder +// builder := Update(update) // // Expression Equivalent: // -// Remove(expression.Name("itemToRemove")) -// "REMOVE itemToRemove" +// Remove(expression.Name("itemToRemove")) +// "REMOVE itemToRemove" func (ub UpdateBuilder) Remove(name NameBuilder) UpdateBuilder { if ub.operationList == nil { ub.operationList = map[operationMode][]operationBuilder{} @@ -276,22 +276,22 @@ func (ub UpdateBuilder) Remove(name NameBuilder) UpdateBuilder { // // Example: // -// // update represents the set operation to set the item attribute -// // "itemToSet" to the value "setValue" if the item attribute does not -// // exist yet. (conditional write) -// update := expression.Set(expression.Name("itemToSet"), expression.IfNotExists(expression.Name("itemToSet"), expression.Value("setValue"))) +// // update represents the set operation to set the item attribute +// // "itemToSet" to the value "setValue" if the item attribute does not +// // exist yet. (conditional write) +// update := expression.Set(expression.Name("itemToSet"), expression.IfNotExists(expression.Name("itemToSet"), expression.Value("setValue"))) // -// // Adding more update methods -// anotherUpdate := update.Remove(expression.Name("someName")) -// // Creating a Builder -// builder := Update(update) +// // Adding more update methods +// anotherUpdate := update.Remove(expression.Name("someName")) +// // Creating a Builder +// builder := Update(update) // // Expression Equivalent: // -// expression.Set(expression.Name("itemToSet"), expression.IfNotExists(expression.Name("itemToSet"), expression.Value("setValue"))) -// // Let :val be an ExpressionAttributeValue representing the value -// // "setValue" -// "SET itemToSet = :val" +// expression.Set(expression.Name("itemToSet"), expression.IfNotExists(expression.Name("itemToSet"), expression.Value("setValue"))) +// // Let :val be an ExpressionAttributeValue representing the value +// // "setValue" +// "SET itemToSet = :val" func Set(name NameBuilder, operandBuilder OperandBuilder) UpdateBuilder { emptyUpdateBuilder := UpdateBuilder{} return emptyUpdateBuilder.Set(name, operandBuilder) @@ -305,23 +305,23 @@ func Set(name NameBuilder, operandBuilder OperandBuilder) UpdateBuilder { // // Example: // -// // Let update represent an already existing update expression. Set() adds -// // the operation to to set the item attribute "itemToSet" to the value -// // "setValue" if the item attribute does not exist yet. (conditional -// // write) -// update := update.Set(expression.Name("itemToSet"), expression.IfNotExists(expression.Name("itemToSet"), expression.Value("setValue"))) +// // Let update represent an already existing update expression. Set() adds +// // the operation to to set the item attribute "itemToSet" to the value +// // "setValue" if the item attribute does not exist yet. (conditional +// // write) +// update := update.Set(expression.Name("itemToSet"), expression.IfNotExists(expression.Name("itemToSet"), expression.Value("setValue"))) // -// // Adding more update methods -// anotherUpdate := update.Remove(expression.Name("someName")) -// // Creating a Builder -// builder := Update(update) +// // Adding more update methods +// anotherUpdate := update.Remove(expression.Name("someName")) +// // Creating a Builder +// builder := Update(update) // // Expression Equivalent: // -// Set(expression.Name("itemToSet"), expression.IfNotExists(expression.Name("itemToSet"), expression.Value("setValue"))) -// // Let :val be an ExpressionAttributeValue representing the value -// // "setValue" -// "SET itemToSet = :val" +// Set(expression.Name("itemToSet"), expression.IfNotExists(expression.Name("itemToSet"), expression.Value("setValue"))) +// // Let :val be an ExpressionAttributeValue representing the value +// // "setValue" +// "SET itemToSet = :val" func (ub UpdateBuilder) Set(name NameBuilder, operandBuilder OperandBuilder) UpdateBuilder { if ub.operationList == nil { ub.operationList = map[operationMode][]operationBuilder{} diff --git a/feature/dynamodbstreams/attributevalue/decode.go b/feature/dynamodbstreams/attributevalue/decode.go index ea0a8e67762..b722b3eec38 100644 --- a/feature/dynamodbstreams/attributevalue/decode.go +++ b/feature/dynamodbstreams/attributevalue/decode.go @@ -13,24 +13,25 @@ import ( // An Unmarshaler is an interface to provide custom unmarshaling of // AttributeValues. Use this to provide custom logic determining // how AttributeValues should be unmarshaled. -// type ExampleUnmarshaler struct { -// Value int -// } -// -// func (u *ExampleUnmarshaler) UnmarshalDynamoDBStreamsAttributeValue(av types.AttributeValue) error { -// avN, ok := av.(*types.AttributeValueMemberN) -// if !ok { -// return nil -// } -// -// n, err := strconv.ParseInt(avN.Value, 10, 0) -// if err != nil { -// return err -// } -// -// u.Value = int(n) -// return nil -// } +// +// type ExampleUnmarshaler struct { +// Value int +// } +// +// func (u *ExampleUnmarshaler) UnmarshalDynamoDBStreamsAttributeValue(av types.AttributeValue) error { +// avN, ok := av.(*types.AttributeValueMemberN) +// if !ok { +// return nil +// } +// +// n, err := strconv.ParseInt(avN.Value, 10, 0) +// if err != nil { +// return err +// } +// +// u.Value = int(n) +// return nil +// } type Unmarshaler interface { UnmarshalDynamoDBStreamsAttributeValue(types.AttributeValue) error } @@ -54,17 +55,17 @@ type Unmarshaler interface { // When decoding AttributeValues to interfaces Unmarshal will use the // following types. // -// []byte, AV Binary (B) -// [][]byte, AV Binary Set (BS) -// bool, AV Boolean (BOOL) -// []interface{}, AV List (L) -// map[string]interface{}, AV Map (M) -// float64, AV Number (N) -// Number, AV Number (N) with UseNumber set -// []float64, AV Number Set (NS) -// []Number, AV Number Set (NS) with UseNumber set -// string, AV String (S) -// []string, AV String Set (SS) +// []byte, AV Binary (B) +// [][]byte, AV Binary Set (BS) +// bool, AV Boolean (BOOL) +// []interface{}, AV List (L) +// map[string]interface{}, AV Map (M) +// float64, AV Number (N) +// Number, AV Number (N) with UseNumber set +// []float64, AV Number Set (NS) +// []Number, AV Number Set (NS) with UseNumber set +// string, AV String (S) +// []string, AV String Set (SS) // // If the Decoder option, UseNumber is set numbers will be unmarshaled // as Number values instead of float64. Use this to maintain the original @@ -101,17 +102,17 @@ func Unmarshal(av types.AttributeValue, out interface{}) error { // When decoding AttributeValues to interfaces Unmarshal will use the // following types. // -// []byte, AV Binary (B) -// [][]byte, AV Binary Set (BS) -// bool, AV Boolean (BOOL) -// []interface{}, AV List (L) -// map[string]interface{}, AV Map (M) -// float64, AV Number (N) -// Number, AV Number (N) with UseNumber set -// []float64, AV Number Set (NS) -// []Number, AV Number Set (NS) with UseNumber set -// string, AV String (S) -// []string, AV String Set (SS) +// []byte, AV Binary (B) +// [][]byte, AV Binary Set (BS) +// bool, AV Boolean (BOOL) +// []interface{}, AV List (L) +// map[string]interface{}, AV Map (M) +// float64, AV Number (N) +// Number, AV Number (N) with UseNumber set +// []float64, AV Number Set (NS) +// []Number, AV Number Set (NS) with UseNumber set +// string, AV String (S) +// []string, AV String Set (SS) // // If the Decoder option, UseNumber is set numbers will be unmarshaled // as Number values instead of float64. Use this to maintain the original diff --git a/feature/dynamodbstreams/attributevalue/doc.go b/feature/dynamodbstreams/attributevalue/doc.go index 1e282e0c198..ce8656f770f 100644 --- a/feature/dynamodbstreams/attributevalue/doc.go +++ b/feature/dynamodbstreams/attributevalue/doc.go @@ -10,14 +10,14 @@ // AttributeValue. See the feature/dynamodb/attributevalue package for // converting to DynamoDB AttributeValue types. // -// Converting AttributeValue between DynamoDB and DynamoDBStreams +// # Converting AttributeValue between DynamoDB and DynamoDBStreams // // The FromDynamoDBMap, FromDynamoDBList, and FromDynamoDB functions provide // the conversion utilities to convert a DynamoDB AttributeValue type to a // DynamoDBStreams AttributeValue type. Use these utilities when you need to // convert the AttributeValue type between the two APIs. // -// AttributeValue Unmarshaling +// # AttributeValue Unmarshaling // // To unmarshal an AttributeValue to a Go type you can use the Unmarshal, // UnmarshalList, UnmarshalMap, and UnmarshalListOfMaps functions. The List and @@ -28,35 +28,35 @@ // GetRecords operation. The items returned will be unmarshaled into the slice // of the Records struct. // -// type Record struct { -// ID string -// URLs []string -// } +// type Record struct { +// ID string +// URLs []string +// } // -// //... +// //... // -// result, err := client.GetRecords(context.Context(), &dynamodbstreams.GetRecordsInput{ -// ShardIterator: &shardIterator, -// }) -// if err != nil { -// return fmt.Errorf("failed to get records from stream, %w", err) -// } +// result, err := client.GetRecords(context.Context(), &dynamodbstreams.GetRecordsInput{ +// ShardIterator: &shardIterator, +// }) +// if err != nil { +// return fmt.Errorf("failed to get records from stream, %w", err) +// } // -// var records []Record -// for _, ddbRecord := range result.Records { -// if record.DynamoDB == nil { -// continue -// } +// var records []Record +// for _, ddbRecord := range result.Records { +// if record.DynamoDB == nil { +// continue +// } // -// var record -// err := attributevalue.UnmarshalMap(ddbRecord.NewImage, &record) -// if err != nil { -// return fmt.Errorf("failed to unmarshal record, %w", err)) -// } -// records = append(records, record) -// } +// var record +// err := attributevalue.UnmarshalMap(ddbRecord.NewImage, &record) +// if err != nil { +// return fmt.Errorf("failed to unmarshal record, %w", err)) +// } +// records = append(records, record) +// } // -// Struct tags +// # Struct tags // // The AttributeValue Marshal and Unmarshal functions support the `dynamodbav` // struct tag by default. Additional tags can be enabled with the diff --git a/feature/dynamodbstreams/attributevalue/encode.go b/feature/dynamodbstreams/attributevalue/encode.go index 7c30fc48afd..d190a36afb3 100644 --- a/feature/dynamodbstreams/attributevalue/encode.go +++ b/feature/dynamodbstreams/attributevalue/encode.go @@ -66,15 +66,14 @@ func (e *UnixTime) UnmarshalDynamoDBStreamsAttributeValue(av types.AttributeValu // to AttributeValues. Use this to provide custom logic determining how a // Go Value type should be marshaled. // -// type CustomIntType struct { -// Value Int -// } -// func (m *CustomIntType) MarshalDynamoDBStreamsAttributeValue() (types.AttributeValue, error) { -// return &types.AttributeValueMemberN{ -// Value: strconv.Itoa(m.Value), -// }, nil -// } -// +// type CustomIntType struct { +// Value Int +// } +// func (m *CustomIntType) MarshalDynamoDBStreamsAttributeValue() (types.AttributeValue, error) { +// return &types.AttributeValueMemberN{ +// Value: strconv.Itoa(m.Value), +// }, nil +// } type Marshaler interface { MarshalDynamoDBStreamsAttributeValue() (types.AttributeValue, error) } @@ -98,51 +97,51 @@ type Marshaler interface { // `dynamodbav` struct tag can be used to control how the value will be // marshaled into a AttributeValue. // -// // Field is ignored -// Field int `dynamodbav:"-"` +// // Field is ignored +// Field int `dynamodbav:"-"` // -// // Field AttributeValue map key "myName" -// Field int `dynamodbav:"myName"` +// // Field AttributeValue map key "myName" +// Field int `dynamodbav:"myName"` // -// // Field AttributeValue map key "myName", and -// // Field is omitted if the field is a zero value for the type. -// Field int `dynamodbav:"myName,omitempty"` +// // Field AttributeValue map key "myName", and +// // Field is omitted if the field is a zero value for the type. +// Field int `dynamodbav:"myName,omitempty"` // -// // Field AttributeValue map key "Field", and -// // Field is omitted if the field is a zero value for the type. -// Field int `dynamodbav:",omitempty"` +// // Field AttributeValue map key "Field", and +// // Field is omitted if the field is a zero value for the type. +// Field int `dynamodbav:",omitempty"` // -// // Field's elems will be omitted if the elem's value is empty. -// // only valid for slices, and maps. -// Field []string `dynamodbav:",omitemptyelem"` +// // Field's elems will be omitted if the elem's value is empty. +// // only valid for slices, and maps. +// Field []string `dynamodbav:",omitemptyelem"` // -// // Field AttributeValue map key "Field", and -// // Field is sent as NULL if the field is a zero value for the type. -// Field int `dynamodbav:",nullempty"` +// // Field AttributeValue map key "Field", and +// // Field is sent as NULL if the field is a zero value for the type. +// Field int `dynamodbav:",nullempty"` // -// // Field's elems will be sent as NULL if the elem's value a zero value -// // for the type. Only valid for slices, and maps. -// Field []string `dynamodbav:",nullemptyelem"` +// // Field's elems will be sent as NULL if the elem's value a zero value +// // for the type. Only valid for slices, and maps. +// Field []string `dynamodbav:",nullemptyelem"` // -// // Field will be marshaled as a AttributeValue string -// // only value for number types, (int,uint,float) -// Field int `dynamodbav:",string"` +// // Field will be marshaled as a AttributeValue string +// // only value for number types, (int,uint,float) +// Field int `dynamodbav:",string"` // -// // Field will be marshaled as a binary set -// Field [][]byte `dynamodbav:",binaryset"` +// // Field will be marshaled as a binary set +// Field [][]byte `dynamodbav:",binaryset"` // -// // Field will be marshaled as a number set -// Field []int `dynamodbav:",numberset"` +// // Field will be marshaled as a number set +// Field []int `dynamodbav:",numberset"` // -// // Field will be marshaled as a string set -// Field []string `dynamodbav:",stringset"` +// // Field will be marshaled as a string set +// Field []string `dynamodbav:",stringset"` // -// // Field will be marshaled as Unix time number in seconds. -// // This tag is only valid with time.Time typed struct fields. -// // Important to note that zero value time as unixtime is not 0 seconds -// // from January 1, 1970 UTC, but -62135596800. Which is seconds between -// // January 1, 0001 UTC, and January 1, 0001 UTC. -// Field time.Time `dynamodbav:",unixtime"` +// // Field will be marshaled as Unix time number in seconds. +// // This tag is only valid with time.Time typed struct fields. +// // Important to note that zero value time as unixtime is not 0 seconds +// // from January 1, 1970 UTC, but -62135596800. Which is seconds between +// // January 1, 0001 UTC, and January 1, 0001 UTC. +// Field time.Time `dynamodbav:",unixtime"` // // The omitempty tag is only used during Marshaling and is ignored for // Unmarshal. omitempty will skip any member if the Go value of the member is @@ -160,9 +159,9 @@ type Marshaler interface { // All struct fields and with anonymous fields, are marshaled unless the // any of the following conditions are meet. // -// - the field is not exported -// - json or dynamodbav field tag is "-" -// - json or dynamodbav field tag specifies "omitempty", and is a zero value. +// - the field is not exported +// - json or dynamodbav field tag is "-" +// - json or dynamodbav field tag specifies "omitempty", and is a zero value. // // Pointer and interfaces values are encoded as the value pointed to or // contained in the interface. A nil value encodes as the AttributeValue NULL @@ -201,51 +200,51 @@ func Marshal(in interface{}) (types.AttributeValue, error) { // `dynamodbav` struct tag can be used to control how the value will be // marshaled into a AttributeValue. // -// // Field is ignored -// Field int `dynamodbav:"-"` +// // Field is ignored +// Field int `dynamodbav:"-"` // -// // Field AttributeValue map key "myName" -// Field int `dynamodbav:"myName"` +// // Field AttributeValue map key "myName" +// Field int `dynamodbav:"myName"` // -// // Field AttributeValue map key "myName", and -// // Field is omitted if the field is a zero value for the type. -// Field int `dynamodbav:"myName,omitempty"` +// // Field AttributeValue map key "myName", and +// // Field is omitted if the field is a zero value for the type. +// Field int `dynamodbav:"myName,omitempty"` // -// // Field AttributeValue map key "Field", and -// // Field is omitted if the field is a zero value for the type. -// Field int `dynamodbav:",omitempty"` +// // Field AttributeValue map key "Field", and +// // Field is omitted if the field is a zero value for the type. +// Field int `dynamodbav:",omitempty"` // -// // Field's elems will be omitted if the elem's value is empty. -// // only valid for slices, and maps. -// Field []string `dynamodbav:",omitemptyelem"` +// // Field's elems will be omitted if the elem's value is empty. +// // only valid for slices, and maps. +// Field []string `dynamodbav:",omitemptyelem"` // -// // Field AttributeValue map key "Field", and -// // Field is sent as NULL if the field is a zero value for the type. -// Field int `dynamodbav:",nullempty"` +// // Field AttributeValue map key "Field", and +// // Field is sent as NULL if the field is a zero value for the type. +// Field int `dynamodbav:",nullempty"` // -// // Field's elems will be sent as NULL if the elem's value a zero value -// // for the type. Only valid for slices, and maps. -// Field []string `dynamodbav:",nullemptyelem"` +// // Field's elems will be sent as NULL if the elem's value a zero value +// // for the type. Only valid for slices, and maps. +// Field []string `dynamodbav:",nullemptyelem"` // -// // Field will be marshaled as a AttributeValue string -// // only value for number types, (int,uint,float) -// Field int `dynamodbav:",string"` +// // Field will be marshaled as a AttributeValue string +// // only value for number types, (int,uint,float) +// Field int `dynamodbav:",string"` // -// // Field will be marshaled as a binary set -// Field [][]byte `dynamodbav:",binaryset"` +// // Field will be marshaled as a binary set +// Field [][]byte `dynamodbav:",binaryset"` // -// // Field will be marshaled as a number set -// Field []int `dynamodbav:",numberset"` +// // Field will be marshaled as a number set +// Field []int `dynamodbav:",numberset"` // -// // Field will be marshaled as a string set -// Field []string `dynamodbav:",stringset"` +// // Field will be marshaled as a string set +// Field []string `dynamodbav:",stringset"` // -// // Field will be marshaled as Unix time number in seconds. -// // This tag is only valid with time.Time typed struct fields. -// // Important to note that zero value time as unixtime is not 0 seconds -// // from January 1, 1970 UTC, but -62135596800. Which is seconds between -// // January 1, 0001 UTC, and January 1, 0001 UTC. -// Field time.Time `dynamodbav:",unixtime"` +// // Field will be marshaled as Unix time number in seconds. +// // This tag is only valid with time.Time typed struct fields. +// // Important to note that zero value time as unixtime is not 0 seconds +// // from January 1, 1970 UTC, but -62135596800. Which is seconds between +// // January 1, 0001 UTC, and January 1, 0001 UTC. +// Field time.Time `dynamodbav:",unixtime"` // // The omitempty tag is only used during Marshaling and is ignored for // Unmarshal. omitempty will skip any member if the Go value of the member is @@ -263,9 +262,9 @@ func Marshal(in interface{}) (types.AttributeValue, error) { // All struct fields and with anonymous fields, are marshaled unless the // any of the following conditions are meet. // -// - the field is not exported -// - json or dynamodbav field tag is "-" -// - json or dynamodbav field tag specifies "omitempty", and is a zero value. +// - the field is not exported +// - json or dynamodbav field tag is "-" +// - json or dynamodbav field tag specifies "omitempty", and is a zero value. // // Pointer and interfaces values are encoded as the value pointed to or // contained in the interface. A nil value encodes as the AttributeValue NULL diff --git a/feature/ec2/imds/request_middleware_test.go b/feature/ec2/imds/request_middleware_test.go index 8aee6fb93bc..28310fce927 100644 --- a/feature/ec2/imds/request_middleware_test.go +++ b/feature/ec2/imds/request_middleware_test.go @@ -208,7 +208,7 @@ func TestOperationTimeoutMiddleware_withCustomDeadline(t *testing.T) { // Ensure that the response body is read in the deserialize middleware, // ensuring that the timeoutOperation middleware won't race canceling the // context with the upstream reading the response body. -// * https://github.com/aws/aws-sdk-go-v2/issues/1253 +// - https://github.com/aws/aws-sdk-go-v2/issues/1253 func TestDeserailizeResponse_cacheBody(t *testing.T) { type Output struct { Content io.ReadCloser diff --git a/feature/rds/auth/connect.go b/feature/rds/auth/connect.go index 8bd18a8e00d..5e07c626ef1 100644 --- a/feature/rds/auth/connect.go +++ b/feature/rds/auth/connect.go @@ -30,16 +30,16 @@ type BuildAuthTokenOptions struct{} // The following example shows how to use BuildAuthToken to create an authentication // token for connecting to a MySQL database in RDS. // -// authToken, err := BuildAuthToken(dbEndpoint, awsRegion, dbUser, awsCreds) +// authToken, err := BuildAuthToken(dbEndpoint, awsRegion, dbUser, awsCreds) // -// // Create the MySQL DNS string for the DB connection -// // user:password@protocol(endpoint)/dbname? -// connectStr = fmt.Sprintf("%s:%s@tcp(%s)/%s?allowCleartextPasswords=true&tls=rds", -// dbUser, authToken, dbEndpoint, dbName, -// ) +// // Create the MySQL DNS string for the DB connection +// // user:password@protocol(endpoint)/dbname? +// connectStr = fmt.Sprintf("%s:%s@tcp(%s)/%s?allowCleartextPasswords=true&tls=rds", +// dbUser, authToken, dbEndpoint, dbName, +// ) // -// // Use db to perform SQL operations on database -// db, err := sql.Open("mysql", connectStr) +// // Use db to perform SQL operations on database +// db, err := sql.Open("mysql", connectStr) // // See http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html // for more information on using IAM database authentication with RDS. diff --git a/feature/s3/manager/upload.go b/feature/s3/manager/upload.go index 3e80df4111f..d68246c2b86 100644 --- a/feature/s3/manager/upload.go +++ b/feature/s3/manager/upload.go @@ -50,7 +50,6 @@ const DefaultUploadConcurrency = 5 // fmt.Printf("upload failure, %s\n", err.Error()) // } // } -// type MultiUploadFailure interface { error @@ -72,7 +71,7 @@ type multiUploadError struct { // batchItemError returns the string representation of the error. // -// See apierr.BaseError ErrorWithExtra for output format +// # See apierr.BaseError ErrorWithExtra for output format // // Satisfies the error interface. func (m *multiUploadError) Error() string { @@ -167,7 +166,7 @@ func WithUploaderRequestOptions(opts ...func(*s3.Options)) func(*Uploader) { // on this structure for multiple objects and across concurrent goroutines. // Mutating the Uploader's properties is not safe to be done concurrently. // -// Pre-computed Checksums +// # Pre-computed Checksums // // Care must be taken when using pre-computed checksums the transfer upload // manager. The format and value of the checksum differs based on if the upload @@ -188,7 +187,7 @@ func WithUploaderRequestOptions(opts ...func(*s3.Options)) func(*Uploader) { // ContentMD5 for multipart upload is explicitly ignored for multipart upload, // and its value is suppressed. // -// Automatically Computed Checksums +// # Automatically Computed Checksums // // When the ChecksumAlgorithm member of Upload's input parameter PutObjectInput // is set to a valid value, the SDK will automatically compute the checksum of @@ -250,6 +249,7 @@ type Uploader struct { // satisfies the client.ConfigProvider interface. // // Example: +// // // Load AWS Config // cfg, err := config.LoadDefaultConfig(context.TODO()) // if err != nil { diff --git a/internal/awstesting/assert.go b/internal/awstesting/assert.go index faee3151b19..e9e5bf34b20 100644 --- a/internal/awstesting/assert.go +++ b/internal/awstesting/assert.go @@ -165,7 +165,7 @@ func objectsAreEqual(expected, actual interface{}) bool { // Equal asserts that two objects are equal. // -// assert.Equal(t, 123, 123, "123 and 123 should be equal") +// assert.Equal(t, 123, 123, "123 and 123 should be equal") // // Returns whether the assertion was successful (true) or not (false). // diff --git a/internal/ini/doc.go b/internal/ini/doc.go index 1e55bbd07b9..fdd5321b4c6 100644 --- a/internal/ini/doc.go +++ b/internal/ini/doc.go @@ -13,30 +13,31 @@ // } // // Below is the BNF that describes this parser -// Grammar: -// stmt -> section | stmt' -// stmt' -> epsilon | expr -// expr -> value (stmt)* | equal_expr (stmt)* -// equal_expr -> value ( ':' | '=' ) equal_expr' -// equal_expr' -> number | string | quoted_string -// quoted_string -> " quoted_string' -// quoted_string' -> string quoted_string_end -// quoted_string_end -> " -// -// section -> [ section' -// section' -> section_value section_close -// section_value -> number | string_subset | boolean | quoted_string_subset -// quoted_string_subset -> " quoted_string_subset' -// quoted_string_subset' -> string_subset quoted_string_end -// quoted_string_subset -> " -// section_close -> ] -// -// value -> number | string_subset | boolean -// string -> ? UTF-8 Code-Points except '\n' (U+000A) and '\r\n' (U+000D U+000A) ? -// string_subset -> ? Code-points excepted by grammar except ':' (U+003A), '=' (U+003D), '[' (U+005B), and ']' (U+005D) ? -// -// SkipState will skip (NL WS)+ -// -// comment -> # comment' | ; comment' -// comment' -> epsilon | value +// +// Grammar: +// stmt -> section | stmt' +// stmt' -> epsilon | expr +// expr -> value (stmt)* | equal_expr (stmt)* +// equal_expr -> value ( ':' | '=' ) equal_expr' +// equal_expr' -> number | string | quoted_string +// quoted_string -> " quoted_string' +// quoted_string' -> string quoted_string_end +// quoted_string_end -> " +// +// section -> [ section' +// section' -> section_value section_close +// section_value -> number | string_subset | boolean | quoted_string_subset +// quoted_string_subset -> " quoted_string_subset' +// quoted_string_subset' -> string_subset quoted_string_end +// quoted_string_subset -> " +// section_close -> ] +// +// value -> number | string_subset | boolean +// string -> ? UTF-8 Code-Points except '\n' (U+000A) and '\r\n' (U+000D U+000A) ? +// string_subset -> ? Code-points excepted by grammar except ':' (U+003A), '=' (U+003D), '[' (U+005B), and ']' (U+005D) ? +// +// SkipState will skip (NL WS)+ +// +// comment -> # comment' | ; comment' +// comment' -> epsilon | value package ini diff --git a/internal/ini/literal_tokens_test.go b/internal/ini/literal_tokens_test.go index ec14d0c9298..489155a454b 100644 --- a/internal/ini/literal_tokens_test.go +++ b/internal/ini/literal_tokens_test.go @@ -159,8 +159,8 @@ func TestNewLiteralToken(t *testing.T) { ), }, { - name: "utf8 whitespace", - b: []rune("0 0"), + name: "utf8 whitespace", + b: []rune("0 0"), expectedRead: 1, expectedToken: newToken(TokenLit, []rune("0"), @@ -168,8 +168,8 @@ func TestNewLiteralToken(t *testing.T) { ), }, { - name: "utf8 whitespace expr", - b: []rune("0=0 0"), + name: "utf8 whitespace expr", + b: []rune("0=0 0"), expectedRead: 1, expectedToken: newToken(TokenLit, []rune("0"), diff --git a/internal/protocoltest/awsrestjson/document/doc.go b/internal/protocoltest/awsrestjson/document/doc.go index 49b6226bd0c..2b06b14f3cd 100644 --- a/internal/protocoltest/awsrestjson/document/doc.go +++ b/internal/protocoltest/awsrestjson/document/doc.go @@ -11,21 +11,21 @@ // // The following examples show how you can create document types using basic Go types. // -// NewLazyDocument(map[string]interface{}{ -// "favoriteNumber": 42, -// "fruits": []string{"apple", "orange"}, -// "capitals": map[string]interface{}{ -// "Washington": "Olympia", -// "Oregon": "Salem", -// }, -// "skyIsBlue": true, -// }) +// NewLazyDocument(map[string]interface{}{ +// "favoriteNumber": 42, +// "fruits": []string{"apple", "orange"}, +// "capitals": map[string]interface{}{ +// "Washington": "Olympia", +// "Oregon": "Salem", +// }, +// "skyIsBlue": true, +// }) // -// NewLazyDocument(3.14159) +// NewLazyDocument(3.14159) // -// NewLazyDocument([]interface{"One", 2, 3, 3.5, "four"}) +// NewLazyDocument([]interface{"One", 2, 3, 3.5, "four"}) // -// NewLazyDocument(true) +// NewLazyDocument(true) // // Services can send document types as part of their API responses. To retrieve the content of a response document // you use the UnmarshalSmithyDocument method on the response document. When calling UnmarshalSmithyDocument you pass @@ -33,35 +33,34 @@ // // For example, if you expect to receive key/value map from the service response: // -// var kv map[string]interface{} -// if err := outputDocument.UnmarshalSmithyDocument(&kv); err != nil { -// // handle error -// } +// var kv map[string]interface{} +// if err := outputDocument.UnmarshalSmithyDocument(&kv); err != nil { +// // handle error +// } // // If a service can return one or more data-types in the response, you can use an empty interface and type switch to // dynamically handle the response type. // -// var v interface{} -// if err := outputDocument.UnmarshalSmithyDocument(&v); err != nil { -// // handle error -// } +// var v interface{} +// if err := outputDocument.UnmarshalSmithyDocument(&v); err != nil { +// // handle error +// } // -// switch vv := v.(type) { -// case map[string]interface{}: -// // handle key/value map -// case []interface{}: -// // handle array of values -// case bool: -// // handle boolean -// case document.Number: -// // handle an arbitrary precision number -// case string: -// // handle string -// default: -// // handle unknown case -// } +// switch vv := v.(type) { +// case map[string]interface{}: +// // handle key/value map +// case []interface{}: +// // handle array of values +// case bool: +// // handle boolean +// case document.Number: +// // handle an arbitrary precision number +// case string: +// // handle string +// default: +// // handle unknown case +// } // // The mapping of Go types to document types is covered in more depth in https://pkg.go.dev/github.com/aws/smithy-go/document // including more in depth examples that cover user-defined structure types. -// package document diff --git a/internal/protocoltest/awsrestjson/types/types.go b/internal/protocoltest/awsrestjson/types/types.go index 18d55c662d2..7f0c939ee9a 100644 --- a/internal/protocoltest/awsrestjson/types/types.go +++ b/internal/protocoltest/awsrestjson/types/types.go @@ -16,16 +16,17 @@ type ComplexNestedErrorData struct { // A union with a representative set of types for members. // // The following types satisfy this interface: -// MyUnionMemberBlobValue -// MyUnionMemberBooleanValue -// MyUnionMemberEnumValue -// MyUnionMemberListValue -// MyUnionMemberMapValue -// MyUnionMemberNumberValue -// MyUnionMemberRenamedStructureValue -// MyUnionMemberStringValue -// MyUnionMemberStructureValue -// MyUnionMemberTimestampValue +// +// MyUnionMemberBlobValue +// MyUnionMemberBooleanValue +// MyUnionMemberEnumValue +// MyUnionMemberListValue +// MyUnionMemberMapValue +// MyUnionMemberNumberValue +// MyUnionMemberRenamedStructureValue +// MyUnionMemberStringValue +// MyUnionMemberStructureValue +// MyUnionMemberTimestampValue type MyUnion interface { isMyUnion() } @@ -125,7 +126,8 @@ type PayloadConfig struct { } // The following types satisfy this interface: -// PlayerActionMemberQuit +// +// PlayerActionMemberQuit type PlayerAction interface { isPlayerAction() } @@ -156,8 +158,9 @@ type RecursiveShapesInputOutputNested2 struct { } // The following types satisfy this interface: -// SimpleUnionMemberInt -// SimpleUnionMemberString +// +// SimpleUnionMemberInt +// SimpleUnionMemberString type SimpleUnion interface { isSimpleUnion() } diff --git a/internal/protocoltest/jsonrpc/doc.go b/internal/protocoltest/jsonrpc/doc.go index bb9710a0b81..b486d9624fb 100644 --- a/internal/protocoltest/jsonrpc/doc.go +++ b/internal/protocoltest/jsonrpc/doc.go @@ -2,5 +2,4 @@ // Package jsonrpc provides the API client, operations, and parameter types for // Sample Json 1.1 Protocol Service. -// package jsonrpc diff --git a/internal/protocoltest/jsonrpc/document/doc.go b/internal/protocoltest/jsonrpc/document/doc.go index 49b6226bd0c..2b06b14f3cd 100644 --- a/internal/protocoltest/jsonrpc/document/doc.go +++ b/internal/protocoltest/jsonrpc/document/doc.go @@ -11,21 +11,21 @@ // // The following examples show how you can create document types using basic Go types. // -// NewLazyDocument(map[string]interface{}{ -// "favoriteNumber": 42, -// "fruits": []string{"apple", "orange"}, -// "capitals": map[string]interface{}{ -// "Washington": "Olympia", -// "Oregon": "Salem", -// }, -// "skyIsBlue": true, -// }) +// NewLazyDocument(map[string]interface{}{ +// "favoriteNumber": 42, +// "fruits": []string{"apple", "orange"}, +// "capitals": map[string]interface{}{ +// "Washington": "Olympia", +// "Oregon": "Salem", +// }, +// "skyIsBlue": true, +// }) // -// NewLazyDocument(3.14159) +// NewLazyDocument(3.14159) // -// NewLazyDocument([]interface{"One", 2, 3, 3.5, "four"}) +// NewLazyDocument([]interface{"One", 2, 3, 3.5, "four"}) // -// NewLazyDocument(true) +// NewLazyDocument(true) // // Services can send document types as part of their API responses. To retrieve the content of a response document // you use the UnmarshalSmithyDocument method on the response document. When calling UnmarshalSmithyDocument you pass @@ -33,35 +33,34 @@ // // For example, if you expect to receive key/value map from the service response: // -// var kv map[string]interface{} -// if err := outputDocument.UnmarshalSmithyDocument(&kv); err != nil { -// // handle error -// } +// var kv map[string]interface{} +// if err := outputDocument.UnmarshalSmithyDocument(&kv); err != nil { +// // handle error +// } // // If a service can return one or more data-types in the response, you can use an empty interface and type switch to // dynamically handle the response type. // -// var v interface{} -// if err := outputDocument.UnmarshalSmithyDocument(&v); err != nil { -// // handle error -// } +// var v interface{} +// if err := outputDocument.UnmarshalSmithyDocument(&v); err != nil { +// // handle error +// } // -// switch vv := v.(type) { -// case map[string]interface{}: -// // handle key/value map -// case []interface{}: -// // handle array of values -// case bool: -// // handle boolean -// case document.Number: -// // handle an arbitrary precision number -// case string: -// // handle string -// default: -// // handle unknown case -// } +// switch vv := v.(type) { +// case map[string]interface{}: +// // handle key/value map +// case []interface{}: +// // handle array of values +// case bool: +// // handle boolean +// case document.Number: +// // handle an arbitrary precision number +// case string: +// // handle string +// default: +// // handle unknown case +// } // // The mapping of Go types to document types is covered in more depth in https://pkg.go.dev/github.com/aws/smithy-go/document // including more in depth examples that cover user-defined structure types. -// package document diff --git a/internal/protocoltest/jsonrpc/types/types.go b/internal/protocoltest/jsonrpc/types/types.go index da6223a5560..cfba4c8d00d 100644 --- a/internal/protocoltest/jsonrpc/types/types.go +++ b/internal/protocoltest/jsonrpc/types/types.go @@ -77,15 +77,16 @@ type KitchenSink struct { // A union with a representative set of types for members. // // The following types satisfy this interface: -// MyUnionMemberBlobValue -// MyUnionMemberBooleanValue -// MyUnionMemberEnumValue -// MyUnionMemberListValue -// MyUnionMemberMapValue -// MyUnionMemberNumberValue -// MyUnionMemberStringValue -// MyUnionMemberStructureValue -// MyUnionMemberTimestampValue +// +// MyUnionMemberBlobValue +// MyUnionMemberBooleanValue +// MyUnionMemberEnumValue +// MyUnionMemberListValue +// MyUnionMemberMapValue +// MyUnionMemberNumberValue +// MyUnionMemberStringValue +// MyUnionMemberStructureValue +// MyUnionMemberTimestampValue type MyUnion interface { isMyUnion() } diff --git a/internal/protocoltest/jsonrpc10/doc.go b/internal/protocoltest/jsonrpc10/doc.go index 3b1a99e7765..ab5e3a40641 100644 --- a/internal/protocoltest/jsonrpc10/doc.go +++ b/internal/protocoltest/jsonrpc10/doc.go @@ -2,5 +2,4 @@ // Package jsonrpc10 provides the API client, operations, and parameter types for // the API. -// package jsonrpc10 diff --git a/internal/protocoltest/jsonrpc10/types/types.go b/internal/protocoltest/jsonrpc10/types/types.go index dc742a8d9a5..aaed8ff80d3 100644 --- a/internal/protocoltest/jsonrpc10/types/types.go +++ b/internal/protocoltest/jsonrpc10/types/types.go @@ -16,15 +16,16 @@ type ComplexNestedErrorData struct { // A union with a representative set of types for members. // // The following types satisfy this interface: -// MyUnionMemberBlobValue -// MyUnionMemberBooleanValue -// MyUnionMemberEnumValue -// MyUnionMemberListValue -// MyUnionMemberMapValue -// MyUnionMemberNumberValue -// MyUnionMemberStringValue -// MyUnionMemberStructureValue -// MyUnionMemberTimestampValue +// +// MyUnionMemberBlobValue +// MyUnionMemberBooleanValue +// MyUnionMemberEnumValue +// MyUnionMemberListValue +// MyUnionMemberMapValue +// MyUnionMemberNumberValue +// MyUnionMemberStringValue +// MyUnionMemberStructureValue +// MyUnionMemberTimestampValue type MyUnion interface { isMyUnion() } diff --git a/internal/protocoltest/restxml/types/types.go b/internal/protocoltest/restxml/types/types.go index 0fdfcbe8e34..041d802d22c 100644 --- a/internal/protocoltest/restxml/types/types.go +++ b/internal/protocoltest/restxml/types/types.go @@ -99,16 +99,17 @@ type XmlNestedUnionStruct struct { } // The following types satisfy this interface: -// XmlUnionShapeMemberBooleanValue -// XmlUnionShapeMemberByteValue -// XmlUnionShapeMemberDoubleValue -// XmlUnionShapeMemberFloatValue -// XmlUnionShapeMemberIntegerValue -// XmlUnionShapeMemberLongValue -// XmlUnionShapeMemberShortValue -// XmlUnionShapeMemberStringValue -// XmlUnionShapeMemberStructValue -// XmlUnionShapeMemberUnionValue +// +// XmlUnionShapeMemberBooleanValue +// XmlUnionShapeMemberByteValue +// XmlUnionShapeMemberDoubleValue +// XmlUnionShapeMemberFloatValue +// XmlUnionShapeMemberIntegerValue +// XmlUnionShapeMemberLongValue +// XmlUnionShapeMemberShortValue +// XmlUnionShapeMemberStringValue +// XmlUnionShapeMemberStructValue +// XmlUnionShapeMemberUnionValue type XmlUnionShape interface { isXmlUnionShape() } diff --git a/internal/v4a/internal/crypto/compare.go b/internal/v4a/internal/crypto/compare.go index a93ec40c8a8..1d0f25f8c20 100644 --- a/internal/v4a/internal/crypto/compare.go +++ b/internal/v4a/internal/crypto/compare.go @@ -5,10 +5,10 @@ import "fmt" // ConstantTimeByteCompare is a constant-time byte comparison of x and y. This function performs an absolute comparison // if the two byte slices assuming they represent a big-endian number. // -// error if len(x) != len(y) -// -1 if x < y -// 0 if x == y -// +1 if x > y +// error if len(x) != len(y) +// -1 if x < y +// 0 if x == y +// +1 if x > y func ConstantTimeByteCompare(x, y []byte) (int, error) { if len(x) != len(y) { return 0, fmt.Errorf("slice lengths do not match") diff --git a/service/accessanalyzer/types/types.go b/service/accessanalyzer/types/types.go index 005b6978e02..eaac7acabac 100644 --- a/service/accessanalyzer/types/types.go +++ b/service/accessanalyzer/types/types.go @@ -202,8 +202,9 @@ type AccessPreviewSummary struct { // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAcl.html). // // The following types satisfy this interface: -// AclGranteeMemberId -// AclGranteeMemberUri +// +// AclGranteeMemberId +// AclGranteeMemberUri type AclGrantee interface { isAclGrantee() } @@ -443,11 +444,12 @@ type CloudTrailProperties struct { // control configuration. // // The following types satisfy this interface: -// ConfigurationMemberIamRole -// ConfigurationMemberKmsKey -// ConfigurationMemberS3Bucket -// ConfigurationMemberSecretsManagerSecret -// ConfigurationMemberSqsQueue +// +// ConfigurationMemberIamRole +// ConfigurationMemberKmsKey +// ConfigurationMemberS3Bucket +// ConfigurationMemberSecretsManagerSecret +// ConfigurationMemberSqsQueue type Configuration interface { isConfiguration() } @@ -932,8 +934,9 @@ type Location struct { // (https://docs.aws.amazon.com/AmazonS3/latest/dev/creating-access-points.html). // // The following types satisfy this interface: -// NetworkOriginConfigurationMemberInternetConfiguration -// NetworkOriginConfigurationMemberVpcConfiguration +// +// NetworkOriginConfigurationMemberInternetConfiguration +// NetworkOriginConfigurationMemberVpcConfiguration type NetworkOriginConfiguration interface { isNetworkOriginConfiguration() } @@ -963,10 +966,11 @@ func (*NetworkOriginConfigurationMemberVpcConfiguration) isNetworkOriginConfigur // A single element in a path through the JSON representation of a policy. // // The following types satisfy this interface: -// PathElementMemberIndex -// PathElementMemberKey -// PathElementMemberSubstring -// PathElementMemberValue +// +// PathElementMemberIndex +// PathElementMemberKey +// PathElementMemberSubstring +// PathElementMemberValue type PathElement interface { isPathElement() } diff --git a/service/apigatewayv2/api_op_ImportApi.go b/service/apigatewayv2/api_op_ImportApi.go index bda4c36a4ab..906f333a429 100644 --- a/service/apigatewayv2/api_op_ImportApi.go +++ b/service/apigatewayv2/api_op_ImportApi.go @@ -28,7 +28,6 @@ func (c *Client) ImportApi(ctx context.Context, params *ImportApiInput, optFns . return out, nil } -// type ImportApiInput struct { // The OpenAPI definition. Supported only for HTTP APIs. diff --git a/service/apigatewayv2/api_op_ReimportApi.go b/service/apigatewayv2/api_op_ReimportApi.go index 4f5a0017cee..4defdc5babb 100644 --- a/service/apigatewayv2/api_op_ReimportApi.go +++ b/service/apigatewayv2/api_op_ReimportApi.go @@ -28,7 +28,6 @@ func (c *Client) ReimportApi(ctx context.Context, params *ReimportApiInput, optF return out, nil } -// type ReimportApiInput struct { // The API identifier. diff --git a/service/appconfig/types/types.go b/service/appconfig/types/types.go index d9607f1356f..a272546c7d0 100644 --- a/service/appconfig/types/types.go +++ b/service/appconfig/types/types.go @@ -117,7 +117,8 @@ type AppliedExtension struct { // specified by a call. // // The following types satisfy this interface: -// BadRequestDetailsMemberInvalidConfiguration +// +// BadRequestDetailsMemberInvalidConfiguration type BadRequestDetails interface { isBadRequestDetails() } diff --git a/service/appconfigdata/types/types.go b/service/appconfigdata/types/types.go index 969de6f3e67..c77992a1176 100644 --- a/service/appconfigdata/types/types.go +++ b/service/appconfigdata/types/types.go @@ -10,7 +10,8 @@ import ( // specified by a call. // // The following types satisfy this interface: -// BadRequestDetailsMemberInvalidParameters +// +// BadRequestDetailsMemberInvalidParameters type BadRequestDetails interface { isBadRequestDetails() } diff --git a/service/applicationdiscoveryservice/types/errors.go b/service/applicationdiscoveryservice/types/errors.go index d664c9665b4..288327e00af 100644 --- a/service/applicationdiscoveryservice/types/errors.go +++ b/service/applicationdiscoveryservice/types/errors.go @@ -27,7 +27,6 @@ func (e *AuthorizationErrorException) ErrorMessage() string { func (e *AuthorizationErrorException) ErrorCode() string { return "AuthorizationErrorException" } func (e *AuthorizationErrorException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ConflictErrorException struct { Message *string diff --git a/service/appmesh/api_op_CreateMesh.go b/service/appmesh/api_op_CreateMesh.go index e870cbc8250..00c773f48f4 100644 --- a/service/appmesh/api_op_CreateMesh.go +++ b/service/appmesh/api_op_CreateMesh.go @@ -33,7 +33,6 @@ func (c *Client) CreateMesh(ctx context.Context, params *CreateMeshInput, optFns return out, nil } -// type CreateMeshInput struct { // The name to use for the service mesh. @@ -57,7 +56,6 @@ type CreateMeshInput struct { noSmithyDocumentSerde } -// type CreateMeshOutput struct { // The full description of your service mesh following the create call. diff --git a/service/appmesh/api_op_CreateRoute.go b/service/appmesh/api_op_CreateRoute.go index b8be6a187be..559815ff5a6 100644 --- a/service/appmesh/api_op_CreateRoute.go +++ b/service/appmesh/api_op_CreateRoute.go @@ -31,7 +31,6 @@ func (c *Client) CreateRoute(ctx context.Context, params *CreateRouteInput, optF return out, nil } -// type CreateRouteInput struct { // The name of the service mesh to create the route in. @@ -76,7 +75,6 @@ type CreateRouteInput struct { noSmithyDocumentSerde } -// type CreateRouteOutput struct { // The full description of your mesh following the create call. diff --git a/service/appmesh/api_op_CreateVirtualNode.go b/service/appmesh/api_op_CreateVirtualNode.go index b73222bc26a..2ddd05f0e63 100644 --- a/service/appmesh/api_op_CreateVirtualNode.go +++ b/service/appmesh/api_op_CreateVirtualNode.go @@ -50,7 +50,6 @@ func (c *Client) CreateVirtualNode(ctx context.Context, params *CreateVirtualNod return out, nil } -// type CreateVirtualNodeInput struct { // The name of the service mesh to create the virtual node in. @@ -88,7 +87,6 @@ type CreateVirtualNodeInput struct { noSmithyDocumentSerde } -// type CreateVirtualNodeOutput struct { // The full description of your virtual node following the create call. diff --git a/service/appmesh/api_op_CreateVirtualRouter.go b/service/appmesh/api_op_CreateVirtualRouter.go index 9355972b026..7312e432d7b 100644 --- a/service/appmesh/api_op_CreateVirtualRouter.go +++ b/service/appmesh/api_op_CreateVirtualRouter.go @@ -35,7 +35,6 @@ func (c *Client) CreateVirtualRouter(ctx context.Context, params *CreateVirtualR return out, nil } -// type CreateVirtualRouterInput struct { // The name of the service mesh to create the virtual router in. @@ -73,7 +72,6 @@ type CreateVirtualRouterInput struct { noSmithyDocumentSerde } -// type CreateVirtualRouterOutput struct { // The full description of your virtual router following the create call. diff --git a/service/appmesh/api_op_CreateVirtualService.go b/service/appmesh/api_op_CreateVirtualService.go index d2fe8794527..c453d194a97 100644 --- a/service/appmesh/api_op_CreateVirtualService.go +++ b/service/appmesh/api_op_CreateVirtualService.go @@ -34,7 +34,6 @@ func (c *Client) CreateVirtualService(ctx context.Context, params *CreateVirtual return out, nil } -// type CreateVirtualServiceInput struct { // The name of the service mesh to create the virtual service in. @@ -72,7 +71,6 @@ type CreateVirtualServiceInput struct { noSmithyDocumentSerde } -// type CreateVirtualServiceOutput struct { // The full description of your virtual service following the create call. diff --git a/service/appmesh/api_op_DeleteMesh.go b/service/appmesh/api_op_DeleteMesh.go index 3ddc951c56c..7287f53b635 100644 --- a/service/appmesh/api_op_DeleteMesh.go +++ b/service/appmesh/api_op_DeleteMesh.go @@ -29,7 +29,6 @@ func (c *Client) DeleteMesh(ctx context.Context, params *DeleteMeshInput, optFns return out, nil } -// type DeleteMeshInput struct { // The name of the service mesh to delete. @@ -40,7 +39,6 @@ type DeleteMeshInput struct { noSmithyDocumentSerde } -// type DeleteMeshOutput struct { // The service mesh that was deleted. diff --git a/service/appmesh/api_op_DeleteRoute.go b/service/appmesh/api_op_DeleteRoute.go index cd67b47cdb1..492f598480e 100644 --- a/service/appmesh/api_op_DeleteRoute.go +++ b/service/appmesh/api_op_DeleteRoute.go @@ -27,7 +27,6 @@ func (c *Client) DeleteRoute(ctx context.Context, params *DeleteRouteInput, optF return out, nil } -// type DeleteRouteInput struct { // The name of the service mesh to delete the route in. @@ -54,7 +53,6 @@ type DeleteRouteInput struct { noSmithyDocumentSerde } -// type DeleteRouteOutput struct { // The route that was deleted. diff --git a/service/appmesh/api_op_DeleteVirtualNode.go b/service/appmesh/api_op_DeleteVirtualNode.go index b90e3192514..d1a2a572660 100644 --- a/service/appmesh/api_op_DeleteVirtualNode.go +++ b/service/appmesh/api_op_DeleteVirtualNode.go @@ -51,7 +51,6 @@ type DeleteVirtualNodeInput struct { noSmithyDocumentSerde } -// type DeleteVirtualNodeOutput struct { // The virtual node that was deleted. diff --git a/service/appmesh/api_op_DeleteVirtualRouter.go b/service/appmesh/api_op_DeleteVirtualRouter.go index 722c7df8c00..4ed81e95660 100644 --- a/service/appmesh/api_op_DeleteVirtualRouter.go +++ b/service/appmesh/api_op_DeleteVirtualRouter.go @@ -28,7 +28,6 @@ func (c *Client) DeleteVirtualRouter(ctx context.Context, params *DeleteVirtualR return out, nil } -// type DeleteVirtualRouterInput struct { // The name of the service mesh to delete the virtual router in. @@ -50,7 +49,6 @@ type DeleteVirtualRouterInput struct { noSmithyDocumentSerde } -// type DeleteVirtualRouterOutput struct { // The virtual router that was deleted. diff --git a/service/appmesh/api_op_DeleteVirtualService.go b/service/appmesh/api_op_DeleteVirtualService.go index dc5f787e466..313a1e7d3e7 100644 --- a/service/appmesh/api_op_DeleteVirtualService.go +++ b/service/appmesh/api_op_DeleteVirtualService.go @@ -27,7 +27,6 @@ func (c *Client) DeleteVirtualService(ctx context.Context, params *DeleteVirtual return out, nil } -// type DeleteVirtualServiceInput struct { // The name of the service mesh to delete the virtual service in. @@ -49,7 +48,6 @@ type DeleteVirtualServiceInput struct { noSmithyDocumentSerde } -// type DeleteVirtualServiceOutput struct { // The virtual service that was deleted. diff --git a/service/appmesh/api_op_DescribeMesh.go b/service/appmesh/api_op_DescribeMesh.go index a1d4da1bf28..e96a9ab2458 100644 --- a/service/appmesh/api_op_DescribeMesh.go +++ b/service/appmesh/api_op_DescribeMesh.go @@ -27,7 +27,6 @@ func (c *Client) DescribeMesh(ctx context.Context, params *DescribeMeshInput, op return out, nil } -// type DescribeMeshInput struct { // The name of the service mesh to describe. @@ -44,7 +43,6 @@ type DescribeMeshInput struct { noSmithyDocumentSerde } -// type DescribeMeshOutput struct { // The full description of your service mesh. diff --git a/service/appmesh/api_op_DescribeRoute.go b/service/appmesh/api_op_DescribeRoute.go index cc723e0da49..cb5f2f2d2a6 100644 --- a/service/appmesh/api_op_DescribeRoute.go +++ b/service/appmesh/api_op_DescribeRoute.go @@ -27,7 +27,6 @@ func (c *Client) DescribeRoute(ctx context.Context, params *DescribeRouteInput, return out, nil } -// type DescribeRouteInput struct { // The name of the service mesh that the route resides in. @@ -54,7 +53,6 @@ type DescribeRouteInput struct { noSmithyDocumentSerde } -// type DescribeRouteOutput struct { // The full description of your route. diff --git a/service/appmesh/api_op_DescribeVirtualNode.go b/service/appmesh/api_op_DescribeVirtualNode.go index 47fd1a8732d..223e9b22da3 100644 --- a/service/appmesh/api_op_DescribeVirtualNode.go +++ b/service/appmesh/api_op_DescribeVirtualNode.go @@ -27,7 +27,6 @@ func (c *Client) DescribeVirtualNode(ctx context.Context, params *DescribeVirtua return out, nil } -// type DescribeVirtualNodeInput struct { // The name of the service mesh that the virtual node resides in. @@ -49,7 +48,6 @@ type DescribeVirtualNodeInput struct { noSmithyDocumentSerde } -// type DescribeVirtualNodeOutput struct { // The full description of your virtual node. diff --git a/service/appmesh/api_op_DescribeVirtualRouter.go b/service/appmesh/api_op_DescribeVirtualRouter.go index 94419d02680..752cb7b5da6 100644 --- a/service/appmesh/api_op_DescribeVirtualRouter.go +++ b/service/appmesh/api_op_DescribeVirtualRouter.go @@ -27,7 +27,6 @@ func (c *Client) DescribeVirtualRouter(ctx context.Context, params *DescribeVirt return out, nil } -// type DescribeVirtualRouterInput struct { // The name of the service mesh that the virtual router resides in. @@ -49,7 +48,6 @@ type DescribeVirtualRouterInput struct { noSmithyDocumentSerde } -// type DescribeVirtualRouterOutput struct { // The full description of your virtual router. diff --git a/service/appmesh/api_op_DescribeVirtualService.go b/service/appmesh/api_op_DescribeVirtualService.go index 2040e82a941..7cacdda990d 100644 --- a/service/appmesh/api_op_DescribeVirtualService.go +++ b/service/appmesh/api_op_DescribeVirtualService.go @@ -27,7 +27,6 @@ func (c *Client) DescribeVirtualService(ctx context.Context, params *DescribeVir return out, nil } -// type DescribeVirtualServiceInput struct { // The name of the service mesh that the virtual service resides in. @@ -49,7 +48,6 @@ type DescribeVirtualServiceInput struct { noSmithyDocumentSerde } -// type DescribeVirtualServiceOutput struct { // The full description of your virtual service. diff --git a/service/appmesh/api_op_ListMeshes.go b/service/appmesh/api_op_ListMeshes.go index b432ba2d65f..3df43cf2c74 100644 --- a/service/appmesh/api_op_ListMeshes.go +++ b/service/appmesh/api_op_ListMeshes.go @@ -28,7 +28,6 @@ func (c *Client) ListMeshes(ctx context.Context, params *ListMeshesInput, optFns return out, nil } -// type ListMeshesInput struct { // The maximum number of results returned by ListMeshes in paginated output. When @@ -50,7 +49,6 @@ type ListMeshesInput struct { noSmithyDocumentSerde } -// type ListMeshesOutput struct { // The list of existing service meshes. diff --git a/service/appmesh/api_op_ListRoutes.go b/service/appmesh/api_op_ListRoutes.go index a60dabaf08e..f8797fc0e77 100644 --- a/service/appmesh/api_op_ListRoutes.go +++ b/service/appmesh/api_op_ListRoutes.go @@ -28,7 +28,6 @@ func (c *Client) ListRoutes(ctx context.Context, params *ListRoutesInput, optFns return out, nil } -// type ListRoutesInput struct { // The name of the service mesh to list routes in. @@ -65,7 +64,6 @@ type ListRoutesInput struct { noSmithyDocumentSerde } -// type ListRoutesOutput struct { // The list of existing routes for the specified service mesh and virtual router. diff --git a/service/appmesh/api_op_ListTagsForResource.go b/service/appmesh/api_op_ListTagsForResource.go index 23bda69d8aa..f8fac30b03a 100644 --- a/service/appmesh/api_op_ListTagsForResource.go +++ b/service/appmesh/api_op_ListTagsForResource.go @@ -28,7 +28,6 @@ func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForRes return out, nil } -// type ListTagsForResourceInput struct { // The Amazon Resource Name (ARN) that identifies the resource to list the tags @@ -55,7 +54,6 @@ type ListTagsForResourceInput struct { noSmithyDocumentSerde } -// type ListTagsForResourceOutput struct { // The tags for the resource. diff --git a/service/appmesh/api_op_ListVirtualNodes.go b/service/appmesh/api_op_ListVirtualNodes.go index dbb0fd76458..72d6c5d8b36 100644 --- a/service/appmesh/api_op_ListVirtualNodes.go +++ b/service/appmesh/api_op_ListVirtualNodes.go @@ -28,7 +28,6 @@ func (c *Client) ListVirtualNodes(ctx context.Context, params *ListVirtualNodesI return out, nil } -// type ListVirtualNodesInput struct { // The name of the service mesh to list virtual nodes in. @@ -60,7 +59,6 @@ type ListVirtualNodesInput struct { noSmithyDocumentSerde } -// type ListVirtualNodesOutput struct { // The list of existing virtual nodes for the specified service mesh. diff --git a/service/appmesh/api_op_ListVirtualRouters.go b/service/appmesh/api_op_ListVirtualRouters.go index b64d1ab08ab..177c4cebba4 100644 --- a/service/appmesh/api_op_ListVirtualRouters.go +++ b/service/appmesh/api_op_ListVirtualRouters.go @@ -28,7 +28,6 @@ func (c *Client) ListVirtualRouters(ctx context.Context, params *ListVirtualRout return out, nil } -// type ListVirtualRoutersInput struct { // The name of the service mesh to list virtual routers in. @@ -60,7 +59,6 @@ type ListVirtualRoutersInput struct { noSmithyDocumentSerde } -// type ListVirtualRoutersOutput struct { // The list of existing virtual routers for the specified service mesh. diff --git a/service/appmesh/api_op_ListVirtualServices.go b/service/appmesh/api_op_ListVirtualServices.go index 26f463ea9cf..9d01845ce67 100644 --- a/service/appmesh/api_op_ListVirtualServices.go +++ b/service/appmesh/api_op_ListVirtualServices.go @@ -28,7 +28,6 @@ func (c *Client) ListVirtualServices(ctx context.Context, params *ListVirtualSer return out, nil } -// type ListVirtualServicesInput struct { // The name of the service mesh to list virtual services in. @@ -60,7 +59,6 @@ type ListVirtualServicesInput struct { noSmithyDocumentSerde } -// type ListVirtualServicesOutput struct { // The list of existing virtual services for the specified service mesh. diff --git a/service/appmesh/api_op_TagResource.go b/service/appmesh/api_op_TagResource.go index 7870487bcc0..063d432cf7d 100644 --- a/service/appmesh/api_op_TagResource.go +++ b/service/appmesh/api_op_TagResource.go @@ -30,7 +30,6 @@ func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optF return out, nil } -// type TagResourceInput struct { // The Amazon Resource Name (ARN) of the resource to add tags to. @@ -48,7 +47,6 @@ type TagResourceInput struct { noSmithyDocumentSerde } -// type TagResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/appmesh/api_op_UntagResource.go b/service/appmesh/api_op_UntagResource.go index 4dd84c215e1..b5a58ac91b4 100644 --- a/service/appmesh/api_op_UntagResource.go +++ b/service/appmesh/api_op_UntagResource.go @@ -26,7 +26,6 @@ func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, return out, nil } -// type UntagResourceInput struct { // The Amazon Resource Name (ARN) of the resource to delete tags from. @@ -42,7 +41,6 @@ type UntagResourceInput struct { noSmithyDocumentSerde } -// type UntagResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/appmesh/api_op_UpdateMesh.go b/service/appmesh/api_op_UpdateMesh.go index 20c9d728787..e7285720ef7 100644 --- a/service/appmesh/api_op_UpdateMesh.go +++ b/service/appmesh/api_op_UpdateMesh.go @@ -28,7 +28,6 @@ func (c *Client) UpdateMesh(ctx context.Context, params *UpdateMeshInput, optFns return out, nil } -// type UpdateMeshInput struct { // The name of the service mesh to update. @@ -46,7 +45,6 @@ type UpdateMeshInput struct { noSmithyDocumentSerde } -// type UpdateMeshOutput struct { // An object that represents a service mesh returned by a describe operation. diff --git a/service/appmesh/api_op_UpdateRoute.go b/service/appmesh/api_op_UpdateRoute.go index b56c0fe64d6..9b3c7c7463f 100644 --- a/service/appmesh/api_op_UpdateRoute.go +++ b/service/appmesh/api_op_UpdateRoute.go @@ -28,7 +28,6 @@ func (c *Client) UpdateRoute(ctx context.Context, params *UpdateRouteInput, optF return out, nil } -// type UpdateRouteInput struct { // The name of the service mesh that the route resides in. @@ -64,7 +63,6 @@ type UpdateRouteInput struct { noSmithyDocumentSerde } -// type UpdateRouteOutput struct { // A full description of the route that was updated. diff --git a/service/appmesh/api_op_UpdateVirtualNode.go b/service/appmesh/api_op_UpdateVirtualNode.go index 74d2f7d2f1c..bb72bfbc4b0 100644 --- a/service/appmesh/api_op_UpdateVirtualNode.go +++ b/service/appmesh/api_op_UpdateVirtualNode.go @@ -28,7 +28,6 @@ func (c *Client) UpdateVirtualNode(ctx context.Context, params *UpdateVirtualNod return out, nil } -// type UpdateVirtualNodeInput struct { // The name of the service mesh that the virtual node resides in. @@ -59,7 +58,6 @@ type UpdateVirtualNodeInput struct { noSmithyDocumentSerde } -// type UpdateVirtualNodeOutput struct { // A full description of the virtual node that was updated. diff --git a/service/appmesh/api_op_UpdateVirtualRouter.go b/service/appmesh/api_op_UpdateVirtualRouter.go index 9c7d8fb9f3f..10fd99f34a1 100644 --- a/service/appmesh/api_op_UpdateVirtualRouter.go +++ b/service/appmesh/api_op_UpdateVirtualRouter.go @@ -28,7 +28,6 @@ func (c *Client) UpdateVirtualRouter(ctx context.Context, params *UpdateVirtualR return out, nil } -// type UpdateVirtualRouterInput struct { // The name of the service mesh that the virtual router resides in. @@ -60,7 +59,6 @@ type UpdateVirtualRouterInput struct { noSmithyDocumentSerde } -// type UpdateVirtualRouterOutput struct { // A full description of the virtual router that was updated. diff --git a/service/appmesh/api_op_UpdateVirtualService.go b/service/appmesh/api_op_UpdateVirtualService.go index 7c29e57e1d3..1f63f9fdbb8 100644 --- a/service/appmesh/api_op_UpdateVirtualService.go +++ b/service/appmesh/api_op_UpdateVirtualService.go @@ -28,7 +28,6 @@ func (c *Client) UpdateVirtualService(ctx context.Context, params *UpdateVirtual return out, nil } -// type UpdateVirtualServiceInput struct { // The name of the service mesh that the virtual service resides in. @@ -60,7 +59,6 @@ type UpdateVirtualServiceInput struct { noSmithyDocumentSerde } -// type UpdateVirtualServiceOutput struct { // A full description of the virtual service that was updated. diff --git a/service/appmesh/types/types.go b/service/appmesh/types/types.go index e955327f64e..1f52c2a94b1 100644 --- a/service/appmesh/types/types.go +++ b/service/appmesh/types/types.go @@ -10,7 +10,8 @@ import ( // An object that represents the access logging information for a virtual node. // // The following types satisfy this interface: -// AccessLogMemberFile +// +// AccessLogMemberFile type AccessLog interface { isAccessLog() } @@ -73,7 +74,8 @@ type AwsCloudMapServiceDiscovery struct { // outbound traffic to. // // The following types satisfy this interface: -// BackendMemberVirtualService +// +// BackendMemberVirtualService type Backend interface { isBackend() } @@ -130,8 +132,9 @@ type ClientPolicyTls struct { // An object that represents the client's certificate. // // The following types satisfy this interface: -// ClientTlsCertificateMemberFile -// ClientTlsCertificateMemberSds +// +// ClientTlsCertificateMemberFile +// ClientTlsCertificateMemberSds type ClientTlsCertificate interface { isClientTlsCertificate() } @@ -464,11 +467,12 @@ type GrpcGatewayRouteRewrite struct { // An object representing the method header to be matched. // // The following types satisfy this interface: -// GrpcMetadataMatchMethodMemberExact -// GrpcMetadataMatchMethodMemberPrefix -// GrpcMetadataMatchMethodMemberRange -// GrpcMetadataMatchMethodMemberRegex -// GrpcMetadataMatchMethodMemberSuffix +// +// GrpcMetadataMatchMethodMemberExact +// GrpcMetadataMatchMethodMemberPrefix +// GrpcMetadataMatchMethodMemberRange +// GrpcMetadataMatchMethodMemberRegex +// GrpcMetadataMatchMethodMemberSuffix type GrpcMetadataMatchMethod interface { isGrpcMetadataMatchMethod() } @@ -634,11 +638,12 @@ type GrpcRouteMetadata struct { // An object that represents the match method. Specify one of the match values. // // The following types satisfy this interface: -// GrpcRouteMetadataMatchMethodMemberExact -// GrpcRouteMetadataMatchMethodMemberPrefix -// GrpcRouteMetadataMatchMethodMemberRange -// GrpcRouteMetadataMatchMethodMemberRegex -// GrpcRouteMetadataMatchMethodMemberSuffix +// +// GrpcRouteMetadataMatchMethodMemberExact +// GrpcRouteMetadataMatchMethodMemberPrefix +// GrpcRouteMetadataMatchMethodMemberRange +// GrpcRouteMetadataMatchMethodMemberRegex +// GrpcRouteMetadataMatchMethodMemberSuffix type GrpcRouteMetadataMatchMethod interface { isGrpcRouteMetadataMatchMethod() } @@ -710,11 +715,12 @@ type GrpcTimeout struct { // sent in a request. Specify one match method. // // The following types satisfy this interface: -// HeaderMatchMethodMemberExact -// HeaderMatchMethodMemberPrefix -// HeaderMatchMethodMemberRange -// HeaderMatchMethodMemberRegex -// HeaderMatchMethodMemberSuffix +// +// HeaderMatchMethodMemberExact +// HeaderMatchMethodMemberPrefix +// HeaderMatchMethodMemberRange +// HeaderMatchMethodMemberRegex +// HeaderMatchMethodMemberSuffix type HeaderMatchMethod interface { isHeaderMatchMethod() } @@ -1119,10 +1125,11 @@ type Listener struct { // An object that represents timeouts for different protocols. // // The following types satisfy this interface: -// ListenerTimeoutMemberGrpc -// ListenerTimeoutMemberHttp -// ListenerTimeoutMemberHttp2 -// ListenerTimeoutMemberTcp +// +// ListenerTimeoutMemberGrpc +// ListenerTimeoutMemberHttp +// ListenerTimeoutMemberHttp2 +// ListenerTimeoutMemberTcp type ListenerTimeout interface { isListenerTimeout() } @@ -1212,9 +1219,10 @@ type ListenerTlsAcmCertificate struct { // certificate. // // The following types satisfy this interface: -// ListenerTlsCertificateMemberAcm -// ListenerTlsCertificateMemberFile -// ListenerTlsCertificateMemberSds +// +// ListenerTlsCertificateMemberAcm +// ListenerTlsCertificateMemberFile +// ListenerTlsCertificateMemberSds type ListenerTlsCertificate interface { isListenerTlsCertificate() } @@ -1304,8 +1312,9 @@ type ListenerTlsValidationContext struct { // context trust. // // The following types satisfy this interface: -// ListenerTlsValidationContextTrustMemberFile -// ListenerTlsValidationContextTrustMemberSds +// +// ListenerTlsValidationContextTrustMemberFile +// ListenerTlsValidationContextTrustMemberSds type ListenerTlsValidationContextTrust interface { isListenerTlsValidationContextTrust() } @@ -1694,8 +1703,9 @@ type RouteStatus struct { // An object that represents the service discovery information for a virtual node. // // The following types satisfy this interface: -// ServiceDiscoveryMemberAwsCloudMap -// ServiceDiscoveryMemberDns +// +// ServiceDiscoveryMemberAwsCloudMap +// ServiceDiscoveryMemberDns type ServiceDiscovery interface { isServiceDiscovery() } @@ -1860,9 +1870,10 @@ type TlsValidationContextSdsTrust struct { // trust. // // The following types satisfy this interface: -// TlsValidationContextTrustMemberAcm -// TlsValidationContextTrustMemberFile -// TlsValidationContextTrustMemberSds +// +// TlsValidationContextTrustMemberAcm +// TlsValidationContextTrustMemberFile +// TlsValidationContextTrustMemberSds type TlsValidationContextTrust interface { isTlsValidationContextTrust() } @@ -1900,7 +1911,8 @@ func (*TlsValidationContextTrustMemberSds) isTlsValidationContextTrust() {} // The access log configuration for a virtual gateway. // // The following types satisfy this interface: -// VirtualGatewayAccessLogMemberFile +// +// VirtualGatewayAccessLogMemberFile type VirtualGatewayAccessLog interface { isVirtualGatewayAccessLog() } @@ -1959,8 +1971,9 @@ type VirtualGatewayClientPolicyTls struct { // Security (TLS) certificate. // // The following types satisfy this interface: -// VirtualGatewayClientTlsCertificateMemberFile -// VirtualGatewayClientTlsCertificateMemberSds +// +// VirtualGatewayClientTlsCertificateMemberFile +// VirtualGatewayClientTlsCertificateMemberSds type VirtualGatewayClientTlsCertificate interface { isVirtualGatewayClientTlsCertificate() } @@ -1993,9 +2006,10 @@ func (*VirtualGatewayClientTlsCertificateMemberSds) isVirtualGatewayClientTlsCer // 2147483647. // // The following types satisfy this interface: -// VirtualGatewayConnectionPoolMemberGrpc -// VirtualGatewayConnectionPoolMemberHttp -// VirtualGatewayConnectionPoolMemberHttp2 +// +// VirtualGatewayConnectionPoolMemberGrpc +// VirtualGatewayConnectionPoolMemberHttp +// VirtualGatewayConnectionPoolMemberHttp2 type VirtualGatewayConnectionPool interface { isVirtualGatewayConnectionPool() } @@ -2228,9 +2242,10 @@ type VirtualGatewayListenerTlsAcmCertificate struct { // certificate. // // The following types satisfy this interface: -// VirtualGatewayListenerTlsCertificateMemberAcm -// VirtualGatewayListenerTlsCertificateMemberFile -// VirtualGatewayListenerTlsCertificateMemberSds +// +// VirtualGatewayListenerTlsCertificateMemberAcm +// VirtualGatewayListenerTlsCertificateMemberFile +// VirtualGatewayListenerTlsCertificateMemberSds type VirtualGatewayListenerTlsCertificate interface { isVirtualGatewayListenerTlsCertificate() } @@ -2320,8 +2335,9 @@ type VirtualGatewayListenerTlsValidationContext struct { // Security (TLS) validation context trust. // // The following types satisfy this interface: -// VirtualGatewayListenerTlsValidationContextTrustMemberFile -// VirtualGatewayListenerTlsValidationContextTrustMemberSds +// +// VirtualGatewayListenerTlsValidationContextTrustMemberFile +// VirtualGatewayListenerTlsValidationContextTrustMemberSds type VirtualGatewayListenerTlsValidationContextTrust interface { isVirtualGatewayListenerTlsValidationContextTrust() } @@ -2519,9 +2535,10 @@ type VirtualGatewayTlsValidationContextSdsTrust struct { // trust. // // The following types satisfy this interface: -// VirtualGatewayTlsValidationContextTrustMemberAcm -// VirtualGatewayTlsValidationContextTrustMemberFile -// VirtualGatewayTlsValidationContextTrustMemberSds +// +// VirtualGatewayTlsValidationContextTrustMemberAcm +// VirtualGatewayTlsValidationContextTrustMemberFile +// VirtualGatewayTlsValidationContextTrustMemberSds type VirtualGatewayTlsValidationContextTrust interface { isVirtualGatewayTlsValidationContextTrust() } @@ -2565,10 +2582,11 @@ func (*VirtualGatewayTlsValidationContextTrustMemberSds) isVirtualGatewayTlsVali // 2147483647. // // The following types satisfy this interface: -// VirtualNodeConnectionPoolMemberGrpc -// VirtualNodeConnectionPoolMemberHttp -// VirtualNodeConnectionPoolMemberHttp2 -// VirtualNodeConnectionPoolMemberTcp +// +// VirtualNodeConnectionPoolMemberGrpc +// VirtualNodeConnectionPoolMemberHttp +// VirtualNodeConnectionPoolMemberHttp2 +// VirtualNodeConnectionPoolMemberTcp type VirtualNodeConnectionPool interface { isVirtualNodeConnectionPool() } @@ -2968,8 +2986,9 @@ type VirtualServiceData struct { // An object that represents the provider for a virtual service. // // The following types satisfy this interface: -// VirtualServiceProviderMemberVirtualNode -// VirtualServiceProviderMemberVirtualRouter +// +// VirtualServiceProviderMemberVirtualNode +// VirtualServiceProviderMemberVirtualRouter type VirtualServiceProvider interface { isVirtualServiceProvider() } diff --git a/service/backupstorage/LICENSE.txt b/service/backupstorage/LICENSE.txt new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/service/backupstorage/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/service/backupstorage/api_client.go b/service/backupstorage/api_client.go new file mode 100644 index 00000000000..3a3296e16a0 --- /dev/null +++ b/service/backupstorage/api_client.go @@ -0,0 +1,433 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package backupstorage + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/aws/defaults" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/retry" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" + internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" + smithy "github.com/aws/smithy-go" + smithydocument "github.com/aws/smithy-go/document" + "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net" + "net/http" + "time" +) + +const ServiceID = "BackupStorage" +const ServiceAPIVersion = "2018-04-10" + +// Client provides the API client to make operations call for AWS Backup Storage. +type Client struct { + options Options +} + +// New returns an initialized Client based on the functional options. Provide +// additional functional options to further configure the behavior of the client, +// such as changing the client's endpoint or adding custom middleware behavior. +func New(options Options, optFns ...func(*Options)) *Client { + options = options.Copy() + + resolveDefaultLogger(&options) + + setResolvedDefaultsMode(&options) + + resolveRetryer(&options) + + resolveHTTPClient(&options) + + resolveHTTPSignerV4(&options) + + resolveDefaultEndpointConfiguration(&options) + + for _, fn := range optFns { + fn(&options) + } + + client := &Client{ + options: options, + } + + return client +} + +type Options struct { + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + APIOptions []func(*middleware.Stack) error + + // Configures the events that will be sent to the configured logger. + ClientLogMode aws.ClientLogMode + + // The credentials object to use when signing requests. + Credentials aws.CredentialsProvider + + // The configuration DefaultsMode that the SDK should use when constructing the + // clients initial default settings. + DefaultsMode aws.DefaultsMode + + // The endpoint options to be used when attempting to resolve an endpoint. + EndpointOptions EndpointResolverOptions + + // The service endpoint resolver. + EndpointResolver EndpointResolver + + // Signature Version 4 (SigV4) Signer + HTTPSignerV4 HTTPSignerV4 + + // The logger writer interface to write logging messages to. + Logger logging.Logger + + // The region to send requests to. (Required) + Region string + + // RetryMaxAttempts specifies the maximum number attempts an API client will call + // an operation that fails with a retryable error. A value of 0 is ignored, and + // will not be used to configure the API client created default retryer, or modify + // per operation call's retry max attempts. When creating a new API Clients this + // member will only be used if the Retryer Options member is nil. This value will + // be ignored if Retryer is not nil. If specified in an operation call's functional + // options with a value that is different than the constructed client's Options, + // the Client's Retryer will be wrapped to use the operation's specific + // RetryMaxAttempts value. + RetryMaxAttempts int + + // RetryMode specifies the retry mode the API client will be created with, if + // Retryer option is not also specified. When creating a new API Clients this + // member will only be used if the Retryer Options member is nil. This value will + // be ignored if Retryer is not nil. Currently does not support per operation call + // overrides, may in the future. + RetryMode aws.RetryMode + + // Retryer guides how HTTP requests should be retried in case of recoverable + // failures. When nil the API client will use a default retryer. The kind of + // default retry created by the API client can be changed with the RetryMode + // option. + Retryer aws.Retryer + + // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set + // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig. You + // should not populate this structure programmatically, or rely on the values here + // within your applications. + RuntimeEnvironment aws.RuntimeEnvironment + + // The initial DefaultsMode used when the client options were constructed. If the + // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved + // value was at that point in time. Currently does not support per operation call + // overrides, may in the future. + resolvedDefaultsMode aws.DefaultsMode + + // The HTTP client to invoke API calls with. Defaults to client's default HTTP + // implementation if nil. + HTTPClient HTTPClient +} + +// WithAPIOptions returns a functional option for setting the Client's APIOptions +// option. +func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { + return func(o *Options) { + o.APIOptions = append(o.APIOptions, optFns...) + } +} + +// WithEndpointResolver returns a functional option for setting the Client's +// EndpointResolver option. +func WithEndpointResolver(v EndpointResolver) func(*Options) { + return func(o *Options) { + o.EndpointResolver = v + } +} + +type HTTPClient interface { + Do(*http.Request) (*http.Response, error) +} + +// Copy creates a clone where the APIOptions list is deep copied. +func (o Options) Copy() Options { + to := o + to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) + copy(to.APIOptions, o.APIOptions) + + return to +} +func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { + ctx = middleware.ClearStackValues(ctx) + stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) + options := c.options.Copy() + for _, fn := range optFns { + fn(&options) + } + + finalizeRetryMaxAttemptOptions(&options, *c) + + finalizeClientEndpointResolverOptions(&options) + + for _, fn := range stackFns { + if err := fn(stack, options); err != nil { + return nil, metadata, err + } + } + + for _, fn := range options.APIOptions { + if err := fn(stack); err != nil { + return nil, metadata, err + } + } + + handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) + result, metadata, err = handler.Handle(ctx, params) + if err != nil { + err = &smithy.OperationError{ + ServiceID: ServiceID, + OperationName: opID, + Err: err, + } + } + return result, metadata, err +} + +type noSmithyDocumentSerde = smithydocument.NoSerde + +func resolveDefaultLogger(o *Options) { + if o.Logger != nil { + return + } + o.Logger = logging.Nop{} +} + +func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { + return middleware.AddSetLoggerMiddleware(stack, o.Logger) +} + +func setResolvedDefaultsMode(o *Options) { + if len(o.resolvedDefaultsMode) > 0 { + return + } + + var mode aws.DefaultsMode + mode.SetFromString(string(o.DefaultsMode)) + + if mode == aws.DefaultsModeAuto { + mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) + } + + o.resolvedDefaultsMode = mode +} + +// NewFromConfig returns a new client from the provided config. +func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { + opts := Options{ + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + } + resolveAWSRetryerProvider(cfg, &opts) + resolveAWSRetryMaxAttempts(cfg, &opts) + resolveAWSRetryMode(cfg, &opts) + resolveAWSEndpointResolver(cfg, &opts) + resolveUseDualStackEndpoint(cfg, &opts) + resolveUseFIPSEndpoint(cfg, &opts) + return New(opts, optFns...) +} + +func resolveHTTPClient(o *Options) { + var buildable *awshttp.BuildableClient + + if o.HTTPClient != nil { + var ok bool + buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) + if !ok { + return + } + } else { + buildable = awshttp.NewBuildableClient() + } + + modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) + if err == nil { + buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { + if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { + dialer.Timeout = dialerTimeout + } + }) + + buildable = buildable.WithTransportOptions(func(transport *http.Transport) { + if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { + transport.TLSHandshakeTimeout = tlsHandshakeTimeout + } + }) + } + + o.HTTPClient = buildable +} + +func resolveRetryer(o *Options) { + if o.Retryer != nil { + return + } + + if len(o.RetryMode) == 0 { + modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) + if err == nil { + o.RetryMode = modeConfig.RetryMode + } + } + if len(o.RetryMode) == 0 { + o.RetryMode = aws.RetryModeStandard + } + + var standardOptions []func(*retry.StandardOptions) + if v := o.RetryMaxAttempts; v != 0 { + standardOptions = append(standardOptions, func(so *retry.StandardOptions) { + so.MaxAttempts = v + }) + } + + switch o.RetryMode { + case aws.RetryModeAdaptive: + var adaptiveOptions []func(*retry.AdaptiveModeOptions) + if len(standardOptions) != 0 { + adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { + ao.StandardOptions = append(ao.StandardOptions, standardOptions...) + }) + } + o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) + + default: + o.Retryer = retry.NewStandard(standardOptions...) + } +} + +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + +func resolveAWSRetryMode(cfg aws.Config, o *Options) { + if len(cfg.RetryMode) == 0 { + return + } + o.RetryMode = cfg.RetryMode +} +func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { + if cfg.RetryMaxAttempts == 0 { + return + } + o.RetryMaxAttempts = cfg.RetryMaxAttempts +} + +func finalizeRetryMaxAttemptOptions(o *Options, client Client) { + if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { + return + } + + o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) +} + +func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { + if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { + return + } + o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver()) +} + +func addClientUserAgent(stack *middleware.Stack) error { + return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "backupstorage", goModuleVersion)(stack) +} + +func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error { + mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{ + CredentialsProvider: o.Credentials, + Signer: o.HTTPSignerV4, + LogSigning: o.ClientLogMode.IsSigning(), + }) + return stack.Finalize.Add(mw, middleware.After) +} + +type HTTPSignerV4 interface { + SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error +} + +func resolveHTTPSignerV4(o *Options) { + if o.HTTPSignerV4 != nil { + return + } + o.HTTPSignerV4 = newDefaultV4Signer(*o) +} + +func newDefaultV4Signer(o Options) *v4.Signer { + return v4.NewSigner(func(so *v4.SignerOptions) { + so.Logger = o.Logger + so.LogSigning = o.ClientLogMode.IsSigning() + }) +} + +func addRetryMiddlewares(stack *middleware.Stack, o Options) error { + mo := retry.AddRetryMiddlewaresOptions{ + Retryer: o.Retryer, + LogRetryAttempts: o.ClientLogMode.IsRetries(), + } + return retry.AddRetryMiddlewares(stack, mo) +} + +// resolves dual-stack endpoint configuration +func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { + if len(cfg.ConfigSources) == 0 { + return nil + } + value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) + if err != nil { + return err + } + if found { + o.EndpointOptions.UseDualStackEndpoint = value + } + return nil +} + +// resolves FIPS endpoint configuration +func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { + if len(cfg.ConfigSources) == 0 { + return nil + } + value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) + if err != nil { + return err + } + if found { + o.EndpointOptions.UseFIPSEndpoint = value + } + return nil +} + +func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { + return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) +} + +func addResponseErrorMiddleware(stack *middleware.Stack) error { + return awshttp.AddResponseErrorMiddleware(stack) +} + +func addRequestResponseLogging(stack *middleware.Stack, o Options) error { + return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ + LogRequest: o.ClientLogMode.IsRequest(), + LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), + LogResponse: o.ClientLogMode.IsResponse(), + LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), + }, middleware.After) +} diff --git a/service/backupstorage/api_client_test.go b/service/backupstorage/api_client_test.go new file mode 100644 index 00000000000..7361c7a4390 --- /dev/null +++ b/service/backupstorage/api_client_test.go @@ -0,0 +1,123 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package backupstorage + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io/ioutil" + "net/http" + "strings" + "testing" +) + +func TestClient_resolveRetryOptions(t *testing.T) { + nopClient := smithyhttp.ClientDoFunc(func(_ *http.Request) (*http.Response, error) { + return &http.Response{ + StatusCode: 200, + Header: http.Header{}, + Body: ioutil.NopCloser(strings.NewReader("")), + }, nil + }) + + cases := map[string]struct { + defaultsMode aws.DefaultsMode + retryer aws.Retryer + retryMaxAttempts int + opRetryMaxAttempts *int + retryMode aws.RetryMode + expectClientRetryMode aws.RetryMode + expectClientMaxAttempts int + expectOpMaxAttempts int + }{ + "defaults": { + defaultsMode: aws.DefaultsModeStandard, + expectClientRetryMode: aws.RetryModeStandard, + expectClientMaxAttempts: 3, + expectOpMaxAttempts: 3, + }, + "custom default retry": { + retryMode: aws.RetryModeAdaptive, + retryMaxAttempts: 10, + expectClientRetryMode: aws.RetryModeAdaptive, + expectClientMaxAttempts: 10, + expectOpMaxAttempts: 10, + }, + "custom op max attempts": { + retryMode: aws.RetryModeAdaptive, + retryMaxAttempts: 10, + opRetryMaxAttempts: aws.Int(2), + expectClientRetryMode: aws.RetryModeAdaptive, + expectClientMaxAttempts: 10, + expectOpMaxAttempts: 2, + }, + "custom op no change max attempts": { + retryMode: aws.RetryModeAdaptive, + retryMaxAttempts: 10, + opRetryMaxAttempts: aws.Int(10), + expectClientRetryMode: aws.RetryModeAdaptive, + expectClientMaxAttempts: 10, + expectOpMaxAttempts: 10, + }, + "custom op 0 max attempts": { + retryMode: aws.RetryModeAdaptive, + retryMaxAttempts: 10, + opRetryMaxAttempts: aws.Int(0), + expectClientRetryMode: aws.RetryModeAdaptive, + expectClientMaxAttempts: 10, + expectOpMaxAttempts: 10, + }, + } + + for name, c := range cases { + t.Run(name, func(t *testing.T) { + client := NewFromConfig(aws.Config{ + DefaultsMode: c.defaultsMode, + Retryer: func() func() aws.Retryer { + if c.retryer == nil { + return nil + } + + return func() aws.Retryer { return c.retryer } + }(), + HTTPClient: nopClient, + RetryMaxAttempts: c.retryMaxAttempts, + RetryMode: c.retryMode, + }) + + if e, a := c.expectClientRetryMode, client.options.RetryMode; e != a { + t.Errorf("expect %v retry mode, got %v", e, a) + } + if e, a := c.expectClientMaxAttempts, client.options.Retryer.MaxAttempts(); e != a { + t.Errorf("expect %v max attempts, got %v", e, a) + } + + _, _, err := client.invokeOperation(context.Background(), "mockOperation", struct{}{}, + []func(*Options){ + func(o *Options) { + if c.opRetryMaxAttempts == nil { + return + } + o.RetryMaxAttempts = *c.opRetryMaxAttempts + }, + }, + func(s *middleware.Stack, o Options) error { + s.Initialize.Clear() + s.Serialize.Clear() + s.Build.Clear() + s.Finalize.Clear() + s.Deserialize.Clear() + + if e, a := c.expectOpMaxAttempts, o.Retryer.MaxAttempts(); e != a { + t.Errorf("expect %v op max attempts, got %v", e, a) + } + return nil + }) + if err != nil { + t.Fatalf("expect no operation error, got %v", err) + } + }) + } +} diff --git a/service/backupstorage/api_op_DeleteObject.go b/service/backupstorage/api_op_DeleteObject.go new file mode 100644 index 00000000000..bf8ad60c9f4 --- /dev/null +++ b/service/backupstorage/api_op_DeleteObject.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package backupstorage + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Delete Object from the incremental base Backup. +func (c *Client) DeleteObject(ctx context.Context, params *DeleteObjectInput, optFns ...func(*Options)) (*DeleteObjectOutput, error) { + if params == nil { + params = &DeleteObjectInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteObject", params, optFns, c.addOperationDeleteObjectMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteObjectOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteObjectInput struct { + + // Backup job Id for the in-progress backup. + // + // This member is required. + BackupJobId *string + + // The name of the Object. + // + // This member is required. + ObjectName *string + + noSmithyDocumentSerde +} + +type DeleteObjectOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteObjectMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteObject{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteObject{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteObjectValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteObject(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteObject(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "backup-storage", + OperationName: "DeleteObject", + } +} diff --git a/service/backupstorage/api_op_GetChunk.go b/service/backupstorage/api_op_GetChunk.go new file mode 100644 index 00000000000..7e898cf85d7 --- /dev/null +++ b/service/backupstorage/api_op_GetChunk.go @@ -0,0 +1,141 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package backupstorage + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/backupstorage/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" +) + +// Gets the specified object's chunk. +func (c *Client) GetChunk(ctx context.Context, params *GetChunkInput, optFns ...func(*Options)) (*GetChunkOutput, error) { + if params == nil { + params = &GetChunkInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetChunk", params, optFns, c.addOperationGetChunkMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetChunkOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetChunkInput struct { + + // Chunk token + // + // This member is required. + ChunkToken *string + + // Storage job id + // + // This member is required. + StorageJobId *string + + noSmithyDocumentSerde +} + +type GetChunkOutput struct { + + // Data checksum + // + // This member is required. + Checksum *string + + // Checksum algorithm + // + // This member is required. + ChecksumAlgorithm types.DataChecksumAlgorithm + + // Chunk data + // + // This member is required. + Data io.ReadCloser + + // Data length + // + // This member is required. + Length int64 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetChunkMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetChunk{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetChunk{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetChunkValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetChunk(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetChunk(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "backup-storage", + OperationName: "GetChunk", + } +} diff --git a/service/backupstorage/api_op_GetObjectMetadata.go b/service/backupstorage/api_op_GetObjectMetadata.go new file mode 100644 index 00000000000..423da01fd7a --- /dev/null +++ b/service/backupstorage/api_op_GetObjectMetadata.go @@ -0,0 +1,136 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package backupstorage + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/backupstorage/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" +) + +// Get metadata associated with an Object. +func (c *Client) GetObjectMetadata(ctx context.Context, params *GetObjectMetadataInput, optFns ...func(*Options)) (*GetObjectMetadataOutput, error) { + if params == nil { + params = &GetObjectMetadataInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetObjectMetadata", params, optFns, c.addOperationGetObjectMetadataMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetObjectMetadataOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetObjectMetadataInput struct { + + // Object token. + // + // This member is required. + ObjectToken *string + + // Backup job id for the in-progress backup. + // + // This member is required. + StorageJobId *string + + noSmithyDocumentSerde +} + +type GetObjectMetadataOutput struct { + + // Metadata blob. + MetadataBlob io.ReadCloser + + // MetadataBlob checksum. + MetadataBlobChecksum *string + + // Checksum algorithm. + MetadataBlobChecksumAlgorithm types.DataChecksumAlgorithm + + // The size of MetadataBlob. + MetadataBlobLength int64 + + // Metadata string. + MetadataString *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetObjectMetadataMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetObjectMetadata{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetObjectMetadata{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetObjectMetadataValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetObjectMetadata(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetObjectMetadata(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "backup-storage", + OperationName: "GetObjectMetadata", + } +} diff --git a/service/backupstorage/api_op_ListChunks.go b/service/backupstorage/api_op_ListChunks.go new file mode 100644 index 00000000000..06e3ac5dcbf --- /dev/null +++ b/service/backupstorage/api_op_ListChunks.go @@ -0,0 +1,223 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package backupstorage + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/backupstorage/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// List chunks in a given Object +func (c *Client) ListChunks(ctx context.Context, params *ListChunksInput, optFns ...func(*Options)) (*ListChunksOutput, error) { + if params == nil { + params = &ListChunksInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListChunks", params, optFns, c.addOperationListChunksMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListChunksOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListChunksInput struct { + + // Object token + // + // This member is required. + ObjectToken *string + + // Storage job id + // + // This member is required. + StorageJobId *string + + // Maximum number of chunks + MaxResults int32 + + // Pagination token + NextToken *string + + noSmithyDocumentSerde +} + +type ListChunksOutput struct { + + // List of chunks + // + // This member is required. + ChunkList []types.Chunk + + // Pagination token + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListChunksMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListChunks{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListChunks{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListChunksValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListChunks(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListChunksAPIClient is a client that implements the ListChunks operation. +type ListChunksAPIClient interface { + ListChunks(context.Context, *ListChunksInput, ...func(*Options)) (*ListChunksOutput, error) +} + +var _ ListChunksAPIClient = (*Client)(nil) + +// ListChunksPaginatorOptions is the paginator options for ListChunks +type ListChunksPaginatorOptions struct { + // Maximum number of chunks + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListChunksPaginator is a paginator for ListChunks +type ListChunksPaginator struct { + options ListChunksPaginatorOptions + client ListChunksAPIClient + params *ListChunksInput + nextToken *string + firstPage bool +} + +// NewListChunksPaginator returns a new ListChunksPaginator +func NewListChunksPaginator(client ListChunksAPIClient, params *ListChunksInput, optFns ...func(*ListChunksPaginatorOptions)) *ListChunksPaginator { + if params == nil { + params = &ListChunksInput{} + } + + options := ListChunksPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListChunksPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListChunksPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListChunks page. +func (p *ListChunksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListChunksOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.MaxResults = p.options.Limit + + result, err := p.client.ListChunks(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListChunks(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "backup-storage", + OperationName: "ListChunks", + } +} diff --git a/service/backupstorage/api_op_ListObjects.go b/service/backupstorage/api_op_ListObjects.go new file mode 100644 index 00000000000..908ffb6b416 --- /dev/null +++ b/service/backupstorage/api_op_ListObjects.go @@ -0,0 +1,233 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package backupstorage + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/backupstorage/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// List all Objects in a given Backup. +func (c *Client) ListObjects(ctx context.Context, params *ListObjectsInput, optFns ...func(*Options)) (*ListObjectsOutput, error) { + if params == nil { + params = &ListObjectsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListObjects", params, optFns, c.addOperationListObjectsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListObjectsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListObjectsInput struct { + + // Storage job id + // + // This member is required. + StorageJobId *string + + // (Optional) Created after filter + CreatedAfter *time.Time + + // (Optional) Created before filter + CreatedBefore *time.Time + + // Maximum objects count + MaxResults int32 + + // Pagination token + NextToken *string + + // Optional, specifies the starting Object name to list from. Ignored if NextToken + // is not NULL + StartingObjectName *string + + // Optional, specifies the starting Object prefix to list from. Ignored if + // NextToken is not NULL + StartingObjectPrefix *string + + noSmithyDocumentSerde +} + +type ListObjectsOutput struct { + + // Object list + // + // This member is required. + ObjectList []types.BackupObject + + // Pagination token + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListObjectsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListObjects{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListObjects{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListObjectsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListObjects(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListObjectsAPIClient is a client that implements the ListObjects operation. +type ListObjectsAPIClient interface { + ListObjects(context.Context, *ListObjectsInput, ...func(*Options)) (*ListObjectsOutput, error) +} + +var _ ListObjectsAPIClient = (*Client)(nil) + +// ListObjectsPaginatorOptions is the paginator options for ListObjects +type ListObjectsPaginatorOptions struct { + // Maximum objects count + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListObjectsPaginator is a paginator for ListObjects +type ListObjectsPaginator struct { + options ListObjectsPaginatorOptions + client ListObjectsAPIClient + params *ListObjectsInput + nextToken *string + firstPage bool +} + +// NewListObjectsPaginator returns a new ListObjectsPaginator +func NewListObjectsPaginator(client ListObjectsAPIClient, params *ListObjectsInput, optFns ...func(*ListObjectsPaginatorOptions)) *ListObjectsPaginator { + if params == nil { + params = &ListObjectsInput{} + } + + options := ListObjectsPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListObjectsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListObjectsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListObjects page. +func (p *ListObjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListObjectsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.MaxResults = p.options.Limit + + result, err := p.client.ListObjects(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListObjects(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "backup-storage", + OperationName: "ListObjects", + } +} diff --git a/service/backupstorage/api_op_NotifyObjectComplete.go b/service/backupstorage/api_op_NotifyObjectComplete.go new file mode 100644 index 00000000000..4fe9263c15f --- /dev/null +++ b/service/backupstorage/api_op_NotifyObjectComplete.go @@ -0,0 +1,162 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package backupstorage + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/backupstorage/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" +) + +// Complete upload +func (c *Client) NotifyObjectComplete(ctx context.Context, params *NotifyObjectCompleteInput, optFns ...func(*Options)) (*NotifyObjectCompleteOutput, error) { + if params == nil { + params = &NotifyObjectCompleteInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "NotifyObjectComplete", params, optFns, c.addOperationNotifyObjectCompleteMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*NotifyObjectCompleteOutput) + out.ResultMetadata = metadata + return out, nil +} + +type NotifyObjectCompleteInput struct { + + // Backup job Id for the in-progress backup + // + // This member is required. + BackupJobId *string + + // Object checksum + // + // This member is required. + ObjectChecksum *string + + // Checksum algorithm + // + // This member is required. + ObjectChecksumAlgorithm types.SummaryChecksumAlgorithm + + // Upload Id for the in-progress upload + // + // This member is required. + UploadId *string + + // Optional metadata associated with an Object. Maximum length is 4MB. + MetadataBlob io.Reader + + // Checksum of MetadataBlob. + MetadataBlobChecksum *string + + // Checksum algorithm. + MetadataBlobChecksumAlgorithm types.DataChecksumAlgorithm + + // The size of MetadataBlob. + MetadataBlobLength int64 + + // Optional metadata associated with an Object. Maximum string length is 256 bytes. + MetadataString *string + + noSmithyDocumentSerde +} + +type NotifyObjectCompleteOutput struct { + + // Object checksum + // + // This member is required. + ObjectChecksum *string + + // Checksum algorithm + // + // This member is required. + ObjectChecksumAlgorithm types.SummaryChecksumAlgorithm + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationNotifyObjectCompleteMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpNotifyObjectComplete{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpNotifyObjectComplete{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddUnsignedPayloadMiddleware(stack); err != nil { + return err + } + if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpNotifyObjectCompleteValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opNotifyObjectComplete(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opNotifyObjectComplete(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "backup-storage", + OperationName: "NotifyObjectComplete", + } +} diff --git a/service/backupstorage/api_op_PutChunk.go b/service/backupstorage/api_op_PutChunk.go new file mode 100644 index 00000000000..16483a271e1 --- /dev/null +++ b/service/backupstorage/api_op_PutChunk.go @@ -0,0 +1,162 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package backupstorage + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/backupstorage/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" +) + +// Upload chunk. +func (c *Client) PutChunk(ctx context.Context, params *PutChunkInput, optFns ...func(*Options)) (*PutChunkOutput, error) { + if params == nil { + params = &PutChunkInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutChunk", params, optFns, c.addOperationPutChunkMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutChunkOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutChunkInput struct { + + // Backup job Id for the in-progress backup. + // + // This member is required. + BackupJobId *string + + // Data checksum + // + // This member is required. + Checksum *string + + // Checksum algorithm + // + // This member is required. + ChecksumAlgorithm types.DataChecksumAlgorithm + + // Describes this chunk's position relative to the other chunks + // + // This member is required. + ChunkIndex int64 + + // Data to be uploaded + // + // This member is required. + Data io.Reader + + // Data length + // + // This member is required. + Length int64 + + // Upload Id for the in-progress upload. + // + // This member is required. + UploadId *string + + noSmithyDocumentSerde +} + +type PutChunkOutput struct { + + // Chunk checksum + // + // This member is required. + ChunkChecksum *string + + // Checksum algorithm + // + // This member is required. + ChunkChecksumAlgorithm types.DataChecksumAlgorithm + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutChunkMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpPutChunk{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutChunk{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddUnsignedPayloadMiddleware(stack); err != nil { + return err + } + if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpPutChunkValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutChunk(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutChunk(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "backup-storage", + OperationName: "PutChunk", + } +} diff --git a/service/backupstorage/api_op_PutObject.go b/service/backupstorage/api_op_PutObject.go new file mode 100644 index 00000000000..7a7681ee92a --- /dev/null +++ b/service/backupstorage/api_op_PutObject.go @@ -0,0 +1,173 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package backupstorage + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/backupstorage/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" +) + +// Upload object that can store object metadata String and data blob in single API +// call using inline chunk field. +func (c *Client) PutObject(ctx context.Context, params *PutObjectInput, optFns ...func(*Options)) (*PutObjectOutput, error) { + if params == nil { + params = &PutObjectInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutObject", params, optFns, c.addOperationPutObjectMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutObjectOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutObjectInput struct { + + // Backup job Id for the in-progress backup. + // + // This member is required. + BackupJobId *string + + // The name of the Object to be uploaded. + // + // This member is required. + ObjectName *string + + // Inline chunk data to be uploaded. + InlineChunk io.Reader + + // Inline chunk checksum + InlineChunkChecksum *string + + // Inline chunk checksum algorithm + InlineChunkChecksumAlgorithm *string + + // Length of the inline chunk data. + InlineChunkLength int64 + + // Store user defined metadata like backup checksum, disk ids, restore metadata + // etc. + MetadataString *string + + // object checksum + ObjectChecksum *string + + // object checksum algorithm + ObjectChecksumAlgorithm types.SummaryChecksumAlgorithm + + // Throw an exception if Object name is already exist. + ThrowOnDuplicate bool + + noSmithyDocumentSerde +} + +type PutObjectOutput struct { + + // Inline chunk checksum + // + // This member is required. + InlineChunkChecksum *string + + // Inline chunk checksum algorithm + // + // This member is required. + InlineChunkChecksumAlgorithm types.DataChecksumAlgorithm + + // object checksum + // + // This member is required. + ObjectChecksum *string + + // object checksum algorithm + // + // This member is required. + ObjectChecksumAlgorithm types.SummaryChecksumAlgorithm + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutObjectMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpPutObject{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutObject{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddUnsignedPayloadMiddleware(stack); err != nil { + return err + } + if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpPutObjectValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutObject(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutObject(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "backup-storage", + OperationName: "PutObject", + } +} diff --git a/service/backupstorage/api_op_StartObject.go b/service/backupstorage/api_op_StartObject.go new file mode 100644 index 00000000000..2eea25cc0dd --- /dev/null +++ b/service/backupstorage/api_op_StartObject.go @@ -0,0 +1,130 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package backupstorage + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Start upload containing one or many chunks. +func (c *Client) StartObject(ctx context.Context, params *StartObjectInput, optFns ...func(*Options)) (*StartObjectOutput, error) { + if params == nil { + params = &StartObjectInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartObject", params, optFns, c.addOperationStartObjectMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartObjectOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartObjectInput struct { + + // Backup job Id for the in-progress backup + // + // This member is required. + BackupJobId *string + + // Name for the object. + // + // This member is required. + ObjectName *string + + // Throw an exception if Object name is already exist. + ThrowOnDuplicate bool + + noSmithyDocumentSerde +} + +type StartObjectOutput struct { + + // Upload Id for a given upload. + // + // This member is required. + UploadId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartObjectMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpStartObject{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartObject{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpStartObjectValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartObject(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStartObject(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "backup-storage", + OperationName: "StartObject", + } +} diff --git a/service/backupstorage/deserializers.go b/service/backupstorage/deserializers.go new file mode 100644 index 00000000000..6061746e93a --- /dev/null +++ b/service/backupstorage/deserializers.go @@ -0,0 +1,2528 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package backupstorage + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/backupstorage/types" + smithy "github.com/aws/smithy-go" + smithyio "github.com/aws/smithy-go/io" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" + "io/ioutil" + "strconv" + "strings" +) + +type awsRestjson1_deserializeOpDeleteObject struct { +} + +func (*awsRestjson1_deserializeOpDeleteObject) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteObject) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteObject(response, &metadata) + } + output := &DeleteObjectOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteObject(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("IllegalArgumentException", errorCode): + return awsRestjson1_deserializeErrorIllegalArgumentException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("RetryableException", errorCode): + return awsRestjson1_deserializeErrorRetryableException(response, errorBody) + + case strings.EqualFold("ServiceInternalException", errorCode): + return awsRestjson1_deserializeErrorServiceInternalException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpGetChunk struct { +} + +func (*awsRestjson1_deserializeOpGetChunk) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetChunk) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetChunk(response, &metadata) + } + output := &GetChunkOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsGetChunkOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + err = awsRestjson1_deserializeOpDocumentGetChunkOutput(output, response.Body) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)} + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetChunk(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("IllegalArgumentException", errorCode): + return awsRestjson1_deserializeErrorIllegalArgumentException(response, errorBody) + + case strings.EqualFold("KMSInvalidKeyUsageException", errorCode): + return awsRestjson1_deserializeErrorKMSInvalidKeyUsageException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("RetryableException", errorCode): + return awsRestjson1_deserializeErrorRetryableException(response, errorBody) + + case strings.EqualFold("ServiceInternalException", errorCode): + return awsRestjson1_deserializeErrorServiceInternalException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsGetChunkOutput(v *GetChunkOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("x-amz-checksum"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Checksum = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("x-amz-checksum-algorithm"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ChecksumAlgorithm = types.DataChecksumAlgorithm(headerValues[0]) + } + + if headerValues := response.Header.Values("x-amz-data-length"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + vv, err := strconv.ParseInt(headerValues[0], 0, 64) + if err != nil { + return err + } + v.Length = vv + } + + return nil +} +func awsRestjson1_deserializeOpDocumentGetChunkOutput(v *GetChunkOutput, body io.ReadCloser) error { + if v == nil { + return fmt.Errorf("unsupported deserialization of nil %T", v) + } + + v.Data = body + return nil +} + +type awsRestjson1_deserializeOpGetObjectMetadata struct { +} + +func (*awsRestjson1_deserializeOpGetObjectMetadata) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetObjectMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetObjectMetadata(response, &metadata) + } + output := &GetObjectMetadataOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsGetObjectMetadataOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + err = awsRestjson1_deserializeOpDocumentGetObjectMetadataOutput(output, response.Body) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)} + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetObjectMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("IllegalArgumentException", errorCode): + return awsRestjson1_deserializeErrorIllegalArgumentException(response, errorBody) + + case strings.EqualFold("KMSInvalidKeyUsageException", errorCode): + return awsRestjson1_deserializeErrorKMSInvalidKeyUsageException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("RetryableException", errorCode): + return awsRestjson1_deserializeErrorRetryableException(response, errorBody) + + case strings.EqualFold("ServiceInternalException", errorCode): + return awsRestjson1_deserializeErrorServiceInternalException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsGetObjectMetadataOutput(v *GetObjectMetadataOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("x-amz-checksum"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.MetadataBlobChecksum = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("x-amz-checksum-algorithm"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.MetadataBlobChecksumAlgorithm = types.DataChecksumAlgorithm(headerValues[0]) + } + + if headerValues := response.Header.Values("x-amz-data-length"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + vv, err := strconv.ParseInt(headerValues[0], 0, 64) + if err != nil { + return err + } + v.MetadataBlobLength = vv + } + + if headerValues := response.Header.Values("x-amz-metadata-string"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.MetadataString = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestjson1_deserializeOpDocumentGetObjectMetadataOutput(v *GetObjectMetadataOutput, body io.ReadCloser) error { + if v == nil { + return fmt.Errorf("unsupported deserialization of nil %T", v) + } + + v.MetadataBlob = body + return nil +} + +type awsRestjson1_deserializeOpListChunks struct { +} + +func (*awsRestjson1_deserializeOpListChunks) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListChunks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListChunks(response, &metadata) + } + output := &ListChunksOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListChunksOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListChunks(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("IllegalArgumentException", errorCode): + return awsRestjson1_deserializeErrorIllegalArgumentException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("RetryableException", errorCode): + return awsRestjson1_deserializeErrorRetryableException(response, errorBody) + + case strings.EqualFold("ServiceInternalException", errorCode): + return awsRestjson1_deserializeErrorServiceInternalException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListChunksOutput(v **ListChunksOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListChunksOutput + if *v == nil { + sv = &ListChunksOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChunkList": + if err := awsRestjson1_deserializeDocumentChunkList(&sv.ChunkList, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListObjects struct { +} + +func (*awsRestjson1_deserializeOpListObjects) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListObjects) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListObjects(response, &metadata) + } + output := &ListObjectsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListObjectsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListObjects(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("IllegalArgumentException", errorCode): + return awsRestjson1_deserializeErrorIllegalArgumentException(response, errorBody) + + case strings.EqualFold("KMSInvalidKeyUsageException", errorCode): + return awsRestjson1_deserializeErrorKMSInvalidKeyUsageException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("RetryableException", errorCode): + return awsRestjson1_deserializeErrorRetryableException(response, errorBody) + + case strings.EqualFold("ServiceInternalException", errorCode): + return awsRestjson1_deserializeErrorServiceInternalException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListObjectsOutput(v **ListObjectsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListObjectsOutput + if *v == nil { + sv = &ListObjectsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "ObjectList": + if err := awsRestjson1_deserializeDocumentObjectList(&sv.ObjectList, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpNotifyObjectComplete struct { +} + +func (*awsRestjson1_deserializeOpNotifyObjectComplete) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpNotifyObjectComplete) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorNotifyObjectComplete(response, &metadata) + } + output := &NotifyObjectCompleteOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentNotifyObjectCompleteOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorNotifyObjectComplete(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("IllegalArgumentException", errorCode): + return awsRestjson1_deserializeErrorIllegalArgumentException(response, errorBody) + + case strings.EqualFold("KMSInvalidKeyUsageException", errorCode): + return awsRestjson1_deserializeErrorKMSInvalidKeyUsageException(response, errorBody) + + case strings.EqualFold("NotReadableInputStreamException", errorCode): + return awsRestjson1_deserializeErrorNotReadableInputStreamException(response, errorBody) + + case strings.EqualFold("RetryableException", errorCode): + return awsRestjson1_deserializeErrorRetryableException(response, errorBody) + + case strings.EqualFold("ServiceInternalException", errorCode): + return awsRestjson1_deserializeErrorServiceInternalException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentNotifyObjectCompleteOutput(v **NotifyObjectCompleteOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *NotifyObjectCompleteOutput + if *v == nil { + sv = &NotifyObjectCompleteOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ObjectChecksum": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.ObjectChecksum = ptr.String(jtv) + } + + case "ObjectChecksumAlgorithm": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SummaryChecksumAlgorithm to be of type string, got %T instead", value) + } + sv.ObjectChecksumAlgorithm = types.SummaryChecksumAlgorithm(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPutChunk struct { +} + +func (*awsRestjson1_deserializeOpPutChunk) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutChunk) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorPutChunk(response, &metadata) + } + output := &PutChunkOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentPutChunkOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorPutChunk(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("IllegalArgumentException", errorCode): + return awsRestjson1_deserializeErrorIllegalArgumentException(response, errorBody) + + case strings.EqualFold("KMSInvalidKeyUsageException", errorCode): + return awsRestjson1_deserializeErrorKMSInvalidKeyUsageException(response, errorBody) + + case strings.EqualFold("NotReadableInputStreamException", errorCode): + return awsRestjson1_deserializeErrorNotReadableInputStreamException(response, errorBody) + + case strings.EqualFold("RetryableException", errorCode): + return awsRestjson1_deserializeErrorRetryableException(response, errorBody) + + case strings.EqualFold("ServiceInternalException", errorCode): + return awsRestjson1_deserializeErrorServiceInternalException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentPutChunkOutput(v **PutChunkOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutChunkOutput + if *v == nil { + sv = &PutChunkOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChunkChecksum": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.ChunkChecksum = ptr.String(jtv) + } + + case "ChunkChecksumAlgorithm": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DataChecksumAlgorithm to be of type string, got %T instead", value) + } + sv.ChunkChecksumAlgorithm = types.DataChecksumAlgorithm(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPutObject struct { +} + +func (*awsRestjson1_deserializeOpPutObject) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutObject) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorPutObject(response, &metadata) + } + output := &PutObjectOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentPutObjectOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorPutObject(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("IllegalArgumentException", errorCode): + return awsRestjson1_deserializeErrorIllegalArgumentException(response, errorBody) + + case strings.EqualFold("KMSInvalidKeyUsageException", errorCode): + return awsRestjson1_deserializeErrorKMSInvalidKeyUsageException(response, errorBody) + + case strings.EqualFold("NotReadableInputStreamException", errorCode): + return awsRestjson1_deserializeErrorNotReadableInputStreamException(response, errorBody) + + case strings.EqualFold("RetryableException", errorCode): + return awsRestjson1_deserializeErrorRetryableException(response, errorBody) + + case strings.EqualFold("ServiceInternalException", errorCode): + return awsRestjson1_deserializeErrorServiceInternalException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentPutObjectOutput(v **PutObjectOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutObjectOutput + if *v == nil { + sv = &PutObjectOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "InlineChunkChecksum": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.InlineChunkChecksum = ptr.String(jtv) + } + + case "InlineChunkChecksumAlgorithm": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DataChecksumAlgorithm to be of type string, got %T instead", value) + } + sv.InlineChunkChecksumAlgorithm = types.DataChecksumAlgorithm(jtv) + } + + case "ObjectChecksum": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.ObjectChecksum = ptr.String(jtv) + } + + case "ObjectChecksumAlgorithm": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SummaryChecksumAlgorithm to be of type string, got %T instead", value) + } + sv.ObjectChecksumAlgorithm = types.SummaryChecksumAlgorithm(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpStartObject struct { +} + +func (*awsRestjson1_deserializeOpStartObject) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpStartObject) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorStartObject(response, &metadata) + } + output := &StartObjectOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentStartObjectOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorStartObject(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("DataAlreadyExistsException", errorCode): + return awsRestjson1_deserializeErrorDataAlreadyExistsException(response, errorBody) + + case strings.EqualFold("IllegalArgumentException", errorCode): + return awsRestjson1_deserializeErrorIllegalArgumentException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("RetryableException", errorCode): + return awsRestjson1_deserializeErrorRetryableException(response, errorBody) + + case strings.EqualFold("ServiceInternalException", errorCode): + return awsRestjson1_deserializeErrorServiceInternalException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentStartObjectOutput(v **StartObjectOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StartObjectOutput + if *v == nil { + sv = &StartObjectOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "UploadId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.UploadId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessDeniedException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorDataAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.DataAlreadyExistsException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentDataAlreadyExistsException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorIllegalArgumentException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.IllegalArgumentException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentIllegalArgumentException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorKMSInvalidKeyUsageException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.KMSInvalidKeyUsageException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentKMSInvalidKeyUsageException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorNotReadableInputStreamException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NotReadableInputStreamException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentNotReadableInputStreamException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceNotFoundException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorRetryableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.RetryableException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentRetryableException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorServiceInternalException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ServiceInternalException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentServiceInternalException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorServiceUnavailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ServiceUnavailableException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentServiceUnavailableException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ThrottlingException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentThrottlingException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentBackupObject(v **types.BackupObject, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.BackupObject + if *v == nil { + sv = &types.BackupObject{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChunksCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected OptionalLong to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ChunksCount = ptr.Int64(i64) + } + + case "MetadataString": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.MetadataString = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "ObjectChecksum": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.ObjectChecksum = ptr.String(jtv) + } + + case "ObjectChecksumAlgorithm": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SummaryChecksumAlgorithm to be of type string, got %T instead", value) + } + sv.ObjectChecksumAlgorithm = types.SummaryChecksumAlgorithm(jtv) + } + + case "ObjectToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.ObjectToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentChunk(v **types.Chunk, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Chunk + if *v == nil { + sv = &types.Chunk{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Checksum": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.Checksum = ptr.String(jtv) + } + + case "ChecksumAlgorithm": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DataChecksumAlgorithm to be of type string, got %T instead", value) + } + sv.ChecksumAlgorithm = types.DataChecksumAlgorithm(jtv) + } + + case "ChunkToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.ChunkToken = ptr.String(jtv) + } + + case "Index": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Index = i64 + } + + case "Length": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Length = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentChunkList(v *[]types.Chunk, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Chunk + if *v == nil { + cv = []types.Chunk{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Chunk + destAddr := &col + if err := awsRestjson1_deserializeDocumentChunk(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentDataAlreadyExistsException(v **types.DataAlreadyExistsException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DataAlreadyExistsException + if *v == nil { + sv = &types.DataAlreadyExistsException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Checksum": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.Checksum = ptr.String(jtv) + } + + case "ChecksumAlgorithm": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.ChecksumAlgorithm = ptr.String(jtv) + } + + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentIllegalArgumentException(v **types.IllegalArgumentException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.IllegalArgumentException + if *v == nil { + sv = &types.IllegalArgumentException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentKMSInvalidKeyUsageException(v **types.KMSInvalidKeyUsageException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.KMSInvalidKeyUsageException + if *v == nil { + sv = &types.KMSInvalidKeyUsageException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentNotReadableInputStreamException(v **types.NotReadableInputStreamException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.NotReadableInputStreamException + if *v == nil { + sv = &types.NotReadableInputStreamException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentObjectList(v *[]types.BackupObject, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.BackupObject + if *v == nil { + cv = []types.BackupObject{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BackupObject + destAddr := &col + if err := awsRestjson1_deserializeDocumentBackupObject(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceNotFoundException + if *v == nil { + sv = &types.ResourceNotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRetryableException(v **types.RetryableException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.RetryableException + if *v == nil { + sv = &types.RetryableException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentServiceInternalException(v **types.ServiceInternalException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ServiceInternalException + if *v == nil { + sv = &types.ServiceInternalException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentServiceUnavailableException(v **types.ServiceUnavailableException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ServiceUnavailableException + if *v == nil { + sv = &types.ServiceUnavailableException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ThrottlingException + if *v == nil { + sv = &types.ThrottlingException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} diff --git a/service/backupstorage/doc.go b/service/backupstorage/doc.go new file mode 100644 index 00000000000..1a1a6d74d45 --- /dev/null +++ b/service/backupstorage/doc.go @@ -0,0 +1,7 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package backupstorage provides the API client, operations, and parameter types +// for AWS Backup Storage. +// +// The frontend service for Cryo Storage. +package backupstorage diff --git a/service/backupstorage/endpoints.go b/service/backupstorage/endpoints.go new file mode 100644 index 00000000000..5239e8f8056 --- /dev/null +++ b/service/backupstorage/endpoints.go @@ -0,0 +1,200 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package backupstorage + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + internalendpoints "github.com/aws/aws-sdk-go-v2/service/backupstorage/internal/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/url" + "strings" +) + +// EndpointResolverOptions is the service endpoint resolver options +type EndpointResolverOptions = internalendpoints.Options + +// EndpointResolver interface for resolving service endpoints. +type EndpointResolver interface { + ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) +} + +var _ EndpointResolver = &internalendpoints.Resolver{} + +// NewDefaultEndpointResolver constructs a new service endpoint resolver +func NewDefaultEndpointResolver() *internalendpoints.Resolver { + return internalendpoints.New() +} + +// EndpointResolverFunc is a helper utility that wraps a function so it satisfies +// the EndpointResolver interface. This is useful when you want to add additional +// endpoint resolving logic, or stub out specific endpoints with custom values. +type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) + +func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + return fn(region, options) +} + +func resolveDefaultEndpointConfiguration(o *Options) { + if o.EndpointResolver != nil { + return + } + o.EndpointResolver = NewDefaultEndpointResolver() +} + +// EndpointResolverFromURL returns an EndpointResolver configured using the +// provided endpoint url. By default, the resolved endpoint resolver uses the +// client region as signing region, and the endpoint source is set to +// EndpointSourceCustom.You can provide functional options to configure endpoint +// values for the resolved endpoint. +func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { + e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} + for _, fn := range optFns { + fn(&e) + } + + return EndpointResolverFunc( + func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { + if len(e.SigningRegion) == 0 { + e.SigningRegion = region + } + return e, nil + }, + ) +} + +type ResolveEndpoint struct { + Resolver EndpointResolver + Options EndpointResolverOptions +} + +func (*ResolveEndpoint) ID() string { + return "ResolveEndpoint" +} + +func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.Resolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + eo := m.Options + eo.Logger = middleware.GetLogger(ctx) + + var endpoint aws.Endpoint + endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL, err = url.Parse(endpoint.URL) + if err != nil { + return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) + } + + if len(awsmiddleware.GetSigningName(ctx)) == 0 { + signingName := endpoint.SigningName + if len(signingName) == 0 { + signingName = "backup-storage" + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + } + ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) + ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) + ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) + ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) + return next.HandleSerialize(ctx, in) +} +func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { + return stack.Serialize.Insert(&ResolveEndpoint{ + Resolver: o.EndpointResolver, + Options: o.EndpointOptions, + }, "OperationSerializer", middleware.Before) +} + +func removeResolveEndpointMiddleware(stack *middleware.Stack) error { + _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) + return err +} + +type wrappedEndpointResolver struct { + awsResolver aws.EndpointResolverWithOptions + resolver EndpointResolver +} + +func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + if w.awsResolver == nil { + goto fallback + } + endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options) + if err == nil { + return endpoint, nil + } + + if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) { + return endpoint, err + } + +fallback: + if w.resolver == nil { + return endpoint, fmt.Errorf("default endpoint resolver provided was nil") + } + return w.resolver.ResolveEndpoint(region, options) +} + +type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) + +func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { + return a(service, region) +} + +var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) + +// withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver. +// If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided +// fallbackResolver for resolution. +// +// fallbackResolver must not be nil +func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver { + var resolver aws.EndpointResolverWithOptions + + if awsResolverWithOptions != nil { + resolver = awsResolverWithOptions + } else if awsResolver != nil { + resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) + } + + return &wrappedEndpointResolver{ + awsResolver: resolver, + resolver: fallbackResolver, + } +} + +func finalizeClientEndpointResolverOptions(options *Options) { + options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() + + if len(options.EndpointOptions.ResolvedRegion) == 0 { + const fipsInfix = "-fips-" + const fipsPrefix = "fips-" + const fipsSuffix = "-fips" + + if strings.Contains(options.Region, fipsInfix) || + strings.Contains(options.Region, fipsPrefix) || + strings.Contains(options.Region, fipsSuffix) { + options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( + options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") + options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled + } + } + +} diff --git a/service/backupstorage/generated.json b/service/backupstorage/generated.json new file mode 100644 index 00000000000..bb382e0abfd --- /dev/null +++ b/service/backupstorage/generated.json @@ -0,0 +1,36 @@ +{ + "dependencies": { + "github.com/aws/aws-sdk-go-v2": "v1.4.0", + "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", + "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", + "github.com/aws/smithy-go": "v1.4.0" + }, + "files": [ + "api_client.go", + "api_client_test.go", + "api_op_DeleteObject.go", + "api_op_GetChunk.go", + "api_op_GetObjectMetadata.go", + "api_op_ListChunks.go", + "api_op_ListObjects.go", + "api_op_NotifyObjectComplete.go", + "api_op_PutChunk.go", + "api_op_PutObject.go", + "api_op_StartObject.go", + "deserializers.go", + "doc.go", + "endpoints.go", + "generated.json", + "internal/endpoints/endpoints.go", + "internal/endpoints/endpoints_test.go", + "protocol_test.go", + "serializers.go", + "types/enums.go", + "types/errors.go", + "types/types.go", + "validators.go" + ], + "go": "1.15", + "module": "github.com/aws/aws-sdk-go-v2/service/backupstorage", + "unstable": false +} diff --git a/service/backupstorage/go.mod b/service/backupstorage/go.mod new file mode 100644 index 00000000000..4f3b58b1a0b --- /dev/null +++ b/service/backupstorage/go.mod @@ -0,0 +1,16 @@ +module github.com/aws/aws-sdk-go-v2/service/backupstorage + +go 1.15 + +require ( + github.com/aws/aws-sdk-go-v2 v1.16.10 + github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.17 + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.11 + github.com/aws/smithy-go v1.12.1 +) + +replace github.com/aws/aws-sdk-go-v2 => ../../ + +replace github.com/aws/aws-sdk-go-v2/internal/configsources => ../../internal/configsources/ + +replace github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 => ../../internal/endpoints/v2/ diff --git a/service/backupstorage/go.sum b/service/backupstorage/go.sum new file mode 100644 index 00000000000..fbab4f88502 --- /dev/null +++ b/service/backupstorage/go.sum @@ -0,0 +1,11 @@ +github.com/aws/smithy-go v1.12.1 h1:yQRC55aXN/y1W10HgwHle01DRuV9Dpf31iGkotjt3Ag= +github.com/aws/smithy-go v1.12.1/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/service/backupstorage/go_module_metadata.go b/service/backupstorage/go_module_metadata.go new file mode 100644 index 00000000000..1eed73e21e4 --- /dev/null +++ b/service/backupstorage/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package backupstorage + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "tip" diff --git a/service/backupstorage/internal/endpoints/endpoints.go b/service/backupstorage/internal/endpoints/endpoints.go new file mode 100644 index 00000000000..b2a3b311661 --- /dev/null +++ b/service/backupstorage/internal/endpoints/endpoints.go @@ -0,0 +1,264 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "github.com/aws/aws-sdk-go-v2/aws" + endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" + "github.com/aws/smithy-go/logging" + "regexp" +) + +// Options is the endpoint resolver configuration options +type Options struct { + // Logger is a logging implementation that log events should be sent to. + Logger logging.Logger + + // LogDeprecated indicates that deprecated endpoints should be logged to the + // provided logger. + LogDeprecated bool + + // ResolvedRegion is used to override the region to be resolved, rather then the + // using the value passed to the ResolveEndpoint method. This value is used by the + // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative + // name. You must not set this value directly in your application. + ResolvedRegion string + + // DisableHTTPS informs the resolver to return an endpoint that does not use the + // HTTPS scheme. + DisableHTTPS bool + + // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. + UseDualStackEndpoint aws.DualStackEndpointState + + // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. + UseFIPSEndpoint aws.FIPSEndpointState +} + +func (o Options) GetResolvedRegion() string { + return o.ResolvedRegion +} + +func (o Options) GetDisableHTTPS() bool { + return o.DisableHTTPS +} + +func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { + return o.UseDualStackEndpoint +} + +func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { + return o.UseFIPSEndpoint +} + +func transformToSharedOptions(options Options) endpoints.Options { + return endpoints.Options{ + Logger: options.Logger, + LogDeprecated: options.LogDeprecated, + ResolvedRegion: options.ResolvedRegion, + DisableHTTPS: options.DisableHTTPS, + UseDualStackEndpoint: options.UseDualStackEndpoint, + UseFIPSEndpoint: options.UseFIPSEndpoint, + } +} + +// Resolver BackupStorage endpoint resolver +type Resolver struct { + partitions endpoints.Partitions +} + +// ResolveEndpoint resolves the service endpoint for the given region and options +func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { + if len(region) == 0 { + return endpoint, &aws.MissingRegionError{} + } + + opt := transformToSharedOptions(options) + return r.partitions.ResolveEndpoint(region, opt) +} + +// New returns a new Resolver +func New() *Resolver { + return &Resolver{ + partitions: defaultPartitions, + } +} + +var partitionRegexp = struct { + Aws *regexp.Regexp + AwsCn *regexp.Regexp + AwsIso *regexp.Regexp + AwsIsoB *regexp.Regexp + AwsUsGov *regexp.Regexp +}{ + + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"), + AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), + AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), + AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), + AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), +} + +var defaultPartitions = endpoints.Partitions{ + { + ID: "aws", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "backupstorage.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "backupstorage-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "backupstorage-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "backupstorage.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.Aws, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "eu-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-east-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-west-2", + }: endpoints.Endpoint{}, + }, + }, + { + ID: "aws-cn", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "backupstorage.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "backupstorage-fips.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "backupstorage-fips.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "backupstorage.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsCn, + IsRegionalized: true, + }, + { + ID: "aws-iso", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "backupstorage-fips.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "backupstorage.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIso, + IsRegionalized: true, + }, + { + ID: "aws-iso-b", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "backupstorage-fips.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "backupstorage.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoB, + IsRegionalized: true, + }, + { + ID: "aws-us-gov", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "backupstorage.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "backupstorage-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "backupstorage-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "backupstorage.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsUsGov, + IsRegionalized: true, + }, +} diff --git a/service/backupstorage/internal/endpoints/endpoints_test.go b/service/backupstorage/internal/endpoints/endpoints_test.go new file mode 100644 index 00000000000..08e5da2d833 --- /dev/null +++ b/service/backupstorage/internal/endpoints/endpoints_test.go @@ -0,0 +1,11 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "testing" +) + +func TestRegexCompile(t *testing.T) { + _ = defaultPartitions +} diff --git a/service/backupstorage/protocol_test.go b/service/backupstorage/protocol_test.go new file mode 100644 index 00000000000..50c88462b13 --- /dev/null +++ b/service/backupstorage/protocol_test.go @@ -0,0 +1,3 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package backupstorage diff --git a/service/backupstorage/serializers.go b/service/backupstorage/serializers.go new file mode 100644 index 00000000000..8c071de7923 --- /dev/null +++ b/service/backupstorage/serializers.go @@ -0,0 +1,770 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package backupstorage + +import ( + "bytes" + "context" + "fmt" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/encoding/httpbinding" + smithyjson "github.com/aws/smithy-go/encoding/json" + "github.com/aws/smithy-go/middleware" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +type awsRestjson1_serializeOpDeleteObject struct { +} + +func (*awsRestjson1_serializeOpDeleteObject) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteObject) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteObjectInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/backup-jobs/{BackupJobId}/object/{ObjectName}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteObjectInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteObjectInput(v *DeleteObjectInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.BackupJobId == nil || len(*v.BackupJobId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member BackupJobId must not be empty")} + } + if v.BackupJobId != nil { + if err := encoder.SetURI("BackupJobId").String(*v.BackupJobId); err != nil { + return err + } + } + + if v.ObjectName == nil || len(*v.ObjectName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ObjectName must not be empty")} + } + if v.ObjectName != nil { + if err := encoder.SetURI("ObjectName").String(*v.ObjectName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetChunk struct { +} + +func (*awsRestjson1_serializeOpGetChunk) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetChunk) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetChunkInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/restore-jobs/{StorageJobId}/chunk/{ChunkToken}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetChunkInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetChunkInput(v *GetChunkInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChunkToken == nil || len(*v.ChunkToken) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChunkToken must not be empty")} + } + if v.ChunkToken != nil { + if err := encoder.SetURI("ChunkToken").String(*v.ChunkToken); err != nil { + return err + } + } + + if v.StorageJobId == nil || len(*v.StorageJobId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member StorageJobId must not be empty")} + } + if v.StorageJobId != nil { + if err := encoder.SetURI("StorageJobId").String(*v.StorageJobId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetObjectMetadata struct { +} + +func (*awsRestjson1_serializeOpGetObjectMetadata) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetObjectMetadata) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetObjectMetadataInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/restore-jobs/{StorageJobId}/object/{ObjectToken}/metadata") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetObjectMetadataInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetObjectMetadataInput(v *GetObjectMetadataInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ObjectToken == nil || len(*v.ObjectToken) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ObjectToken must not be empty")} + } + if v.ObjectToken != nil { + if err := encoder.SetURI("ObjectToken").String(*v.ObjectToken); err != nil { + return err + } + } + + if v.StorageJobId == nil || len(*v.StorageJobId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member StorageJobId must not be empty")} + } + if v.StorageJobId != nil { + if err := encoder.SetURI("StorageJobId").String(*v.StorageJobId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpListChunks struct { +} + +func (*awsRestjson1_serializeOpListChunks) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListChunks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListChunksInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/restore-jobs/{StorageJobId}/chunks/{ObjectToken}/list") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListChunksInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListChunksInput(v *ListChunksInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != 0 { + encoder.SetQuery("max-results").Integer(v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) + } + + if v.ObjectToken == nil || len(*v.ObjectToken) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ObjectToken must not be empty")} + } + if v.ObjectToken != nil { + if err := encoder.SetURI("ObjectToken").String(*v.ObjectToken); err != nil { + return err + } + } + + if v.StorageJobId == nil || len(*v.StorageJobId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member StorageJobId must not be empty")} + } + if v.StorageJobId != nil { + if err := encoder.SetURI("StorageJobId").String(*v.StorageJobId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpListObjects struct { +} + +func (*awsRestjson1_serializeOpListObjects) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListObjects) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListObjectsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/restore-jobs/{StorageJobId}/objects/list") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListObjectsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListObjectsInput(v *ListObjectsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.CreatedAfter != nil { + encoder.SetQuery("created-after").String(smithytime.FormatDateTime(*v.CreatedAfter)) + } + + if v.CreatedBefore != nil { + encoder.SetQuery("created-before").String(smithytime.FormatDateTime(*v.CreatedBefore)) + } + + if v.MaxResults != 0 { + encoder.SetQuery("max-results").Integer(v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) + } + + if v.StartingObjectName != nil { + encoder.SetQuery("starting-object-name").String(*v.StartingObjectName) + } + + if v.StartingObjectPrefix != nil { + encoder.SetQuery("starting-object-prefix").String(*v.StartingObjectPrefix) + } + + if v.StorageJobId == nil || len(*v.StorageJobId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member StorageJobId must not be empty")} + } + if v.StorageJobId != nil { + if err := encoder.SetURI("StorageJobId").String(*v.StorageJobId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpNotifyObjectComplete struct { +} + +func (*awsRestjson1_serializeOpNotifyObjectComplete) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpNotifyObjectComplete) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*NotifyObjectCompleteInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/backup-jobs/{BackupJobId}/object/{UploadId}/complete") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsNotifyObjectCompleteInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + + if input.MetadataBlob != nil { + payload := input.MetadataBlob + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsNotifyObjectCompleteInput(v *NotifyObjectCompleteInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.BackupJobId == nil || len(*v.BackupJobId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member BackupJobId must not be empty")} + } + if v.BackupJobId != nil { + if err := encoder.SetURI("BackupJobId").String(*v.BackupJobId); err != nil { + return err + } + } + + if v.MetadataBlobChecksum != nil { + encoder.SetQuery("metadata-checksum").String(*v.MetadataBlobChecksum) + } + + if len(v.MetadataBlobChecksumAlgorithm) > 0 { + encoder.SetQuery("metadata-checksum-algorithm").String(string(v.MetadataBlobChecksumAlgorithm)) + } + + if v.MetadataBlobLength != 0 { + encoder.SetQuery("metadata-blob-length").Long(v.MetadataBlobLength) + } + + if v.MetadataString != nil { + encoder.SetQuery("metadata-string").String(*v.MetadataString) + } + + if v.ObjectChecksum != nil { + encoder.SetQuery("checksum").String(*v.ObjectChecksum) + } + + if len(v.ObjectChecksumAlgorithm) > 0 { + encoder.SetQuery("checksum-algorithm").String(string(v.ObjectChecksumAlgorithm)) + } + + if v.UploadId == nil || len(*v.UploadId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member UploadId must not be empty")} + } + if v.UploadId != nil { + if err := encoder.SetURI("UploadId").String(*v.UploadId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpPutChunk struct { +} + +func (*awsRestjson1_serializeOpPutChunk) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPutChunk) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutChunkInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/backup-jobs/{BackupJobId}/chunk/{UploadId}/{ChunkIndex}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsPutChunkInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + + if input.Data != nil { + payload := input.Data + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsPutChunkInput(v *PutChunkInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.BackupJobId == nil || len(*v.BackupJobId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member BackupJobId must not be empty")} + } + if v.BackupJobId != nil { + if err := encoder.SetURI("BackupJobId").String(*v.BackupJobId); err != nil { + return err + } + } + + if v.Checksum != nil { + encoder.SetQuery("checksum").String(*v.Checksum) + } + + if len(v.ChecksumAlgorithm) > 0 { + encoder.SetQuery("checksum-algorithm").String(string(v.ChecksumAlgorithm)) + } + + { + if err := encoder.SetURI("ChunkIndex").Long(v.ChunkIndex); err != nil { + return err + } + } + + { + encoder.SetQuery("length").Long(v.Length) + } + + if v.UploadId == nil || len(*v.UploadId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member UploadId must not be empty")} + } + if v.UploadId != nil { + if err := encoder.SetURI("UploadId").String(*v.UploadId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpPutObject struct { +} + +func (*awsRestjson1_serializeOpPutObject) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPutObject) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutObjectInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/backup-jobs/{BackupJobId}/object/{ObjectName}/put-object") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsPutObjectInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + + if input.InlineChunk != nil { + payload := input.InlineChunk + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsPutObjectInput(v *PutObjectInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.BackupJobId == nil || len(*v.BackupJobId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member BackupJobId must not be empty")} + } + if v.BackupJobId != nil { + if err := encoder.SetURI("BackupJobId").String(*v.BackupJobId); err != nil { + return err + } + } + + if v.InlineChunkChecksum != nil { + encoder.SetQuery("checksum").String(*v.InlineChunkChecksum) + } + + if v.InlineChunkChecksumAlgorithm != nil { + encoder.SetQuery("checksum-algorithm").String(*v.InlineChunkChecksumAlgorithm) + } + + if v.InlineChunkLength != 0 { + encoder.SetQuery("length").Long(v.InlineChunkLength) + } + + if v.MetadataString != nil { + encoder.SetQuery("metadata-string").String(*v.MetadataString) + } + + if v.ObjectChecksum != nil { + encoder.SetQuery("object-checksum").String(*v.ObjectChecksum) + } + + if len(v.ObjectChecksumAlgorithm) > 0 { + encoder.SetQuery("object-checksum-algorithm").String(string(v.ObjectChecksumAlgorithm)) + } + + if v.ObjectName == nil || len(*v.ObjectName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ObjectName must not be empty")} + } + if v.ObjectName != nil { + if err := encoder.SetURI("ObjectName").String(*v.ObjectName); err != nil { + return err + } + } + + if v.ThrowOnDuplicate { + encoder.SetQuery("throwOnDuplicate").Boolean(v.ThrowOnDuplicate) + } + + return nil +} + +type awsRestjson1_serializeOpStartObject struct { +} + +func (*awsRestjson1_serializeOpStartObject) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpStartObject) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StartObjectInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/backup-jobs/{BackupJobId}/object/{ObjectName}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsStartObjectInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentStartObjectInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsStartObjectInput(v *StartObjectInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.BackupJobId == nil || len(*v.BackupJobId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member BackupJobId must not be empty")} + } + if v.BackupJobId != nil { + if err := encoder.SetURI("BackupJobId").String(*v.BackupJobId); err != nil { + return err + } + } + + if v.ObjectName == nil || len(*v.ObjectName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ObjectName must not be empty")} + } + if v.ObjectName != nil { + if err := encoder.SetURI("ObjectName").String(*v.ObjectName); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentStartObjectInput(v *StartObjectInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ThrowOnDuplicate { + ok := object.Key("ThrowOnDuplicate") + ok.Boolean(v.ThrowOnDuplicate) + } + + return nil +} diff --git a/service/backupstorage/types/enums.go b/service/backupstorage/types/enums.go new file mode 100644 index 00000000000..8b8230c3129 --- /dev/null +++ b/service/backupstorage/types/enums.go @@ -0,0 +1,35 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type DataChecksumAlgorithm string + +// Enum values for DataChecksumAlgorithm +const ( + DataChecksumAlgorithmSha256 DataChecksumAlgorithm = "SHA256" +) + +// Values returns all known values for DataChecksumAlgorithm. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (DataChecksumAlgorithm) Values() []DataChecksumAlgorithm { + return []DataChecksumAlgorithm{ + "SHA256", + } +} + +type SummaryChecksumAlgorithm string + +// Enum values for SummaryChecksumAlgorithm +const ( + SummaryChecksumAlgorithmSummary SummaryChecksumAlgorithm = "SUMMARY" +) + +// Values returns all known values for SummaryChecksumAlgorithm. Note that this can +// be expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (SummaryChecksumAlgorithm) Values() []SummaryChecksumAlgorithm { + return []SummaryChecksumAlgorithm{ + "SUMMARY", + } +} diff --git a/service/backupstorage/types/errors.go b/service/backupstorage/types/errors.go new file mode 100644 index 00000000000..f9dc0b5c5ef --- /dev/null +++ b/service/backupstorage/types/errors.go @@ -0,0 +1,208 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "fmt" + smithy "github.com/aws/smithy-go" +) + +type AccessDeniedException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *AccessDeniedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AccessDeniedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AccessDeniedException) ErrorCode() string { return "AccessDeniedException" } +func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Non-retryable exception. Attempted to create already existing object or chunk. +// This message contains a checksum of already presented data. +type DataAlreadyExistsException struct { + Message *string + + Checksum *string + ChecksumAlgorithm *string + + noSmithyDocumentSerde +} + +func (e *DataAlreadyExistsException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *DataAlreadyExistsException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *DataAlreadyExistsException) ErrorCode() string { return "DataAlreadyExistsException" } +func (e *DataAlreadyExistsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Non-retryable exception, indicates client error (wrong argument passed to API). +// See exception message for details. +type IllegalArgumentException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *IllegalArgumentException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *IllegalArgumentException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *IllegalArgumentException) ErrorCode() string { return "IllegalArgumentException" } +func (e *IllegalArgumentException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Non-retryable exception. Indicates the KMS key usage is incorrect. See exception +// message for details. +type KMSInvalidKeyUsageException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *KMSInvalidKeyUsageException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *KMSInvalidKeyUsageException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *KMSInvalidKeyUsageException) ErrorCode() string { return "KMSInvalidKeyUsageException" } +func (e *KMSInvalidKeyUsageException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Retryalble exception. Indicated issues while reading an input stream due to the +// networking issues or connection drop on the client side. +type NotReadableInputStreamException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *NotReadableInputStreamException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NotReadableInputStreamException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NotReadableInputStreamException) ErrorCode() string { + return "NotReadableInputStreamException" +} +func (e *NotReadableInputStreamException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Non-retryable exception. Attempted to make an operation on non-existing or +// expired resource. +type ResourceNotFoundException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *ResourceNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceNotFoundException) ErrorCode() string { return "ResourceNotFoundException" } +func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Retryable exception. In general indicates internal failure that can be fixed by +// retry. +type RetryableException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *RetryableException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *RetryableException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *RetryableException) ErrorCode() string { return "RetryableException" } +func (e *RetryableException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// Deprecated. To be removed from the model. +type ServiceInternalException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *ServiceInternalException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ServiceInternalException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ServiceInternalException) ErrorCode() string { return "ServiceInternalException" } +func (e *ServiceInternalException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// Retryable exception, indicates internal server error. +type ServiceUnavailableException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *ServiceUnavailableException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ServiceUnavailableException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ServiceUnavailableException) ErrorCode() string { return "ServiceUnavailableException" } +func (e *ServiceUnavailableException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// Increased rate over throttling limits. Can be retried with exponential backoff. +type ThrottlingException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *ThrottlingException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ThrottlingException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ThrottlingException) ErrorCode() string { return "ThrottlingException" } +func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/service/backupstorage/types/types.go b/service/backupstorage/types/types.go new file mode 100644 index 00000000000..bc1f581ea4c --- /dev/null +++ b/service/backupstorage/types/types.go @@ -0,0 +1,72 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + smithydocument "github.com/aws/smithy-go/document" +) + +// Object +type BackupObject struct { + + // Object name + // + // This member is required. + Name *string + + // Object checksum + // + // This member is required. + ObjectChecksum *string + + // Checksum algorithm + // + // This member is required. + ObjectChecksumAlgorithm SummaryChecksumAlgorithm + + // Object token + // + // This member is required. + ObjectToken *string + + // Number of chunks in object + ChunksCount *int64 + + // Metadata string associated with the Object + MetadataString *string + + noSmithyDocumentSerde +} + +// Chunk +type Chunk struct { + + // Chunk checksum + // + // This member is required. + Checksum *string + + // Checksum algorithm + // + // This member is required. + ChecksumAlgorithm DataChecksumAlgorithm + + // Chunk token + // + // This member is required. + ChunkToken *string + + // Chunk index + // + // This member is required. + Index int64 + + // Chunk length + // + // This member is required. + Length int64 + + noSmithyDocumentSerde +} + +type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/service/backupstorage/validators.go b/service/backupstorage/validators.go new file mode 100644 index 00000000000..cb7054b474d --- /dev/null +++ b/service/backupstorage/validators.go @@ -0,0 +1,400 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package backupstorage + +import ( + "context" + "fmt" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +type validateOpDeleteObject struct { +} + +func (*validateOpDeleteObject) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteObject) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteObjectInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteObjectInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetChunk struct { +} + +func (*validateOpGetChunk) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetChunk) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetChunkInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetChunkInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetObjectMetadata struct { +} + +func (*validateOpGetObjectMetadata) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetObjectMetadata) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetObjectMetadataInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetObjectMetadataInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListChunks struct { +} + +func (*validateOpListChunks) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListChunks) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListChunksInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListChunksInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListObjects struct { +} + +func (*validateOpListObjects) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListObjects) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListObjectsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListObjectsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpNotifyObjectComplete struct { +} + +func (*validateOpNotifyObjectComplete) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpNotifyObjectComplete) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*NotifyObjectCompleteInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpNotifyObjectCompleteInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutChunk struct { +} + +func (*validateOpPutChunk) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutChunk) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutChunkInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutChunkInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutObject struct { +} + +func (*validateOpPutObject) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutObject) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutObjectInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutObjectInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStartObject struct { +} + +func (*validateOpStartObject) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartObject) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartObjectInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartObjectInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpDeleteObjectValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteObject{}, middleware.After) +} + +func addOpGetChunkValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetChunk{}, middleware.After) +} + +func addOpGetObjectMetadataValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetObjectMetadata{}, middleware.After) +} + +func addOpListChunksValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListChunks{}, middleware.After) +} + +func addOpListObjectsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListObjects{}, middleware.After) +} + +func addOpNotifyObjectCompleteValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpNotifyObjectComplete{}, middleware.After) +} + +func addOpPutChunkValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutChunk{}, middleware.After) +} + +func addOpPutObjectValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutObject{}, middleware.After) +} + +func addOpStartObjectValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartObject{}, middleware.After) +} + +func validateOpDeleteObjectInput(v *DeleteObjectInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteObjectInput"} + if v.BackupJobId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BackupJobId")) + } + if v.ObjectName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ObjectName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetChunkInput(v *GetChunkInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetChunkInput"} + if v.StorageJobId == nil { + invalidParams.Add(smithy.NewErrParamRequired("StorageJobId")) + } + if v.ChunkToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChunkToken")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetObjectMetadataInput(v *GetObjectMetadataInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetObjectMetadataInput"} + if v.StorageJobId == nil { + invalidParams.Add(smithy.NewErrParamRequired("StorageJobId")) + } + if v.ObjectToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("ObjectToken")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListChunksInput(v *ListChunksInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListChunksInput"} + if v.StorageJobId == nil { + invalidParams.Add(smithy.NewErrParamRequired("StorageJobId")) + } + if v.ObjectToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("ObjectToken")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListObjectsInput(v *ListObjectsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListObjectsInput"} + if v.StorageJobId == nil { + invalidParams.Add(smithy.NewErrParamRequired("StorageJobId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpNotifyObjectCompleteInput(v *NotifyObjectCompleteInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "NotifyObjectCompleteInput"} + if v.BackupJobId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BackupJobId")) + } + if v.UploadId == nil { + invalidParams.Add(smithy.NewErrParamRequired("UploadId")) + } + if v.ObjectChecksum == nil { + invalidParams.Add(smithy.NewErrParamRequired("ObjectChecksum")) + } + if len(v.ObjectChecksumAlgorithm) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ObjectChecksumAlgorithm")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutChunkInput(v *PutChunkInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutChunkInput"} + if v.BackupJobId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BackupJobId")) + } + if v.UploadId == nil { + invalidParams.Add(smithy.NewErrParamRequired("UploadId")) + } + if v.Data == nil { + invalidParams.Add(smithy.NewErrParamRequired("Data")) + } + if v.Checksum == nil { + invalidParams.Add(smithy.NewErrParamRequired("Checksum")) + } + if len(v.ChecksumAlgorithm) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ChecksumAlgorithm")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutObjectInput(v *PutObjectInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutObjectInput"} + if v.BackupJobId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BackupJobId")) + } + if v.ObjectName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ObjectName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpStartObjectInput(v *StartObjectInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartObjectInput"} + if v.BackupJobId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BackupJobId")) + } + if v.ObjectName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ObjectName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/chimesdkmeetings/api_op_UntagResource.go b/service/chimesdkmeetings/api_op_UntagResource.go index ef8f66ba703..5fc52b63fdd 100644 --- a/service/chimesdkmeetings/api_op_UntagResource.go +++ b/service/chimesdkmeetings/api_op_UntagResource.go @@ -29,7 +29,8 @@ import ( // that created the resource. For example, to remove the tags from an Amazon EC2 // instance using the UntagResources operation, you must have both of the following // permissions: tag:UntagResource -// ChimeSDKMeetings:DeleteTags +// +// ChimeSDKMeetings:DeleteTags func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { if params == nil { params = &UntagResourceInput{} diff --git a/service/clouddirectory/types/types.go b/service/clouddirectory/types/types.go index 955a072b754..dd631ad9552 100644 --- a/service/clouddirectory/types/types.go +++ b/service/clouddirectory/types/types.go @@ -1511,11 +1511,12 @@ type Tag struct { // single value. // // The following types satisfy this interface: -// TypedAttributeValueMemberBinaryValue -// TypedAttributeValueMemberBooleanValue -// TypedAttributeValueMemberDatetimeValue -// TypedAttributeValueMemberNumberValue -// TypedAttributeValueMemberStringValue +// +// TypedAttributeValueMemberBinaryValue +// TypedAttributeValueMemberBooleanValue +// TypedAttributeValueMemberDatetimeValue +// TypedAttributeValueMemberNumberValue +// TypedAttributeValueMemberStringValue type TypedAttributeValue interface { isTypedAttributeValue() } diff --git a/service/configservice/api_op_DeleteConfigRule.go b/service/configservice/api_op_DeleteConfigRule.go index ad2e578ab60..946f682b510 100644 --- a/service/configservice/api_op_DeleteConfigRule.go +++ b/service/configservice/api_op_DeleteConfigRule.go @@ -31,7 +31,6 @@ func (c *Client) DeleteConfigRule(ctx context.Context, params *DeleteConfigRuleI return out, nil } -// type DeleteConfigRuleInput struct { // The name of the Config rule that you want to delete. diff --git a/service/configservice/api_op_DeleteEvaluationResults.go b/service/configservice/api_op_DeleteEvaluationResults.go index 1b68bedd163..506297cc471 100644 --- a/service/configservice/api_op_DeleteEvaluationResults.go +++ b/service/configservice/api_op_DeleteEvaluationResults.go @@ -29,7 +29,6 @@ func (c *Client) DeleteEvaluationResults(ctx context.Context, params *DeleteEval return out, nil } -// type DeleteEvaluationResultsInput struct { // The name of the Config rule for which you want to delete the evaluation results. diff --git a/service/configservice/api_op_DescribeComplianceByConfigRule.go b/service/configservice/api_op_DescribeComplianceByConfigRule.go index 32bac13dbb8..67b796bb13c 100644 --- a/service/configservice/api_op_DescribeComplianceByConfigRule.go +++ b/service/configservice/api_op_DescribeComplianceByConfigRule.go @@ -48,7 +48,6 @@ func (c *Client) DescribeComplianceByConfigRule(ctx context.Context, params *Des return out, nil } -// type DescribeComplianceByConfigRuleInput struct { // Filters the results by compliance. The allowed values are COMPLIANT and @@ -65,7 +64,6 @@ type DescribeComplianceByConfigRuleInput struct { noSmithyDocumentSerde } -// type DescribeComplianceByConfigRuleOutput struct { // Indicates whether each of the specified Config rules is compliant. diff --git a/service/configservice/api_op_DescribeComplianceByResource.go b/service/configservice/api_op_DescribeComplianceByResource.go index 4a65a7d5808..917722f145a 100644 --- a/service/configservice/api_op_DescribeComplianceByResource.go +++ b/service/configservice/api_op_DescribeComplianceByResource.go @@ -49,7 +49,6 @@ func (c *Client) DescribeComplianceByResource(ctx context.Context, params *Descr return out, nil } -// type DescribeComplianceByResourceInput struct { // Filters the results by compliance. The allowed values are COMPLIANT, @@ -79,7 +78,6 @@ type DescribeComplianceByResourceInput struct { noSmithyDocumentSerde } -// type DescribeComplianceByResourceOutput struct { // Indicates whether the specified Amazon Web Services resource complies with all diff --git a/service/configservice/api_op_DescribeConfigRuleEvaluationStatus.go b/service/configservice/api_op_DescribeConfigRuleEvaluationStatus.go index a9a9c04fa3f..4b11b26c8d1 100644 --- a/service/configservice/api_op_DescribeConfigRuleEvaluationStatus.go +++ b/service/configservice/api_op_DescribeConfigRuleEvaluationStatus.go @@ -31,7 +31,6 @@ func (c *Client) DescribeConfigRuleEvaluationStatus(ctx context.Context, params return out, nil } -// type DescribeConfigRuleEvaluationStatusInput struct { // The name of the Config managed rules for which you want status information. If @@ -53,7 +52,6 @@ type DescribeConfigRuleEvaluationStatusInput struct { noSmithyDocumentSerde } -// type DescribeConfigRuleEvaluationStatusOutput struct { // Status information about your Config managed rules. diff --git a/service/configservice/api_op_DescribeConfigRules.go b/service/configservice/api_op_DescribeConfigRules.go index 6be217467e1..37b041bbc69 100644 --- a/service/configservice/api_op_DescribeConfigRules.go +++ b/service/configservice/api_op_DescribeConfigRules.go @@ -28,7 +28,6 @@ func (c *Client) DescribeConfigRules(ctx context.Context, params *DescribeConfig return out, nil } -// type DescribeConfigRulesInput struct { // The names of the Config rules for which you want details. If you do not specify @@ -42,7 +41,6 @@ type DescribeConfigRulesInput struct { noSmithyDocumentSerde } -// type DescribeConfigRulesOutput struct { // The details about your Config rules. diff --git a/service/configservice/api_op_GetComplianceDetailsByConfigRule.go b/service/configservice/api_op_GetComplianceDetailsByConfigRule.go index f2beafa0774..a384bd9b5cb 100644 --- a/service/configservice/api_op_GetComplianceDetailsByConfigRule.go +++ b/service/configservice/api_op_GetComplianceDetailsByConfigRule.go @@ -31,7 +31,6 @@ func (c *Client) GetComplianceDetailsByConfigRule(ctx context.Context, params *G return out, nil } -// type GetComplianceDetailsByConfigRuleInput struct { // The name of the Config rule for which you want compliance information. @@ -55,7 +54,6 @@ type GetComplianceDetailsByConfigRuleInput struct { noSmithyDocumentSerde } -// type GetComplianceDetailsByConfigRuleOutput struct { // Indicates whether the Amazon Web Services resource complies with the specified diff --git a/service/configservice/api_op_GetComplianceDetailsByResource.go b/service/configservice/api_op_GetComplianceDetailsByResource.go index 5df708b6405..33447fb212f 100644 --- a/service/configservice/api_op_GetComplianceDetailsByResource.go +++ b/service/configservice/api_op_GetComplianceDetailsByResource.go @@ -30,7 +30,6 @@ func (c *Client) GetComplianceDetailsByResource(ctx context.Context, params *Get return out, nil } -// type GetComplianceDetailsByResourceInput struct { // The ID of the Amazon Web Services resource for which you want compliance @@ -56,7 +55,6 @@ type GetComplianceDetailsByResourceInput struct { noSmithyDocumentSerde } -// type GetComplianceDetailsByResourceOutput struct { // Indicates whether the specified Amazon Web Services resource complies each diff --git a/service/configservice/api_op_GetComplianceSummaryByConfigRule.go b/service/configservice/api_op_GetComplianceSummaryByConfigRule.go index 2d394a85e76..0773f8933e8 100644 --- a/service/configservice/api_op_GetComplianceSummaryByConfigRule.go +++ b/service/configservice/api_op_GetComplianceSummaryByConfigRule.go @@ -32,7 +32,6 @@ type GetComplianceSummaryByConfigRuleInput struct { noSmithyDocumentSerde } -// type GetComplianceSummaryByConfigRuleOutput struct { // The number of Config rules that are compliant and the number that are diff --git a/service/configservice/api_op_GetComplianceSummaryByResourceType.go b/service/configservice/api_op_GetComplianceSummaryByResourceType.go index 53c75f60366..4c9e797a443 100644 --- a/service/configservice/api_op_GetComplianceSummaryByResourceType.go +++ b/service/configservice/api_op_GetComplianceSummaryByResourceType.go @@ -29,7 +29,6 @@ func (c *Client) GetComplianceSummaryByResourceType(ctx context.Context, params return out, nil } -// type GetComplianceSummaryByResourceTypeInput struct { // Specify one or more resource types to get the number of resources that are @@ -42,7 +41,6 @@ type GetComplianceSummaryByResourceTypeInput struct { noSmithyDocumentSerde } -// type GetComplianceSummaryByResourceTypeOutput struct { // The number of resources that are compliant and the number that are noncompliant. diff --git a/service/configservice/api_op_ListDiscoveredResources.go b/service/configservice/api_op_ListDiscoveredResources.go index 2ca5794f63e..c818aea260d 100644 --- a/service/configservice/api_op_ListDiscoveredResources.go +++ b/service/configservice/api_op_ListDiscoveredResources.go @@ -38,7 +38,6 @@ func (c *Client) ListDiscoveredResources(ctx context.Context, params *ListDiscov return out, nil } -// type ListDiscoveredResourcesInput struct { // The type of resources that you want Config to list in the response. @@ -72,7 +71,6 @@ type ListDiscoveredResourcesInput struct { noSmithyDocumentSerde } -// type ListDiscoveredResourcesOutput struct { // The string that you use in a subsequent request to get the next page of results diff --git a/service/configservice/api_op_PutEvaluations.go b/service/configservice/api_op_PutEvaluations.go index db13ea7bbc5..fea49d85f64 100644 --- a/service/configservice/api_op_PutEvaluations.go +++ b/service/configservice/api_op_PutEvaluations.go @@ -28,7 +28,6 @@ func (c *Client) PutEvaluations(ctx context.Context, params *PutEvaluationsInput return out, nil } -// type PutEvaluationsInput struct { // An encrypted token that associates an evaluation with an Config rule. Identifies @@ -52,7 +51,6 @@ type PutEvaluationsInput struct { noSmithyDocumentSerde } -// type PutEvaluationsOutput struct { // Requests that failed because of a client or server error. diff --git a/service/configservice/api_op_StartConfigRulesEvaluation.go b/service/configservice/api_op_StartConfigRulesEvaluation.go index f6e713d9072..e2526fef550 100644 --- a/service/configservice/api_op_StartConfigRulesEvaluation.go +++ b/service/configservice/api_op_StartConfigRulesEvaluation.go @@ -54,7 +54,6 @@ func (c *Client) StartConfigRulesEvaluation(ctx context.Context, params *StartCo return out, nil } -// type StartConfigRulesEvaluationInput struct { // The list of names of Config rules that you want to run evaluations for. diff --git a/service/connect/types/errors.go b/service/connect/types/errors.go index 08129865533..4594e00da6a 100644 --- a/service/connect/types/errors.go +++ b/service/connect/types/errors.go @@ -266,7 +266,6 @@ func (e *OutboundContactNotPermittedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type PropertyValidationException struct { Message *string diff --git a/service/connect/types/types.go b/service/connect/types/types.go index de9a76cb9de..09ac893e63c 100644 --- a/service/connect/types/types.go +++ b/service/connect/types/types.go @@ -1464,12 +1464,13 @@ type Reference struct { // one non null field between the URL and attachment based on the reference type. // // The following types satisfy this interface: -// ReferenceSummaryMemberAttachment -// ReferenceSummaryMemberDate -// ReferenceSummaryMemberEmail -// ReferenceSummaryMemberNumber -// ReferenceSummaryMemberString -// ReferenceSummaryMemberUrl +// +// ReferenceSummaryMemberAttachment +// ReferenceSummaryMemberDate +// ReferenceSummaryMemberEmail +// ReferenceSummaryMemberNumber +// ReferenceSummaryMemberString +// ReferenceSummaryMemberUrl type ReferenceSummary interface { isReferenceSummary() } diff --git a/service/connectcampaigns/types/types.go b/service/connectcampaigns/types/types.go index 208fe912e8d..5f384ba5720 100644 --- a/service/connectcampaigns/types/types.go +++ b/service/connectcampaigns/types/types.go @@ -95,8 +95,9 @@ type CampaignSummary struct { // The possible types of dialer config parameters // // The following types satisfy this interface: -// DialerConfigMemberPredictiveDialerConfig -// DialerConfigMemberProgressiveDialerConfig +// +// DialerConfigMemberPredictiveDialerConfig +// DialerConfigMemberProgressiveDialerConfig type DialerConfig interface { isDialerConfig() } diff --git a/service/databasemigrationservice/api_op_AddTagsToResource.go b/service/databasemigrationservice/api_op_AddTagsToResource.go index dde09b74f34..d79c4ac3220 100644 --- a/service/databasemigrationservice/api_op_AddTagsToResource.go +++ b/service/databasemigrationservice/api_op_AddTagsToResource.go @@ -50,7 +50,6 @@ type AddTagsToResourceInput struct { noSmithyDocumentSerde } -// type AddTagsToResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/databasemigrationservice/api_op_ApplyPendingMaintenanceAction.go b/service/databasemigrationservice/api_op_ApplyPendingMaintenanceAction.go index 58fe02f716f..02996daa71f 100644 --- a/service/databasemigrationservice/api_op_ApplyPendingMaintenanceAction.go +++ b/service/databasemigrationservice/api_op_ApplyPendingMaintenanceAction.go @@ -28,7 +28,6 @@ func (c *Client) ApplyPendingMaintenanceAction(ctx context.Context, params *Appl return out, nil } -// type ApplyPendingMaintenanceActionInput struct { // The pending maintenance action to apply to this resource. Valid values: @@ -61,7 +60,6 @@ type ApplyPendingMaintenanceActionInput struct { noSmithyDocumentSerde } -// type ApplyPendingMaintenanceActionOutput struct { // The DMS resource that the pending maintenance action will be applied to. diff --git a/service/databasemigrationservice/api_op_CancelReplicationTaskAssessmentRun.go b/service/databasemigrationservice/api_op_CancelReplicationTaskAssessmentRun.go index b17ef7ee00f..ce17d48cac3 100644 --- a/service/databasemigrationservice/api_op_CancelReplicationTaskAssessmentRun.go +++ b/service/databasemigrationservice/api_op_CancelReplicationTaskAssessmentRun.go @@ -29,7 +29,6 @@ func (c *Client) CancelReplicationTaskAssessmentRun(ctx context.Context, params return out, nil } -// type CancelReplicationTaskAssessmentRunInput struct { // Amazon Resource Name (ARN) of the premigration assessment run to be canceled. @@ -40,7 +39,6 @@ type CancelReplicationTaskAssessmentRunInput struct { noSmithyDocumentSerde } -// type CancelReplicationTaskAssessmentRunOutput struct { // The ReplicationTaskAssessmentRun object for the canceled assessment run. diff --git a/service/databasemigrationservice/api_op_CreateEndpoint.go b/service/databasemigrationservice/api_op_CreateEndpoint.go index 908299c3788..31739ccdbf4 100644 --- a/service/databasemigrationservice/api_op_CreateEndpoint.go +++ b/service/databasemigrationservice/api_op_CreateEndpoint.go @@ -32,7 +32,6 @@ func (c *Client) CreateEndpoint(ctx context.Context, params *CreateEndpointInput return out, nil } -// type CreateEndpointInput struct { // The database endpoint identifier. Identifiers must begin with a letter and must @@ -249,7 +248,6 @@ type CreateEndpointInput struct { noSmithyDocumentSerde } -// type CreateEndpointOutput struct { // The endpoint that was created. diff --git a/service/databasemigrationservice/api_op_CreateEventSubscription.go b/service/databasemigrationservice/api_op_CreateEventSubscription.go index f9efd698d0a..12214ce8d38 100644 --- a/service/databasemigrationservice/api_op_CreateEventSubscription.go +++ b/service/databasemigrationservice/api_op_CreateEventSubscription.go @@ -40,7 +40,6 @@ func (c *Client) CreateEventSubscription(ctx context.Context, params *CreateEven return out, nil } -// type CreateEventSubscriptionInput struct { // The Amazon Resource Name (ARN) of the Amazon SNS topic created for event @@ -85,7 +84,6 @@ type CreateEventSubscriptionInput struct { noSmithyDocumentSerde } -// type CreateEventSubscriptionOutput struct { // The event subscription that was created. diff --git a/service/databasemigrationservice/api_op_CreateReplicationInstance.go b/service/databasemigrationservice/api_op_CreateReplicationInstance.go index a0684890060..9359237e6bf 100644 --- a/service/databasemigrationservice/api_op_CreateReplicationInstance.go +++ b/service/databasemigrationservice/api_op_CreateReplicationInstance.go @@ -34,7 +34,6 @@ func (c *Client) CreateReplicationInstance(ctx context.Context, params *CreateRe return out, nil } -// type CreateReplicationInstanceInput struct { // The compute and memory capacity of the replication instance as defined for the @@ -136,7 +135,6 @@ type CreateReplicationInstanceInput struct { noSmithyDocumentSerde } -// type CreateReplicationInstanceOutput struct { // The replication instance that was created. diff --git a/service/databasemigrationservice/api_op_CreateReplicationSubnetGroup.go b/service/databasemigrationservice/api_op_CreateReplicationSubnetGroup.go index fb283ded5b9..8b541dccd16 100644 --- a/service/databasemigrationservice/api_op_CreateReplicationSubnetGroup.go +++ b/service/databasemigrationservice/api_op_CreateReplicationSubnetGroup.go @@ -30,7 +30,6 @@ func (c *Client) CreateReplicationSubnetGroup(ctx context.Context, params *Creat return out, nil } -// type CreateReplicationSubnetGroupInput struct { // The description for the subnet group. @@ -57,7 +56,6 @@ type CreateReplicationSubnetGroupInput struct { noSmithyDocumentSerde } -// type CreateReplicationSubnetGroupOutput struct { // The replication subnet group that was created. diff --git a/service/databasemigrationservice/api_op_CreateReplicationTask.go b/service/databasemigrationservice/api_op_CreateReplicationTask.go index 755c09a53c0..a0017fe7a67 100644 --- a/service/databasemigrationservice/api_op_CreateReplicationTask.go +++ b/service/databasemigrationservice/api_op_CreateReplicationTask.go @@ -28,7 +28,6 @@ func (c *Client) CreateReplicationTask(ctx context.Context, params *CreateReplic return out, nil } -// type CreateReplicationTaskInput struct { // The migration type. Valid values: full-load | cdc | full-load-and-cdc @@ -129,7 +128,6 @@ type CreateReplicationTaskInput struct { noSmithyDocumentSerde } -// type CreateReplicationTaskOutput struct { // The replication task that was created. diff --git a/service/databasemigrationservice/api_op_DeleteConnection.go b/service/databasemigrationservice/api_op_DeleteConnection.go index 29ad4fca7b8..3f9d7c08478 100644 --- a/service/databasemigrationservice/api_op_DeleteConnection.go +++ b/service/databasemigrationservice/api_op_DeleteConnection.go @@ -27,7 +27,6 @@ func (c *Client) DeleteConnection(ctx context.Context, params *DeleteConnectionI return out, nil } -// type DeleteConnectionInput struct { // The Amazon Resource Name (ARN) string that uniquely identifies the endpoint. @@ -43,7 +42,6 @@ type DeleteConnectionInput struct { noSmithyDocumentSerde } -// type DeleteConnectionOutput struct { // The connection that is being deleted. diff --git a/service/databasemigrationservice/api_op_DeleteEndpoint.go b/service/databasemigrationservice/api_op_DeleteEndpoint.go index ca400c989fa..15650286482 100644 --- a/service/databasemigrationservice/api_op_DeleteEndpoint.go +++ b/service/databasemigrationservice/api_op_DeleteEndpoint.go @@ -28,7 +28,6 @@ func (c *Client) DeleteEndpoint(ctx context.Context, params *DeleteEndpointInput return out, nil } -// type DeleteEndpointInput struct { // The Amazon Resource Name (ARN) string that uniquely identifies the endpoint. @@ -39,7 +38,6 @@ type DeleteEndpointInput struct { noSmithyDocumentSerde } -// type DeleteEndpointOutput struct { // The endpoint that was deleted. diff --git a/service/databasemigrationservice/api_op_DeleteEventSubscription.go b/service/databasemigrationservice/api_op_DeleteEventSubscription.go index 09bafd0fc22..fd11d71c2de 100644 --- a/service/databasemigrationservice/api_op_DeleteEventSubscription.go +++ b/service/databasemigrationservice/api_op_DeleteEventSubscription.go @@ -27,7 +27,6 @@ func (c *Client) DeleteEventSubscription(ctx context.Context, params *DeleteEven return out, nil } -// type DeleteEventSubscriptionInput struct { // The name of the DMS event notification subscription to be deleted. @@ -38,7 +37,6 @@ type DeleteEventSubscriptionInput struct { noSmithyDocumentSerde } -// type DeleteEventSubscriptionOutput struct { // The event subscription that was deleted. diff --git a/service/databasemigrationservice/api_op_DeleteReplicationInstance.go b/service/databasemigrationservice/api_op_DeleteReplicationInstance.go index 770907cd328..7860b5d5f7f 100644 --- a/service/databasemigrationservice/api_op_DeleteReplicationInstance.go +++ b/service/databasemigrationservice/api_op_DeleteReplicationInstance.go @@ -28,7 +28,6 @@ func (c *Client) DeleteReplicationInstance(ctx context.Context, params *DeleteRe return out, nil } -// type DeleteReplicationInstanceInput struct { // The Amazon Resource Name (ARN) of the replication instance to be deleted. @@ -39,7 +38,6 @@ type DeleteReplicationInstanceInput struct { noSmithyDocumentSerde } -// type DeleteReplicationInstanceOutput struct { // The replication instance that was deleted. diff --git a/service/databasemigrationservice/api_op_DeleteReplicationSubnetGroup.go b/service/databasemigrationservice/api_op_DeleteReplicationSubnetGroup.go index 23b5ac4f98e..aef90701ee9 100644 --- a/service/databasemigrationservice/api_op_DeleteReplicationSubnetGroup.go +++ b/service/databasemigrationservice/api_op_DeleteReplicationSubnetGroup.go @@ -26,7 +26,6 @@ func (c *Client) DeleteReplicationSubnetGroup(ctx context.Context, params *Delet return out, nil } -// type DeleteReplicationSubnetGroupInput struct { // The subnet group name of the replication instance. @@ -37,7 +36,6 @@ type DeleteReplicationSubnetGroupInput struct { noSmithyDocumentSerde } -// type DeleteReplicationSubnetGroupOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/databasemigrationservice/api_op_DeleteReplicationTask.go b/service/databasemigrationservice/api_op_DeleteReplicationTask.go index 53c743a30ea..afff5a4ecba 100644 --- a/service/databasemigrationservice/api_op_DeleteReplicationTask.go +++ b/service/databasemigrationservice/api_op_DeleteReplicationTask.go @@ -27,7 +27,6 @@ func (c *Client) DeleteReplicationTask(ctx context.Context, params *DeleteReplic return out, nil } -// type DeleteReplicationTaskInput struct { // The Amazon Resource Name (ARN) of the replication task to be deleted. @@ -38,7 +37,6 @@ type DeleteReplicationTaskInput struct { noSmithyDocumentSerde } -// type DeleteReplicationTaskOutput struct { // The deleted replication task. diff --git a/service/databasemigrationservice/api_op_DeleteReplicationTaskAssessmentRun.go b/service/databasemigrationservice/api_op_DeleteReplicationTaskAssessmentRun.go index 782b135705c..950df11d799 100644 --- a/service/databasemigrationservice/api_op_DeleteReplicationTaskAssessmentRun.go +++ b/service/databasemigrationservice/api_op_DeleteReplicationTaskAssessmentRun.go @@ -30,7 +30,6 @@ func (c *Client) DeleteReplicationTaskAssessmentRun(ctx context.Context, params return out, nil } -// type DeleteReplicationTaskAssessmentRunInput struct { // Amazon Resource Name (ARN) of the premigration assessment run to be deleted. @@ -41,7 +40,6 @@ type DeleteReplicationTaskAssessmentRunInput struct { noSmithyDocumentSerde } -// type DeleteReplicationTaskAssessmentRunOutput struct { // The ReplicationTaskAssessmentRun object for the deleted assessment run. diff --git a/service/databasemigrationservice/api_op_DescribeAccountAttributes.go b/service/databasemigrationservice/api_op_DescribeAccountAttributes.go index 9a6685d6aad..df75de2686f 100644 --- a/service/databasemigrationservice/api_op_DescribeAccountAttributes.go +++ b/service/databasemigrationservice/api_op_DescribeAccountAttributes.go @@ -34,12 +34,10 @@ func (c *Client) DescribeAccountAttributes(ctx context.Context, params *Describe return out, nil } -// type DescribeAccountAttributesInput struct { noSmithyDocumentSerde } -// type DescribeAccountAttributesOutput struct { // Account quota information. diff --git a/service/databasemigrationservice/api_op_DescribeApplicableIndividualAssessments.go b/service/databasemigrationservice/api_op_DescribeApplicableIndividualAssessments.go index f6ef2d50fc5..2c7170a3fa2 100644 --- a/service/databasemigrationservice/api_op_DescribeApplicableIndividualAssessments.go +++ b/service/databasemigrationservice/api_op_DescribeApplicableIndividualAssessments.go @@ -44,7 +44,6 @@ func (c *Client) DescribeApplicableIndividualAssessments(ctx context.Context, pa return out, nil } -// type DescribeApplicableIndividualAssessmentsInput struct { // Optional pagination token provided by a previous request. If this parameter is @@ -80,7 +79,6 @@ type DescribeApplicableIndividualAssessmentsInput struct { noSmithyDocumentSerde } -// type DescribeApplicableIndividualAssessmentsOutput struct { // List of names for the individual assessments supported by the premigration diff --git a/service/databasemigrationservice/api_op_DescribeConnections.go b/service/databasemigrationservice/api_op_DescribeConnections.go index e9bfb862448..008cc179a47 100644 --- a/service/databasemigrationservice/api_op_DescribeConnections.go +++ b/service/databasemigrationservice/api_op_DescribeConnections.go @@ -34,7 +34,6 @@ func (c *Client) DescribeConnections(ctx context.Context, params *DescribeConnec return out, nil } -// type DescribeConnectionsInput struct { // The filters applied to the connection. Valid filter names: endpoint-arn | @@ -55,7 +54,6 @@ type DescribeConnectionsInput struct { noSmithyDocumentSerde } -// type DescribeConnectionsOutput struct { // A description of the connections. diff --git a/service/databasemigrationservice/api_op_DescribeEndpointTypes.go b/service/databasemigrationservice/api_op_DescribeEndpointTypes.go index fdda508f6bf..f2c5b68900e 100644 --- a/service/databasemigrationservice/api_op_DescribeEndpointTypes.go +++ b/service/databasemigrationservice/api_op_DescribeEndpointTypes.go @@ -28,7 +28,6 @@ func (c *Client) DescribeEndpointTypes(ctx context.Context, params *DescribeEndp return out, nil } -// type DescribeEndpointTypesInput struct { // Filters applied to the endpoint types. Valid filter names: engine-name | @@ -49,7 +48,6 @@ type DescribeEndpointTypesInput struct { noSmithyDocumentSerde } -// type DescribeEndpointTypesOutput struct { // An optional pagination token provided by a previous request. If this parameter diff --git a/service/databasemigrationservice/api_op_DescribeEndpoints.go b/service/databasemigrationservice/api_op_DescribeEndpoints.go index 5f1e136dbb8..60edb190020 100644 --- a/service/databasemigrationservice/api_op_DescribeEndpoints.go +++ b/service/databasemigrationservice/api_op_DescribeEndpoints.go @@ -33,7 +33,6 @@ func (c *Client) DescribeEndpoints(ctx context.Context, params *DescribeEndpoint return out, nil } -// type DescribeEndpointsInput struct { // Filters applied to the endpoints. Valid filter names: endpoint-arn | @@ -54,7 +53,6 @@ type DescribeEndpointsInput struct { noSmithyDocumentSerde } -// type DescribeEndpointsOutput struct { // Endpoint description. diff --git a/service/databasemigrationservice/api_op_DescribeEventCategories.go b/service/databasemigrationservice/api_op_DescribeEventCategories.go index 4a97c433098..1fa061857da 100644 --- a/service/databasemigrationservice/api_op_DescribeEventCategories.go +++ b/service/databasemigrationservice/api_op_DescribeEventCategories.go @@ -31,7 +31,6 @@ func (c *Client) DescribeEventCategories(ctx context.Context, params *DescribeEv return out, nil } -// type DescribeEventCategoriesInput struct { // Filters applied to the event categories. @@ -44,7 +43,6 @@ type DescribeEventCategoriesInput struct { noSmithyDocumentSerde } -// type DescribeEventCategoriesOutput struct { // A list of event categories. diff --git a/service/databasemigrationservice/api_op_DescribeEventSubscriptions.go b/service/databasemigrationservice/api_op_DescribeEventSubscriptions.go index 41d564708f8..d410526d177 100644 --- a/service/databasemigrationservice/api_op_DescribeEventSubscriptions.go +++ b/service/databasemigrationservice/api_op_DescribeEventSubscriptions.go @@ -31,7 +31,6 @@ func (c *Client) DescribeEventSubscriptions(ctx context.Context, params *Describ return out, nil } -// type DescribeEventSubscriptionsInput struct { // Filters applied to event subscriptions. Valid filter names: @@ -55,7 +54,6 @@ type DescribeEventSubscriptionsInput struct { noSmithyDocumentSerde } -// type DescribeEventSubscriptionsOutput struct { // A list of event subscriptions. diff --git a/service/databasemigrationservice/api_op_DescribeEvents.go b/service/databasemigrationservice/api_op_DescribeEvents.go index e864e9df719..cd4f1598b6d 100644 --- a/service/databasemigrationservice/api_op_DescribeEvents.go +++ b/service/databasemigrationservice/api_op_DescribeEvents.go @@ -33,7 +33,6 @@ func (c *Client) DescribeEvents(ctx context.Context, params *DescribeEventsInput return out, nil } -// type DescribeEventsInput struct { // The duration of the events to be listed. @@ -72,7 +71,6 @@ type DescribeEventsInput struct { noSmithyDocumentSerde } -// type DescribeEventsOutput struct { // The events described. diff --git a/service/databasemigrationservice/api_op_DescribeOrderableReplicationInstances.go b/service/databasemigrationservice/api_op_DescribeOrderableReplicationInstances.go index 98f5d259481..8f18cd13b9c 100644 --- a/service/databasemigrationservice/api_op_DescribeOrderableReplicationInstances.go +++ b/service/databasemigrationservice/api_op_DescribeOrderableReplicationInstances.go @@ -29,7 +29,6 @@ func (c *Client) DescribeOrderableReplicationInstances(ctx context.Context, para return out, nil } -// type DescribeOrderableReplicationInstancesInput struct { // An optional pagination token provided by a previous request. If this parameter @@ -46,7 +45,6 @@ type DescribeOrderableReplicationInstancesInput struct { noSmithyDocumentSerde } -// type DescribeOrderableReplicationInstancesOutput struct { // An optional pagination token provided by a previous request. If this parameter diff --git a/service/databasemigrationservice/api_op_DescribePendingMaintenanceActions.go b/service/databasemigrationservice/api_op_DescribePendingMaintenanceActions.go index a2f9a40dfdb..c9570f66dc9 100644 --- a/service/databasemigrationservice/api_op_DescribePendingMaintenanceActions.go +++ b/service/databasemigrationservice/api_op_DescribePendingMaintenanceActions.go @@ -28,7 +28,6 @@ func (c *Client) DescribePendingMaintenanceActions(ctx context.Context, params * return out, nil } -// type DescribePendingMaintenanceActionsInput struct { // @@ -51,7 +50,6 @@ type DescribePendingMaintenanceActionsInput struct { noSmithyDocumentSerde } -// type DescribePendingMaintenanceActionsOutput struct { // An optional pagination token provided by a previous request. If this parameter diff --git a/service/databasemigrationservice/api_op_DescribeRefreshSchemasStatus.go b/service/databasemigrationservice/api_op_DescribeRefreshSchemasStatus.go index f424a758c27..b3eead75ab0 100644 --- a/service/databasemigrationservice/api_op_DescribeRefreshSchemasStatus.go +++ b/service/databasemigrationservice/api_op_DescribeRefreshSchemasStatus.go @@ -27,7 +27,6 @@ func (c *Client) DescribeRefreshSchemasStatus(ctx context.Context, params *Descr return out, nil } -// type DescribeRefreshSchemasStatusInput struct { // The Amazon Resource Name (ARN) string that uniquely identifies the endpoint. @@ -38,7 +37,6 @@ type DescribeRefreshSchemasStatusInput struct { noSmithyDocumentSerde } -// type DescribeRefreshSchemasStatusOutput struct { // The status of the schema. diff --git a/service/databasemigrationservice/api_op_DescribeReplicationInstances.go b/service/databasemigrationservice/api_op_DescribeReplicationInstances.go index 6ba3fab1389..6fdffb328bc 100644 --- a/service/databasemigrationservice/api_op_DescribeReplicationInstances.go +++ b/service/databasemigrationservice/api_op_DescribeReplicationInstances.go @@ -34,7 +34,6 @@ func (c *Client) DescribeReplicationInstances(ctx context.Context, params *Descr return out, nil } -// type DescribeReplicationInstancesInput struct { // Filters applied to replication instances. Valid filter names: @@ -56,7 +55,6 @@ type DescribeReplicationInstancesInput struct { noSmithyDocumentSerde } -// type DescribeReplicationInstancesOutput struct { // An optional pagination token provided by a previous request. If this parameter diff --git a/service/databasemigrationservice/api_op_DescribeReplicationSubnetGroups.go b/service/databasemigrationservice/api_op_DescribeReplicationSubnetGroups.go index 1152f624fcd..25ba8c1d350 100644 --- a/service/databasemigrationservice/api_op_DescribeReplicationSubnetGroups.go +++ b/service/databasemigrationservice/api_op_DescribeReplicationSubnetGroups.go @@ -28,7 +28,6 @@ func (c *Client) DescribeReplicationSubnetGroups(ctx context.Context, params *De return out, nil } -// type DescribeReplicationSubnetGroupsInput struct { // Filters applied to replication subnet groups. Valid filter names: @@ -49,7 +48,6 @@ type DescribeReplicationSubnetGroupsInput struct { noSmithyDocumentSerde } -// type DescribeReplicationSubnetGroupsOutput struct { // An optional pagination token provided by a previous request. If this parameter diff --git a/service/databasemigrationservice/api_op_DescribeReplicationTaskAssessmentResults.go b/service/databasemigrationservice/api_op_DescribeReplicationTaskAssessmentResults.go index 10ef4b32724..314d6f208c7 100644 --- a/service/databasemigrationservice/api_op_DescribeReplicationTaskAssessmentResults.go +++ b/service/databasemigrationservice/api_op_DescribeReplicationTaskAssessmentResults.go @@ -33,7 +33,6 @@ func (c *Client) DescribeReplicationTaskAssessmentResults(ctx context.Context, p return out, nil } -// type DescribeReplicationTaskAssessmentResultsInput struct { // An optional pagination token provided by a previous request. If this parameter @@ -55,7 +54,6 @@ type DescribeReplicationTaskAssessmentResultsInput struct { noSmithyDocumentSerde } -// type DescribeReplicationTaskAssessmentResultsOutput struct { // - The Amazon S3 bucket where the task assessment report is located. diff --git a/service/databasemigrationservice/api_op_DescribeReplicationTaskAssessmentRuns.go b/service/databasemigrationservice/api_op_DescribeReplicationTaskAssessmentRuns.go index 5f3ca07450c..087e75f59f1 100644 --- a/service/databasemigrationservice/api_op_DescribeReplicationTaskAssessmentRuns.go +++ b/service/databasemigrationservice/api_op_DescribeReplicationTaskAssessmentRuns.go @@ -33,7 +33,6 @@ func (c *Client) DescribeReplicationTaskAssessmentRuns(ctx context.Context, para return out, nil } -// type DescribeReplicationTaskAssessmentRunsInput struct { // Filters applied to the premigration assessment runs described in the form of @@ -54,7 +53,6 @@ type DescribeReplicationTaskAssessmentRunsInput struct { noSmithyDocumentSerde } -// type DescribeReplicationTaskAssessmentRunsOutput struct { // A pagination token returned for you to pass to a subsequent request. If you pass diff --git a/service/databasemigrationservice/api_op_DescribeReplicationTaskIndividualAssessments.go b/service/databasemigrationservice/api_op_DescribeReplicationTaskIndividualAssessments.go index 7d90466f10b..5e5997820db 100644 --- a/service/databasemigrationservice/api_op_DescribeReplicationTaskIndividualAssessments.go +++ b/service/databasemigrationservice/api_op_DescribeReplicationTaskIndividualAssessments.go @@ -30,7 +30,6 @@ func (c *Client) DescribeReplicationTaskIndividualAssessments(ctx context.Contex return out, nil } -// type DescribeReplicationTaskIndividualAssessmentsInput struct { // Filters applied to the individual assessments described in the form of key-value @@ -51,7 +50,6 @@ type DescribeReplicationTaskIndividualAssessmentsInput struct { noSmithyDocumentSerde } -// type DescribeReplicationTaskIndividualAssessmentsOutput struct { // A pagination token returned for you to pass to a subsequent request. If you pass diff --git a/service/databasemigrationservice/api_op_DescribeReplicationTasks.go b/service/databasemigrationservice/api_op_DescribeReplicationTasks.go index c78428920c6..00799294d82 100644 --- a/service/databasemigrationservice/api_op_DescribeReplicationTasks.go +++ b/service/databasemigrationservice/api_op_DescribeReplicationTasks.go @@ -34,7 +34,6 @@ func (c *Client) DescribeReplicationTasks(ctx context.Context, params *DescribeR return out, nil } -// type DescribeReplicationTasksInput struct { // Filters applied to replication tasks. Valid filter names: replication-task-arn | @@ -60,7 +59,6 @@ type DescribeReplicationTasksInput struct { noSmithyDocumentSerde } -// type DescribeReplicationTasksOutput struct { // An optional pagination token provided by a previous request. If this parameter diff --git a/service/databasemigrationservice/api_op_DescribeSchemas.go b/service/databasemigrationservice/api_op_DescribeSchemas.go index ed7795f57c5..630534d956b 100644 --- a/service/databasemigrationservice/api_op_DescribeSchemas.go +++ b/service/databasemigrationservice/api_op_DescribeSchemas.go @@ -27,7 +27,6 @@ func (c *Client) DescribeSchemas(ctx context.Context, params *DescribeSchemasInp return out, nil } -// type DescribeSchemasInput struct { // The Amazon Resource Name (ARN) string that uniquely identifies the endpoint. @@ -49,7 +48,6 @@ type DescribeSchemasInput struct { noSmithyDocumentSerde } -// type DescribeSchemasOutput struct { // An optional pagination token provided by a previous request. If this parameter diff --git a/service/databasemigrationservice/api_op_DescribeTableStatistics.go b/service/databasemigrationservice/api_op_DescribeTableStatistics.go index 5f3432369aa..ffd4b43e4b1 100644 --- a/service/databasemigrationservice/api_op_DescribeTableStatistics.go +++ b/service/databasemigrationservice/api_op_DescribeTableStatistics.go @@ -32,7 +32,6 @@ func (c *Client) DescribeTableStatistics(ctx context.Context, params *DescribeTa return out, nil } -// type DescribeTableStatisticsInput struct { // The Amazon Resource Name (ARN) of the replication task. @@ -59,7 +58,6 @@ type DescribeTableStatisticsInput struct { noSmithyDocumentSerde } -// type DescribeTableStatisticsOutput struct { // An optional pagination token provided by a previous request. If this parameter diff --git a/service/databasemigrationservice/api_op_ListTagsForResource.go b/service/databasemigrationservice/api_op_ListTagsForResource.go index cf2176c7098..88047afcf3b 100644 --- a/service/databasemigrationservice/api_op_ListTagsForResource.go +++ b/service/databasemigrationservice/api_op_ListTagsForResource.go @@ -30,7 +30,6 @@ func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForRes return out, nil } -// type ListTagsForResourceInput struct { // The Amazon Resource Name (ARN) string that uniquely identifies the DMS resource @@ -47,7 +46,6 @@ type ListTagsForResourceInput struct { noSmithyDocumentSerde } -// type ListTagsForResourceOutput struct { // A list of tags for the resource. diff --git a/service/databasemigrationservice/api_op_ModifyEndpoint.go b/service/databasemigrationservice/api_op_ModifyEndpoint.go index e24f4ba1bf2..699f337347a 100644 --- a/service/databasemigrationservice/api_op_ModifyEndpoint.go +++ b/service/databasemigrationservice/api_op_ModifyEndpoint.go @@ -32,7 +32,6 @@ func (c *Client) ModifyEndpoint(ctx context.Context, params *ModifyEndpointInput return out, nil } -// type ModifyEndpointInput struct { // The Amazon Resource Name (ARN) string that uniquely identifies the endpoint. @@ -247,7 +246,6 @@ type ModifyEndpointInput struct { noSmithyDocumentSerde } -// type ModifyEndpointOutput struct { // The modified endpoint. diff --git a/service/databasemigrationservice/api_op_ModifyEventSubscription.go b/service/databasemigrationservice/api_op_ModifyEventSubscription.go index a73fc646c30..a58da83291d 100644 --- a/service/databasemigrationservice/api_op_ModifyEventSubscription.go +++ b/service/databasemigrationservice/api_op_ModifyEventSubscription.go @@ -27,7 +27,6 @@ func (c *Client) ModifyEventSubscription(ctx context.Context, params *ModifyEven return out, nil } -// type ModifyEventSubscriptionInput struct { // The name of the DMS event notification subscription to be modified. @@ -54,7 +53,6 @@ type ModifyEventSubscriptionInput struct { noSmithyDocumentSerde } -// type ModifyEventSubscriptionOutput struct { // The modified event subscription. diff --git a/service/databasemigrationservice/api_op_ModifyReplicationInstance.go b/service/databasemigrationservice/api_op_ModifyReplicationInstance.go index df6ecf805d2..5b209994998 100644 --- a/service/databasemigrationservice/api_op_ModifyReplicationInstance.go +++ b/service/databasemigrationservice/api_op_ModifyReplicationInstance.go @@ -29,7 +29,6 @@ func (c *Client) ModifyReplicationInstance(ctx context.Context, params *ModifyRe return out, nil } -// type ModifyReplicationInstanceInput struct { // The Amazon Resource Name (ARN) of the replication instance. @@ -104,7 +103,6 @@ type ModifyReplicationInstanceInput struct { noSmithyDocumentSerde } -// type ModifyReplicationInstanceOutput struct { // The modified replication instance. diff --git a/service/databasemigrationservice/api_op_ModifyReplicationSubnetGroup.go b/service/databasemigrationservice/api_op_ModifyReplicationSubnetGroup.go index ff64c10e173..d7195c2a14e 100644 --- a/service/databasemigrationservice/api_op_ModifyReplicationSubnetGroup.go +++ b/service/databasemigrationservice/api_op_ModifyReplicationSubnetGroup.go @@ -27,7 +27,6 @@ func (c *Client) ModifyReplicationSubnetGroup(ctx context.Context, params *Modif return out, nil } -// type ModifyReplicationSubnetGroupInput struct { // The name of the replication instance subnet group. @@ -46,7 +45,6 @@ type ModifyReplicationSubnetGroupInput struct { noSmithyDocumentSerde } -// type ModifyReplicationSubnetGroupOutput struct { // The modified replication subnet group. diff --git a/service/databasemigrationservice/api_op_ModifyReplicationTask.go b/service/databasemigrationservice/api_op_ModifyReplicationTask.go index 93a59e6f455..f50e92eff0b 100644 --- a/service/databasemigrationservice/api_op_ModifyReplicationTask.go +++ b/service/databasemigrationservice/api_op_ModifyReplicationTask.go @@ -32,7 +32,6 @@ func (c *Client) ModifyReplicationTask(ctx context.Context, params *ModifyReplic return out, nil } -// type ModifyReplicationTaskInput struct { // The Amazon Resource Name (ARN) of the replication task. @@ -100,7 +99,6 @@ type ModifyReplicationTaskInput struct { noSmithyDocumentSerde } -// type ModifyReplicationTaskOutput struct { // The replication task that was modified. diff --git a/service/databasemigrationservice/api_op_MoveReplicationTask.go b/service/databasemigrationservice/api_op_MoveReplicationTask.go index 8151a60f96b..9022e85db96 100644 --- a/service/databasemigrationservice/api_op_MoveReplicationTask.go +++ b/service/databasemigrationservice/api_op_MoveReplicationTask.go @@ -30,7 +30,6 @@ func (c *Client) MoveReplicationTask(ctx context.Context, params *MoveReplicatio return out, nil } -// type MoveReplicationTaskInput struct { // The Amazon Resource Name (ARN) of the task that you want to move. @@ -46,7 +45,6 @@ type MoveReplicationTaskInput struct { noSmithyDocumentSerde } -// type MoveReplicationTaskOutput struct { // The replication task that was moved. diff --git a/service/databasemigrationservice/api_op_RefreshSchemas.go b/service/databasemigrationservice/api_op_RefreshSchemas.go index 321ff99450d..72f20f78223 100644 --- a/service/databasemigrationservice/api_op_RefreshSchemas.go +++ b/service/databasemigrationservice/api_op_RefreshSchemas.go @@ -29,7 +29,6 @@ func (c *Client) RefreshSchemas(ctx context.Context, params *RefreshSchemasInput return out, nil } -// type RefreshSchemasInput struct { // The Amazon Resource Name (ARN) string that uniquely identifies the endpoint. @@ -45,7 +44,6 @@ type RefreshSchemasInput struct { noSmithyDocumentSerde } -// type RefreshSchemasOutput struct { // The status of the refreshed schema. diff --git a/service/databasemigrationservice/api_op_RemoveTagsFromResource.go b/service/databasemigrationservice/api_op_RemoveTagsFromResource.go index 2aefb1135c0..3ef1f558607 100644 --- a/service/databasemigrationservice/api_op_RemoveTagsFromResource.go +++ b/service/databasemigrationservice/api_op_RemoveTagsFromResource.go @@ -46,7 +46,6 @@ type RemoveTagsFromResourceInput struct { noSmithyDocumentSerde } -// type RemoveTagsFromResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/databasemigrationservice/api_op_StartReplicationTask.go b/service/databasemigrationservice/api_op_StartReplicationTask.go index 1dca0db587a..81f3fe74555 100644 --- a/service/databasemigrationservice/api_op_StartReplicationTask.go +++ b/service/databasemigrationservice/api_op_StartReplicationTask.go @@ -31,7 +31,6 @@ func (c *Client) StartReplicationTask(ctx context.Context, params *StartReplicat return out, nil } -// type StartReplicationTaskInput struct { // The Amazon Resource Name (ARN) of the replication task to be started. @@ -80,7 +79,6 @@ type StartReplicationTaskInput struct { noSmithyDocumentSerde } -// type StartReplicationTaskOutput struct { // The replication task started. diff --git a/service/databasemigrationservice/api_op_StartReplicationTaskAssessment.go b/service/databasemigrationservice/api_op_StartReplicationTaskAssessment.go index 4234bd47363..2a0483f2039 100644 --- a/service/databasemigrationservice/api_op_StartReplicationTaskAssessment.go +++ b/service/databasemigrationservice/api_op_StartReplicationTaskAssessment.go @@ -40,7 +40,6 @@ func (c *Client) StartReplicationTaskAssessment(ctx context.Context, params *Sta return out, nil } -// type StartReplicationTaskAssessmentInput struct { // The Amazon Resource Name (ARN) of the replication task. @@ -51,7 +50,6 @@ type StartReplicationTaskAssessmentInput struct { noSmithyDocumentSerde } -// type StartReplicationTaskAssessmentOutput struct { // The assessed replication task. diff --git a/service/databasemigrationservice/api_op_StartReplicationTaskAssessmentRun.go b/service/databasemigrationservice/api_op_StartReplicationTaskAssessmentRun.go index dc30f4d0596..05afa0190ab 100644 --- a/service/databasemigrationservice/api_op_StartReplicationTaskAssessmentRun.go +++ b/service/databasemigrationservice/api_op_StartReplicationTaskAssessmentRun.go @@ -33,7 +33,6 @@ func (c *Client) StartReplicationTaskAssessmentRun(ctx context.Context, params * return out, nil } -// type StartReplicationTaskAssessmentRunInput struct { // Unique name to identify the assessment run. @@ -102,7 +101,6 @@ type StartReplicationTaskAssessmentRunInput struct { noSmithyDocumentSerde } -// type StartReplicationTaskAssessmentRunOutput struct { // The premigration assessment run that was started. diff --git a/service/databasemigrationservice/api_op_StopReplicationTask.go b/service/databasemigrationservice/api_op_StopReplicationTask.go index ce03d2f5715..ec58a11a4a0 100644 --- a/service/databasemigrationservice/api_op_StopReplicationTask.go +++ b/service/databasemigrationservice/api_op_StopReplicationTask.go @@ -27,7 +27,6 @@ func (c *Client) StopReplicationTask(ctx context.Context, params *StopReplicatio return out, nil } -// type StopReplicationTaskInput struct { // The Amazon Resource Name(ARN) of the replication task to be stopped. @@ -38,7 +37,6 @@ type StopReplicationTaskInput struct { noSmithyDocumentSerde } -// type StopReplicationTaskOutput struct { // The replication task stopped. diff --git a/service/databasemigrationservice/api_op_TestConnection.go b/service/databasemigrationservice/api_op_TestConnection.go index 00a0b6f7aab..b6bc840f585 100644 --- a/service/databasemigrationservice/api_op_TestConnection.go +++ b/service/databasemigrationservice/api_op_TestConnection.go @@ -27,7 +27,6 @@ func (c *Client) TestConnection(ctx context.Context, params *TestConnectionInput return out, nil } -// type TestConnectionInput struct { // The Amazon Resource Name (ARN) string that uniquely identifies the endpoint. @@ -43,7 +42,6 @@ type TestConnectionInput struct { noSmithyDocumentSerde } -// type TestConnectionOutput struct { // The connection tested. diff --git a/service/databasemigrationservice/api_op_UpdateSubscriptionsToEventBridge.go b/service/databasemigrationservice/api_op_UpdateSubscriptionsToEventBridge.go index 80bf5e51f8c..931ef5c9138 100644 --- a/service/databasemigrationservice/api_op_UpdateSubscriptionsToEventBridge.go +++ b/service/databasemigrationservice/api_op_UpdateSubscriptionsToEventBridge.go @@ -38,7 +38,6 @@ func (c *Client) UpdateSubscriptionsToEventBridge(ctx context.Context, params *U return out, nil } -// type UpdateSubscriptionsToEventBridgeInput struct { // When set to true, this operation migrates DMS subscriptions for Amazon SNS @@ -50,7 +49,6 @@ type UpdateSubscriptionsToEventBridgeInput struct { noSmithyDocumentSerde } -// type UpdateSubscriptionsToEventBridgeOutput struct { // A string that indicates how many event subscriptions were migrated and how many diff --git a/service/dynamodb/internal/customizations/doc.go b/service/dynamodb/internal/customizations/doc.go index 765e424b9b7..b023f04befb 100644 --- a/service/dynamodb/internal/customizations/doc.go +++ b/service/dynamodb/internal/customizations/doc.go @@ -4,16 +4,16 @@ Package customizations provides customizations for the Amazon DynamoDB API clien The DynamoDB API client uses two customizations, response checksum validation, and manual content-encoding: gzip support. -Middleware layering +# Middleware layering Checksum validation needs to be performed first in deserialization chain on top of gzip decompression. Since the behavior of Deserialization is in reverse order to the other stack steps its easier to consider that "after" means "before". - HTTP Response -> Checksum -> gzip decompress -> deserialize + HTTP Response -> Checksum -> gzip decompress -> deserialize -Response checksum validation +# Response checksum validation DynamoDB responses can include a X-Amz-Crc32 header with the CRC32 checksum value of the response body. If the response body is content-encoding: gzip, the @@ -26,16 +26,17 @@ means that if the response is gzipped the checksum is of the gzipped response, not the decompressed response bytes. Customization option: - DisableValidateResponseChecksum (Enabled by Default) -Accept encoding gzip + DisableValidateResponseChecksum (Enabled by Default) + +# Accept encoding gzip For customization around accept encoding, dynamodb client uses the middlewares defined at service/internal/accept-encoding. Please refer to the documentation for `accept-encoding` package for more details. Customization option: - EnableAcceptEncodingGzip (Disabled by Default) + EnableAcceptEncodingGzip (Disabled by Default) */ package customizations diff --git a/service/dynamodb/types/types.go b/service/dynamodb/types/types.go index 4cab9a3f7c6..5a69a8e6692 100644 --- a/service/dynamodb/types/types.go +++ b/service/dynamodb/types/types.go @@ -61,16 +61,17 @@ type AttributeDefinition struct { // in the Amazon DynamoDB Developer Guide. // // The following types satisfy this interface: -// AttributeValueMemberB -// AttributeValueMemberBOOL -// AttributeValueMemberBS -// AttributeValueMemberL -// AttributeValueMemberM -// AttributeValueMemberN -// AttributeValueMemberNS -// AttributeValueMemberNULL -// AttributeValueMemberS -// AttributeValueMemberSS +// +// AttributeValueMemberB +// AttributeValueMemberBOOL +// AttributeValueMemberBS +// AttributeValueMemberL +// AttributeValueMemberM +// AttributeValueMemberN +// AttributeValueMemberNS +// AttributeValueMemberNULL +// AttributeValueMemberS +// AttributeValueMemberSS type AttributeValue interface { isAttributeValue() } diff --git a/service/dynamodbstreams/types/types.go b/service/dynamodbstreams/types/types.go index 7ae787f749d..be732543388 100644 --- a/service/dynamodbstreams/types/types.go +++ b/service/dynamodbstreams/types/types.go @@ -14,16 +14,17 @@ import ( // in the Amazon DynamoDB Developer Guide. // // The following types satisfy this interface: -// AttributeValueMemberB -// AttributeValueMemberBOOL -// AttributeValueMemberBS -// AttributeValueMemberL -// AttributeValueMemberM -// AttributeValueMemberN -// AttributeValueMemberNS -// AttributeValueMemberNULL -// AttributeValueMemberS -// AttributeValueMemberSS +// +// AttributeValueMemberB +// AttributeValueMemberBOOL +// AttributeValueMemberBS +// AttributeValueMemberL +// AttributeValueMemberM +// AttributeValueMemberN +// AttributeValueMemberNS +// AttributeValueMemberNULL +// AttributeValueMemberS +// AttributeValueMemberSS type AttributeValue interface { isAttributeValue() } diff --git a/service/efs/api_op_CreateMountTarget.go b/service/efs/api_op_CreateMountTarget.go index 211d5cac6d4..7d1193574af 100644 --- a/service/efs/api_op_CreateMountTarget.go +++ b/service/efs/api_op_CreateMountTarget.go @@ -136,7 +136,6 @@ func (c *Client) CreateMountTarget(ctx context.Context, params *CreateMountTarge return out, nil } -// type CreateMountTargetInput struct { // The ID of the file system for which to create the mount target. diff --git a/service/efs/api_op_CreateTags.go b/service/efs/api_op_CreateTags.go index fb965c86f19..0674d9b158e 100644 --- a/service/efs/api_op_CreateTags.go +++ b/service/efs/api_op_CreateTags.go @@ -35,7 +35,6 @@ func (c *Client) CreateTags(ctx context.Context, params *CreateTagsInput, optFns return out, nil } -// type CreateTagsInput struct { // The ID of the file system whose tags you want to modify (String). This operation diff --git a/service/efs/api_op_DeleteFileSystem.go b/service/efs/api_op_DeleteFileSystem.go index 00ba3e936b6..8889701f160 100644 --- a/service/efs/api_op_DeleteFileSystem.go +++ b/service/efs/api_op_DeleteFileSystem.go @@ -41,7 +41,6 @@ func (c *Client) DeleteFileSystem(ctx context.Context, params *DeleteFileSystemI return out, nil } -// type DeleteFileSystemInput struct { // The ID of the file system you want to delete. diff --git a/service/efs/api_op_DeleteMountTarget.go b/service/efs/api_op_DeleteMountTarget.go index 626c4fbc521..9bd45cc91bb 100644 --- a/service/efs/api_op_DeleteMountTarget.go +++ b/service/efs/api_op_DeleteMountTarget.go @@ -46,7 +46,6 @@ func (c *Client) DeleteMountTarget(ctx context.Context, params *DeleteMountTarge return out, nil } -// type DeleteMountTargetInput struct { // The ID of the mount target to delete (String). diff --git a/service/efs/api_op_DeleteTags.go b/service/efs/api_op_DeleteTags.go index 846a01c7df4..9a7665ca712 100644 --- a/service/efs/api_op_DeleteTags.go +++ b/service/efs/api_op_DeleteTags.go @@ -35,7 +35,6 @@ func (c *Client) DeleteTags(ctx context.Context, params *DeleteTagsInput, optFns return out, nil } -// type DeleteTagsInput struct { // The ID of the file system whose tags you want to delete (String). diff --git a/service/efs/api_op_DescribeFileSystems.go b/service/efs/api_op_DescribeFileSystems.go index 67fd540b35a..7d38e36cb77 100644 --- a/service/efs/api_op_DescribeFileSystems.go +++ b/service/efs/api_op_DescribeFileSystems.go @@ -45,7 +45,6 @@ func (c *Client) DescribeFileSystems(ctx context.Context, params *DescribeFileSy return out, nil } -// type DescribeFileSystemsInput struct { // (Optional) Restricts the list to the file system with this creation token diff --git a/service/efs/api_op_DescribeMountTargetSecurityGroups.go b/service/efs/api_op_DescribeMountTargetSecurityGroups.go index 932b8c5479e..4ae6db567ac 100644 --- a/service/efs/api_op_DescribeMountTargetSecurityGroups.go +++ b/service/efs/api_op_DescribeMountTargetSecurityGroups.go @@ -36,7 +36,6 @@ func (c *Client) DescribeMountTargetSecurityGroups(ctx context.Context, params * return out, nil } -// type DescribeMountTargetSecurityGroupsInput struct { // The ID of the mount target whose security groups you want to retrieve. diff --git a/service/efs/api_op_DescribeMountTargets.go b/service/efs/api_op_DescribeMountTargets.go index 2eb624109a1..508ee0eb63e 100644 --- a/service/efs/api_op_DescribeMountTargets.go +++ b/service/efs/api_op_DescribeMountTargets.go @@ -32,7 +32,6 @@ func (c *Client) DescribeMountTargets(ctx context.Context, params *DescribeMount return out, nil } -// type DescribeMountTargetsInput struct { // (Optional) The ID of the access point whose mount targets that you want to list. @@ -63,7 +62,6 @@ type DescribeMountTargetsInput struct { noSmithyDocumentSerde } -// type DescribeMountTargetsOutput struct { // If the request included the Marker, the response returns that value in this diff --git a/service/efs/api_op_DescribeTags.go b/service/efs/api_op_DescribeTags.go index 3f8272fb091..c0353b2440c 100644 --- a/service/efs/api_op_DescribeTags.go +++ b/service/efs/api_op_DescribeTags.go @@ -36,7 +36,6 @@ func (c *Client) DescribeTags(ctx context.Context, params *DescribeTagsInput, op return out, nil } -// type DescribeTagsInput struct { // The ID of the file system whose tag set you want to retrieve. @@ -58,7 +57,6 @@ type DescribeTagsInput struct { noSmithyDocumentSerde } -// type DescribeTagsOutput struct { // Returns tags associated with the file system as an array of Tag objects. diff --git a/service/efs/api_op_ModifyMountTargetSecurityGroups.go b/service/efs/api_op_ModifyMountTargetSecurityGroups.go index ee7a117b2ab..8e03e017f7d 100644 --- a/service/efs/api_op_ModifyMountTargetSecurityGroups.go +++ b/service/efs/api_op_ModifyMountTargetSecurityGroups.go @@ -39,7 +39,6 @@ func (c *Client) ModifyMountTargetSecurityGroups(ctx context.Context, params *Mo return out, nil } -// type ModifyMountTargetSecurityGroupsInput struct { // The ID of the mount target whose security groups you want to modify. diff --git a/service/elasticbeanstalk/api_op_AbortEnvironmentUpdate.go b/service/elasticbeanstalk/api_op_AbortEnvironmentUpdate.go index bb3eb20bf83..cc5d05c3c8b 100644 --- a/service/elasticbeanstalk/api_op_AbortEnvironmentUpdate.go +++ b/service/elasticbeanstalk/api_op_AbortEnvironmentUpdate.go @@ -27,7 +27,6 @@ func (c *Client) AbortEnvironmentUpdate(ctx context.Context, params *AbortEnviro return out, nil } -// type AbortEnvironmentUpdateInput struct { // This specifies the ID of the environment with the in-progress update that you diff --git a/service/elasticbeanstalk/api_op_CreateApplicationVersion.go b/service/elasticbeanstalk/api_op_CreateApplicationVersion.go index d9e08732918..a5755f78c1c 100644 --- a/service/elasticbeanstalk/api_op_CreateApplicationVersion.go +++ b/service/elasticbeanstalk/api_op_CreateApplicationVersion.go @@ -37,7 +37,6 @@ func (c *Client) CreateApplicationVersion(ctx context.Context, params *CreateApp return out, nil } -// type CreateApplicationVersionInput struct { // The name of the application. If no application is found with this name, and diff --git a/service/elasticbeanstalk/api_op_CreateEnvironment.go b/service/elasticbeanstalk/api_op_CreateEnvironment.go index 8ed13b564a1..1376535b761 100644 --- a/service/elasticbeanstalk/api_op_CreateEnvironment.go +++ b/service/elasticbeanstalk/api_op_CreateEnvironment.go @@ -29,7 +29,6 @@ func (c *Client) CreateEnvironment(ctx context.Context, params *CreateEnvironmen return out, nil } -// type CreateEnvironmentInput struct { // The name of the application that is associated with this environment. diff --git a/service/elasticbeanstalk/api_op_RebuildEnvironment.go b/service/elasticbeanstalk/api_op_RebuildEnvironment.go index 70446c114d3..a7625efc37b 100644 --- a/service/elasticbeanstalk/api_op_RebuildEnvironment.go +++ b/service/elasticbeanstalk/api_op_RebuildEnvironment.go @@ -27,7 +27,6 @@ func (c *Client) RebuildEnvironment(ctx context.Context, params *RebuildEnvironm return out, nil } -// type RebuildEnvironmentInput struct { // The ID of the environment to rebuild. Condition: You must specify either this or diff --git a/service/elasticbeanstalk/api_op_RestartAppServer.go b/service/elasticbeanstalk/api_op_RestartAppServer.go index 2af64085fd8..38b1d894bd3 100644 --- a/service/elasticbeanstalk/api_op_RestartAppServer.go +++ b/service/elasticbeanstalk/api_op_RestartAppServer.go @@ -27,7 +27,6 @@ func (c *Client) RestartAppServer(ctx context.Context, params *RestartAppServerI return out, nil } -// type RestartAppServerInput struct { // The ID of the environment to restart the server for. Condition: You must specify diff --git a/service/elasticbeanstalk/api_op_UpdateApplicationVersion.go b/service/elasticbeanstalk/api_op_UpdateApplicationVersion.go index ee48f4cbe8f..790daa43d72 100644 --- a/service/elasticbeanstalk/api_op_UpdateApplicationVersion.go +++ b/service/elasticbeanstalk/api_op_UpdateApplicationVersion.go @@ -29,7 +29,6 @@ func (c *Client) UpdateApplicationVersion(ctx context.Context, params *UpdateApp return out, nil } -// type UpdateApplicationVersionInput struct { // The name of the application associated with this version. If no application is diff --git a/service/emrcontainers/types/types.go b/service/emrcontainers/types/types.go index 8132b9561d2..fe86b036b9d 100644 --- a/service/emrcontainers/types/types.go +++ b/service/emrcontainers/types/types.go @@ -71,7 +71,8 @@ type ConfigurationOverrides struct { // The information about the container used for a job run or a managed endpoint. // // The following types satisfy this interface: -// ContainerInfoMemberEksInfo +// +// ContainerInfoMemberEksInfo type ContainerInfo interface { isContainerInfo() } diff --git a/service/emrserverless/types/types.go b/service/emrserverless/types/types.go index e16af3d46fc..1cfcd5bf471 100644 --- a/service/emrserverless/types/types.go +++ b/service/emrserverless/types/types.go @@ -213,8 +213,9 @@ type InitialCapacityConfig struct { // The driver that the job runs on. // // The following types satisfy this interface: -// JobDriverMemberHive -// JobDriverMemberSparkSubmit +// +// JobDriverMemberHive +// JobDriverMemberSparkSubmit type JobDriver interface { isJobDriver() } diff --git a/service/evidently/types/types.go b/service/evidently/types/types.go index 8cbb44efb13..7c705e3a53f 100644 --- a/service/evidently/types/types.go +++ b/service/evidently/types/types.go @@ -1153,10 +1153,11 @@ type ValidationExceptionField struct { // one field. It can be boolValue, doubleValue, longValue, or stringValue. // // The following types satisfy this interface: -// VariableValueMemberBoolValue -// VariableValueMemberDoubleValue -// VariableValueMemberLongValue -// VariableValueMemberStringValue +// +// VariableValueMemberBoolValue +// VariableValueMemberDoubleValue +// VariableValueMemberLongValue +// VariableValueMemberStringValue type VariableValue interface { isVariableValue() } diff --git a/service/forecast/types/types.go b/service/forecast/types/types.go index 174fb10f547..76bd5b2f20d 100644 --- a/service/forecast/types/types.go +++ b/service/forecast/types/types.go @@ -184,14 +184,17 @@ type AdditionalDataset struct { } // Provides information about the method used to transform attributes. The -// following is an example using the RETAIL domain: { -// "AttributeName": +// +// following is an example using the RETAIL domain: { +// "AttributeName": +// // "demand", // -// "Transformations": {"aggregation": "sum", "middlefill": "zero", +// "Transformations": {"aggregation": "sum", "middlefill": "zero", +// // "backfill": "zero"} // -// } +// } type AttributeConfig struct { // The name of the attribute as specified in the schema. Amazon Forecast supports @@ -732,21 +735,19 @@ type ExplainabilitySummary struct { // This object belongs to the CreatePredictor operation. If you created your // predictor with CreateAutoPredictor, see AttributeConfig. Provides featurization // (transformation) information for a dataset field. This object is part of the -// FeaturizationConfig object. For example: { -// "AttributeName": "demand", // +// FeaturizationConfig object. For example: { +// "AttributeName": "demand", // // FeaturizationPipeline [ { // -// "FeaturizationMethodName": "filling", -// +// "FeaturizationMethodName": "filling", // // "FeaturizationMethodParameters": {"aggregation": "avg", "backfill": "nan"} // -// // } ] // -// } +// } type Featurization struct { // The name of the schema attribute that specifies the data field to be featurized. @@ -810,14 +811,14 @@ type FeaturizationConfig struct { // Provides information about the method that featurizes (transforms) a dataset // field. The method is part of the FeaturizationPipeline of the Featurization // object. The following is an example of how you specify a FeaturizationMethod -// object. { -// "FeaturizationMethodName": "filling", // +// object. { +// "FeaturizationMethodName": "filling", // // "FeaturizationMethodParameters": {"aggregation": "sum", "middlefill": "zero", // "backfill": "zero"} // -// } +// } type FeaturizationMethod struct { // The name of the method. The "filling" method is the only supported method. diff --git a/service/gamesparks/doc.go b/service/gamesparks/doc.go index 2d10aad89fe..2bef38d3690 100644 --- a/service/gamesparks/doc.go +++ b/service/gamesparks/doc.go @@ -2,6 +2,4 @@ // Package gamesparks provides the API client, operations, and parameter types for // GameSparks. -// -// package gamesparks diff --git a/service/gamesparks/document/doc.go b/service/gamesparks/document/doc.go index 49b6226bd0c..2b06b14f3cd 100644 --- a/service/gamesparks/document/doc.go +++ b/service/gamesparks/document/doc.go @@ -11,21 +11,21 @@ // // The following examples show how you can create document types using basic Go types. // -// NewLazyDocument(map[string]interface{}{ -// "favoriteNumber": 42, -// "fruits": []string{"apple", "orange"}, -// "capitals": map[string]interface{}{ -// "Washington": "Olympia", -// "Oregon": "Salem", -// }, -// "skyIsBlue": true, -// }) +// NewLazyDocument(map[string]interface{}{ +// "favoriteNumber": 42, +// "fruits": []string{"apple", "orange"}, +// "capitals": map[string]interface{}{ +// "Washington": "Olympia", +// "Oregon": "Salem", +// }, +// "skyIsBlue": true, +// }) // -// NewLazyDocument(3.14159) +// NewLazyDocument(3.14159) // -// NewLazyDocument([]interface{"One", 2, 3, 3.5, "four"}) +// NewLazyDocument([]interface{"One", 2, 3, 3.5, "four"}) // -// NewLazyDocument(true) +// NewLazyDocument(true) // // Services can send document types as part of their API responses. To retrieve the content of a response document // you use the UnmarshalSmithyDocument method on the response document. When calling UnmarshalSmithyDocument you pass @@ -33,35 +33,34 @@ // // For example, if you expect to receive key/value map from the service response: // -// var kv map[string]interface{} -// if err := outputDocument.UnmarshalSmithyDocument(&kv); err != nil { -// // handle error -// } +// var kv map[string]interface{} +// if err := outputDocument.UnmarshalSmithyDocument(&kv); err != nil { +// // handle error +// } // // If a service can return one or more data-types in the response, you can use an empty interface and type switch to // dynamically handle the response type. // -// var v interface{} -// if err := outputDocument.UnmarshalSmithyDocument(&v); err != nil { -// // handle error -// } +// var v interface{} +// if err := outputDocument.UnmarshalSmithyDocument(&v); err != nil { +// // handle error +// } // -// switch vv := v.(type) { -// case map[string]interface{}: -// // handle key/value map -// case []interface{}: -// // handle array of values -// case bool: -// // handle boolean -// case document.Number: -// // handle an arbitrary precision number -// case string: -// // handle string -// default: -// // handle unknown case -// } +// switch vv := v.(type) { +// case map[string]interface{}: +// // handle key/value map +// case []interface{}: +// // handle array of values +// case bool: +// // handle boolean +// case document.Number: +// // handle an arbitrary precision number +// case string: +// // handle string +// default: +// // handle unknown case +// } // // The mapping of Go types to document types is covered in more depth in https://pkg.go.dev/github.com/aws/smithy-go/document // including more in depth examples that cover user-defined structure types. -// package document diff --git a/service/glacier/internal/customizations/doc.go b/service/glacier/internal/customizations/doc.go index acd84048bc2..a63e56f191a 100644 --- a/service/glacier/internal/customizations/doc.go +++ b/service/glacier/internal/customizations/doc.go @@ -1,6 +1,6 @@ // Package customizations provides customizations for the Glacier API client. // -// Computing tree hash and sha256 checksum +// # Computing tree hash and sha256 checksum // // Glacier requires not only a sha256 checksum header, but also a tree hash. These // can be set as inputs to the relevant commands, but in most cases this would diff --git a/service/grafana/types/types.go b/service/grafana/types/types.go index bc3368f61bd..19899e73b46 100644 --- a/service/grafana/types/types.go +++ b/service/grafana/types/types.go @@ -96,8 +96,9 @@ type AwsSsoAuthentication struct { // full metadata in XML format in the xml parameter. // // The following types satisfy this interface: -// IdpMetadataMemberUrl -// IdpMetadataMemberXml +// +// IdpMetadataMemberUrl +// IdpMetadataMemberXml type IdpMetadata interface { isIdpMetadata() } diff --git a/service/greengrass/api_op_AssociateServiceRoleToAccount.go b/service/greengrass/api_op_AssociateServiceRoleToAccount.go index 0dcf578dcd8..c51a9fcbcb7 100644 --- a/service/greengrass/api_op_AssociateServiceRoleToAccount.go +++ b/service/greengrass/api_op_AssociateServiceRoleToAccount.go @@ -13,7 +13,7 @@ import ( // Associates a role with your account. AWS IoT Greengrass will use the role to // access your Lambda functions and AWS IoT resources. This is necessary for // deployments to succeed. The role must have at least minimum permissions in the -// policy ''AWSGreengrassResourceAccessRolePolicy''. +// policy ”AWSGreengrassResourceAccessRolePolicy”. func (c *Client) AssociateServiceRoleToAccount(ctx context.Context, params *AssociateServiceRoleToAccountInput, optFns ...func(*Options)) (*AssociateServiceRoleToAccountOutput, error) { if params == nil { params = &AssociateServiceRoleToAccountInput{} diff --git a/service/greengrass/api_op_CreateConnectorDefinition.go b/service/greengrass/api_op_CreateConnectorDefinition.go index aba0eedb3f0..9080e3088c2 100644 --- a/service/greengrass/api_op_CreateConnectorDefinition.go +++ b/service/greengrass/api_op_CreateConnectorDefinition.go @@ -12,7 +12,7 @@ import ( ) // Creates a connector definition. You may provide the initial version of the -// connector definition now or use ''CreateConnectorDefinitionVersion'' at a later +// connector definition now or use ”CreateConnectorDefinitionVersion” at a later // time. func (c *Client) CreateConnectorDefinition(ctx context.Context, params *CreateConnectorDefinitionInput, optFns ...func(*Options)) (*CreateConnectorDefinitionOutput, error) { if params == nil { diff --git a/service/greengrass/api_op_CreateCoreDefinition.go b/service/greengrass/api_op_CreateCoreDefinition.go index 0a399a8b9e4..8f0940cab9b 100644 --- a/service/greengrass/api_op_CreateCoreDefinition.go +++ b/service/greengrass/api_op_CreateCoreDefinition.go @@ -12,7 +12,7 @@ import ( ) // Creates a core definition. You may provide the initial version of the core -// definition now or use ''CreateCoreDefinitionVersion'' at a later time. +// definition now or use ”CreateCoreDefinitionVersion” at a later time. // Greengrass groups must each contain exactly one Greengrass core. func (c *Client) CreateCoreDefinition(ctx context.Context, params *CreateCoreDefinitionInput, optFns ...func(*Options)) (*CreateCoreDefinitionOutput, error) { if params == nil { diff --git a/service/greengrass/api_op_CreateDeployment.go b/service/greengrass/api_op_CreateDeployment.go index 3a589788d3d..89b9520decc 100644 --- a/service/greengrass/api_op_CreateDeployment.go +++ b/service/greengrass/api_op_CreateDeployment.go @@ -11,8 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates a deployment. ''CreateDeployment'' requests are idempotent with respect -// to the ''X-Amzn-Client-Token'' token and the request parameters. +// Creates a deployment. ”CreateDeployment” requests are idempotent with respect +// to the ”X-Amzn-Client-Token” token and the request parameters. func (c *Client) CreateDeployment(ctx context.Context, params *CreateDeploymentInput, optFns ...func(*Options)) (*CreateDeploymentOutput, error) { if params == nil { params = &CreateDeploymentInput{} diff --git a/service/greengrass/api_op_CreateDeviceDefinition.go b/service/greengrass/api_op_CreateDeviceDefinition.go index 263e26cbcd1..5b844e54eb8 100644 --- a/service/greengrass/api_op_CreateDeviceDefinition.go +++ b/service/greengrass/api_op_CreateDeviceDefinition.go @@ -12,7 +12,7 @@ import ( ) // Creates a device definition. You may provide the initial version of the device -// definition now or use ''CreateDeviceDefinitionVersion'' at a later time. +// definition now or use ”CreateDeviceDefinitionVersion” at a later time. func (c *Client) CreateDeviceDefinition(ctx context.Context, params *CreateDeviceDefinitionInput, optFns ...func(*Options)) (*CreateDeviceDefinitionOutput, error) { if params == nil { params = &CreateDeviceDefinitionInput{} diff --git a/service/greengrass/api_op_CreateFunctionDefinition.go b/service/greengrass/api_op_CreateFunctionDefinition.go index cfd645d7147..a7ee997ca7f 100644 --- a/service/greengrass/api_op_CreateFunctionDefinition.go +++ b/service/greengrass/api_op_CreateFunctionDefinition.go @@ -14,7 +14,7 @@ import ( // Creates a Lambda function definition which contains a list of Lambda functions // and their configurations to be used in a group. You can create an initial // version of the definition by providing a list of Lambda functions and their -// configurations now, or use ''CreateFunctionDefinitionVersion'' later. +// configurations now, or use ”CreateFunctionDefinitionVersion” later. func (c *Client) CreateFunctionDefinition(ctx context.Context, params *CreateFunctionDefinitionInput, optFns ...func(*Options)) (*CreateFunctionDefinitionOutput, error) { if params == nil { params = &CreateFunctionDefinitionInput{} diff --git a/service/greengrass/api_op_CreateGroup.go b/service/greengrass/api_op_CreateGroup.go index 1a0e56e1583..8a35ddec831 100644 --- a/service/greengrass/api_op_CreateGroup.go +++ b/service/greengrass/api_op_CreateGroup.go @@ -12,7 +12,7 @@ import ( ) // Creates a group. You may provide the initial version of the group or use -// ''CreateGroupVersion'' at a later time. Tip: You can use the ''gg_group_setup'' +// ”CreateGroupVersion” at a later time. Tip: You can use the ”gg_group_setup” // package (https://github.com/awslabs/aws-greengrass-group-setup) as a library or // command-line application to create and deploy Greengrass groups. func (c *Client) CreateGroup(ctx context.Context, params *CreateGroupInput, optFns ...func(*Options)) (*CreateGroupOutput, error) { diff --git a/service/greengrass/api_op_CreateLoggerDefinition.go b/service/greengrass/api_op_CreateLoggerDefinition.go index 633570744f8..5e25a67be20 100644 --- a/service/greengrass/api_op_CreateLoggerDefinition.go +++ b/service/greengrass/api_op_CreateLoggerDefinition.go @@ -12,7 +12,7 @@ import ( ) // Creates a logger definition. You may provide the initial version of the logger -// definition now or use ''CreateLoggerDefinitionVersion'' at a later time. +// definition now or use ”CreateLoggerDefinitionVersion” at a later time. func (c *Client) CreateLoggerDefinition(ctx context.Context, params *CreateLoggerDefinitionInput, optFns ...func(*Options)) (*CreateLoggerDefinitionOutput, error) { if params == nil { params = &CreateLoggerDefinitionInput{} diff --git a/service/greengrass/api_op_CreateResourceDefinition.go b/service/greengrass/api_op_CreateResourceDefinition.go index bc98940a214..d7ff2ae856f 100644 --- a/service/greengrass/api_op_CreateResourceDefinition.go +++ b/service/greengrass/api_op_CreateResourceDefinition.go @@ -13,7 +13,7 @@ import ( // Creates a resource definition which contains a list of resources to be used in a // group. You can create an initial version of the definition by providing a list -// of resources now, or use ''CreateResourceDefinitionVersion'' later. +// of resources now, or use ”CreateResourceDefinitionVersion” later. func (c *Client) CreateResourceDefinition(ctx context.Context, params *CreateResourceDefinitionInput, optFns ...func(*Options)) (*CreateResourceDefinitionOutput, error) { if params == nil { params = &CreateResourceDefinitionInput{} diff --git a/service/greengrass/api_op_CreateSubscriptionDefinition.go b/service/greengrass/api_op_CreateSubscriptionDefinition.go index cc1ccfc80c8..806afbd9c46 100644 --- a/service/greengrass/api_op_CreateSubscriptionDefinition.go +++ b/service/greengrass/api_op_CreateSubscriptionDefinition.go @@ -12,7 +12,7 @@ import ( ) // Creates a subscription definition. You may provide the initial version of the -// subscription definition now or use ''CreateSubscriptionDefinitionVersion'' at a +// subscription definition now or use ”CreateSubscriptionDefinitionVersion” at a // later time. func (c *Client) CreateSubscriptionDefinition(ctx context.Context, params *CreateSubscriptionDefinitionInput, optFns ...func(*Options)) (*CreateSubscriptionDefinitionOutput, error) { if params == nil { diff --git a/service/greengrass/api_op_StartBulkDeployment.go b/service/greengrass/api_op_StartBulkDeployment.go index a14b4986d96..a6ed7a17472 100644 --- a/service/greengrass/api_op_StartBulkDeployment.go +++ b/service/greengrass/api_op_StartBulkDeployment.go @@ -13,7 +13,7 @@ import ( // Deploys multiple groups in one operation. This action starts the bulk deployment // of a specified set of group versions. Each group version deployment will be // triggered with an adaptive rate that has a fixed upper limit. We recommend that -// you include an ''X-Amzn-Client-Token'' token in every ''StartBulkDeployment'' +// you include an ”X-Amzn-Client-Token” token in every ”StartBulkDeployment” // request. These requests are idempotent with respect to the token and the request // parameters. func (c *Client) StartBulkDeployment(ctx context.Context, params *StartBulkDeploymentInput, optFns ...func(*Options)) (*StartBulkDeploymentOutput, error) { diff --git a/service/greengrass/api_op_StopBulkDeployment.go b/service/greengrass/api_op_StopBulkDeployment.go index f655aadde2a..2992ef249ed 100644 --- a/service/greengrass/api_op_StopBulkDeployment.go +++ b/service/greengrass/api_op_StopBulkDeployment.go @@ -11,8 +11,8 @@ import ( ) // Stops the execution of a bulk deployment. This action returns a status of -// ''Stopping'' until the deployment is stopped. You cannot start a new bulk -// deployment while a previous deployment is in the ''Stopping'' state. This action +// ”Stopping” until the deployment is stopped. You cannot start a new bulk +// deployment while a previous deployment is in the ”Stopping” state. This action // doesn't rollback completed deployments or cancel pending deployments. func (c *Client) StopBulkDeployment(ctx context.Context, params *StopBulkDeploymentInput, optFns ...func(*Options)) (*StopBulkDeploymentOutput, error) { if params == nil { diff --git a/service/greengrass/types/types.go b/service/greengrass/types/types.go index 2e238ff23dc..bfa748f48c9 100644 --- a/service/greengrass/types/types.go +++ b/service/greengrass/types/types.go @@ -404,8 +404,8 @@ type FunctionExecutionConfig struct { // function. You can specify one or both values to override the default values. We // recommend that you avoid running as root unless absolutely necessary to minimize // the risk of unintended changes or malicious attacks. To run as root, you must -// set ''IsolationMode'' to ''NoContainer'' and update config.json in -// ''greengrass-root/config'' to set ''allowFunctionsToRunAsRoot'' to ''yes''. +// set ”IsolationMode” to ”NoContainer” and update config.json in +// ”greengrass-root/config” to set ”allowFunctionsToRunAsRoot” to ”yes”. type FunctionRunAsConfig struct { // The group ID whose permissions are used to run a Lambda function. @@ -611,9 +611,9 @@ type ResourceAccessPolicy struct { } // A container for resource data. The container takes only one of the following -// supported resource data types: ''LocalDeviceResourceData'', -// ''LocalVolumeResourceData'', ''SageMakerMachineLearningModelResourceData'', -// ''S3MachineLearningModelResourceData'', ''SecretsManagerSecretResourceData''. +// supported resource data types: ”LocalDeviceResourceData”, +// ”LocalVolumeResourceData”, ”SageMakerMachineLearningModelResourceData”, +// ”S3MachineLearningModelResourceData”, ”SecretsManagerSecretResourceData”. type ResourceDataContainer struct { // Attributes that define the local device resource. diff --git a/service/groundstation/api_op_CancelContact.go b/service/groundstation/api_op_CancelContact.go index 1f0d331dc16..04f55a0a868 100644 --- a/service/groundstation/api_op_CancelContact.go +++ b/service/groundstation/api_op_CancelContact.go @@ -26,7 +26,6 @@ func (c *Client) CancelContact(ctx context.Context, params *CancelContactInput, return out, nil } -// type CancelContactInput struct { // UUID of a contact. @@ -37,7 +36,6 @@ type CancelContactInput struct { noSmithyDocumentSerde } -// type CancelContactOutput struct { // UUID of a contact. diff --git a/service/groundstation/api_op_CreateConfig.go b/service/groundstation/api_op_CreateConfig.go index 3203b59819e..f50a3ed177b 100644 --- a/service/groundstation/api_op_CreateConfig.go +++ b/service/groundstation/api_op_CreateConfig.go @@ -28,7 +28,6 @@ func (c *Client) CreateConfig(ctx context.Context, params *CreateConfigInput, op return out, nil } -// type CreateConfigInput struct { // Parameters of a Config. @@ -47,7 +46,6 @@ type CreateConfigInput struct { noSmithyDocumentSerde } -// type CreateConfigOutput struct { // ARN of a Config. diff --git a/service/groundstation/api_op_CreateDataflowEndpointGroup.go b/service/groundstation/api_op_CreateDataflowEndpointGroup.go index 93e94b8a6a7..892e97b4a1f 100644 --- a/service/groundstation/api_op_CreateDataflowEndpointGroup.go +++ b/service/groundstation/api_op_CreateDataflowEndpointGroup.go @@ -31,7 +31,6 @@ func (c *Client) CreateDataflowEndpointGroup(ctx context.Context, params *Create return out, nil } -// type CreateDataflowEndpointGroupInput struct { // Endpoint details of each endpoint in the dataflow endpoint group. @@ -45,7 +44,6 @@ type CreateDataflowEndpointGroupInput struct { noSmithyDocumentSerde } -// type CreateDataflowEndpointGroupOutput struct { // UUID of a dataflow endpoint group. diff --git a/service/groundstation/api_op_CreateMissionProfile.go b/service/groundstation/api_op_CreateMissionProfile.go index 6a574b34401..2972579f6aa 100644 --- a/service/groundstation/api_op_CreateMissionProfile.go +++ b/service/groundstation/api_op_CreateMissionProfile.go @@ -27,7 +27,6 @@ func (c *Client) CreateMissionProfile(ctx context.Context, params *CreateMission return out, nil } -// type CreateMissionProfileInput struct { // A list of lists of ARNs. Each list of ARNs is an edge, with a from Config and a @@ -67,7 +66,6 @@ type CreateMissionProfileInput struct { noSmithyDocumentSerde } -// type CreateMissionProfileOutput struct { // UUID of a mission profile. diff --git a/service/groundstation/api_op_DeleteConfig.go b/service/groundstation/api_op_DeleteConfig.go index d4d4b6c4d68..a51c412fd8b 100644 --- a/service/groundstation/api_op_DeleteConfig.go +++ b/service/groundstation/api_op_DeleteConfig.go @@ -27,7 +27,6 @@ func (c *Client) DeleteConfig(ctx context.Context, params *DeleteConfigInput, op return out, nil } -// type DeleteConfigInput struct { // UUID of a Config. @@ -43,7 +42,6 @@ type DeleteConfigInput struct { noSmithyDocumentSerde } -// type DeleteConfigOutput struct { // ARN of a Config. diff --git a/service/groundstation/api_op_DeleteDataflowEndpointGroup.go b/service/groundstation/api_op_DeleteDataflowEndpointGroup.go index 8525d2ab3a8..6dddf751ebe 100644 --- a/service/groundstation/api_op_DeleteDataflowEndpointGroup.go +++ b/service/groundstation/api_op_DeleteDataflowEndpointGroup.go @@ -26,7 +26,6 @@ func (c *Client) DeleteDataflowEndpointGroup(ctx context.Context, params *Delete return out, nil } -// type DeleteDataflowEndpointGroupInput struct { // UUID of a dataflow endpoint group. @@ -37,7 +36,6 @@ type DeleteDataflowEndpointGroupInput struct { noSmithyDocumentSerde } -// type DeleteDataflowEndpointGroupOutput struct { // UUID of a dataflow endpoint group. diff --git a/service/groundstation/api_op_DeleteMissionProfile.go b/service/groundstation/api_op_DeleteMissionProfile.go index cbdd64d4f06..91ce385233c 100644 --- a/service/groundstation/api_op_DeleteMissionProfile.go +++ b/service/groundstation/api_op_DeleteMissionProfile.go @@ -26,7 +26,6 @@ func (c *Client) DeleteMissionProfile(ctx context.Context, params *DeleteMission return out, nil } -// type DeleteMissionProfileInput struct { // UUID of a mission profile. @@ -37,7 +36,6 @@ type DeleteMissionProfileInput struct { noSmithyDocumentSerde } -// type DeleteMissionProfileOutput struct { // UUID of a mission profile. diff --git a/service/groundstation/api_op_DescribeContact.go b/service/groundstation/api_op_DescribeContact.go index 3d24c16af9c..8a76022a4a0 100644 --- a/service/groundstation/api_op_DescribeContact.go +++ b/service/groundstation/api_op_DescribeContact.go @@ -28,7 +28,6 @@ func (c *Client) DescribeContact(ctx context.Context, params *DescribeContactInp return out, nil } -// type DescribeContactInput struct { // UUID of a contact. @@ -39,7 +38,6 @@ type DescribeContactInput struct { noSmithyDocumentSerde } -// type DescribeContactOutput struct { // UUID of a contact. diff --git a/service/groundstation/api_op_GetConfig.go b/service/groundstation/api_op_GetConfig.go index 17dc0cf00be..ad9d9fe57a9 100644 --- a/service/groundstation/api_op_GetConfig.go +++ b/service/groundstation/api_op_GetConfig.go @@ -27,7 +27,6 @@ func (c *Client) GetConfig(ctx context.Context, params *GetConfigInput, optFns . return out, nil } -// type GetConfigInput struct { // UUID of a Config. @@ -43,7 +42,6 @@ type GetConfigInput struct { noSmithyDocumentSerde } -// type GetConfigOutput struct { // ARN of a Config diff --git a/service/groundstation/api_op_GetDataflowEndpointGroup.go b/service/groundstation/api_op_GetDataflowEndpointGroup.go index 33e183bd318..b88f53ebcac 100644 --- a/service/groundstation/api_op_GetDataflowEndpointGroup.go +++ b/service/groundstation/api_op_GetDataflowEndpointGroup.go @@ -27,7 +27,6 @@ func (c *Client) GetDataflowEndpointGroup(ctx context.Context, params *GetDatafl return out, nil } -// type GetDataflowEndpointGroupInput struct { // UUID of a dataflow endpoint group. @@ -38,7 +37,6 @@ type GetDataflowEndpointGroupInput struct { noSmithyDocumentSerde } -// type GetDataflowEndpointGroupOutput struct { // ARN of a dataflow endpoint group. diff --git a/service/groundstation/api_op_GetMinuteUsage.go b/service/groundstation/api_op_GetMinuteUsage.go index 9283da5284a..721d05bc4c6 100644 --- a/service/groundstation/api_op_GetMinuteUsage.go +++ b/service/groundstation/api_op_GetMinuteUsage.go @@ -26,7 +26,6 @@ func (c *Client) GetMinuteUsage(ctx context.Context, params *GetMinuteUsageInput return out, nil } -// type GetMinuteUsageInput struct { // The month being requested, with a value of 1-12. @@ -42,7 +41,6 @@ type GetMinuteUsageInput struct { noSmithyDocumentSerde } -// type GetMinuteUsageOutput struct { // Estimated number of minutes remaining for an account, specific to the month diff --git a/service/groundstation/api_op_GetMissionProfile.go b/service/groundstation/api_op_GetMissionProfile.go index 7fa04984ce6..c57dcd971ad 100644 --- a/service/groundstation/api_op_GetMissionProfile.go +++ b/service/groundstation/api_op_GetMissionProfile.go @@ -26,7 +26,6 @@ func (c *Client) GetMissionProfile(ctx context.Context, params *GetMissionProfil return out, nil } -// type GetMissionProfileInput struct { // UUID of a mission profile. @@ -37,7 +36,6 @@ type GetMissionProfileInput struct { noSmithyDocumentSerde } -// type GetMissionProfileOutput struct { // Amount of time after a contact ends that you’d like to receive a CloudWatch diff --git a/service/groundstation/api_op_GetSatellite.go b/service/groundstation/api_op_GetSatellite.go index 0cfeaa85984..639615bcccb 100644 --- a/service/groundstation/api_op_GetSatellite.go +++ b/service/groundstation/api_op_GetSatellite.go @@ -26,7 +26,6 @@ func (c *Client) GetSatellite(ctx context.Context, params *GetSatelliteInput, op return out, nil } -// type GetSatelliteInput struct { // UUID of a satellite. @@ -37,7 +36,6 @@ type GetSatelliteInput struct { noSmithyDocumentSerde } -// type GetSatelliteOutput struct { // A list of ground stations to which the satellite is on-boarded. diff --git a/service/groundstation/api_op_ListConfigs.go b/service/groundstation/api_op_ListConfigs.go index e46390e4d4e..855b3b11f60 100644 --- a/service/groundstation/api_op_ListConfigs.go +++ b/service/groundstation/api_op_ListConfigs.go @@ -28,7 +28,6 @@ func (c *Client) ListConfigs(ctx context.Context, params *ListConfigsInput, optF return out, nil } -// type ListConfigsInput struct { // Maximum number of Configs returned. @@ -41,7 +40,6 @@ type ListConfigsInput struct { noSmithyDocumentSerde } -// type ListConfigsOutput struct { // List of Config items. diff --git a/service/groundstation/api_op_ListContacts.go b/service/groundstation/api_op_ListContacts.go index 4377bb5f4d6..3fec3215b3d 100644 --- a/service/groundstation/api_op_ListContacts.go +++ b/service/groundstation/api_op_ListContacts.go @@ -30,7 +30,6 @@ func (c *Client) ListContacts(ctx context.Context, params *ListContactsInput, op return out, nil } -// type ListContactsInput struct { // End time of a contact. @@ -67,7 +66,6 @@ type ListContactsInput struct { noSmithyDocumentSerde } -// type ListContactsOutput struct { // List of contacts. diff --git a/service/groundstation/api_op_ListDataflowEndpointGroups.go b/service/groundstation/api_op_ListDataflowEndpointGroups.go index ac391df5670..d2f5f4c6023 100644 --- a/service/groundstation/api_op_ListDataflowEndpointGroups.go +++ b/service/groundstation/api_op_ListDataflowEndpointGroups.go @@ -28,7 +28,6 @@ func (c *Client) ListDataflowEndpointGroups(ctx context.Context, params *ListDat return out, nil } -// type ListDataflowEndpointGroupsInput struct { // Maximum number of dataflow endpoint groups returned. @@ -41,7 +40,6 @@ type ListDataflowEndpointGroupsInput struct { noSmithyDocumentSerde } -// type ListDataflowEndpointGroupsOutput struct { // A list of dataflow endpoint groups. diff --git a/service/groundstation/api_op_ListGroundStations.go b/service/groundstation/api_op_ListGroundStations.go index 29fd5546c01..cf6a2781b7c 100644 --- a/service/groundstation/api_op_ListGroundStations.go +++ b/service/groundstation/api_op_ListGroundStations.go @@ -28,7 +28,6 @@ func (c *Client) ListGroundStations(ctx context.Context, params *ListGroundStati return out, nil } -// type ListGroundStationsInput struct { // Maximum number of ground stations returned. @@ -44,7 +43,6 @@ type ListGroundStationsInput struct { noSmithyDocumentSerde } -// type ListGroundStationsOutput struct { // List of ground stations. diff --git a/service/groundstation/api_op_ListMissionProfiles.go b/service/groundstation/api_op_ListMissionProfiles.go index 1d33d71f38f..014bd1f76a1 100644 --- a/service/groundstation/api_op_ListMissionProfiles.go +++ b/service/groundstation/api_op_ListMissionProfiles.go @@ -28,7 +28,6 @@ func (c *Client) ListMissionProfiles(ctx context.Context, params *ListMissionPro return out, nil } -// type ListMissionProfilesInput struct { // Maximum number of mission profiles returned. @@ -41,7 +40,6 @@ type ListMissionProfilesInput struct { noSmithyDocumentSerde } -// type ListMissionProfilesOutput struct { // List of mission profiles. diff --git a/service/groundstation/api_op_ListSatellites.go b/service/groundstation/api_op_ListSatellites.go index 1aa5ef0d454..7c72e50b418 100644 --- a/service/groundstation/api_op_ListSatellites.go +++ b/service/groundstation/api_op_ListSatellites.go @@ -28,7 +28,6 @@ func (c *Client) ListSatellites(ctx context.Context, params *ListSatellitesInput return out, nil } -// type ListSatellitesInput struct { // Maximum number of satellites returned. @@ -41,7 +40,6 @@ type ListSatellitesInput struct { noSmithyDocumentSerde } -// type ListSatellitesOutput struct { // Next token that can be supplied in the next call to get the next page of diff --git a/service/groundstation/api_op_ListTagsForResource.go b/service/groundstation/api_op_ListTagsForResource.go index c8fc2329120..5f1d79b20ac 100644 --- a/service/groundstation/api_op_ListTagsForResource.go +++ b/service/groundstation/api_op_ListTagsForResource.go @@ -26,7 +26,6 @@ func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForRes return out, nil } -// type ListTagsForResourceInput struct { // ARN of a resource. @@ -37,7 +36,6 @@ type ListTagsForResourceInput struct { noSmithyDocumentSerde } -// type ListTagsForResourceOutput struct { // Tags assigned to a resource. diff --git a/service/groundstation/api_op_ReserveContact.go b/service/groundstation/api_op_ReserveContact.go index 084a0a64a33..551f49100df 100644 --- a/service/groundstation/api_op_ReserveContact.go +++ b/service/groundstation/api_op_ReserveContact.go @@ -27,7 +27,6 @@ func (c *Client) ReserveContact(ctx context.Context, params *ReserveContactInput return out, nil } -// type ReserveContactInput struct { // End time of a contact. @@ -61,7 +60,6 @@ type ReserveContactInput struct { noSmithyDocumentSerde } -// type ReserveContactOutput struct { // UUID of a contact. diff --git a/service/groundstation/api_op_TagResource.go b/service/groundstation/api_op_TagResource.go index 1628d603d61..3ad9ac22800 100644 --- a/service/groundstation/api_op_TagResource.go +++ b/service/groundstation/api_op_TagResource.go @@ -26,7 +26,6 @@ func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optF return out, nil } -// type TagResourceInput struct { // ARN of a resource tag. @@ -42,7 +41,6 @@ type TagResourceInput struct { noSmithyDocumentSerde } -// type TagResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/groundstation/api_op_UntagResource.go b/service/groundstation/api_op_UntagResource.go index 8626e64c94f..04cd8380806 100644 --- a/service/groundstation/api_op_UntagResource.go +++ b/service/groundstation/api_op_UntagResource.go @@ -26,7 +26,6 @@ func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, return out, nil } -// type UntagResourceInput struct { // ARN of a resource. @@ -42,7 +41,6 @@ type UntagResourceInput struct { noSmithyDocumentSerde } -// type UntagResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/groundstation/api_op_UpdateConfig.go b/service/groundstation/api_op_UpdateConfig.go index 1c7970763f4..6643e18972a 100644 --- a/service/groundstation/api_op_UpdateConfig.go +++ b/service/groundstation/api_op_UpdateConfig.go @@ -29,7 +29,6 @@ func (c *Client) UpdateConfig(ctx context.Context, params *UpdateConfigInput, op return out, nil } -// type UpdateConfigInput struct { // Parameters of a Config. @@ -55,7 +54,6 @@ type UpdateConfigInput struct { noSmithyDocumentSerde } -// type UpdateConfigOutput struct { // ARN of a Config. diff --git a/service/groundstation/api_op_UpdateMissionProfile.go b/service/groundstation/api_op_UpdateMissionProfile.go index 8911a0cfa7f..916a33309b1 100644 --- a/service/groundstation/api_op_UpdateMissionProfile.go +++ b/service/groundstation/api_op_UpdateMissionProfile.go @@ -27,7 +27,6 @@ func (c *Client) UpdateMissionProfile(ctx context.Context, params *UpdateMission return out, nil } -// type UpdateMissionProfileInput struct { // UUID of a mission profile. @@ -61,7 +60,6 @@ type UpdateMissionProfileInput struct { noSmithyDocumentSerde } -// type UpdateMissionProfileOutput struct { // UUID of a mission profile. diff --git a/service/groundstation/types/types.go b/service/groundstation/types/types.go index 813119dfa0f..b6f0a4c86ce 100644 --- a/service/groundstation/types/types.go +++ b/service/groundstation/types/types.go @@ -72,9 +72,10 @@ type AntennaUplinkConfig struct { // Details for certain Config object types in a contact. // // The following types satisfy this interface: -// ConfigDetailsMemberAntennaDemodDecodeDetails -// ConfigDetailsMemberEndpointDetails -// ConfigDetailsMemberS3RecordingDetails +// +// ConfigDetailsMemberAntennaDemodDecodeDetails +// ConfigDetailsMemberEndpointDetails +// ConfigDetailsMemberS3RecordingDetails type ConfigDetails interface { isConfigDetails() } @@ -128,13 +129,14 @@ type ConfigListItem struct { // what each type of Config contains. // // The following types satisfy this interface: -// ConfigTypeDataMemberAntennaDownlinkConfig -// ConfigTypeDataMemberAntennaDownlinkDemodDecodeConfig -// ConfigTypeDataMemberAntennaUplinkConfig -// ConfigTypeDataMemberDataflowEndpointConfig -// ConfigTypeDataMemberS3RecordingConfig -// ConfigTypeDataMemberTrackingConfig -// ConfigTypeDataMemberUplinkEchoConfig +// +// ConfigTypeDataMemberAntennaDownlinkConfig +// ConfigTypeDataMemberAntennaDownlinkDemodDecodeConfig +// ConfigTypeDataMemberAntennaUplinkConfig +// ConfigTypeDataMemberDataflowEndpointConfig +// ConfigTypeDataMemberS3RecordingConfig +// ConfigTypeDataMemberTrackingConfig +// ConfigTypeDataMemberUplinkEchoConfig type ConfigTypeData interface { isConfigTypeData() } diff --git a/service/healthlake/types/types.go b/service/healthlake/types/types.go index d818f510770..961ab5b8cd8 100644 --- a/service/healthlake/types/types.go +++ b/service/healthlake/types/types.go @@ -173,7 +173,8 @@ type ImportJobProperties struct { // The input properties for an import job. // // The following types satisfy this interface: -// InputDataConfigMemberS3Uri +// +// InputDataConfigMemberS3Uri type InputDataConfig interface { isInputDataConfig() } @@ -207,7 +208,8 @@ type KmsEncryptionConfig struct { // The output data configuration that was supplied when the export job was created. // // The following types satisfy this interface: -// OutputDataConfigMemberS3Configuration +// +// OutputDataConfigMemberS3Configuration type OutputDataConfig interface { isOutputDataConfig() } diff --git a/service/inspector2/types/types.go b/service/inspector2/types/types.go index efafaa99202..c15675bff61 100644 --- a/service/inspector2/types/types.go +++ b/service/inspector2/types/types.go @@ -86,15 +86,16 @@ type AccountState struct { // Contains details about an aggregation request. // // The following types satisfy this interface: -// AggregationRequestMemberAccountAggregation -// AggregationRequestMemberAmiAggregation -// AggregationRequestMemberAwsEcrContainerAggregation -// AggregationRequestMemberEc2InstanceAggregation -// AggregationRequestMemberFindingTypeAggregation -// AggregationRequestMemberImageLayerAggregation -// AggregationRequestMemberPackageAggregation -// AggregationRequestMemberRepositoryAggregation -// AggregationRequestMemberTitleAggregation +// +// AggregationRequestMemberAccountAggregation +// AggregationRequestMemberAmiAggregation +// AggregationRequestMemberAwsEcrContainerAggregation +// AggregationRequestMemberEc2InstanceAggregation +// AggregationRequestMemberFindingTypeAggregation +// AggregationRequestMemberImageLayerAggregation +// AggregationRequestMemberPackageAggregation +// AggregationRequestMemberRepositoryAggregation +// AggregationRequestMemberTitleAggregation type AggregationRequest interface { isAggregationRequest() } @@ -192,15 +193,16 @@ func (*AggregationRequestMemberTitleAggregation) isAggregationRequest() {} // A structure that contains details about the results of an aggregation type. // // The following types satisfy this interface: -// AggregationResponseMemberAccountAggregation -// AggregationResponseMemberAmiAggregation -// AggregationResponseMemberAwsEcrContainerAggregation -// AggregationResponseMemberEc2InstanceAggregation -// AggregationResponseMemberFindingTypeAggregation -// AggregationResponseMemberImageLayerAggregation -// AggregationResponseMemberPackageAggregation -// AggregationResponseMemberRepositoryAggregation -// AggregationResponseMemberTitleAggregation +// +// AggregationResponseMemberAccountAggregation +// AggregationResponseMemberAmiAggregation +// AggregationResponseMemberAwsEcrContainerAggregation +// AggregationResponseMemberEc2InstanceAggregation +// AggregationResponseMemberFindingTypeAggregation +// AggregationResponseMemberImageLayerAggregation +// AggregationResponseMemberPackageAggregation +// AggregationResponseMemberRepositoryAggregation +// AggregationResponseMemberTitleAggregation type AggregationResponse interface { isAggregationResponse() } diff --git a/service/internal/accept-encoding/doc.go b/service/internal/accept-encoding/doc.go index 3ffac01315d..7056d9bf6fa 100644 --- a/service/internal/accept-encoding/doc.go +++ b/service/internal/accept-encoding/doc.go @@ -1,7 +1,7 @@ /* Package acceptencoding provides customizations associated with Accept Encoding Header. -Accept encoding gzip +# Accept encoding gzip The Go HTTP client automatically supports accept-encoding and content-encoding gzip by default. This default behavior is not desired by the SDK, and prevents @@ -18,6 +18,5 @@ client's default behavior. An `EnableAcceptEncodingGzip` option may or may not be present depending on the client using the below middleware. The option if present can be used to enable auto decompressing gzip by the SDK. - */ package acceptencoding diff --git a/service/internal/benchmark/dynamodb/doc.go b/service/internal/benchmark/dynamodb/doc.go index 2af08f6b1e3..931dea3a3cb 100644 --- a/service/internal/benchmark/dynamodb/doc.go +++ b/service/internal/benchmark/dynamodb/doc.go @@ -6,5 +6,5 @@ // // Example command to run the benchmark // -// go test -bench "/default" -run NONE -v -benchtime=10s -benchmem +// go test -bench "/default" -run NONE -v -benchtime=10s -benchmem package benchmark diff --git a/service/internal/checksum/aws_chunked_encoding.go b/service/internal/checksum/aws_chunked_encoding.go index e8b5c3f5a2c..3bd320c4376 100644 --- a/service/internal/checksum/aws_chunked_encoding.go +++ b/service/internal/checksum/aws_chunked_encoding.go @@ -71,11 +71,11 @@ type awsChunkedTrailerValue struct { // Here is the aws-chunked payload stream as read from the awsChunkedEncoding // if original request stream is "Hello world", and checksum hash used is SHA256 // -// \r\n -// Hello world\r\n -// 0\r\n -// x-amz-checksum-sha256:ZOyIygCyaOW6GjVnihtTFtIS9PNmskdyMlNKiuyjfzw=\r\n -// \r\n +// \r\n +// Hello world\r\n +// 0\r\n +// x-amz-checksum-sha256:ZOyIygCyaOW6GjVnihtTFtIS9PNmskdyMlNKiuyjfzw=\r\n +// \r\n type awsChunkedEncoding struct { options awsChunkedEncodingOptions diff --git a/service/internal/checksum/middleware_compute_input_checksum.go b/service/internal/checksum/middleware_compute_input_checksum.go index b10d2150564..fa5f9a8c069 100644 --- a/service/internal/checksum/middleware_compute_input_checksum.go +++ b/service/internal/checksum/middleware_compute_input_checksum.go @@ -97,9 +97,9 @@ func (e computeInputHeaderChecksumError) Error() string { func (e computeInputHeaderChecksumError) Unwrap() error { return e.Err } // HandleBuild handles computing the payload's checksum, in the following cases: -// * Is HTTP, not HTTPS -// * RequireChecksum is true, and no checksums were specified via the Input -// * Trailing checksums are not supported +// - Is HTTP, not HTTPS +// - RequireChecksum is true, and no checksums were specified via the Input +// - Trailing checksums are not supported // // The build handler must be inserted in the stack before ContentPayloadHash // and after ComputeContentLength. @@ -246,9 +246,9 @@ func (e computeInputTrailingChecksumError) Error() string { func (e computeInputTrailingChecksumError) Unwrap() error { return e.Err } // HandleFinalize handles computing the payload's checksum, in the following cases: -// * Is HTTPS, not HTTP -// * A checksum was specified via the Input -// * Trailing checksums are supported. +// - Is HTTPS, not HTTP +// - A checksum was specified via the Input +// - Trailing checksums are supported. // // The finalize handler must be inserted in the stack before Signing, and after Retry. func (m *computeInputPayloadChecksum) HandleFinalize( diff --git a/service/internal/endpoint-discovery/doc.go b/service/internal/endpoint-discovery/doc.go index f9fcd5478d7..36a16a7553a 100644 --- a/service/internal/endpoint-discovery/doc.go +++ b/service/internal/endpoint-discovery/doc.go @@ -10,10 +10,9 @@ identifiers provided by the customer. Endpoint cache keys follow the grammar: - key = sdkId.identifiers - - identifiers = map[string]string + key = sdkId.identifiers + identifiers = map[string]string The endpoint discovery cache implementation is internal. Clients resolves the cache size to 10 entries. Each entry may contain multiple host addresses as @@ -30,6 +29,5 @@ By default, the feature is set to AUTO - indicating operations that require endpoint discovery always use it. To completely turn off the feature, one should set the value as FALSE. Similar configuration rules apply for shared config file where key is `endpoint_discovery_enabled`. - */ package endpointdiscovery diff --git a/service/internal/s3shared/arn/accesspoint_arn.go b/service/internal/s3shared/arn/accesspoint_arn.go index 4f7017e84e7..ec290b21351 100644 --- a/service/internal/s3shared/arn/accesspoint_arn.go +++ b/service/internal/s3shared/arn/accesspoint_arn.go @@ -21,9 +21,8 @@ func (a AccessPointARN) GetARN() arn.ARN { // AccessPoint resource. // // Supported Access point resource format: -// - Access point format: arn:{partition}:s3:{region}:{accountId}:accesspoint/{accesspointName} -// - example: arn:aws:s3:us-west-2:012345678901:accesspoint/myaccesspoint -// +// - Access point format: arn:{partition}:s3:{region}:{accountId}:accesspoint/{accesspointName} +// - example: arn:aws:s3:us-west-2:012345678901:accesspoint/myaccesspoint func ParseAccessPointResource(a arn.ARN, resParts []string) (AccessPointARN, error) { if isFIPS(a.Region) { return AccessPointARN{}, InvalidARNError{ARN: a, Reason: "FIPS region not allowed in ARN"} diff --git a/service/internal/s3shared/arn/outpost_arn.go b/service/internal/s3shared/arn/outpost_arn.go index 2b9bd6c2163..e06a3028570 100644 --- a/service/internal/s3shared/arn/outpost_arn.go +++ b/service/internal/s3shared/arn/outpost_arn.go @@ -17,15 +17,14 @@ type OutpostARN interface { // // Currently supported outpost ARN formats: // * Outpost AccessPoint ARN format: -// - ARN format: arn:{partition}:s3-outposts:{region}:{accountId}:outpost/{outpostId}/accesspoint/{accesspointName} -// - example: arn:aws:s3-outposts:us-west-2:012345678901:outpost/op-1234567890123456/accesspoint/myaccesspoint +// - ARN format: arn:{partition}:s3-outposts:{region}:{accountId}:outpost/{outpostId}/accesspoint/{accesspointName} +// - example: arn:aws:s3-outposts:us-west-2:012345678901:outpost/op-1234567890123456/accesspoint/myaccesspoint // // * Outpost Bucket ARN format: -// - ARN format: arn:{partition}:s3-outposts:{region}:{accountId}:outpost/{outpostId}/bucket/{bucketName} -// - example: arn:aws:s3-outposts:us-west-2:012345678901:outpost/op-1234567890123456/bucket/mybucket +// - ARN format: arn:{partition}:s3-outposts:{region}:{accountId}:outpost/{outpostId}/bucket/{bucketName} +// - example: arn:aws:s3-outposts:us-west-2:012345678901:outpost/op-1234567890123456/bucket/mybucket // // Other outpost ARN formats may be supported and added in the future. -// func ParseOutpostARNResource(a arn.ARN, resParts []string) (OutpostARN, error) { if len(a.Region) == 0 { return nil, InvalidARNError{ARN: a, Reason: "region not set"} @@ -113,7 +112,6 @@ func (o OutpostBucketARN) GetARN() arn.ARN { // bucket resource id. // // parseBucketResource only parses the bucket resource id. -// func parseBucketResource(a arn.ARN, resParts []string) (bucketName string, err error) { if len(resParts) == 0 { return bucketName, InvalidARNError{ARN: a, Reason: "bucket resource-id not set"} diff --git a/service/iot/types/types.go b/service/iot/types/types.go index cff4794a506..a0d20fda436 100644 --- a/service/iot/types/types.go +++ b/service/iot/types/types.go @@ -264,10 +264,11 @@ type AssetPropertyValue struct { // Contains an asset property value (of a single type). // // The following types satisfy this interface: -// AssetPropertyVariantMemberBooleanValue -// AssetPropertyVariantMemberDoubleValue -// AssetPropertyVariantMemberIntegerValue -// AssetPropertyVariantMemberStringValue +// +// AssetPropertyVariantMemberBooleanValue +// AssetPropertyVariantMemberDoubleValue +// AssetPropertyVariantMemberIntegerValue +// AssetPropertyVariantMemberStringValue type AssetPropertyVariant interface { isAssetPropertyVariant() } diff --git a/service/iot1clickprojects/types/errors.go b/service/iot1clickprojects/types/errors.go index 4f4909f0ece..14340696bb5 100644 --- a/service/iot1clickprojects/types/errors.go +++ b/service/iot1clickprojects/types/errors.go @@ -7,7 +7,6 @@ import ( smithy "github.com/aws/smithy-go" ) -// type InternalFailureException struct { Message *string @@ -28,7 +27,6 @@ func (e *InternalFailureException) ErrorMessage() string { func (e *InternalFailureException) ErrorCode() string { return "InternalFailureException" } func (e *InternalFailureException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } -// type InvalidRequestException struct { Message *string @@ -49,7 +47,6 @@ func (e *InvalidRequestException) ErrorMessage() string { func (e *InvalidRequestException) ErrorCode() string { return "InvalidRequestException" } func (e *InvalidRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ResourceConflictException struct { Message *string @@ -70,7 +67,6 @@ func (e *ResourceConflictException) ErrorMessage() string { func (e *ResourceConflictException) ErrorCode() string { return "ResourceConflictException" } func (e *ResourceConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ResourceNotFoundException struct { Message *string @@ -91,7 +87,6 @@ func (e *ResourceNotFoundException) ErrorMessage() string { func (e *ResourceNotFoundException) ErrorCode() string { return "ResourceNotFoundException" } func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type TooManyRequestsException struct { Message *string diff --git a/service/iotanalytics/types/types.go b/service/iotanalytics/types/types.go index efe5f77652c..3f45c24deed 100644 --- a/service/iotanalytics/types/types.go +++ b/service/iotanalytics/types/types.go @@ -648,9 +648,10 @@ type DatastoreStatistics struct { // data store is created. // // The following types satisfy this interface: -// DatastoreStorageMemberCustomerManagedS3 -// DatastoreStorageMemberIotSiteWiseMultiLayerStorage -// DatastoreStorageMemberServiceManagedS3 +// +// DatastoreStorageMemberCustomerManagedS3 +// DatastoreStorageMemberIotSiteWiseMultiLayerStorage +// DatastoreStorageMemberServiceManagedS3 type DatastoreStorage interface { isDatastoreStorage() } diff --git a/service/iotthingsgraph/types/errors.go b/service/iotthingsgraph/types/errors.go index 9a524ce0d3a..f93c711952c 100644 --- a/service/iotthingsgraph/types/errors.go +++ b/service/iotthingsgraph/types/errors.go @@ -7,7 +7,6 @@ import ( smithy "github.com/aws/smithy-go" ) -// type InternalFailureException struct { Message *string @@ -26,7 +25,6 @@ func (e *InternalFailureException) ErrorMessage() string { func (e *InternalFailureException) ErrorCode() string { return "InternalFailureException" } func (e *InternalFailureException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } -// type InvalidRequestException struct { Message *string @@ -45,7 +43,6 @@ func (e *InvalidRequestException) ErrorMessage() string { func (e *InvalidRequestException) ErrorCode() string { return "InvalidRequestException" } func (e *InvalidRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type LimitExceededException struct { Message *string @@ -64,7 +61,6 @@ func (e *LimitExceededException) ErrorMessage() string { func (e *LimitExceededException) ErrorCode() string { return "LimitExceededException" } func (e *LimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ResourceAlreadyExistsException struct { Message *string @@ -83,7 +79,6 @@ func (e *ResourceAlreadyExistsException) ErrorMessage() string { func (e *ResourceAlreadyExistsException) ErrorCode() string { return "ResourceAlreadyExistsException" } func (e *ResourceAlreadyExistsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ResourceInUseException struct { Message *string @@ -102,7 +97,6 @@ func (e *ResourceInUseException) ErrorMessage() string { func (e *ResourceInUseException) ErrorCode() string { return "ResourceInUseException" } func (e *ResourceInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ResourceNotFoundException struct { Message *string @@ -121,7 +115,6 @@ func (e *ResourceNotFoundException) ErrorMessage() string { func (e *ResourceNotFoundException) ErrorCode() string { return "ResourceNotFoundException" } func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ThrottlingException struct { Message *string diff --git a/service/iottwinmaker/types/types.go b/service/iottwinmaker/types/types.go index a63fe3f9c41..c7a746862cd 100644 --- a/service/iottwinmaker/types/types.go +++ b/service/iottwinmaker/types/types.go @@ -342,9 +342,10 @@ type LambdaFunction struct { // accepted as a valid input. // // The following types satisfy this interface: -// ListComponentTypesFilterMemberExtendsFrom -// ListComponentTypesFilterMemberIsAbstract -// ListComponentTypesFilterMemberNamespace +// +// ListComponentTypesFilterMemberExtendsFrom +// ListComponentTypesFilterMemberIsAbstract +// ListComponentTypesFilterMemberNamespace type ListComponentTypesFilter interface { isListComponentTypesFilter() } @@ -380,9 +381,10 @@ func (*ListComponentTypesFilterMemberNamespace) isListComponentTypesFilter() {} // An object that filters items in a list of entities. // // The following types satisfy this interface: -// ListEntitiesFilterMemberComponentTypeId -// ListEntitiesFilterMemberExternalId -// ListEntitiesFilterMemberParentEntityId +// +// ListEntitiesFilterMemberComponentTypeId +// ListEntitiesFilterMemberExternalId +// ListEntitiesFilterMemberParentEntityId type ListEntitiesFilter interface { isListEntitiesFilter() } diff --git a/service/ivs/doc.go b/service/ivs/doc.go index 1238797c88f..522ece5535c 100644 --- a/service/ivs/doc.go +++ b/service/ivs/doc.go @@ -94,7 +94,7 @@ // (https://docs.aws.amazon.com/ivs/latest/userguide/security-iam.html) on the // Security page of the Amazon IVS User Guide. // -// Channel Endpoints +// # Channel Endpoints // // * CreateChannel // — Creates a new channel and an associated stream key to start streaming. @@ -120,7 +120,7 @@ // * DeleteChannel — Deletes the specified // channel. // -// StreamKey Endpoints +// # StreamKey Endpoints // // * CreateStreamKey — Creates a stream key, used to // initiate a stream, for the specified channel ARN. @@ -138,7 +138,7 @@ // Deletes the stream key for the specified ARN, so it can no longer be used to // stream. // -// Stream Endpoints +// # Stream Endpoints // // * GetStream — Gets information about the active // (live) stream on a specified channel. @@ -188,7 +188,7 @@ // invalidates future viewer tokens generated using the key pair’s // privateKey. // -// RecordingConfiguration Endpoints +// # RecordingConfiguration Endpoints // // * CreateRecordingConfiguration — // Creates a new recording configuration, used to enable recording to Amazon S3. diff --git a/service/ivs/types/errors.go b/service/ivs/types/errors.go index 5d85522e741..8136acf0750 100644 --- a/service/ivs/types/errors.go +++ b/service/ivs/types/errors.go @@ -7,7 +7,6 @@ import ( smithy "github.com/aws/smithy-go" ) -// type AccessDeniedException struct { Message *string @@ -28,7 +27,6 @@ func (e *AccessDeniedException) ErrorMessage() string { func (e *AccessDeniedException) ErrorCode() string { return "AccessDeniedException" } func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ChannelNotBroadcasting struct { Message *string @@ -49,7 +47,6 @@ func (e *ChannelNotBroadcasting) ErrorMessage() string { func (e *ChannelNotBroadcasting) ErrorCode() string { return "ChannelNotBroadcasting" } func (e *ChannelNotBroadcasting) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ConflictException struct { Message *string @@ -70,7 +67,6 @@ func (e *ConflictException) ErrorMessage() string { func (e *ConflictException) ErrorCode() string { return "ConflictException" } func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type InternalServerException struct { Message *string @@ -91,7 +87,6 @@ func (e *InternalServerException) ErrorMessage() string { func (e *InternalServerException) ErrorCode() string { return "InternalServerException" } func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } -// type PendingVerification struct { Message *string @@ -112,7 +107,6 @@ func (e *PendingVerification) ErrorMessage() string { func (e *PendingVerification) ErrorCode() string { return "PendingVerification" } func (e *PendingVerification) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ResourceNotFoundException struct { Message *string @@ -133,7 +127,6 @@ func (e *ResourceNotFoundException) ErrorMessage() string { func (e *ResourceNotFoundException) ErrorCode() string { return "ResourceNotFoundException" } func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ServiceQuotaExceededException struct { Message *string @@ -154,7 +147,6 @@ func (e *ServiceQuotaExceededException) ErrorMessage() string { func (e *ServiceQuotaExceededException) ErrorCode() string { return "ServiceQuotaExceededException" } func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type StreamUnavailable struct { Message *string @@ -175,7 +167,6 @@ func (e *StreamUnavailable) ErrorMessage() string { func (e *StreamUnavailable) ErrorCode() string { return "StreamUnavailable" } func (e *StreamUnavailable) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } -// type ThrottlingException struct { Message *string @@ -196,7 +187,6 @@ func (e *ThrottlingException) ErrorMessage() string { func (e *ThrottlingException) ErrorCode() string { return "ThrottlingException" } func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ValidationException struct { Message *string diff --git a/service/ivschat/doc.go b/service/ivschat/doc.go index b361ee4a0fb..452c517f139 100644 --- a/service/ivschat/doc.go +++ b/service/ivschat/doc.go @@ -62,7 +62,7 @@ // (https://docs.aws.amazon.com/ivs/latest/userguide/security-iam.html) on the // Security page of the Amazon IVS User Guide. // -// Messaging Endpoints +// # Messaging Endpoints // // * // DeleteMessage — Sends an event to a specific room which directs clients to @@ -83,14 +83,14 @@ // events to clients of a room; e.g., to notify clients to change the way the chat // UI is rendered. // -// Chat Token Endpoint +// # Chat Token Endpoint // // * CreateChatToken — Creates an encrypted // token that is used to establish an individual WebSocket connection to a room. // The token is valid for one minute, and a connection (session) established with // the token is valid for the specified duration. // -// Room Endpoints +// # Room Endpoints // // * CreateRoom — // Creates a room that allows clients to connect and pass messages. diff --git a/service/ivschat/types/errors.go b/service/ivschat/types/errors.go index fe9a9196363..27ea388364f 100644 --- a/service/ivschat/types/errors.go +++ b/service/ivschat/types/errors.go @@ -7,7 +7,6 @@ import ( smithy "github.com/aws/smithy-go" ) -// type AccessDeniedException struct { Message *string @@ -26,7 +25,6 @@ func (e *AccessDeniedException) ErrorMessage() string { func (e *AccessDeniedException) ErrorCode() string { return "AccessDeniedException" } func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ConflictException struct { Message *string @@ -48,7 +46,6 @@ func (e *ConflictException) ErrorMessage() string { func (e *ConflictException) ErrorCode() string { return "ConflictException" } func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type InternalServerException struct { Message *string @@ -67,7 +64,6 @@ func (e *InternalServerException) ErrorMessage() string { func (e *InternalServerException) ErrorCode() string { return "InternalServerException" } func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } -// type PendingVerification struct { Message *string @@ -86,7 +82,6 @@ func (e *PendingVerification) ErrorMessage() string { func (e *PendingVerification) ErrorCode() string { return "PendingVerification" } func (e *PendingVerification) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ResourceNotFoundException struct { Message *string @@ -108,7 +103,6 @@ func (e *ResourceNotFoundException) ErrorMessage() string { func (e *ResourceNotFoundException) ErrorCode() string { return "ResourceNotFoundException" } func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ServiceQuotaExceededException struct { Message *string @@ -131,7 +125,6 @@ func (e *ServiceQuotaExceededException) ErrorMessage() string { func (e *ServiceQuotaExceededException) ErrorCode() string { return "ServiceQuotaExceededException" } func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ThrottlingException struct { Message *string @@ -154,7 +147,6 @@ func (e *ThrottlingException) ErrorMessage() string { func (e *ThrottlingException) ErrorCode() string { return "ThrottlingException" } func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ValidationException struct { Message *string diff --git a/service/kafkaconnect/doc.go b/service/kafkaconnect/doc.go index 1b3764661f8..270b2be3421 100644 --- a/service/kafkaconnect/doc.go +++ b/service/kafkaconnect/doc.go @@ -2,6 +2,4 @@ // Package kafkaconnect provides the API client, operations, and parameter types // for Managed Streaming for Kafka Connect. -// -// package kafkaconnect diff --git a/service/kendra/types/errors.go b/service/kendra/types/errors.go index 843f46d82fb..7115bd9b9d4 100644 --- a/service/kendra/types/errors.go +++ b/service/kendra/types/errors.go @@ -7,7 +7,6 @@ import ( smithy "github.com/aws/smithy-go" ) -// type AccessDeniedException struct { Message *string @@ -26,7 +25,6 @@ func (e *AccessDeniedException) ErrorMessage() string { func (e *AccessDeniedException) ErrorCode() string { return "AccessDeniedException" } func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ConflictException struct { Message *string @@ -45,7 +43,6 @@ func (e *ConflictException) ErrorMessage() string { func (e *ConflictException) ErrorCode() string { return "ConflictException" } func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type InternalServerException struct { Message *string @@ -83,7 +80,6 @@ func (e *InvalidRequestException) ErrorMessage() string { func (e *InvalidRequestException) ErrorCode() string { return "InvalidRequestException" } func (e *InvalidRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ResourceAlreadyExistException struct { Message *string @@ -102,7 +98,6 @@ func (e *ResourceAlreadyExistException) ErrorMessage() string { func (e *ResourceAlreadyExistException) ErrorCode() string { return "ResourceAlreadyExistException" } func (e *ResourceAlreadyExistException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ResourceInUseException struct { Message *string @@ -121,7 +116,6 @@ func (e *ResourceInUseException) ErrorMessage() string { func (e *ResourceInUseException) ErrorCode() string { return "ResourceInUseException" } func (e *ResourceInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ResourceNotFoundException struct { Message *string @@ -140,7 +134,6 @@ func (e *ResourceNotFoundException) ErrorMessage() string { func (e *ResourceNotFoundException) ErrorCode() string { return "ResourceNotFoundException" } func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ResourceUnavailableException struct { Message *string @@ -159,7 +152,6 @@ func (e *ResourceUnavailableException) ErrorMessage() string { func (e *ResourceUnavailableException) ErrorCode() string { return "ResourceUnavailableException" } func (e *ResourceUnavailableException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ServiceQuotaExceededException struct { Message *string @@ -178,7 +170,6 @@ func (e *ServiceQuotaExceededException) ErrorMessage() string { func (e *ServiceQuotaExceededException) ErrorCode() string { return "ServiceQuotaExceededException" } func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ThrottlingException struct { Message *string @@ -197,7 +188,6 @@ func (e *ThrottlingException) ErrorMessage() string { func (e *ThrottlingException) ErrorCode() string { return "ThrottlingException" } func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ValidationException struct { Message *string diff --git a/service/kinesis/types/errors.go b/service/kinesis/types/errors.go index 512d1f33c0b..f3e86d04b73 100644 --- a/service/kinesis/types/errors.go +++ b/service/kinesis/types/errors.go @@ -299,7 +299,6 @@ func (e *ResourceNotFoundException) ErrorMessage() string { func (e *ResourceNotFoundException) ErrorCode() string { return "ResourceNotFoundException" } func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ValidationException struct { Message *string diff --git a/service/kinesis/types/types.go b/service/kinesis/types/types.go index e293d6cf878..d03ac5f4100 100644 --- a/service/kinesis/types/types.go +++ b/service/kinesis/types/types.go @@ -609,7 +609,8 @@ type SubscribeToShardEvent struct { // consumer can receive over HTTP/2 after a call to SubscribeToShard. // // The following types satisfy this interface: -// SubscribeToShardEventStreamMemberSubscribeToShardEvent +// +// SubscribeToShardEventStreamMemberSubscribeToShardEvent type SubscribeToShardEventStream interface { isSubscribeToShardEventStream() } diff --git a/service/kinesisanalytics/api_op_AddApplicationInput.go b/service/kinesisanalytics/api_op_AddApplicationInput.go index f94fccccf24..215345e3ad3 100644 --- a/service/kinesisanalytics/api_op_AddApplicationInput.go +++ b/service/kinesisanalytics/api_op_AddApplicationInput.go @@ -42,7 +42,6 @@ func (c *Client) AddApplicationInput(ctx context.Context, params *AddApplication return out, nil } -// type AddApplicationInputInput struct { // Name of your existing Amazon Kinesis Analytics application to which you want to @@ -68,7 +67,6 @@ type AddApplicationInputInput struct { noSmithyDocumentSerde } -// type AddApplicationInputOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/kinesisanalytics/api_op_AddApplicationOutput.go b/service/kinesisanalytics/api_op_AddApplicationOutput.go index e0246c08b02..6077d74a1f9 100644 --- a/service/kinesisanalytics/api_op_AddApplicationOutput.go +++ b/service/kinesisanalytics/api_op_AddApplicationOutput.go @@ -50,7 +50,6 @@ func (c *Client) AddApplicationOutput(ctx context.Context, params *AddApplicatio return out, nil } -// type AddApplicationOutputInput struct { // Name of the application to which you want to add the output configuration. @@ -79,7 +78,6 @@ type AddApplicationOutputInput struct { noSmithyDocumentSerde } -// type AddApplicationOutputOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/kinesisanalytics/api_op_AddApplicationReferenceDataSource.go b/service/kinesisanalytics/api_op_AddApplicationReferenceDataSource.go index 7706f6561e3..67776698d6b 100644 --- a/service/kinesisanalytics/api_op_AddApplicationReferenceDataSource.go +++ b/service/kinesisanalytics/api_op_AddApplicationReferenceDataSource.go @@ -42,7 +42,6 @@ func (c *Client) AddApplicationReferenceDataSource(ctx context.Context, params * return out, nil } -// type AddApplicationReferenceDataSourceInput struct { // Name of an existing application. @@ -72,7 +71,6 @@ type AddApplicationReferenceDataSourceInput struct { noSmithyDocumentSerde } -// type AddApplicationReferenceDataSourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/kinesisanalytics/api_op_DeleteApplication.go b/service/kinesisanalytics/api_op_DeleteApplication.go index 86008ae0936..22c5fe492e0 100644 --- a/service/kinesisanalytics/api_op_DeleteApplication.go +++ b/service/kinesisanalytics/api_op_DeleteApplication.go @@ -34,7 +34,6 @@ func (c *Client) DeleteApplication(ctx context.Context, params *DeleteApplicatio return out, nil } -// type DeleteApplicationInput struct { // Name of the Amazon Kinesis Analytics application to delete. @@ -50,7 +49,6 @@ type DeleteApplicationInput struct { noSmithyDocumentSerde } -// type DeleteApplicationOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/kinesisanalytics/api_op_DeleteApplicationOutput.go b/service/kinesisanalytics/api_op_DeleteApplicationOutput.go index 8d7ee52e663..aa70e943efb 100644 --- a/service/kinesisanalytics/api_op_DeleteApplicationOutput.go +++ b/service/kinesisanalytics/api_op_DeleteApplicationOutput.go @@ -33,7 +33,6 @@ func (c *Client) DeleteApplicationOutput(ctx context.Context, params *DeleteAppl return out, nil } -// type DeleteApplicationOutputInput struct { // Amazon Kinesis Analytics application name. @@ -66,7 +65,6 @@ type DeleteApplicationOutputInput struct { noSmithyDocumentSerde } -// type DeleteApplicationOutputOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/kinesisanalytics/api_op_DescribeApplication.go b/service/kinesisanalytics/api_op_DescribeApplication.go index 236b1bcb143..a6166dc9f53 100644 --- a/service/kinesisanalytics/api_op_DescribeApplication.go +++ b/service/kinesisanalytics/api_op_DescribeApplication.go @@ -37,7 +37,6 @@ func (c *Client) DescribeApplication(ctx context.Context, params *DescribeApplic return out, nil } -// type DescribeApplicationInput struct { // Name of the application. @@ -48,7 +47,6 @@ type DescribeApplicationInput struct { noSmithyDocumentSerde } -// type DescribeApplicationOutput struct { // Provides a description of the application, such as the application Amazon diff --git a/service/kinesisanalytics/api_op_DiscoverInputSchema.go b/service/kinesisanalytics/api_op_DiscoverInputSchema.go index d7c763b1413..e707690b2bd 100644 --- a/service/kinesisanalytics/api_op_DiscoverInputSchema.go +++ b/service/kinesisanalytics/api_op_DiscoverInputSchema.go @@ -64,7 +64,6 @@ type DiscoverInputSchemaInput struct { noSmithyDocumentSerde } -// type DiscoverInputSchemaOutput struct { // Schema inferred from the streaming source. It identifies the format of the data diff --git a/service/kinesisanalytics/api_op_ListApplications.go b/service/kinesisanalytics/api_op_ListApplications.go index 17668f6d4a6..433820fd87f 100644 --- a/service/kinesisanalytics/api_op_ListApplications.go +++ b/service/kinesisanalytics/api_op_ListApplications.go @@ -41,7 +41,6 @@ func (c *Client) ListApplications(ctx context.Context, params *ListApplicationsI return out, nil } -// type ListApplicationsInput struct { // Name of the application to start the list with. When using pagination to @@ -56,7 +55,6 @@ type ListApplicationsInput struct { noSmithyDocumentSerde } -// type ListApplicationsOutput struct { // List of ApplicationSummary objects. diff --git a/service/kinesisanalytics/api_op_StartApplication.go b/service/kinesisanalytics/api_op_StartApplication.go index 69eb806f213..e7197c37f63 100644 --- a/service/kinesisanalytics/api_op_StartApplication.go +++ b/service/kinesisanalytics/api_op_StartApplication.go @@ -42,7 +42,6 @@ func (c *Client) StartApplication(ctx context.Context, params *StartApplicationI return out, nil } -// type StartApplicationInput struct { // Name of the application. @@ -61,7 +60,6 @@ type StartApplicationInput struct { noSmithyDocumentSerde } -// type StartApplicationOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/kinesisanalytics/api_op_StopApplication.go b/service/kinesisanalytics/api_op_StopApplication.go index 02b2ecf5574..6614c8efff0 100644 --- a/service/kinesisanalytics/api_op_StopApplication.go +++ b/service/kinesisanalytics/api_op_StopApplication.go @@ -37,7 +37,6 @@ func (c *Client) StopApplication(ctx context.Context, params *StopApplicationInp return out, nil } -// type StopApplicationInput struct { // Name of the running application to stop. @@ -48,7 +47,6 @@ type StopApplicationInput struct { noSmithyDocumentSerde } -// type StopApplicationOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/kinesisanalytics/types/types.go b/service/kinesisanalytics/types/types.go index d35d79cb22c..ce5b61f4798 100644 --- a/service/kinesisanalytics/types/types.go +++ b/service/kinesisanalytics/types/types.go @@ -181,7 +181,8 @@ type CloudWatchLoggingOptionUpdate struct { // such as CSV. For example, the following sample records use CSV format, where the // records use the '\n' as the row delimiter and a comma (",") as the column // delimiter: "name1", "address1" -// "name2", "address2" +// +// "name2", "address2" type CSVMappingParameters struct { // Column delimiter. For example, in a CSV format, a comma (",") is the typical diff --git a/service/kinesisanalyticsv2/types/types.go b/service/kinesisanalyticsv2/types/types.go index 77416996ded..89bbc1b1b8f 100644 --- a/service/kinesisanalyticsv2/types/types.go +++ b/service/kinesisanalyticsv2/types/types.go @@ -640,7 +640,8 @@ type CodeContentUpdate struct { // the following sample records use CSV format, where the records use the '\n' as // the row delimiter and a comma (",") as the column delimiter: "name1", // "address1" -// "name2", "address2" +// +// "name2", "address2" type CSVMappingParameters struct { // The column delimiter. For example, in a CSV format, a comma (",") is the typical diff --git a/service/kinesisvideo/doc.go b/service/kinesisvideo/doc.go index e0fbdc8547d..f7072ab7d9e 100644 --- a/service/kinesisvideo/doc.go +++ b/service/kinesisvideo/doc.go @@ -2,6 +2,4 @@ // Package kinesisvideo provides the API client, operations, and parameter types // for Amazon Kinesis Video Streams. -// -// package kinesisvideo diff --git a/service/kinesisvideoarchivedmedia/doc.go b/service/kinesisvideoarchivedmedia/doc.go index c89f1a44799..c24ccce946c 100644 --- a/service/kinesisvideoarchivedmedia/doc.go +++ b/service/kinesisvideoarchivedmedia/doc.go @@ -2,6 +2,4 @@ // Package kinesisvideoarchivedmedia provides the API client, operations, and // parameter types for Amazon Kinesis Video Streams Archived Media. -// -// package kinesisvideoarchivedmedia diff --git a/service/kinesisvideomedia/doc.go b/service/kinesisvideomedia/doc.go index cd9a5fcd3ab..7babb372c4b 100644 --- a/service/kinesisvideomedia/doc.go +++ b/service/kinesisvideomedia/doc.go @@ -2,6 +2,4 @@ // Package kinesisvideomedia provides the API client, operations, and parameter // types for Amazon Kinesis Video Streams Media. -// -// package kinesisvideomedia diff --git a/service/kms/api_op_UpdatePrimaryRegion.go b/service/kms/api_op_UpdatePrimaryRegion.go index d7b513840ec..e7b87d5dfec 100644 --- a/service/kms/api_op_UpdatePrimaryRegion.go +++ b/service/kms/api_op_UpdatePrimaryRegion.go @@ -71,7 +71,7 @@ import ( // (in the replica key's Region). Include this permission in the replica key's key // policy. // -// Related operations +// # Related operations // // * CreateKey // diff --git a/service/lambda/internal/endpoints/endpoints.go b/service/lambda/internal/endpoints/endpoints.go index b03b7dea0a9..b93fbcd517f 100644 --- a/service/lambda/internal/endpoints/endpoints.go +++ b/service/lambda/internal/endpoints/endpoints.go @@ -567,6 +567,12 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "lambda-fips.us-gov-east-1.amazonaws.com", }, + endpoints.EndpointKey{ + Region: "us-gov-east-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.us-gov-east-1.api.aws", + }, endpoints.EndpointKey{ Region: "us-gov-west-1", }: endpoints.Endpoint{}, @@ -576,6 +582,12 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "lambda-fips.us-gov-west-1.amazonaws.com", }, + endpoints.EndpointKey{ + Region: "us-gov-west-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.us-gov-west-1.api.aws", + }, }, }, } diff --git a/service/lexmodelbuildingservice/types/errors.go b/service/lexmodelbuildingservice/types/errors.go index dfc606406da..316372c9a7d 100644 --- a/service/lexmodelbuildingservice/types/errors.go +++ b/service/lexmodelbuildingservice/types/errors.go @@ -153,7 +153,7 @@ func (e *PreconditionFailedException) ErrorFault() smithy.ErrorFault { return sm // // "resourceReference": { // -// "name": string, "version": string } } +// "name": string, "version": string } } type ResourceInUseException struct { Message *string diff --git a/service/lexmodelsv2/doc.go b/service/lexmodelsv2/doc.go index 19696b3622f..28dd51c4b03 100644 --- a/service/lexmodelsv2/doc.go +++ b/service/lexmodelsv2/doc.go @@ -2,6 +2,4 @@ // Package lexmodelsv2 provides the API client, operations, and parameter types for // Amazon Lex Model Building V2. -// -// package lexmodelsv2 diff --git a/service/lexruntimev2/doc.go b/service/lexruntimev2/doc.go index 4fad194274b..7063eae6be3 100644 --- a/service/lexruntimev2/doc.go +++ b/service/lexruntimev2/doc.go @@ -2,6 +2,4 @@ // Package lexruntimev2 provides the API client, operations, and parameter types // for Amazon Lex Runtime V2. -// -// package lexruntimev2 diff --git a/service/lexruntimev2/types/errors.go b/service/lexruntimev2/types/errors.go index f492f203be2..20f31e1c0da 100644 --- a/service/lexruntimev2/types/errors.go +++ b/service/lexruntimev2/types/errors.go @@ -7,7 +7,6 @@ import ( smithy "github.com/aws/smithy-go" ) -// type AccessDeniedException struct { Message *string @@ -26,7 +25,6 @@ func (e *AccessDeniedException) ErrorMessage() string { func (e *AccessDeniedException) ErrorCode() string { return "AccessDeniedException" } func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type BadGatewayException struct { Message *string @@ -45,7 +43,6 @@ func (e *BadGatewayException) ErrorMessage() string { func (e *BadGatewayException) ErrorCode() string { return "BadGatewayException" } func (e *BadGatewayException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } -// type ConflictException struct { Message *string @@ -64,7 +61,6 @@ func (e *ConflictException) ErrorMessage() string { func (e *ConflictException) ErrorCode() string { return "ConflictException" } func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type DependencyFailedException struct { Message *string @@ -83,7 +79,6 @@ func (e *DependencyFailedException) ErrorMessage() string { func (e *DependencyFailedException) ErrorCode() string { return "DependencyFailedException" } func (e *DependencyFailedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type InternalServerException struct { Message *string @@ -102,7 +97,6 @@ func (e *InternalServerException) ErrorMessage() string { func (e *InternalServerException) ErrorCode() string { return "InternalServerException" } func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } -// type ResourceNotFoundException struct { Message *string @@ -121,7 +115,6 @@ func (e *ResourceNotFoundException) ErrorMessage() string { func (e *ResourceNotFoundException) ErrorCode() string { return "ResourceNotFoundException" } func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ThrottlingException struct { Message *string @@ -140,7 +133,6 @@ func (e *ThrottlingException) ErrorMessage() string { func (e *ThrottlingException) ErrorCode() string { return "ThrottlingException" } func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ValidationException struct { Message *string diff --git a/service/lexruntimev2/types/types.go b/service/lexruntimev2/types/types.go index 84dbffff824..9138d453642 100644 --- a/service/lexruntimev2/types/types.go +++ b/service/lexruntimev2/types/types.go @@ -585,12 +585,13 @@ type Slot struct { // Represents a stream of events between your application and Amazon Lex V2. // // The following types satisfy this interface: -// StartConversationRequestEventStreamMemberAudioInputEvent -// StartConversationRequestEventStreamMemberConfigurationEvent -// StartConversationRequestEventStreamMemberDisconnectionEvent -// StartConversationRequestEventStreamMemberDTMFInputEvent -// StartConversationRequestEventStreamMemberPlaybackCompletionEvent -// StartConversationRequestEventStreamMemberTextInputEvent +// +// StartConversationRequestEventStreamMemberAudioInputEvent +// StartConversationRequestEventStreamMemberConfigurationEvent +// StartConversationRequestEventStreamMemberDisconnectionEvent +// StartConversationRequestEventStreamMemberDTMFInputEvent +// StartConversationRequestEventStreamMemberPlaybackCompletionEvent +// StartConversationRequestEventStreamMemberTextInputEvent type StartConversationRequestEventStream interface { isStartConversationRequestEventStream() } @@ -675,12 +676,13 @@ func (*StartConversationRequestEventStreamMemberTextInputEvent) isStartConversat // Represents a stream of events between Amazon Lex V2 and your application. // // The following types satisfy this interface: -// StartConversationResponseEventStreamMemberAudioResponseEvent -// StartConversationResponseEventStreamMemberHeartbeatEvent -// StartConversationResponseEventStreamMemberIntentResultEvent -// StartConversationResponseEventStreamMemberPlaybackInterruptionEvent -// StartConversationResponseEventStreamMemberTextResponseEvent -// StartConversationResponseEventStreamMemberTranscriptEvent +// +// StartConversationResponseEventStreamMemberAudioResponseEvent +// StartConversationResponseEventStreamMemberHeartbeatEvent +// StartConversationResponseEventStreamMemberIntentResultEvent +// StartConversationResponseEventStreamMemberPlaybackInterruptionEvent +// StartConversationResponseEventStreamMemberTextResponseEvent +// StartConversationResponseEventStreamMemberTranscriptEvent type StartConversationResponseEventStream interface { isStartConversationResponseEventStream() } diff --git a/service/licensemanagerusersubscriptions/types/types.go b/service/licensemanagerusersubscriptions/types/types.go index d7f1b939fea..f1ccbc411e9 100644 --- a/service/licensemanagerusersubscriptions/types/types.go +++ b/service/licensemanagerusersubscriptions/types/types.go @@ -35,7 +35,8 @@ type Filter struct { // Details about an identity provider. // // The following types satisfy this interface: -// IdentityProviderMemberActiveDirectoryIdentityProvider +// +// IdentityProviderMemberActiveDirectoryIdentityProvider type IdentityProvider interface { isIdentityProvider() } diff --git a/service/m2/types/types.go b/service/m2/types/types.go index 0e7e487ad0f..ed732698a90 100644 --- a/service/m2/types/types.go +++ b/service/m2/types/types.go @@ -118,8 +118,9 @@ type ApplicationVersionSummary struct { // Defines the details of a batch job. // // The following types satisfy this interface: -// BatchJobDefinitionMemberFileBatchJobDefinition -// BatchJobDefinitionMemberScriptBatchJobDefinition +// +// BatchJobDefinitionMemberFileBatchJobDefinition +// BatchJobDefinitionMemberScriptBatchJobDefinition type BatchJobDefinition interface { isBatchJobDefinition() } @@ -183,8 +184,9 @@ type BatchJobExecutionSummary struct { // Identifies a specific batch job. // // The following types satisfy this interface: -// BatchJobIdentifierMemberFileBatchJobIdentifier -// BatchJobIdentifierMemberScriptBatchJobIdentifier +// +// BatchJobIdentifierMemberFileBatchJobIdentifier +// BatchJobIdentifierMemberScriptBatchJobIdentifier type BatchJobIdentifier interface { isBatchJobIdentifier() } @@ -243,8 +245,9 @@ type DataSet struct { // storageType and backend (Blu Age or Micro Focus). // // The following types satisfy this interface: -// DatasetDetailOrgAttributesMemberGdg -// DatasetDetailOrgAttributesMemberVsam +// +// DatasetDetailOrgAttributesMemberGdg +// DatasetDetailOrgAttributesMemberVsam type DatasetDetailOrgAttributes interface { isDatasetDetailOrgAttributes() } @@ -271,8 +274,9 @@ func (*DatasetDetailOrgAttributesMemberVsam) isDatasetDetailOrgAttributes() {} // CreateDataSetImportTask operation. // // The following types satisfy this interface: -// DataSetImportConfigMemberDataSets -// DataSetImportConfigMemberS3Location +// +// DataSetImportConfigMemberDataSets +// DataSetImportConfigMemberS3Location type DataSetImportConfig interface { isDataSetImportConfig() } @@ -368,8 +372,9 @@ type DataSetImportTask struct { // storageType and backend (Blu Age or Micro Focus). // // The following types satisfy this interface: -// DatasetOrgAttributesMemberGdg -// DatasetOrgAttributesMemberVsam +// +// DatasetOrgAttributesMemberGdg +// DatasetOrgAttributesMemberVsam type DatasetOrgAttributes interface { isDatasetOrgAttributes() } @@ -422,8 +427,9 @@ type DataSetSummary struct { // The application definition for a particular application. // // The following types satisfy this interface: -// DefinitionMemberContent -// DefinitionMemberS3Location +// +// DefinitionMemberContent +// DefinitionMemberS3Location type Definition interface { isDefinition() } @@ -587,7 +593,8 @@ type EnvironmentSummary struct { // Defines an external storage location. // // The following types satisfy this interface: -// ExternalLocationMemberS3Location +// +// ExternalLocationMemberS3Location type ExternalLocation interface { isExternalLocation() } @@ -796,8 +803,9 @@ type ScriptBatchJobIdentifier struct { // Defines the storage configuration for an environment. // // The following types satisfy this interface: -// StorageConfigurationMemberEfs -// StorageConfigurationMemberFsx +// +// StorageConfigurationMemberEfs +// StorageConfigurationMemberFsx type StorageConfiguration interface { isStorageConfiguration() } diff --git a/service/machinelearning/internal/customizations/doc.go b/service/machinelearning/internal/customizations/doc.go index c19f7e3b3b0..4816642c17c 100644 --- a/service/machinelearning/internal/customizations/doc.go +++ b/service/machinelearning/internal/customizations/doc.go @@ -4,7 +4,7 @@ Package customizations provides customizations for the Machine Learning API clie The Machine Learning API client uses one customization to support the PredictEndpoint input parameter. -Predict Endpoint +# Predict Endpoint The predict endpoint customization runs after normal endpoint resolution happens. If the user has provided a value for PredictEndpoint then this customization will diff --git a/service/managedblockchain/types/errors.go b/service/managedblockchain/types/errors.go index bc03d12aedf..775a1d7f22f 100644 --- a/service/managedblockchain/types/errors.go +++ b/service/managedblockchain/types/errors.go @@ -26,7 +26,6 @@ func (e *AccessDeniedException) ErrorMessage() string { func (e *AccessDeniedException) ErrorCode() string { return "AccessDeniedException" } func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type IllegalActionException struct { Message *string @@ -189,7 +188,6 @@ func (e *ThrottlingException) ErrorMessage() string { func (e *ThrottlingException) ErrorCode() string { return "ThrottlingException" } func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type TooManyTagsException struct { Message *string diff --git a/service/marketplaceentitlementservice/types/types.go b/service/marketplaceentitlementservice/types/types.go index 817d56ae8a1..5768892e5bd 100644 --- a/service/marketplaceentitlementservice/types/types.go +++ b/service/marketplaceentitlementservice/types/types.go @@ -44,10 +44,11 @@ type Entitlement struct { // entitled to for the product. // // The following types satisfy this interface: -// EntitlementValueMemberBooleanValue -// EntitlementValueMemberDoubleValue -// EntitlementValueMemberIntegerValue -// EntitlementValueMemberStringValue +// +// EntitlementValueMemberBooleanValue +// EntitlementValueMemberDoubleValue +// EntitlementValueMemberIntegerValue +// EntitlementValueMemberStringValue type EntitlementValue interface { isEntitlementValue() } diff --git a/service/marketplacemetering/doc.go b/service/marketplacemetering/doc.go index 807fdc1db0a..ebf4893d589 100644 --- a/service/marketplacemetering/doc.go +++ b/service/marketplacemetering/doc.go @@ -19,7 +19,7 @@ // Submits the metering record for a set of customers. BatchMeterUsage is called // from a software-as-a-service (SaaS) application. // -// Accepting New Customers +// # Accepting New Customers // // * // ResolveCustomer - Called by a SaaS application during the registration process. diff --git a/service/memorydb/types/errors.go b/service/memorydb/types/errors.go index e814ff3a31f..d2a1fe61abe 100644 --- a/service/memorydb/types/errors.go +++ b/service/memorydb/types/errors.go @@ -7,7 +7,6 @@ import ( smithy "github.com/aws/smithy-go" ) -// type ACLAlreadyExistsFault struct { Message *string @@ -26,7 +25,6 @@ func (e *ACLAlreadyExistsFault) ErrorMessage() string { func (e *ACLAlreadyExistsFault) ErrorCode() string { return "ACLAlreadyExistsFault" } func (e *ACLAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ACLNotFoundFault struct { Message *string @@ -45,7 +43,6 @@ func (e *ACLNotFoundFault) ErrorMessage() string { func (e *ACLNotFoundFault) ErrorCode() string { return "ACLNotFoundFault" } func (e *ACLNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ACLQuotaExceededFault struct { Message *string @@ -64,7 +61,6 @@ func (e *ACLQuotaExceededFault) ErrorMessage() string { func (e *ACLQuotaExceededFault) ErrorCode() string { return "ACLQuotaExceededFault" } func (e *ACLQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type APICallRateForCustomerExceededFault struct { Message *string @@ -87,7 +83,6 @@ func (e *APICallRateForCustomerExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ClusterAlreadyExistsFault struct { Message *string @@ -106,7 +101,6 @@ func (e *ClusterAlreadyExistsFault) ErrorMessage() string { func (e *ClusterAlreadyExistsFault) ErrorCode() string { return "ClusterAlreadyExistsFault" } func (e *ClusterAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ClusterNotFoundFault struct { Message *string @@ -125,7 +119,6 @@ func (e *ClusterNotFoundFault) ErrorMessage() string { func (e *ClusterNotFoundFault) ErrorCode() string { return "ClusterNotFoundFault" } func (e *ClusterNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ClusterQuotaForCustomerExceededFault struct { Message *string @@ -148,7 +141,6 @@ func (e *ClusterQuotaForCustomerExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type DefaultUserRequired struct { Message *string @@ -167,7 +159,6 @@ func (e *DefaultUserRequired) ErrorMessage() string { func (e *DefaultUserRequired) ErrorCode() string { return "DefaultUserRequired" } func (e *DefaultUserRequired) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type DuplicateUserNameFault struct { Message *string @@ -186,7 +177,6 @@ func (e *DuplicateUserNameFault) ErrorMessage() string { func (e *DuplicateUserNameFault) ErrorCode() string { return "DuplicateUserNameFault" } func (e *DuplicateUserNameFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type InsufficientClusterCapacityFault struct { Message *string @@ -207,7 +197,6 @@ func (e *InsufficientClusterCapacityFault) ErrorCode() string { } func (e *InsufficientClusterCapacityFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type InvalidACLStateFault struct { Message *string @@ -226,7 +215,6 @@ func (e *InvalidACLStateFault) ErrorMessage() string { func (e *InvalidACLStateFault) ErrorCode() string { return "InvalidACLStateFault" } func (e *InvalidACLStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type InvalidARNFault struct { Message *string @@ -245,7 +233,6 @@ func (e *InvalidARNFault) ErrorMessage() string { func (e *InvalidARNFault) ErrorCode() string { return "InvalidARNFault" } func (e *InvalidARNFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type InvalidClusterStateFault struct { Message *string @@ -264,7 +251,6 @@ func (e *InvalidClusterStateFault) ErrorMessage() string { func (e *InvalidClusterStateFault) ErrorCode() string { return "InvalidClusterStateFault" } func (e *InvalidClusterStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type InvalidCredentialsException struct { Message *string @@ -283,7 +269,6 @@ func (e *InvalidCredentialsException) ErrorMessage() string { func (e *InvalidCredentialsException) ErrorCode() string { return "InvalidCredentialsException" } func (e *InvalidCredentialsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type InvalidKMSKeyFault struct { Message *string @@ -302,7 +287,6 @@ func (e *InvalidKMSKeyFault) ErrorMessage() string { func (e *InvalidKMSKeyFault) ErrorCode() string { return "InvalidKMSKeyFault" } func (e *InvalidKMSKeyFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type InvalidNodeStateFault struct { Message *string @@ -321,7 +305,6 @@ func (e *InvalidNodeStateFault) ErrorMessage() string { func (e *InvalidNodeStateFault) ErrorCode() string { return "InvalidNodeStateFault" } func (e *InvalidNodeStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type InvalidParameterCombinationException struct { Message *string @@ -344,7 +327,6 @@ func (e *InvalidParameterCombinationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type InvalidParameterGroupStateFault struct { Message *string @@ -365,7 +347,6 @@ func (e *InvalidParameterGroupStateFault) ErrorCode() string { } func (e *InvalidParameterGroupStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type InvalidParameterValueException struct { Message *string @@ -384,7 +365,6 @@ func (e *InvalidParameterValueException) ErrorMessage() string { func (e *InvalidParameterValueException) ErrorCode() string { return "InvalidParameterValueException" } func (e *InvalidParameterValueException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type InvalidSnapshotStateFault struct { Message *string @@ -403,7 +383,6 @@ func (e *InvalidSnapshotStateFault) ErrorMessage() string { func (e *InvalidSnapshotStateFault) ErrorCode() string { return "InvalidSnapshotStateFault" } func (e *InvalidSnapshotStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type InvalidSubnet struct { Message *string @@ -422,7 +401,6 @@ func (e *InvalidSubnet) ErrorMessage() string { func (e *InvalidSubnet) ErrorCode() string { return "InvalidSubnet" } func (e *InvalidSubnet) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type InvalidUserStateFault struct { Message *string @@ -441,7 +419,6 @@ func (e *InvalidUserStateFault) ErrorMessage() string { func (e *InvalidUserStateFault) ErrorCode() string { return "InvalidUserStateFault" } func (e *InvalidUserStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type InvalidVPCNetworkStateFault struct { Message *string @@ -460,7 +437,6 @@ func (e *InvalidVPCNetworkStateFault) ErrorMessage() string { func (e *InvalidVPCNetworkStateFault) ErrorCode() string { return "InvalidVPCNetworkStateFault" } func (e *InvalidVPCNetworkStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type NodeQuotaForClusterExceededFault struct { Message *string @@ -481,7 +457,6 @@ func (e *NodeQuotaForClusterExceededFault) ErrorCode() string { } func (e *NodeQuotaForClusterExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type NodeQuotaForCustomerExceededFault struct { Message *string @@ -502,7 +477,6 @@ func (e *NodeQuotaForCustomerExceededFault) ErrorCode() string { } func (e *NodeQuotaForCustomerExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type NoOperationFault struct { Message *string @@ -521,7 +495,6 @@ func (e *NoOperationFault) ErrorMessage() string { func (e *NoOperationFault) ErrorCode() string { return "NoOperationFault" } func (e *NoOperationFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ParameterGroupAlreadyExistsFault struct { Message *string @@ -542,7 +515,6 @@ func (e *ParameterGroupAlreadyExistsFault) ErrorCode() string { } func (e *ParameterGroupAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ParameterGroupNotFoundFault struct { Message *string @@ -561,7 +533,6 @@ func (e *ParameterGroupNotFoundFault) ErrorMessage() string { func (e *ParameterGroupNotFoundFault) ErrorCode() string { return "ParameterGroupNotFoundFault" } func (e *ParameterGroupNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ParameterGroupQuotaExceededFault struct { Message *string @@ -582,7 +553,6 @@ func (e *ParameterGroupQuotaExceededFault) ErrorCode() string { } func (e *ParameterGroupQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ServiceLinkedRoleNotFoundFault struct { Message *string @@ -601,7 +571,6 @@ func (e *ServiceLinkedRoleNotFoundFault) ErrorMessage() string { func (e *ServiceLinkedRoleNotFoundFault) ErrorCode() string { return "ServiceLinkedRoleNotFoundFault" } func (e *ServiceLinkedRoleNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ServiceUpdateNotFoundFault struct { Message *string @@ -620,7 +589,6 @@ func (e *ServiceUpdateNotFoundFault) ErrorMessage() string { func (e *ServiceUpdateNotFoundFault) ErrorCode() string { return "ServiceUpdateNotFoundFault" } func (e *ServiceUpdateNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ShardNotFoundFault struct { Message *string @@ -639,7 +607,6 @@ func (e *ShardNotFoundFault) ErrorMessage() string { func (e *ShardNotFoundFault) ErrorCode() string { return "ShardNotFoundFault" } func (e *ShardNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ShardsPerClusterQuotaExceededFault struct { Message *string @@ -662,7 +629,6 @@ func (e *ShardsPerClusterQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type SnapshotAlreadyExistsFault struct { Message *string @@ -681,7 +647,6 @@ func (e *SnapshotAlreadyExistsFault) ErrorMessage() string { func (e *SnapshotAlreadyExistsFault) ErrorCode() string { return "SnapshotAlreadyExistsFault" } func (e *SnapshotAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type SnapshotNotFoundFault struct { Message *string @@ -700,7 +665,6 @@ func (e *SnapshotNotFoundFault) ErrorMessage() string { func (e *SnapshotNotFoundFault) ErrorCode() string { return "SnapshotNotFoundFault" } func (e *SnapshotNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type SnapshotQuotaExceededFault struct { Message *string @@ -719,7 +683,6 @@ func (e *SnapshotQuotaExceededFault) ErrorMessage() string { func (e *SnapshotQuotaExceededFault) ErrorCode() string { return "SnapshotQuotaExceededFault" } func (e *SnapshotQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type SubnetGroupAlreadyExistsFault struct { Message *string @@ -738,7 +701,6 @@ func (e *SubnetGroupAlreadyExistsFault) ErrorMessage() string { func (e *SubnetGroupAlreadyExistsFault) ErrorCode() string { return "SubnetGroupAlreadyExistsFault" } func (e *SubnetGroupAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type SubnetGroupInUseFault struct { Message *string @@ -757,7 +719,6 @@ func (e *SubnetGroupInUseFault) ErrorMessage() string { func (e *SubnetGroupInUseFault) ErrorCode() string { return "SubnetGroupInUseFault" } func (e *SubnetGroupInUseFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type SubnetGroupNotFoundFault struct { Message *string @@ -776,7 +737,6 @@ func (e *SubnetGroupNotFoundFault) ErrorMessage() string { func (e *SubnetGroupNotFoundFault) ErrorCode() string { return "SubnetGroupNotFoundFault" } func (e *SubnetGroupNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type SubnetGroupQuotaExceededFault struct { Message *string @@ -795,7 +755,6 @@ func (e *SubnetGroupQuotaExceededFault) ErrorMessage() string { func (e *SubnetGroupQuotaExceededFault) ErrorCode() string { return "SubnetGroupQuotaExceededFault" } func (e *SubnetGroupQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type SubnetInUse struct { Message *string @@ -814,7 +773,6 @@ func (e *SubnetInUse) ErrorMessage() string { func (e *SubnetInUse) ErrorCode() string { return "SubnetInUse" } func (e *SubnetInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type SubnetNotAllowedFault struct { Message *string @@ -833,7 +791,6 @@ func (e *SubnetNotAllowedFault) ErrorMessage() string { func (e *SubnetNotAllowedFault) ErrorCode() string { return "SubnetNotAllowedFault" } func (e *SubnetNotAllowedFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type SubnetQuotaExceededFault struct { Message *string @@ -852,7 +809,6 @@ func (e *SubnetQuotaExceededFault) ErrorMessage() string { func (e *SubnetQuotaExceededFault) ErrorCode() string { return "SubnetQuotaExceededFault" } func (e *SubnetQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type TagNotFoundFault struct { Message *string @@ -871,7 +827,6 @@ func (e *TagNotFoundFault) ErrorMessage() string { func (e *TagNotFoundFault) ErrorCode() string { return "TagNotFoundFault" } func (e *TagNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type TagQuotaPerResourceExceeded struct { Message *string @@ -890,7 +845,6 @@ func (e *TagQuotaPerResourceExceeded) ErrorMessage() string { func (e *TagQuotaPerResourceExceeded) ErrorCode() string { return "TagQuotaPerResourceExceeded" } func (e *TagQuotaPerResourceExceeded) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type TestFailoverNotAvailableFault struct { Message *string @@ -909,7 +863,6 @@ func (e *TestFailoverNotAvailableFault) ErrorMessage() string { func (e *TestFailoverNotAvailableFault) ErrorCode() string { return "TestFailoverNotAvailableFault" } func (e *TestFailoverNotAvailableFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type UserAlreadyExistsFault struct { Message *string @@ -928,7 +881,6 @@ func (e *UserAlreadyExistsFault) ErrorMessage() string { func (e *UserAlreadyExistsFault) ErrorCode() string { return "UserAlreadyExistsFault" } func (e *UserAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type UserNotFoundFault struct { Message *string @@ -947,7 +899,6 @@ func (e *UserNotFoundFault) ErrorMessage() string { func (e *UserNotFoundFault) ErrorCode() string { return "UserNotFoundFault" } func (e *UserNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type UserQuotaExceededFault struct { Message *string diff --git a/service/migrationhubstrategy/types/types.go b/service/migrationhubstrategy/types/types.go index f33a290dc55..b0b7f6cdf49 100644 --- a/service/migrationhubstrategy/types/types.go +++ b/service/migrationhubstrategy/types/types.go @@ -241,9 +241,10 @@ type DatabaseConfigDetail struct { // Preferences for migrating a database to AWS. // // The following types satisfy this interface: -// DatabaseMigrationPreferenceMemberHeterogeneous -// DatabaseMigrationPreferenceMemberHomogeneous -// DatabaseMigrationPreferenceMemberNoPreference +// +// DatabaseMigrationPreferenceMemberHeterogeneous +// DatabaseMigrationPreferenceMemberHomogeneous +// DatabaseMigrationPreferenceMemberNoPreference type DatabaseMigrationPreference interface { isDatabaseMigrationPreference() } @@ -393,9 +394,10 @@ type ImportFileTaskInformation struct { // Preferences for migrating an application to AWS. // // The following types satisfy this interface: -// ManagementPreferenceMemberAwsManagedResources -// ManagementPreferenceMemberNoPreference -// ManagementPreferenceMemberSelfManageResources +// +// ManagementPreferenceMemberAwsManagedResources +// ManagementPreferenceMemberNoPreference +// ManagementPreferenceMemberSelfManageResources type ManagementPreference interface { isManagementPreference() } diff --git a/service/networkfirewall/api_op_UpdateSubnetChangeProtection.go b/service/networkfirewall/api_op_UpdateSubnetChangeProtection.go index 4f50f7c022e..b3c041daa18 100644 --- a/service/networkfirewall/api_op_UpdateSubnetChangeProtection.go +++ b/service/networkfirewall/api_op_UpdateSubnetChangeProtection.go @@ -10,7 +10,6 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// func (c *Client) UpdateSubnetChangeProtection(ctx context.Context, params *UpdateSubnetChangeProtectionInput, optFns ...func(*Options)) (*UpdateSubnetChangeProtectionOutput, error) { if params == nil { params = &UpdateSubnetChangeProtectionInput{} diff --git a/service/panorama/types/types.go b/service/panorama/types/types.go index fe9ca0cb43e..6680cce0e7f 100644 --- a/service/panorama/types/types.go +++ b/service/panorama/types/types.go @@ -187,7 +187,8 @@ type JobResourceTags struct { // representation of the overrides document. // // The following types satisfy this interface: -// ManifestOverridesPayloadMemberPayloadData +// +// ManifestOverridesPayloadMemberPayloadData type ManifestOverridesPayload interface { isManifestOverridesPayload() } @@ -207,7 +208,8 @@ func (*ManifestOverridesPayloadMemberPayloadData) isManifestOverridesPayload() { // your application source. // // The following types satisfy this interface: -// ManifestPayloadMemberPayloadData +// +// ManifestPayloadMemberPayloadData type ManifestPayload interface { isManifestPayload() } diff --git a/service/personalizeruntime/doc.go b/service/personalizeruntime/doc.go index 0f3baf999aa..2bdc6a8cb01 100644 --- a/service/personalizeruntime/doc.go +++ b/service/personalizeruntime/doc.go @@ -2,6 +2,4 @@ // Package personalizeruntime provides the API client, operations, and parameter // types for Amazon Personalize Runtime. -// -// package personalizeruntime diff --git a/service/pinpointemail/api_op_PutDedicatedIpWarmupAttributes.go b/service/pinpointemail/api_op_PutDedicatedIpWarmupAttributes.go index 818514fbaf6..b6e3c87556c 100644 --- a/service/pinpointemail/api_op_PutDedicatedIpWarmupAttributes.go +++ b/service/pinpointemail/api_op_PutDedicatedIpWarmupAttributes.go @@ -10,7 +10,6 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// func (c *Client) PutDedicatedIpWarmupAttributes(ctx context.Context, params *PutDedicatedIpWarmupAttributesInput, optFns ...func(*Options)) (*PutDedicatedIpWarmupAttributesOutput, error) { if params == nil { params = &PutDedicatedIpWarmupAttributesInput{} diff --git a/service/privatenetworks/LICENSE.txt b/service/privatenetworks/LICENSE.txt new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/service/privatenetworks/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/service/privatenetworks/api_client.go b/service/privatenetworks/api_client.go new file mode 100644 index 00000000000..ab7b0721a36 --- /dev/null +++ b/service/privatenetworks/api_client.go @@ -0,0 +1,433 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/aws/defaults" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/retry" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" + internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" + smithy "github.com/aws/smithy-go" + smithydocument "github.com/aws/smithy-go/document" + "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net" + "net/http" + "time" +) + +const ServiceID = "PrivateNetworks" +const ServiceAPIVersion = "2021-12-03" + +// Client provides the API client to make operations call for AWS Private 5G. +type Client struct { + options Options +} + +// New returns an initialized Client based on the functional options. Provide +// additional functional options to further configure the behavior of the client, +// such as changing the client's endpoint or adding custom middleware behavior. +func New(options Options, optFns ...func(*Options)) *Client { + options = options.Copy() + + resolveDefaultLogger(&options) + + setResolvedDefaultsMode(&options) + + resolveRetryer(&options) + + resolveHTTPClient(&options) + + resolveHTTPSignerV4(&options) + + resolveDefaultEndpointConfiguration(&options) + + for _, fn := range optFns { + fn(&options) + } + + client := &Client{ + options: options, + } + + return client +} + +type Options struct { + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + APIOptions []func(*middleware.Stack) error + + // Configures the events that will be sent to the configured logger. + ClientLogMode aws.ClientLogMode + + // The credentials object to use when signing requests. + Credentials aws.CredentialsProvider + + // The configuration DefaultsMode that the SDK should use when constructing the + // clients initial default settings. + DefaultsMode aws.DefaultsMode + + // The endpoint options to be used when attempting to resolve an endpoint. + EndpointOptions EndpointResolverOptions + + // The service endpoint resolver. + EndpointResolver EndpointResolver + + // Signature Version 4 (SigV4) Signer + HTTPSignerV4 HTTPSignerV4 + + // The logger writer interface to write logging messages to. + Logger logging.Logger + + // The region to send requests to. (Required) + Region string + + // RetryMaxAttempts specifies the maximum number attempts an API client will call + // an operation that fails with a retryable error. A value of 0 is ignored, and + // will not be used to configure the API client created default retryer, or modify + // per operation call's retry max attempts. When creating a new API Clients this + // member will only be used if the Retryer Options member is nil. This value will + // be ignored if Retryer is not nil. If specified in an operation call's functional + // options with a value that is different than the constructed client's Options, + // the Client's Retryer will be wrapped to use the operation's specific + // RetryMaxAttempts value. + RetryMaxAttempts int + + // RetryMode specifies the retry mode the API client will be created with, if + // Retryer option is not also specified. When creating a new API Clients this + // member will only be used if the Retryer Options member is nil. This value will + // be ignored if Retryer is not nil. Currently does not support per operation call + // overrides, may in the future. + RetryMode aws.RetryMode + + // Retryer guides how HTTP requests should be retried in case of recoverable + // failures. When nil the API client will use a default retryer. The kind of + // default retry created by the API client can be changed with the RetryMode + // option. + Retryer aws.Retryer + + // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set + // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig. You + // should not populate this structure programmatically, or rely on the values here + // within your applications. + RuntimeEnvironment aws.RuntimeEnvironment + + // The initial DefaultsMode used when the client options were constructed. If the + // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved + // value was at that point in time. Currently does not support per operation call + // overrides, may in the future. + resolvedDefaultsMode aws.DefaultsMode + + // The HTTP client to invoke API calls with. Defaults to client's default HTTP + // implementation if nil. + HTTPClient HTTPClient +} + +// WithAPIOptions returns a functional option for setting the Client's APIOptions +// option. +func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { + return func(o *Options) { + o.APIOptions = append(o.APIOptions, optFns...) + } +} + +// WithEndpointResolver returns a functional option for setting the Client's +// EndpointResolver option. +func WithEndpointResolver(v EndpointResolver) func(*Options) { + return func(o *Options) { + o.EndpointResolver = v + } +} + +type HTTPClient interface { + Do(*http.Request) (*http.Response, error) +} + +// Copy creates a clone where the APIOptions list is deep copied. +func (o Options) Copy() Options { + to := o + to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) + copy(to.APIOptions, o.APIOptions) + + return to +} +func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { + ctx = middleware.ClearStackValues(ctx) + stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) + options := c.options.Copy() + for _, fn := range optFns { + fn(&options) + } + + finalizeRetryMaxAttemptOptions(&options, *c) + + finalizeClientEndpointResolverOptions(&options) + + for _, fn := range stackFns { + if err := fn(stack, options); err != nil { + return nil, metadata, err + } + } + + for _, fn := range options.APIOptions { + if err := fn(stack); err != nil { + return nil, metadata, err + } + } + + handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) + result, metadata, err = handler.Handle(ctx, params) + if err != nil { + err = &smithy.OperationError{ + ServiceID: ServiceID, + OperationName: opID, + Err: err, + } + } + return result, metadata, err +} + +type noSmithyDocumentSerde = smithydocument.NoSerde + +func resolveDefaultLogger(o *Options) { + if o.Logger != nil { + return + } + o.Logger = logging.Nop{} +} + +func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { + return middleware.AddSetLoggerMiddleware(stack, o.Logger) +} + +func setResolvedDefaultsMode(o *Options) { + if len(o.resolvedDefaultsMode) > 0 { + return + } + + var mode aws.DefaultsMode + mode.SetFromString(string(o.DefaultsMode)) + + if mode == aws.DefaultsModeAuto { + mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) + } + + o.resolvedDefaultsMode = mode +} + +// NewFromConfig returns a new client from the provided config. +func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { + opts := Options{ + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + } + resolveAWSRetryerProvider(cfg, &opts) + resolveAWSRetryMaxAttempts(cfg, &opts) + resolveAWSRetryMode(cfg, &opts) + resolveAWSEndpointResolver(cfg, &opts) + resolveUseDualStackEndpoint(cfg, &opts) + resolveUseFIPSEndpoint(cfg, &opts) + return New(opts, optFns...) +} + +func resolveHTTPClient(o *Options) { + var buildable *awshttp.BuildableClient + + if o.HTTPClient != nil { + var ok bool + buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) + if !ok { + return + } + } else { + buildable = awshttp.NewBuildableClient() + } + + modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) + if err == nil { + buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { + if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { + dialer.Timeout = dialerTimeout + } + }) + + buildable = buildable.WithTransportOptions(func(transport *http.Transport) { + if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { + transport.TLSHandshakeTimeout = tlsHandshakeTimeout + } + }) + } + + o.HTTPClient = buildable +} + +func resolveRetryer(o *Options) { + if o.Retryer != nil { + return + } + + if len(o.RetryMode) == 0 { + modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) + if err == nil { + o.RetryMode = modeConfig.RetryMode + } + } + if len(o.RetryMode) == 0 { + o.RetryMode = aws.RetryModeStandard + } + + var standardOptions []func(*retry.StandardOptions) + if v := o.RetryMaxAttempts; v != 0 { + standardOptions = append(standardOptions, func(so *retry.StandardOptions) { + so.MaxAttempts = v + }) + } + + switch o.RetryMode { + case aws.RetryModeAdaptive: + var adaptiveOptions []func(*retry.AdaptiveModeOptions) + if len(standardOptions) != 0 { + adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { + ao.StandardOptions = append(ao.StandardOptions, standardOptions...) + }) + } + o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) + + default: + o.Retryer = retry.NewStandard(standardOptions...) + } +} + +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + +func resolveAWSRetryMode(cfg aws.Config, o *Options) { + if len(cfg.RetryMode) == 0 { + return + } + o.RetryMode = cfg.RetryMode +} +func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { + if cfg.RetryMaxAttempts == 0 { + return + } + o.RetryMaxAttempts = cfg.RetryMaxAttempts +} + +func finalizeRetryMaxAttemptOptions(o *Options, client Client) { + if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { + return + } + + o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) +} + +func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { + if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { + return + } + o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver()) +} + +func addClientUserAgent(stack *middleware.Stack) error { + return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "privatenetworks", goModuleVersion)(stack) +} + +func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error { + mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{ + CredentialsProvider: o.Credentials, + Signer: o.HTTPSignerV4, + LogSigning: o.ClientLogMode.IsSigning(), + }) + return stack.Finalize.Add(mw, middleware.After) +} + +type HTTPSignerV4 interface { + SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error +} + +func resolveHTTPSignerV4(o *Options) { + if o.HTTPSignerV4 != nil { + return + } + o.HTTPSignerV4 = newDefaultV4Signer(*o) +} + +func newDefaultV4Signer(o Options) *v4.Signer { + return v4.NewSigner(func(so *v4.SignerOptions) { + so.Logger = o.Logger + so.LogSigning = o.ClientLogMode.IsSigning() + }) +} + +func addRetryMiddlewares(stack *middleware.Stack, o Options) error { + mo := retry.AddRetryMiddlewaresOptions{ + Retryer: o.Retryer, + LogRetryAttempts: o.ClientLogMode.IsRetries(), + } + return retry.AddRetryMiddlewares(stack, mo) +} + +// resolves dual-stack endpoint configuration +func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { + if len(cfg.ConfigSources) == 0 { + return nil + } + value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) + if err != nil { + return err + } + if found { + o.EndpointOptions.UseDualStackEndpoint = value + } + return nil +} + +// resolves FIPS endpoint configuration +func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { + if len(cfg.ConfigSources) == 0 { + return nil + } + value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) + if err != nil { + return err + } + if found { + o.EndpointOptions.UseFIPSEndpoint = value + } + return nil +} + +func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { + return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) +} + +func addResponseErrorMiddleware(stack *middleware.Stack) error { + return awshttp.AddResponseErrorMiddleware(stack) +} + +func addRequestResponseLogging(stack *middleware.Stack, o Options) error { + return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ + LogRequest: o.ClientLogMode.IsRequest(), + LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), + LogResponse: o.ClientLogMode.IsResponse(), + LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), + }, middleware.After) +} diff --git a/service/privatenetworks/api_client_test.go b/service/privatenetworks/api_client_test.go new file mode 100644 index 00000000000..5d6dae189f3 --- /dev/null +++ b/service/privatenetworks/api_client_test.go @@ -0,0 +1,123 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io/ioutil" + "net/http" + "strings" + "testing" +) + +func TestClient_resolveRetryOptions(t *testing.T) { + nopClient := smithyhttp.ClientDoFunc(func(_ *http.Request) (*http.Response, error) { + return &http.Response{ + StatusCode: 200, + Header: http.Header{}, + Body: ioutil.NopCloser(strings.NewReader("")), + }, nil + }) + + cases := map[string]struct { + defaultsMode aws.DefaultsMode + retryer aws.Retryer + retryMaxAttempts int + opRetryMaxAttempts *int + retryMode aws.RetryMode + expectClientRetryMode aws.RetryMode + expectClientMaxAttempts int + expectOpMaxAttempts int + }{ + "defaults": { + defaultsMode: aws.DefaultsModeStandard, + expectClientRetryMode: aws.RetryModeStandard, + expectClientMaxAttempts: 3, + expectOpMaxAttempts: 3, + }, + "custom default retry": { + retryMode: aws.RetryModeAdaptive, + retryMaxAttempts: 10, + expectClientRetryMode: aws.RetryModeAdaptive, + expectClientMaxAttempts: 10, + expectOpMaxAttempts: 10, + }, + "custom op max attempts": { + retryMode: aws.RetryModeAdaptive, + retryMaxAttempts: 10, + opRetryMaxAttempts: aws.Int(2), + expectClientRetryMode: aws.RetryModeAdaptive, + expectClientMaxAttempts: 10, + expectOpMaxAttempts: 2, + }, + "custom op no change max attempts": { + retryMode: aws.RetryModeAdaptive, + retryMaxAttempts: 10, + opRetryMaxAttempts: aws.Int(10), + expectClientRetryMode: aws.RetryModeAdaptive, + expectClientMaxAttempts: 10, + expectOpMaxAttempts: 10, + }, + "custom op 0 max attempts": { + retryMode: aws.RetryModeAdaptive, + retryMaxAttempts: 10, + opRetryMaxAttempts: aws.Int(0), + expectClientRetryMode: aws.RetryModeAdaptive, + expectClientMaxAttempts: 10, + expectOpMaxAttempts: 10, + }, + } + + for name, c := range cases { + t.Run(name, func(t *testing.T) { + client := NewFromConfig(aws.Config{ + DefaultsMode: c.defaultsMode, + Retryer: func() func() aws.Retryer { + if c.retryer == nil { + return nil + } + + return func() aws.Retryer { return c.retryer } + }(), + HTTPClient: nopClient, + RetryMaxAttempts: c.retryMaxAttempts, + RetryMode: c.retryMode, + }) + + if e, a := c.expectClientRetryMode, client.options.RetryMode; e != a { + t.Errorf("expect %v retry mode, got %v", e, a) + } + if e, a := c.expectClientMaxAttempts, client.options.Retryer.MaxAttempts(); e != a { + t.Errorf("expect %v max attempts, got %v", e, a) + } + + _, _, err := client.invokeOperation(context.Background(), "mockOperation", struct{}{}, + []func(*Options){ + func(o *Options) { + if c.opRetryMaxAttempts == nil { + return + } + o.RetryMaxAttempts = *c.opRetryMaxAttempts + }, + }, + func(s *middleware.Stack, o Options) error { + s.Initialize.Clear() + s.Serialize.Clear() + s.Build.Clear() + s.Finalize.Clear() + s.Deserialize.Clear() + + if e, a := c.expectOpMaxAttempts, o.Retryer.MaxAttempts(); e != a { + t.Errorf("expect %v op max attempts, got %v", e, a) + } + return nil + }) + if err != nil { + t.Fatalf("expect no operation error, got %v", err) + } + }) + } +} diff --git a/service/privatenetworks/api_op_AcknowledgeOrderReceipt.go b/service/privatenetworks/api_op_AcknowledgeOrderReceipt.go new file mode 100644 index 00000000000..8ef49a4da86 --- /dev/null +++ b/service/privatenetworks/api_op_AcknowledgeOrderReceipt.go @@ -0,0 +1,123 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/privatenetworks/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Acknowledges that the specified network order was received. +func (c *Client) AcknowledgeOrderReceipt(ctx context.Context, params *AcknowledgeOrderReceiptInput, optFns ...func(*Options)) (*AcknowledgeOrderReceiptOutput, error) { + if params == nil { + params = &AcknowledgeOrderReceiptInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AcknowledgeOrderReceipt", params, optFns, c.addOperationAcknowledgeOrderReceiptMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AcknowledgeOrderReceiptOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AcknowledgeOrderReceiptInput struct { + + // The Amazon Resource Name (ARN) of the order. + // + // This member is required. + OrderArn *string + + noSmithyDocumentSerde +} + +type AcknowledgeOrderReceiptOutput struct { + + // Information about the order. + // + // This member is required. + Order *types.Order + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAcknowledgeOrderReceiptMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpAcknowledgeOrderReceipt{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAcknowledgeOrderReceipt{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpAcknowledgeOrderReceiptValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAcknowledgeOrderReceipt(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opAcknowledgeOrderReceipt(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "private-networks", + OperationName: "AcknowledgeOrderReceipt", + } +} diff --git a/service/privatenetworks/api_op_ActivateDeviceIdentifier.go b/service/privatenetworks/api_op_ActivateDeviceIdentifier.go new file mode 100644 index 00000000000..06a59d1c325 --- /dev/null +++ b/service/privatenetworks/api_op_ActivateDeviceIdentifier.go @@ -0,0 +1,131 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/privatenetworks/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Activates the specified device identifier. +func (c *Client) ActivateDeviceIdentifier(ctx context.Context, params *ActivateDeviceIdentifierInput, optFns ...func(*Options)) (*ActivateDeviceIdentifierOutput, error) { + if params == nil { + params = &ActivateDeviceIdentifierInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ActivateDeviceIdentifier", params, optFns, c.addOperationActivateDeviceIdentifierMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ActivateDeviceIdentifierOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ActivateDeviceIdentifierInput struct { + + // The Amazon Resource Name (ARN) of the device identifier. + // + // This member is required. + DeviceIdentifierArn *string + + // Unique, case-sensitive identifier that you provide to ensure the idempotency of + // the request. For more information, see How to ensure idempotency + // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). + ClientToken *string + + noSmithyDocumentSerde +} + +type ActivateDeviceIdentifierOutput struct { + + // Information about the device identifier. + // + // This member is required. + DeviceIdentifier *types.DeviceIdentifier + + // The tags on the device identifier. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationActivateDeviceIdentifierMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpActivateDeviceIdentifier{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpActivateDeviceIdentifier{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpActivateDeviceIdentifierValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opActivateDeviceIdentifier(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opActivateDeviceIdentifier(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "private-networks", + OperationName: "ActivateDeviceIdentifier", + } +} diff --git a/service/privatenetworks/api_op_ActivateNetworkSite.go b/service/privatenetworks/api_op_ActivateNetworkSite.go new file mode 100644 index 00000000000..5aae667f21c --- /dev/null +++ b/service/privatenetworks/api_op_ActivateNetworkSite.go @@ -0,0 +1,131 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/privatenetworks/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Activates the specified network site. +func (c *Client) ActivateNetworkSite(ctx context.Context, params *ActivateNetworkSiteInput, optFns ...func(*Options)) (*ActivateNetworkSiteOutput, error) { + if params == nil { + params = &ActivateNetworkSiteInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ActivateNetworkSite", params, optFns, c.addOperationActivateNetworkSiteMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ActivateNetworkSiteOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ActivateNetworkSiteInput struct { + + // The Amazon Resource Name (ARN) of the network site. + // + // This member is required. + NetworkSiteArn *string + + // The shipping address of the network site. + // + // This member is required. + ShippingAddress *types.Address + + // Unique, case-sensitive identifier that you provide to ensure the idempotency of + // the request. For more information, see How to ensure idempotency + // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). + ClientToken *string + + noSmithyDocumentSerde +} + +type ActivateNetworkSiteOutput struct { + + // Information about the network site. + NetworkSite *types.NetworkSite + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationActivateNetworkSiteMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpActivateNetworkSite{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpActivateNetworkSite{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpActivateNetworkSiteValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opActivateNetworkSite(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opActivateNetworkSite(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "private-networks", + OperationName: "ActivateNetworkSite", + } +} diff --git a/service/privatenetworks/api_op_ConfigureAccessPoint.go b/service/privatenetworks/api_op_ConfigureAccessPoint.go new file mode 100644 index 00000000000..1a980d3355c --- /dev/null +++ b/service/privatenetworks/api_op_ConfigureAccessPoint.go @@ -0,0 +1,146 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/privatenetworks/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Configures the specified network resource. Use this action to specify the +// geographic position of the hardware. You must provide Certified Professional +// Installer (CPI) credentials in the request so that we can obtain spectrum +// grants. For more information, see Radio units +// (https://docs.aws.amazon.com/private-networks/latest/userguide/radio-units.html) +// in the Amazon Web Services Private 5G User Guide. +func (c *Client) ConfigureAccessPoint(ctx context.Context, params *ConfigureAccessPointInput, optFns ...func(*Options)) (*ConfigureAccessPointOutput, error) { + if params == nil { + params = &ConfigureAccessPointInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ConfigureAccessPoint", params, optFns, c.addOperationConfigureAccessPointMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ConfigureAccessPointOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ConfigureAccessPointInput struct { + + // The Amazon Resource Name (ARN) of the network resource. + // + // This member is required. + AccessPointArn *string + + // A Base64 encoded string of the CPI certificate associated with the CPI user who + // is certifying the coordinates of the network resource. + CpiSecretKey *string + + // The CPI user ID of the CPI user who is certifying the coordinates of the network + // resource. + CpiUserId *string + + // The CPI password associated with the CPI certificate in cpiSecretKey. + CpiUserPassword *string + + // The CPI user name of the CPI user who is certifying the coordinates of the radio + // unit. + CpiUsername *string + + // The position of the network resource. + Position *types.Position + + noSmithyDocumentSerde +} + +type ConfigureAccessPointOutput struct { + + // Information about the network resource. + // + // This member is required. + AccessPoint *types.NetworkResource + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationConfigureAccessPointMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpConfigureAccessPoint{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpConfigureAccessPoint{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpConfigureAccessPointValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opConfigureAccessPoint(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opConfigureAccessPoint(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "private-networks", + OperationName: "ConfigureAccessPoint", + } +} diff --git a/service/privatenetworks/api_op_CreateNetwork.go b/service/privatenetworks/api_op_CreateNetwork.go new file mode 100644 index 00000000000..ec821fbb73b --- /dev/null +++ b/service/privatenetworks/api_op_CreateNetwork.go @@ -0,0 +1,137 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/privatenetworks/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a network. +func (c *Client) CreateNetwork(ctx context.Context, params *CreateNetworkInput, optFns ...func(*Options)) (*CreateNetworkOutput, error) { + if params == nil { + params = &CreateNetworkInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateNetwork", params, optFns, c.addOperationCreateNetworkMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateNetworkOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateNetworkInput struct { + + // The name of the network. You can't change the name after you create the network. + // + // This member is required. + NetworkName *string + + // Unique, case-sensitive identifier that you provide to ensure the idempotency of + // the request. For more information, see How to ensure idempotency + // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). + ClientToken *string + + // The description of the network. + Description *string + + // The tags to apply to the network. + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateNetworkOutput struct { + + // Information about the network. + // + // This member is required. + Network *types.Network + + // The network tags. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateNetworkMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateNetwork{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateNetwork{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateNetworkValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateNetwork(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateNetwork(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "private-networks", + OperationName: "CreateNetwork", + } +} diff --git a/service/privatenetworks/api_op_CreateNetworkSite.go b/service/privatenetworks/api_op_CreateNetworkSite.go new file mode 100644 index 00000000000..89c24aed361 --- /dev/null +++ b/service/privatenetworks/api_op_CreateNetworkSite.go @@ -0,0 +1,151 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/privatenetworks/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a network site. +func (c *Client) CreateNetworkSite(ctx context.Context, params *CreateNetworkSiteInput, optFns ...func(*Options)) (*CreateNetworkSiteOutput, error) { + if params == nil { + params = &CreateNetworkSiteInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateNetworkSite", params, optFns, c.addOperationCreateNetworkSiteMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateNetworkSiteOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateNetworkSiteInput struct { + + // The Amazon Resource Name (ARN) of the network. + // + // This member is required. + NetworkArn *string + + // The name of the site. You can't change the name after you create the site. + // + // This member is required. + NetworkSiteName *string + + // The Availability Zone that is the parent of this site. You can't change the + // Availability Zone after you create the site. + AvailabilityZone *string + + // The ID of the Availability Zone that is the parent of this site. You can't + // change the Availability Zone after you create the site. + AvailabilityZoneId *string + + // Unique, case-sensitive identifier that you provide to ensure the idempotency of + // the request. For more information, see How to ensure idempotency + // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). + ClientToken *string + + // The description of the site. + Description *string + + // Information about the pending plan for this site. + PendingPlan *types.SitePlan + + // The tags to apply to the network site. + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateNetworkSiteOutput struct { + + // Information about the network site. + NetworkSite *types.NetworkSite + + // The network site tags. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateNetworkSiteMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateNetworkSite{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateNetworkSite{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateNetworkSiteValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateNetworkSite(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateNetworkSite(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "private-networks", + OperationName: "CreateNetworkSite", + } +} diff --git a/service/privatenetworks/api_op_DeactivateDeviceIdentifier.go b/service/privatenetworks/api_op_DeactivateDeviceIdentifier.go new file mode 100644 index 00000000000..eb8fd15e73d --- /dev/null +++ b/service/privatenetworks/api_op_DeactivateDeviceIdentifier.go @@ -0,0 +1,128 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/privatenetworks/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deactivates the specified device identifier. +func (c *Client) DeactivateDeviceIdentifier(ctx context.Context, params *DeactivateDeviceIdentifierInput, optFns ...func(*Options)) (*DeactivateDeviceIdentifierOutput, error) { + if params == nil { + params = &DeactivateDeviceIdentifierInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeactivateDeviceIdentifier", params, optFns, c.addOperationDeactivateDeviceIdentifierMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeactivateDeviceIdentifierOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeactivateDeviceIdentifierInput struct { + + // The Amazon Resource Name (ARN) of the device identifier. + // + // This member is required. + DeviceIdentifierArn *string + + // Unique, case-sensitive identifier that you provide to ensure the idempotency of + // the request. For more information, see How to ensure idempotency + // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). + ClientToken *string + + noSmithyDocumentSerde +} + +type DeactivateDeviceIdentifierOutput struct { + + // Information about the device identifier. + // + // This member is required. + DeviceIdentifier *types.DeviceIdentifier + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeactivateDeviceIdentifierMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeactivateDeviceIdentifier{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeactivateDeviceIdentifier{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeactivateDeviceIdentifierValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeactivateDeviceIdentifier(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeactivateDeviceIdentifier(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "private-networks", + OperationName: "DeactivateDeviceIdentifier", + } +} diff --git a/service/privatenetworks/api_op_DeleteNetwork.go b/service/privatenetworks/api_op_DeleteNetwork.go new file mode 100644 index 00000000000..84654c6d4b3 --- /dev/null +++ b/service/privatenetworks/api_op_DeleteNetwork.go @@ -0,0 +1,131 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/privatenetworks/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the specified network. You must delete network sites before you delete +// the network. For more information, see DeleteNetworkSite +// (https://docs.aws.amazon.com/private-networks/latest/APIReference/API_DeleteNetworkSite.html) +// in the API Reference for Amazon Web Services Private 5G. +func (c *Client) DeleteNetwork(ctx context.Context, params *DeleteNetworkInput, optFns ...func(*Options)) (*DeleteNetworkOutput, error) { + if params == nil { + params = &DeleteNetworkInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteNetwork", params, optFns, c.addOperationDeleteNetworkMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteNetworkOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteNetworkInput struct { + + // The Amazon Resource Name (ARN) of the network. + // + // This member is required. + NetworkArn *string + + // Unique, case-sensitive identifier that you provide to ensure the idempotency of + // the request. For more information, see How to ensure idempotency + // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). + ClientToken *string + + noSmithyDocumentSerde +} + +type DeleteNetworkOutput struct { + + // Information about the network. + // + // This member is required. + Network *types.Network + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteNetworkMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteNetwork{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteNetwork{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteNetworkValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteNetwork(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteNetwork(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "private-networks", + OperationName: "DeleteNetwork", + } +} diff --git a/service/privatenetworks/api_op_DeleteNetworkSite.go b/service/privatenetworks/api_op_DeleteNetworkSite.go new file mode 100644 index 00000000000..fbc94d042cb --- /dev/null +++ b/service/privatenetworks/api_op_DeleteNetworkSite.go @@ -0,0 +1,130 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/privatenetworks/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the specified network site. Return the hardware after you delete the +// network site. You are responsible for minimum charges. For more information, see +// Hardware returns +// (https://docs.aws.amazon.com/private-networks/latest/userguide/hardware-maintenance.html) +// in the Amazon Web Services Private 5G User Guide. +func (c *Client) DeleteNetworkSite(ctx context.Context, params *DeleteNetworkSiteInput, optFns ...func(*Options)) (*DeleteNetworkSiteOutput, error) { + if params == nil { + params = &DeleteNetworkSiteInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteNetworkSite", params, optFns, c.addOperationDeleteNetworkSiteMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteNetworkSiteOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteNetworkSiteInput struct { + + // The Amazon Resource Name (ARN) of the network site. + // + // This member is required. + NetworkSiteArn *string + + // Unique, case-sensitive identifier that you provide to ensure the idempotency of + // the request. For more information, see How to ensure idempotency + // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). + ClientToken *string + + noSmithyDocumentSerde +} + +type DeleteNetworkSiteOutput struct { + + // Information about the network site. + NetworkSite *types.NetworkSite + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteNetworkSiteMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteNetworkSite{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteNetworkSite{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteNetworkSiteValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteNetworkSite(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteNetworkSite(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "private-networks", + OperationName: "DeleteNetworkSite", + } +} diff --git a/service/privatenetworks/api_op_GetDeviceIdentifier.go b/service/privatenetworks/api_op_GetDeviceIdentifier.go new file mode 100644 index 00000000000..7f832f573c9 --- /dev/null +++ b/service/privatenetworks/api_op_GetDeviceIdentifier.go @@ -0,0 +1,124 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/privatenetworks/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets the specified device identifier. +func (c *Client) GetDeviceIdentifier(ctx context.Context, params *GetDeviceIdentifierInput, optFns ...func(*Options)) (*GetDeviceIdentifierOutput, error) { + if params == nil { + params = &GetDeviceIdentifierInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetDeviceIdentifier", params, optFns, c.addOperationGetDeviceIdentifierMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetDeviceIdentifierOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetDeviceIdentifierInput struct { + + // The Amazon Resource Name (ARN) of the device identifier. + // + // This member is required. + DeviceIdentifierArn *string + + noSmithyDocumentSerde +} + +type GetDeviceIdentifierOutput struct { + + // Information about the device identifier. + DeviceIdentifier *types.DeviceIdentifier + + // The device identifier tags. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetDeviceIdentifierMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetDeviceIdentifier{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetDeviceIdentifier{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetDeviceIdentifierValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDeviceIdentifier(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetDeviceIdentifier(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "private-networks", + OperationName: "GetDeviceIdentifier", + } +} diff --git a/service/privatenetworks/api_op_GetNetwork.go b/service/privatenetworks/api_op_GetNetwork.go new file mode 100644 index 00000000000..43d1b9c6495 --- /dev/null +++ b/service/privatenetworks/api_op_GetNetwork.go @@ -0,0 +1,126 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/privatenetworks/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets the specified network. +func (c *Client) GetNetwork(ctx context.Context, params *GetNetworkInput, optFns ...func(*Options)) (*GetNetworkOutput, error) { + if params == nil { + params = &GetNetworkInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetNetwork", params, optFns, c.addOperationGetNetworkMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetNetworkOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetNetworkInput struct { + + // The Amazon Resource Name (ARN) of the network. + // + // This member is required. + NetworkArn *string + + noSmithyDocumentSerde +} + +type GetNetworkOutput struct { + + // Information about the network. + // + // This member is required. + Network *types.Network + + // The network tags. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetNetworkMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetNetwork{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetNetwork{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetNetworkValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetNetwork(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetNetwork(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "private-networks", + OperationName: "GetNetwork", + } +} diff --git a/service/privatenetworks/api_op_GetNetworkResource.go b/service/privatenetworks/api_op_GetNetworkResource.go new file mode 100644 index 00000000000..75f3451ab95 --- /dev/null +++ b/service/privatenetworks/api_op_GetNetworkResource.go @@ -0,0 +1,126 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/privatenetworks/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets the specified network resource. +func (c *Client) GetNetworkResource(ctx context.Context, params *GetNetworkResourceInput, optFns ...func(*Options)) (*GetNetworkResourceOutput, error) { + if params == nil { + params = &GetNetworkResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetNetworkResource", params, optFns, c.addOperationGetNetworkResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetNetworkResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetNetworkResourceInput struct { + + // The Amazon Resource Name (ARN) of the network resource. + // + // This member is required. + NetworkResourceArn *string + + noSmithyDocumentSerde +} + +type GetNetworkResourceOutput struct { + + // Information about the network resource. + // + // This member is required. + NetworkResource *types.NetworkResource + + // The network resource tags. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetNetworkResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetNetworkResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetNetworkResource{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetNetworkResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetNetworkResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetNetworkResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "private-networks", + OperationName: "GetNetworkResource", + } +} diff --git a/service/privatenetworks/api_op_GetNetworkSite.go b/service/privatenetworks/api_op_GetNetworkSite.go new file mode 100644 index 00000000000..5ff174df825 --- /dev/null +++ b/service/privatenetworks/api_op_GetNetworkSite.go @@ -0,0 +1,124 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/privatenetworks/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets the specified network site. +func (c *Client) GetNetworkSite(ctx context.Context, params *GetNetworkSiteInput, optFns ...func(*Options)) (*GetNetworkSiteOutput, error) { + if params == nil { + params = &GetNetworkSiteInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetNetworkSite", params, optFns, c.addOperationGetNetworkSiteMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetNetworkSiteOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetNetworkSiteInput struct { + + // The Amazon Resource Name (ARN) of the network site. + // + // This member is required. + NetworkSiteArn *string + + noSmithyDocumentSerde +} + +type GetNetworkSiteOutput struct { + + // Information about the network site. + NetworkSite *types.NetworkSite + + // The network site tags. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetNetworkSiteMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetNetworkSite{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetNetworkSite{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetNetworkSiteValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetNetworkSite(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetNetworkSite(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "private-networks", + OperationName: "GetNetworkSite", + } +} diff --git a/service/privatenetworks/api_op_GetOrder.go b/service/privatenetworks/api_op_GetOrder.go new file mode 100644 index 00000000000..bcaaf7291ea --- /dev/null +++ b/service/privatenetworks/api_op_GetOrder.go @@ -0,0 +1,126 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/privatenetworks/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets the specified order. +func (c *Client) GetOrder(ctx context.Context, params *GetOrderInput, optFns ...func(*Options)) (*GetOrderOutput, error) { + if params == nil { + params = &GetOrderInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetOrder", params, optFns, c.addOperationGetOrderMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetOrderOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetOrderInput struct { + + // The Amazon Resource Name (ARN) of the order. + // + // This member is required. + OrderArn *string + + noSmithyDocumentSerde +} + +type GetOrderOutput struct { + + // Information about the order. + // + // This member is required. + Order *types.Order + + // The order tags. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetOrderMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetOrder{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetOrder{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetOrderValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetOrder(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetOrder(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "private-networks", + OperationName: "GetOrder", + } +} diff --git a/service/privatenetworks/api_op_ListDeviceIdentifiers.go b/service/privatenetworks/api_op_ListDeviceIdentifiers.go new file mode 100644 index 00000000000..2a9e7fec6d8 --- /dev/null +++ b/service/privatenetworks/api_op_ListDeviceIdentifiers.go @@ -0,0 +1,241 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/privatenetworks/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists device identifiers. Add filters to your request to return a more specific +// list of results. Use filters to match the Amazon Resource Name (ARN) of an +// order, the status of device identifiers, or the ARN of the traffic group. If you +// specify multiple filters, filters are joined with an OR, and the request returns +// results that match all of the specified filters. +func (c *Client) ListDeviceIdentifiers(ctx context.Context, params *ListDeviceIdentifiersInput, optFns ...func(*Options)) (*ListDeviceIdentifiersOutput, error) { + if params == nil { + params = &ListDeviceIdentifiersInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListDeviceIdentifiers", params, optFns, c.addOperationListDeviceIdentifiersMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListDeviceIdentifiersOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListDeviceIdentifiersInput struct { + + // The Amazon Resource Name (ARN) of the network. + // + // This member is required. + NetworkArn *string + + // The filters. + // + // * ORDER - The Amazon Resource Name (ARN) of the order. + // + // * STATUS - + // The status (ACTIVE | INACTIVE). + // + // * TRAFFIC_GROUP - The Amazon Resource Name + // (ARN) of the traffic group. + // + // Filter values are case sensitive. If you specify + // multiple values for a filter, the values are joined with an OR, and the request + // returns all results that match any of the specified values. + Filters map[string][]string + + // The maximum number of results to return. + MaxResults *int32 + + // The token for the next page of results. + StartToken *string + + noSmithyDocumentSerde +} + +type ListDeviceIdentifiersOutput struct { + + // Information about the device identifiers. + DeviceIdentifiers []types.DeviceIdentifier + + // The token for the next page of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListDeviceIdentifiersMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListDeviceIdentifiers{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListDeviceIdentifiers{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListDeviceIdentifiersValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDeviceIdentifiers(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListDeviceIdentifiersAPIClient is a client that implements the +// ListDeviceIdentifiers operation. +type ListDeviceIdentifiersAPIClient interface { + ListDeviceIdentifiers(context.Context, *ListDeviceIdentifiersInput, ...func(*Options)) (*ListDeviceIdentifiersOutput, error) +} + +var _ ListDeviceIdentifiersAPIClient = (*Client)(nil) + +// ListDeviceIdentifiersPaginatorOptions is the paginator options for +// ListDeviceIdentifiers +type ListDeviceIdentifiersPaginatorOptions struct { + // The maximum number of results to return. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListDeviceIdentifiersPaginator is a paginator for ListDeviceIdentifiers +type ListDeviceIdentifiersPaginator struct { + options ListDeviceIdentifiersPaginatorOptions + client ListDeviceIdentifiersAPIClient + params *ListDeviceIdentifiersInput + nextToken *string + firstPage bool +} + +// NewListDeviceIdentifiersPaginator returns a new ListDeviceIdentifiersPaginator +func NewListDeviceIdentifiersPaginator(client ListDeviceIdentifiersAPIClient, params *ListDeviceIdentifiersInput, optFns ...func(*ListDeviceIdentifiersPaginatorOptions)) *ListDeviceIdentifiersPaginator { + if params == nil { + params = &ListDeviceIdentifiersInput{} + } + + options := ListDeviceIdentifiersPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListDeviceIdentifiersPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.StartToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListDeviceIdentifiersPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListDeviceIdentifiers page. +func (p *ListDeviceIdentifiersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListDeviceIdentifiersOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.StartToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListDeviceIdentifiers(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListDeviceIdentifiers(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "private-networks", + OperationName: "ListDeviceIdentifiers", + } +} diff --git a/service/privatenetworks/api_op_ListNetworkResources.go b/service/privatenetworks/api_op_ListNetworkResources.go new file mode 100644 index 00000000000..129c149a112 --- /dev/null +++ b/service/privatenetworks/api_op_ListNetworkResources.go @@ -0,0 +1,239 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/privatenetworks/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists network resources. Add filters to your request to return a more specific +// list of results. Use filters to match the Amazon Resource Name (ARN) of an order +// or the status of network resources. If you specify multiple filters, filters are +// joined with an OR, and the request returns results that match all of the +// specified filters. +func (c *Client) ListNetworkResources(ctx context.Context, params *ListNetworkResourcesInput, optFns ...func(*Options)) (*ListNetworkResourcesOutput, error) { + if params == nil { + params = &ListNetworkResourcesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListNetworkResources", params, optFns, c.addOperationListNetworkResourcesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListNetworkResourcesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListNetworkResourcesInput struct { + + // The Amazon Resource Name (ARN) of the network. + // + // This member is required. + NetworkArn *string + + // The filters. + // + // * ORDER - The Amazon Resource Name (ARN) of the order. + // + // * STATUS - + // The status (AVAILABLE | DELETED | DELETING | PENDING | PENDING_RETURN | + // PROVISIONING | SHIPPED). + // + // Filter values are case sensitive. If you specify + // multiple values for a filter, the values are joined with an OR, and the request + // returns all results that match any of the specified values. + Filters map[string][]string + + // The maximum number of results to return. + MaxResults *int32 + + // The token for the next page of results. + StartToken *string + + noSmithyDocumentSerde +} + +type ListNetworkResourcesOutput struct { + + // Information about network resources. + NetworkResources []types.NetworkResource + + // The token for the next page of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListNetworkResourcesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListNetworkResources{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListNetworkResources{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListNetworkResourcesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListNetworkResources(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListNetworkResourcesAPIClient is a client that implements the +// ListNetworkResources operation. +type ListNetworkResourcesAPIClient interface { + ListNetworkResources(context.Context, *ListNetworkResourcesInput, ...func(*Options)) (*ListNetworkResourcesOutput, error) +} + +var _ ListNetworkResourcesAPIClient = (*Client)(nil) + +// ListNetworkResourcesPaginatorOptions is the paginator options for +// ListNetworkResources +type ListNetworkResourcesPaginatorOptions struct { + // The maximum number of results to return. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListNetworkResourcesPaginator is a paginator for ListNetworkResources +type ListNetworkResourcesPaginator struct { + options ListNetworkResourcesPaginatorOptions + client ListNetworkResourcesAPIClient + params *ListNetworkResourcesInput + nextToken *string + firstPage bool +} + +// NewListNetworkResourcesPaginator returns a new ListNetworkResourcesPaginator +func NewListNetworkResourcesPaginator(client ListNetworkResourcesAPIClient, params *ListNetworkResourcesInput, optFns ...func(*ListNetworkResourcesPaginatorOptions)) *ListNetworkResourcesPaginator { + if params == nil { + params = &ListNetworkResourcesInput{} + } + + options := ListNetworkResourcesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListNetworkResourcesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.StartToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListNetworkResourcesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListNetworkResources page. +func (p *ListNetworkResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListNetworkResourcesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.StartToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListNetworkResources(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListNetworkResources(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "private-networks", + OperationName: "ListNetworkResources", + } +} diff --git a/service/privatenetworks/api_op_ListNetworkSites.go b/service/privatenetworks/api_op_ListNetworkSites.go new file mode 100644 index 00000000000..732a316af1e --- /dev/null +++ b/service/privatenetworks/api_op_ListNetworkSites.go @@ -0,0 +1,234 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/privatenetworks/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists network sites. Add filters to your request to return a more specific list +// of results. Use filters to match the status of the network site. +func (c *Client) ListNetworkSites(ctx context.Context, params *ListNetworkSitesInput, optFns ...func(*Options)) (*ListNetworkSitesOutput, error) { + if params == nil { + params = &ListNetworkSitesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListNetworkSites", params, optFns, c.addOperationListNetworkSitesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListNetworkSitesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListNetworkSitesInput struct { + + // The Amazon Resource Name (ARN) of the network. + // + // This member is required. + NetworkArn *string + + // The filters. Add filters to your request to return a more specific list of + // results. Use filters to match the status of the network sites. + // + // * STATUS - The + // status (AVAILABLE | CREATED | DELETED | DEPROVISIONING | PROVISIONING). + // + // Filter + // values are case sensitive. If you specify multiple values for a filter, the + // values are joined with an OR, and the request returns all results that match any + // of the specified values. + Filters map[string][]string + + // The maximum number of results to return. + MaxResults *int32 + + // The token for the next page of results. + StartToken *string + + noSmithyDocumentSerde +} + +type ListNetworkSitesOutput struct { + + // Information about the network sites. + NetworkSites []types.NetworkSite + + // The token for the next page of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListNetworkSitesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListNetworkSites{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListNetworkSites{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListNetworkSitesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListNetworkSites(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListNetworkSitesAPIClient is a client that implements the ListNetworkSites +// operation. +type ListNetworkSitesAPIClient interface { + ListNetworkSites(context.Context, *ListNetworkSitesInput, ...func(*Options)) (*ListNetworkSitesOutput, error) +} + +var _ ListNetworkSitesAPIClient = (*Client)(nil) + +// ListNetworkSitesPaginatorOptions is the paginator options for ListNetworkSites +type ListNetworkSitesPaginatorOptions struct { + // The maximum number of results to return. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListNetworkSitesPaginator is a paginator for ListNetworkSites +type ListNetworkSitesPaginator struct { + options ListNetworkSitesPaginatorOptions + client ListNetworkSitesAPIClient + params *ListNetworkSitesInput + nextToken *string + firstPage bool +} + +// NewListNetworkSitesPaginator returns a new ListNetworkSitesPaginator +func NewListNetworkSitesPaginator(client ListNetworkSitesAPIClient, params *ListNetworkSitesInput, optFns ...func(*ListNetworkSitesPaginatorOptions)) *ListNetworkSitesPaginator { + if params == nil { + params = &ListNetworkSitesInput{} + } + + options := ListNetworkSitesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListNetworkSitesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.StartToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListNetworkSitesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListNetworkSites page. +func (p *ListNetworkSitesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListNetworkSitesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.StartToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListNetworkSites(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListNetworkSites(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "private-networks", + OperationName: "ListNetworkSites", + } +} diff --git a/service/privatenetworks/api_op_ListNetworks.go b/service/privatenetworks/api_op_ListNetworks.go new file mode 100644 index 00000000000..501ba149221 --- /dev/null +++ b/service/privatenetworks/api_op_ListNetworks.go @@ -0,0 +1,223 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/privatenetworks/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists networks. Add filters to your request to return a more specific list of +// results. Use filters to match the status of the network. +func (c *Client) ListNetworks(ctx context.Context, params *ListNetworksInput, optFns ...func(*Options)) (*ListNetworksOutput, error) { + if params == nil { + params = &ListNetworksInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListNetworks", params, optFns, c.addOperationListNetworksMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListNetworksOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListNetworksInput struct { + + // The filters. + // + // * STATUS - The status (AVAILABLE | CREATED | DELETED | + // DEPROVISIONING | PROVISIONING). + // + // Filter values are case sensitive. If you + // specify multiple values for a filter, the values are joined with an OR, and the + // request returns all results that match any of the specified values. + Filters map[string][]string + + // The maximum number of results to return. + MaxResults *int32 + + // The token for the next page of results. + StartToken *string + + noSmithyDocumentSerde +} + +type ListNetworksOutput struct { + + // The networks. + Networks []types.Network + + // The token for the next page of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListNetworksMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListNetworks{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListNetworks{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListNetworks(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListNetworksAPIClient is a client that implements the ListNetworks operation. +type ListNetworksAPIClient interface { + ListNetworks(context.Context, *ListNetworksInput, ...func(*Options)) (*ListNetworksOutput, error) +} + +var _ ListNetworksAPIClient = (*Client)(nil) + +// ListNetworksPaginatorOptions is the paginator options for ListNetworks +type ListNetworksPaginatorOptions struct { + // The maximum number of results to return. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListNetworksPaginator is a paginator for ListNetworks +type ListNetworksPaginator struct { + options ListNetworksPaginatorOptions + client ListNetworksAPIClient + params *ListNetworksInput + nextToken *string + firstPage bool +} + +// NewListNetworksPaginator returns a new ListNetworksPaginator +func NewListNetworksPaginator(client ListNetworksAPIClient, params *ListNetworksInput, optFns ...func(*ListNetworksPaginatorOptions)) *ListNetworksPaginator { + if params == nil { + params = &ListNetworksInput{} + } + + options := ListNetworksPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListNetworksPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.StartToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListNetworksPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListNetworks page. +func (p *ListNetworksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListNetworksOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.StartToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListNetworks(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListNetworks(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "private-networks", + OperationName: "ListNetworks", + } +} diff --git a/service/privatenetworks/api_op_ListOrders.go b/service/privatenetworks/api_op_ListOrders.go new file mode 100644 index 00000000000..6f206392716 --- /dev/null +++ b/service/privatenetworks/api_op_ListOrders.go @@ -0,0 +1,237 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/privatenetworks/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists orders. Add filters to your request to return a more specific list of +// results. Use filters to match the Amazon Resource Name (ARN) of the network site +// or the status of the order. If you specify multiple filters, filters are joined +// with an OR, and the request returns results that match all of the specified +// filters. +func (c *Client) ListOrders(ctx context.Context, params *ListOrdersInput, optFns ...func(*Options)) (*ListOrdersOutput, error) { + if params == nil { + params = &ListOrdersInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListOrders", params, optFns, c.addOperationListOrdersMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListOrdersOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListOrdersInput struct { + + // The Amazon Resource Name (ARN) of the network. + // + // This member is required. + NetworkArn *string + + // The filters. + // + // * NETWORK_SITE - The Amazon Resource Name (ARN) of the network + // site. + // + // * STATUS - The status (ACKNOWLEDGING | ACKNOWLEDGED | + // UNACKNOWLEDGED). + // + // Filter values are case sensitive. If you specify multiple + // values for a filter, the values are joined with an OR, and the request returns + // all results that match any of the specified values. + Filters map[string][]string + + // The maximum number of results to return. + MaxResults *int32 + + // The token for the next page of results. + StartToken *string + + noSmithyDocumentSerde +} + +type ListOrdersOutput struct { + + // The token for the next page of results. + NextToken *string + + // Information about the orders. + Orders []types.Order + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListOrdersMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListOrders{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListOrders{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListOrdersValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOrders(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListOrdersAPIClient is a client that implements the ListOrders operation. +type ListOrdersAPIClient interface { + ListOrders(context.Context, *ListOrdersInput, ...func(*Options)) (*ListOrdersOutput, error) +} + +var _ ListOrdersAPIClient = (*Client)(nil) + +// ListOrdersPaginatorOptions is the paginator options for ListOrders +type ListOrdersPaginatorOptions struct { + // The maximum number of results to return. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListOrdersPaginator is a paginator for ListOrders +type ListOrdersPaginator struct { + options ListOrdersPaginatorOptions + client ListOrdersAPIClient + params *ListOrdersInput + nextToken *string + firstPage bool +} + +// NewListOrdersPaginator returns a new ListOrdersPaginator +func NewListOrdersPaginator(client ListOrdersAPIClient, params *ListOrdersInput, optFns ...func(*ListOrdersPaginatorOptions)) *ListOrdersPaginator { + if params == nil { + params = &ListOrdersInput{} + } + + options := ListOrdersPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListOrdersPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.StartToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListOrdersPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListOrders page. +func (p *ListOrdersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListOrdersOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.StartToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListOrders(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListOrders(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "private-networks", + OperationName: "ListOrders", + } +} diff --git a/service/privatenetworks/api_op_ListTagsForResource.go b/service/privatenetworks/api_op_ListTagsForResource.go new file mode 100644 index 00000000000..cdadf4c2c4e --- /dev/null +++ b/service/privatenetworks/api_op_ListTagsForResource.go @@ -0,0 +1,120 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the tags for the specified resource. +func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { + if params == nil { + params = &ListTagsForResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTagsForResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListTagsForResourceInput struct { + + // The Amazon Resource Name (ARN) of the resource. + // + // This member is required. + ResourceArn *string + + noSmithyDocumentSerde +} + +type ListTagsForResourceOutput struct { + + // The resource tags. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "private-networks", + OperationName: "ListTagsForResource", + } +} diff --git a/service/privatenetworks/api_op_Ping.go b/service/privatenetworks/api_op_Ping.go new file mode 100644 index 00000000000..a270dd50a25 --- /dev/null +++ b/service/privatenetworks/api_op_Ping.go @@ -0,0 +1,111 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Checks the health of the service. +func (c *Client) Ping(ctx context.Context, params *PingInput, optFns ...func(*Options)) (*PingOutput, error) { + if params == nil { + params = &PingInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "Ping", params, optFns, c.addOperationPingMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PingOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PingInput struct { + noSmithyDocumentSerde +} + +type PingOutput struct { + + // Information about the health of the service. + Status *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPingMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpPing{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPing{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPing(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPing(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "private-networks", + OperationName: "Ping", + } +} diff --git a/service/privatenetworks/api_op_TagResource.go b/service/privatenetworks/api_op_TagResource.go new file mode 100644 index 00000000000..c012f5f4fe5 --- /dev/null +++ b/service/privatenetworks/api_op_TagResource.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds tags to the specified resource. +func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { + if params == nil { + params = &TagResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TagResourceInput struct { + + // The Amazon Resource Name (ARN) of the resource. + // + // This member is required. + ResourceArn *string + + // The tags to add to the resource. + // + // This member is required. + Tags map[string]string + + noSmithyDocumentSerde +} + +type TagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpTagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "private-networks", + OperationName: "TagResource", + } +} diff --git a/service/privatenetworks/api_op_UntagResource.go b/service/privatenetworks/api_op_UntagResource.go new file mode 100644 index 00000000000..9bf07fcc36b --- /dev/null +++ b/service/privatenetworks/api_op_UntagResource.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes tags from the specified resource. +func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { + if params == nil { + params = &UntagResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UntagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UntagResourceInput struct { + + // The Amazon Resource Name (ARN) of the resource. + // + // This member is required. + ResourceArn *string + + // The tag keys. + // + // This member is required. + TagKeys []string + + noSmithyDocumentSerde +} + +type UntagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUntagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "private-networks", + OperationName: "UntagResource", + } +} diff --git a/service/privatenetworks/api_op_UpdateNetworkSite.go b/service/privatenetworks/api_op_UpdateNetworkSite.go new file mode 100644 index 00000000000..0f6eb79f7c5 --- /dev/null +++ b/service/privatenetworks/api_op_UpdateNetworkSite.go @@ -0,0 +1,132 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/privatenetworks/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the specified network site. +func (c *Client) UpdateNetworkSite(ctx context.Context, params *UpdateNetworkSiteInput, optFns ...func(*Options)) (*UpdateNetworkSiteOutput, error) { + if params == nil { + params = &UpdateNetworkSiteInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateNetworkSite", params, optFns, c.addOperationUpdateNetworkSiteMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateNetworkSiteOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateNetworkSiteInput struct { + + // The Amazon Resource Name (ARN) of the network site. + // + // This member is required. + NetworkSiteArn *string + + // Unique, case-sensitive identifier that you provide to ensure the idempotency of + // the request. For more information, see How to ensure idempotency + // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). + ClientToken *string + + // The description. + Description *string + + noSmithyDocumentSerde +} + +type UpdateNetworkSiteOutput struct { + + // Information about the network site. + NetworkSite *types.NetworkSite + + // The network site tags. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateNetworkSiteMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateNetworkSite{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateNetworkSite{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateNetworkSiteValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateNetworkSite(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateNetworkSite(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "private-networks", + OperationName: "UpdateNetworkSite", + } +} diff --git a/service/privatenetworks/api_op_UpdateNetworkSitePlan.go b/service/privatenetworks/api_op_UpdateNetworkSitePlan.go new file mode 100644 index 00000000000..515bbfcc2f1 --- /dev/null +++ b/service/privatenetworks/api_op_UpdateNetworkSitePlan.go @@ -0,0 +1,134 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/privatenetworks/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the specified network site plan. +func (c *Client) UpdateNetworkSitePlan(ctx context.Context, params *UpdateNetworkSitePlanInput, optFns ...func(*Options)) (*UpdateNetworkSitePlanOutput, error) { + if params == nil { + params = &UpdateNetworkSitePlanInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateNetworkSitePlan", params, optFns, c.addOperationUpdateNetworkSitePlanMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateNetworkSitePlanOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateNetworkSitePlanInput struct { + + // The Amazon Resource Name (ARN) of the network site. + // + // This member is required. + NetworkSiteArn *string + + // The pending plan. + // + // This member is required. + PendingPlan *types.SitePlan + + // Unique, case-sensitive identifier that you provide to ensure the idempotency of + // the request. For more information, see How to ensure idempotency + // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). + ClientToken *string + + noSmithyDocumentSerde +} + +type UpdateNetworkSitePlanOutput struct { + + // Information about the network site. + NetworkSite *types.NetworkSite + + // The network site tags. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateNetworkSitePlanMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateNetworkSitePlan{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateNetworkSitePlan{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateNetworkSitePlanValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateNetworkSitePlan(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateNetworkSitePlan(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "private-networks", + OperationName: "UpdateNetworkSitePlan", + } +} diff --git a/service/privatenetworks/deserializers.go b/service/privatenetworks/deserializers.go new file mode 100644 index 00000000000..f157ff4b277 --- /dev/null +++ b/service/privatenetworks/deserializers.go @@ -0,0 +1,5819 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/privatenetworks/types" + smithy "github.com/aws/smithy-go" + smithyio "github.com/aws/smithy-go/io" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" + "math" + "strconv" + "strings" +) + +type awsRestjson1_deserializeOpAcknowledgeOrderReceipt struct { +} + +func (*awsRestjson1_deserializeOpAcknowledgeOrderReceipt) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpAcknowledgeOrderReceipt) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorAcknowledgeOrderReceipt(response, &metadata) + } + output := &AcknowledgeOrderReceiptOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentAcknowledgeOrderReceiptOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorAcknowledgeOrderReceipt(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentAcknowledgeOrderReceiptOutput(v **AcknowledgeOrderReceiptOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *AcknowledgeOrderReceiptOutput + if *v == nil { + sv = &AcknowledgeOrderReceiptOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "order": + if err := awsRestjson1_deserializeDocumentOrder(&sv.Order, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpActivateDeviceIdentifier struct { +} + +func (*awsRestjson1_deserializeOpActivateDeviceIdentifier) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpActivateDeviceIdentifier) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorActivateDeviceIdentifier(response, &metadata) + } + output := &ActivateDeviceIdentifierOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentActivateDeviceIdentifierOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorActivateDeviceIdentifier(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentActivateDeviceIdentifierOutput(v **ActivateDeviceIdentifierOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ActivateDeviceIdentifierOutput + if *v == nil { + sv = &ActivateDeviceIdentifierOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "deviceIdentifier": + if err := awsRestjson1_deserializeDocumentDeviceIdentifier(&sv.DeviceIdentifier, value); err != nil { + return err + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpActivateNetworkSite struct { +} + +func (*awsRestjson1_deserializeOpActivateNetworkSite) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpActivateNetworkSite) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorActivateNetworkSite(response, &metadata) + } + output := &ActivateNetworkSiteOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentActivateNetworkSiteOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorActivateNetworkSite(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentActivateNetworkSiteOutput(v **ActivateNetworkSiteOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ActivateNetworkSiteOutput + if *v == nil { + sv = &ActivateNetworkSiteOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "networkSite": + if err := awsRestjson1_deserializeDocumentNetworkSite(&sv.NetworkSite, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpConfigureAccessPoint struct { +} + +func (*awsRestjson1_deserializeOpConfigureAccessPoint) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpConfigureAccessPoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorConfigureAccessPoint(response, &metadata) + } + output := &ConfigureAccessPointOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentConfigureAccessPointOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorConfigureAccessPoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentConfigureAccessPointOutput(v **ConfigureAccessPointOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ConfigureAccessPointOutput + if *v == nil { + sv = &ConfigureAccessPointOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accessPoint": + if err := awsRestjson1_deserializeDocumentNetworkResource(&sv.AccessPoint, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateNetwork struct { +} + +func (*awsRestjson1_deserializeOpCreateNetwork) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateNetwork) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCreateNetwork(response, &metadata) + } + output := &CreateNetworkOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCreateNetworkOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateNetwork(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateNetworkOutput(v **CreateNetworkOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateNetworkOutput + if *v == nil { + sv = &CreateNetworkOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "network": + if err := awsRestjson1_deserializeDocumentNetwork(&sv.Network, value); err != nil { + return err + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateNetworkSite struct { +} + +func (*awsRestjson1_deserializeOpCreateNetworkSite) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateNetworkSite) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCreateNetworkSite(response, &metadata) + } + output := &CreateNetworkSiteOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCreateNetworkSiteOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateNetworkSite(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateNetworkSiteOutput(v **CreateNetworkSiteOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateNetworkSiteOutput + if *v == nil { + sv = &CreateNetworkSiteOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "networkSite": + if err := awsRestjson1_deserializeDocumentNetworkSite(&sv.NetworkSite, value); err != nil { + return err + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeactivateDeviceIdentifier struct { +} + +func (*awsRestjson1_deserializeOpDeactivateDeviceIdentifier) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeactivateDeviceIdentifier) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeactivateDeviceIdentifier(response, &metadata) + } + output := &DeactivateDeviceIdentifierOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDeactivateDeviceIdentifierOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeactivateDeviceIdentifier(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDeactivateDeviceIdentifierOutput(v **DeactivateDeviceIdentifierOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeactivateDeviceIdentifierOutput + if *v == nil { + sv = &DeactivateDeviceIdentifierOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "deviceIdentifier": + if err := awsRestjson1_deserializeDocumentDeviceIdentifier(&sv.DeviceIdentifier, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteNetwork struct { +} + +func (*awsRestjson1_deserializeOpDeleteNetwork) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteNetwork) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteNetwork(response, &metadata) + } + output := &DeleteNetworkOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDeleteNetworkOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteNetwork(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDeleteNetworkOutput(v **DeleteNetworkOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteNetworkOutput + if *v == nil { + sv = &DeleteNetworkOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "network": + if err := awsRestjson1_deserializeDocumentNetwork(&sv.Network, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteNetworkSite struct { +} + +func (*awsRestjson1_deserializeOpDeleteNetworkSite) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteNetworkSite) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteNetworkSite(response, &metadata) + } + output := &DeleteNetworkSiteOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDeleteNetworkSiteOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteNetworkSite(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDeleteNetworkSiteOutput(v **DeleteNetworkSiteOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteNetworkSiteOutput + if *v == nil { + sv = &DeleteNetworkSiteOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "networkSite": + if err := awsRestjson1_deserializeDocumentNetworkSite(&sv.NetworkSite, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetDeviceIdentifier struct { +} + +func (*awsRestjson1_deserializeOpGetDeviceIdentifier) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetDeviceIdentifier) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetDeviceIdentifier(response, &metadata) + } + output := &GetDeviceIdentifierOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetDeviceIdentifierOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetDeviceIdentifier(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetDeviceIdentifierOutput(v **GetDeviceIdentifierOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetDeviceIdentifierOutput + if *v == nil { + sv = &GetDeviceIdentifierOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "deviceIdentifier": + if err := awsRestjson1_deserializeDocumentDeviceIdentifier(&sv.DeviceIdentifier, value); err != nil { + return err + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetNetwork struct { +} + +func (*awsRestjson1_deserializeOpGetNetwork) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetNetwork) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetNetwork(response, &metadata) + } + output := &GetNetworkOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetNetworkOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetNetwork(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetNetworkOutput(v **GetNetworkOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetNetworkOutput + if *v == nil { + sv = &GetNetworkOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "network": + if err := awsRestjson1_deserializeDocumentNetwork(&sv.Network, value); err != nil { + return err + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetNetworkResource struct { +} + +func (*awsRestjson1_deserializeOpGetNetworkResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetNetworkResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetNetworkResource(response, &metadata) + } + output := &GetNetworkResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetNetworkResourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetNetworkResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetNetworkResourceOutput(v **GetNetworkResourceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetNetworkResourceOutput + if *v == nil { + sv = &GetNetworkResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "networkResource": + if err := awsRestjson1_deserializeDocumentNetworkResource(&sv.NetworkResource, value); err != nil { + return err + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetNetworkSite struct { +} + +func (*awsRestjson1_deserializeOpGetNetworkSite) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetNetworkSite) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetNetworkSite(response, &metadata) + } + output := &GetNetworkSiteOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetNetworkSiteOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetNetworkSite(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetNetworkSiteOutput(v **GetNetworkSiteOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetNetworkSiteOutput + if *v == nil { + sv = &GetNetworkSiteOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "networkSite": + if err := awsRestjson1_deserializeDocumentNetworkSite(&sv.NetworkSite, value); err != nil { + return err + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetOrder struct { +} + +func (*awsRestjson1_deserializeOpGetOrder) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetOrder) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetOrder(response, &metadata) + } + output := &GetOrderOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetOrderOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetOrder(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetOrderOutput(v **GetOrderOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetOrderOutput + if *v == nil { + sv = &GetOrderOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "order": + if err := awsRestjson1_deserializeDocumentOrder(&sv.Order, value); err != nil { + return err + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListDeviceIdentifiers struct { +} + +func (*awsRestjson1_deserializeOpListDeviceIdentifiers) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListDeviceIdentifiers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListDeviceIdentifiers(response, &metadata) + } + output := &ListDeviceIdentifiersOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListDeviceIdentifiersOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListDeviceIdentifiers(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListDeviceIdentifiersOutput(v **ListDeviceIdentifiersOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListDeviceIdentifiersOutput + if *v == nil { + sv = &ListDeviceIdentifiersOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "deviceIdentifiers": + if err := awsRestjson1_deserializeDocumentDeviceIdentifierList(&sv.DeviceIdentifiers, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListNetworkResources struct { +} + +func (*awsRestjson1_deserializeOpListNetworkResources) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListNetworkResources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListNetworkResources(response, &metadata) + } + output := &ListNetworkResourcesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListNetworkResourcesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListNetworkResources(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListNetworkResourcesOutput(v **ListNetworkResourcesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListNetworkResourcesOutput + if *v == nil { + sv = &ListNetworkResourcesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "networkResources": + if err := awsRestjson1_deserializeDocumentNetworkResourceList(&sv.NetworkResources, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListNetworks struct { +} + +func (*awsRestjson1_deserializeOpListNetworks) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListNetworks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListNetworks(response, &metadata) + } + output := &ListNetworksOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListNetworksOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListNetworks(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListNetworksOutput(v **ListNetworksOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListNetworksOutput + if *v == nil { + sv = &ListNetworksOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "networks": + if err := awsRestjson1_deserializeDocumentNetworkList(&sv.Networks, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListNetworkSites struct { +} + +func (*awsRestjson1_deserializeOpListNetworkSites) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListNetworkSites) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListNetworkSites(response, &metadata) + } + output := &ListNetworkSitesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListNetworkSitesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListNetworkSites(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListNetworkSitesOutput(v **ListNetworkSitesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListNetworkSitesOutput + if *v == nil { + sv = &ListNetworkSitesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "networkSites": + if err := awsRestjson1_deserializeDocumentNetworkSiteList(&sv.NetworkSites, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListOrders struct { +} + +func (*awsRestjson1_deserializeOpListOrders) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListOrders) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListOrders(response, &metadata) + } + output := &ListOrdersOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListOrdersOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListOrders(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListOrdersOutput(v **ListOrdersOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListOrdersOutput + if *v == nil { + sv = &ListOrdersOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "orders": + if err := awsRestjson1_deserializeDocumentOrderList(&sv.Orders, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListTagsForResource struct { +} + +func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) + } + output := &ListTagsForResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListTagsForResourceOutput + if *v == nil { + sv = &ListTagsForResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPing struct { +} + +func (*awsRestjson1_deserializeOpPing) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPing) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorPing(response, &metadata) + } + output := &PingOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentPingOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorPing(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentPingOutput(v **PingOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PingOutput + if *v == nil { + sv = &PingOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Status = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpTagResource struct { +} + +func (*awsRestjson1_deserializeOpTagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) + } + output := &TagResourceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUntagResource struct { +} + +func (*awsRestjson1_deserializeOpUntagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) + } + output := &UntagResourceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUpdateNetworkSite struct { +} + +func (*awsRestjson1_deserializeOpUpdateNetworkSite) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateNetworkSite) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateNetworkSite(response, &metadata) + } + output := &UpdateNetworkSiteOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateNetworkSiteOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateNetworkSite(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateNetworkSiteOutput(v **UpdateNetworkSiteOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateNetworkSiteOutput + if *v == nil { + sv = &UpdateNetworkSiteOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "networkSite": + if err := awsRestjson1_deserializeDocumentNetworkSite(&sv.NetworkSite, value); err != nil { + return err + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateNetworkSitePlan struct { +} + +func (*awsRestjson1_deserializeOpUpdateNetworkSitePlan) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateNetworkSitePlan) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateNetworkSitePlan(response, &metadata) + } + output := &UpdateNetworkSitePlanOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateNetworkSitePlanOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateNetworkSitePlan(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateNetworkSitePlanOutput(v **UpdateNetworkSitePlanOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateNetworkSitePlanOutput + if *v == nil { + sv = &UpdateNetworkSitePlanOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "networkSite": + if err := awsRestjson1_deserializeDocumentNetworkSite(&sv.NetworkSite, value); err != nil { + return err + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeOpHttpBindingsInternalServerException(v *types.InternalServerException, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("Retry-After"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + vv, err := strconv.ParseInt(headerValues[0], 0, 32) + if err != nil { + return err + } + v.RetryAfterSeconds = ptr.Int32(int32(vv)) + } + + return nil +} +func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessDeniedException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InternalServerException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + if err := awsRestjson1_deserializeOpHttpBindingsInternalServerException(output, response); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response error with invalid HTTP bindings, %w", err)} + } + + return output +} + +func awsRestjson1_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.LimitExceededException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentLimitExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceNotFoundException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ThrottlingException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentThrottlingException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ValidationException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentValidationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAddress(v **types.Address, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Address + if *v == nil { + sv = &types.Address{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "city": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressContent to be of type string, got %T instead", value) + } + sv.City = ptr.String(jtv) + } + + case "company": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressContent to be of type string, got %T instead", value) + } + sv.Company = ptr.String(jtv) + } + + case "country": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressContent to be of type string, got %T instead", value) + } + sv.Country = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressContent to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "phoneNumber": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressContent to be of type string, got %T instead", value) + } + sv.PhoneNumber = ptr.String(jtv) + } + + case "postalCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressContent to be of type string, got %T instead", value) + } + sv.PostalCode = ptr.String(jtv) + } + + case "stateOrProvince": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressContent to be of type string, got %T instead", value) + } + sv.StateOrProvince = ptr.String(jtv) + } + + case "street1": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressContent to be of type string, got %T instead", value) + } + sv.Street1 = ptr.String(jtv) + } + + case "street2": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressContent to be of type string, got %T instead", value) + } + sv.Street2 = ptr.String(jtv) + } + + case "street3": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressContent to be of type string, got %T instead", value) + } + sv.Street3 = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDeviceIdentifier(v **types.DeviceIdentifier, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DeviceIdentifier + if *v == nil { + sv = &types.DeviceIdentifier{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "deviceIdentifierArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.DeviceIdentifierArn = ptr.String(jtv) + } + + case "iccid": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Iccid = ptr.String(jtv) + } + + case "imsi": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) + } + sv.Imsi = ptr.String(jtv) + } + + case "networkArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.NetworkArn = ptr.String(jtv) + } + + case "orderArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.OrderArn = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeviceIdentifierStatus to be of type string, got %T instead", value) + } + sv.Status = types.DeviceIdentifierStatus(jtv) + } + + case "trafficGroupArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.TrafficGroupArn = ptr.String(jtv) + } + + case "vendor": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Vendor = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDeviceIdentifierList(v *[]types.DeviceIdentifier, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.DeviceIdentifier + if *v == nil { + cv = []types.DeviceIdentifier{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DeviceIdentifier + destAddr := &col + if err := awsRestjson1_deserializeDocumentDeviceIdentifier(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InternalServerException + if *v == nil { + sv = &types.InternalServerException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "retryAfterSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RetryAfterSeconds = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentLimitExceededException(v **types.LimitExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LimitExceededException + if *v == nil { + sv = &types.LimitExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentNameValuePair(v **types.NameValuePair, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.NameValuePair + if *v == nil { + sv = &types.NameValuePair{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentNameValuePairs(v *[]types.NameValuePair, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.NameValuePair + if *v == nil { + cv = []types.NameValuePair{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.NameValuePair + destAddr := &col + if err := awsRestjson1_deserializeDocumentNameValuePair(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentNetwork(v **types.Network, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Network + if *v == nil { + sv = &types.Network{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "networkArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.NetworkArn = ptr.String(jtv) + } + + case "networkName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.NetworkName = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NetworkStatus to be of type string, got %T instead", value) + } + sv.Status = types.NetworkStatus(jtv) + } + + case "statusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StatusReason = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentNetworkList(v *[]types.Network, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Network + if *v == nil { + cv = []types.Network{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Network + destAddr := &col + if err := awsRestjson1_deserializeDocumentNetwork(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentNetworkResource(v **types.NetworkResource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.NetworkResource + if *v == nil { + sv = &types.NetworkResource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "attributes": + if err := awsRestjson1_deserializeDocumentNameValuePairs(&sv.Attributes, value); err != nil { + return err + } + + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "health": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected HealthStatus to be of type string, got %T instead", value) + } + sv.Health = types.HealthStatus(jtv) + } + + case "model": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Model = ptr.String(jtv) + } + + case "networkArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.NetworkArn = ptr.String(jtv) + } + + case "networkResourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.NetworkResourceArn = ptr.String(jtv) + } + + case "networkSiteArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.NetworkSiteArn = ptr.String(jtv) + } + + case "orderArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.OrderArn = ptr.String(jtv) + } + + case "position": + if err := awsRestjson1_deserializeDocumentPosition(&sv.Position, value); err != nil { + return err + } + + case "serialNumber": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.SerialNumber = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NetworkResourceStatus to be of type string, got %T instead", value) + } + sv.Status = types.NetworkResourceStatus(jtv) + } + + case "statusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StatusReason = ptr.String(jtv) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NetworkResourceType to be of type string, got %T instead", value) + } + sv.Type = types.NetworkResourceType(jtv) + } + + case "vendor": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Vendor = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentNetworkResourceDefinition(v **types.NetworkResourceDefinition, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.NetworkResourceDefinition + if *v == nil { + sv = &types.NetworkResourceDefinition{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "count": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Count = ptr.Int32(int32(i64)) + } + + case "options": + if err := awsRestjson1_deserializeDocumentOptions(&sv.Options, value); err != nil { + return err + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NetworkResourceDefinitionType to be of type string, got %T instead", value) + } + sv.Type = types.NetworkResourceDefinitionType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentNetworkResourceDefinitions(v *[]types.NetworkResourceDefinition, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.NetworkResourceDefinition + if *v == nil { + cv = []types.NetworkResourceDefinition{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.NetworkResourceDefinition + destAddr := &col + if err := awsRestjson1_deserializeDocumentNetworkResourceDefinition(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentNetworkResourceList(v *[]types.NetworkResource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.NetworkResource + if *v == nil { + cv = []types.NetworkResource{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.NetworkResource + destAddr := &col + if err := awsRestjson1_deserializeDocumentNetworkResource(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentNetworkSite(v **types.NetworkSite, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.NetworkSite + if *v == nil { + sv = &types.NetworkSite{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "availabilityZone": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.AvailabilityZone = ptr.String(jtv) + } + + case "availabilityZoneId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.AvailabilityZoneId = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "currentPlan": + if err := awsRestjson1_deserializeDocumentSitePlan(&sv.CurrentPlan, value); err != nil { + return err + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "networkArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.NetworkArn = ptr.String(jtv) + } + + case "networkSiteArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.NetworkSiteArn = ptr.String(jtv) + } + + case "networkSiteName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.NetworkSiteName = ptr.String(jtv) + } + + case "pendingPlan": + if err := awsRestjson1_deserializeDocumentSitePlan(&sv.PendingPlan, value); err != nil { + return err + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NetworkSiteStatus to be of type string, got %T instead", value) + } + sv.Status = types.NetworkSiteStatus(jtv) + } + + case "statusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StatusReason = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentNetworkSiteList(v *[]types.NetworkSite, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.NetworkSite + if *v == nil { + cv = []types.NetworkSite{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.NetworkSite + destAddr := &col + if err := awsRestjson1_deserializeDocumentNetworkSite(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentOptions(v *[]types.NameValuePair, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.NameValuePair + if *v == nil { + cv = []types.NameValuePair{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.NameValuePair + destAddr := &col + if err := awsRestjson1_deserializeDocumentNameValuePair(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentOrder(v **types.Order, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Order + if *v == nil { + sv = &types.Order{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "acknowledgmentStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AcknowledgmentStatus to be of type string, got %T instead", value) + } + sv.AcknowledgmentStatus = types.AcknowledgmentStatus(jtv) + } + + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "networkArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.NetworkArn = ptr.String(jtv) + } + + case "networkSiteArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.NetworkSiteArn = ptr.String(jtv) + } + + case "orderArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.OrderArn = ptr.String(jtv) + } + + case "shippingAddress": + if err := awsRestjson1_deserializeDocumentAddress(&sv.ShippingAddress, value); err != nil { + return err + } + + case "trackingInformation": + if err := awsRestjson1_deserializeDocumentTrackingInformationList(&sv.TrackingInformation, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentOrderList(v *[]types.Order, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Order + if *v == nil { + cv = []types.Order{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Order + destAddr := &col + if err := awsRestjson1_deserializeDocumentOrder(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentPosition(v **types.Position, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Position + if *v == nil { + sv = &types.Position{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "elevation": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Elevation = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Elevation = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + case "elevationReference": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ElevationReference to be of type string, got %T instead", value) + } + sv.ElevationReference = types.ElevationReference(jtv) + } + + case "elevationUnit": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ElevationUnit to be of type string, got %T instead", value) + } + sv.ElevationUnit = types.ElevationUnit(jtv) + } + + case "latitude": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Latitude = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Latitude = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + case "longitude": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Longitude = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Longitude = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceNotFoundException + if *v == nil { + sv = &types.ResourceNotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "resourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceId = ptr.String(jtv) + } + + case "resourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSitePlan(v **types.SitePlan, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SitePlan + if *v == nil { + sv = &types.SitePlan{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "options": + if err := awsRestjson1_deserializeDocumentOptions(&sv.Options, value); err != nil { + return err + } + + case "resourceDefinitions": + if err := awsRestjson1_deserializeDocumentNetworkResourceDefinitions(&sv.ResourceDefinitions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentTagMap(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ThrottlingException + if *v == nil { + sv = &types.ThrottlingException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentTrackingInformation(v **types.TrackingInformation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.TrackingInformation + if *v == nil { + sv = &types.TrackingInformation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "trackingNumber": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.TrackingNumber = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentTrackingInformationList(v *[]types.TrackingInformation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.TrackingInformation + if *v == nil { + cv = []types.TrackingInformation{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.TrackingInformation + destAddr := &col + if err := awsRestjson1_deserializeDocumentTrackingInformation(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentValidationException(v **types.ValidationException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ValidationException + if *v == nil { + sv = &types.ValidationException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "fieldList": + if err := awsRestjson1_deserializeDocumentValidationExceptionFieldList(&sv.FieldList, value); err != nil { + return err + } + + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "reason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ValidationExceptionReason to be of type string, got %T instead", value) + } + sv.Reason = types.ValidationExceptionReason(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentValidationExceptionField(v **types.ValidationExceptionField, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ValidationExceptionField + if *v == nil { + sv = &types.ValidationExceptionField{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentValidationExceptionFieldList(v *[]types.ValidationExceptionField, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ValidationExceptionField + if *v == nil { + cv = []types.ValidationExceptionField{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ValidationExceptionField + destAddr := &col + if err := awsRestjson1_deserializeDocumentValidationExceptionField(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} diff --git a/service/privatenetworks/doc.go b/service/privatenetworks/doc.go new file mode 100644 index 00000000000..a2031859ab3 --- /dev/null +++ b/service/privatenetworks/doc.go @@ -0,0 +1,11 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package privatenetworks provides the API client, operations, and parameter types +// for AWS Private 5G. +// +// Amazon Web Services Private 5G is a managed service that makes it easy to +// deploy, operate, and scale your own private mobile network at your on-premises +// location. Private 5G provides the pre-configured hardware and software for +// mobile networks, helps automate setup, and scales capacity on demand to support +// additional devices as needed. +package privatenetworks diff --git a/service/privatenetworks/endpoints.go b/service/privatenetworks/endpoints.go new file mode 100644 index 00000000000..1c8f27463e2 --- /dev/null +++ b/service/privatenetworks/endpoints.go @@ -0,0 +1,200 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + internalendpoints "github.com/aws/aws-sdk-go-v2/service/privatenetworks/internal/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/url" + "strings" +) + +// EndpointResolverOptions is the service endpoint resolver options +type EndpointResolverOptions = internalendpoints.Options + +// EndpointResolver interface for resolving service endpoints. +type EndpointResolver interface { + ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) +} + +var _ EndpointResolver = &internalendpoints.Resolver{} + +// NewDefaultEndpointResolver constructs a new service endpoint resolver +func NewDefaultEndpointResolver() *internalendpoints.Resolver { + return internalendpoints.New() +} + +// EndpointResolverFunc is a helper utility that wraps a function so it satisfies +// the EndpointResolver interface. This is useful when you want to add additional +// endpoint resolving logic, or stub out specific endpoints with custom values. +type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) + +func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + return fn(region, options) +} + +func resolveDefaultEndpointConfiguration(o *Options) { + if o.EndpointResolver != nil { + return + } + o.EndpointResolver = NewDefaultEndpointResolver() +} + +// EndpointResolverFromURL returns an EndpointResolver configured using the +// provided endpoint url. By default, the resolved endpoint resolver uses the +// client region as signing region, and the endpoint source is set to +// EndpointSourceCustom.You can provide functional options to configure endpoint +// values for the resolved endpoint. +func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { + e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} + for _, fn := range optFns { + fn(&e) + } + + return EndpointResolverFunc( + func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { + if len(e.SigningRegion) == 0 { + e.SigningRegion = region + } + return e, nil + }, + ) +} + +type ResolveEndpoint struct { + Resolver EndpointResolver + Options EndpointResolverOptions +} + +func (*ResolveEndpoint) ID() string { + return "ResolveEndpoint" +} + +func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.Resolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + eo := m.Options + eo.Logger = middleware.GetLogger(ctx) + + var endpoint aws.Endpoint + endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL, err = url.Parse(endpoint.URL) + if err != nil { + return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) + } + + if len(awsmiddleware.GetSigningName(ctx)) == 0 { + signingName := endpoint.SigningName + if len(signingName) == 0 { + signingName = "private-networks" + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + } + ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) + ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) + ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) + ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) + return next.HandleSerialize(ctx, in) +} +func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { + return stack.Serialize.Insert(&ResolveEndpoint{ + Resolver: o.EndpointResolver, + Options: o.EndpointOptions, + }, "OperationSerializer", middleware.Before) +} + +func removeResolveEndpointMiddleware(stack *middleware.Stack) error { + _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) + return err +} + +type wrappedEndpointResolver struct { + awsResolver aws.EndpointResolverWithOptions + resolver EndpointResolver +} + +func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + if w.awsResolver == nil { + goto fallback + } + endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options) + if err == nil { + return endpoint, nil + } + + if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) { + return endpoint, err + } + +fallback: + if w.resolver == nil { + return endpoint, fmt.Errorf("default endpoint resolver provided was nil") + } + return w.resolver.ResolveEndpoint(region, options) +} + +type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) + +func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { + return a(service, region) +} + +var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) + +// withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver. +// If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided +// fallbackResolver for resolution. +// +// fallbackResolver must not be nil +func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver { + var resolver aws.EndpointResolverWithOptions + + if awsResolverWithOptions != nil { + resolver = awsResolverWithOptions + } else if awsResolver != nil { + resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) + } + + return &wrappedEndpointResolver{ + awsResolver: resolver, + resolver: fallbackResolver, + } +} + +func finalizeClientEndpointResolverOptions(options *Options) { + options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() + + if len(options.EndpointOptions.ResolvedRegion) == 0 { + const fipsInfix = "-fips-" + const fipsPrefix = "fips-" + const fipsSuffix = "-fips" + + if strings.Contains(options.Region, fipsInfix) || + strings.Contains(options.Region, fipsPrefix) || + strings.Contains(options.Region, fipsSuffix) { + options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( + options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") + options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled + } + } + +} diff --git a/service/privatenetworks/generated.json b/service/privatenetworks/generated.json new file mode 100644 index 00000000000..c0592af0b1d --- /dev/null +++ b/service/privatenetworks/generated.json @@ -0,0 +1,52 @@ +{ + "dependencies": { + "github.com/aws/aws-sdk-go-v2": "v1.4.0", + "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", + "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", + "github.com/aws/smithy-go": "v1.4.0" + }, + "files": [ + "api_client.go", + "api_client_test.go", + "api_op_AcknowledgeOrderReceipt.go", + "api_op_ActivateDeviceIdentifier.go", + "api_op_ActivateNetworkSite.go", + "api_op_ConfigureAccessPoint.go", + "api_op_CreateNetwork.go", + "api_op_CreateNetworkSite.go", + "api_op_DeactivateDeviceIdentifier.go", + "api_op_DeleteNetwork.go", + "api_op_DeleteNetworkSite.go", + "api_op_GetDeviceIdentifier.go", + "api_op_GetNetwork.go", + "api_op_GetNetworkResource.go", + "api_op_GetNetworkSite.go", + "api_op_GetOrder.go", + "api_op_ListDeviceIdentifiers.go", + "api_op_ListNetworkResources.go", + "api_op_ListNetworkSites.go", + "api_op_ListNetworks.go", + "api_op_ListOrders.go", + "api_op_ListTagsForResource.go", + "api_op_Ping.go", + "api_op_TagResource.go", + "api_op_UntagResource.go", + "api_op_UpdateNetworkSite.go", + "api_op_UpdateNetworkSitePlan.go", + "deserializers.go", + "doc.go", + "endpoints.go", + "generated.json", + "internal/endpoints/endpoints.go", + "internal/endpoints/endpoints_test.go", + "protocol_test.go", + "serializers.go", + "types/enums.go", + "types/errors.go", + "types/types.go", + "validators.go" + ], + "go": "1.15", + "module": "github.com/aws/aws-sdk-go-v2/service/privatenetworks", + "unstable": false +} diff --git a/service/privatenetworks/go.mod b/service/privatenetworks/go.mod new file mode 100644 index 00000000000..080959a68d7 --- /dev/null +++ b/service/privatenetworks/go.mod @@ -0,0 +1,16 @@ +module github.com/aws/aws-sdk-go-v2/service/privatenetworks + +go 1.15 + +require ( + github.com/aws/aws-sdk-go-v2 v1.16.10 + github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.17 + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.11 + github.com/aws/smithy-go v1.12.1 +) + +replace github.com/aws/aws-sdk-go-v2 => ../../ + +replace github.com/aws/aws-sdk-go-v2/internal/configsources => ../../internal/configsources/ + +replace github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 => ../../internal/endpoints/v2/ diff --git a/service/privatenetworks/go.sum b/service/privatenetworks/go.sum new file mode 100644 index 00000000000..fbab4f88502 --- /dev/null +++ b/service/privatenetworks/go.sum @@ -0,0 +1,11 @@ +github.com/aws/smithy-go v1.12.1 h1:yQRC55aXN/y1W10HgwHle01DRuV9Dpf31iGkotjt3Ag= +github.com/aws/smithy-go v1.12.1/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/service/privatenetworks/go_module_metadata.go b/service/privatenetworks/go_module_metadata.go new file mode 100644 index 00000000000..e750cbea9cd --- /dev/null +++ b/service/privatenetworks/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package privatenetworks + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "tip" diff --git a/service/privatenetworks/internal/endpoints/endpoints.go b/service/privatenetworks/internal/endpoints/endpoints.go new file mode 100644 index 00000000000..e89f58159cd --- /dev/null +++ b/service/privatenetworks/internal/endpoints/endpoints.go @@ -0,0 +1,250 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "github.com/aws/aws-sdk-go-v2/aws" + endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" + "github.com/aws/smithy-go/logging" + "regexp" +) + +// Options is the endpoint resolver configuration options +type Options struct { + // Logger is a logging implementation that log events should be sent to. + Logger logging.Logger + + // LogDeprecated indicates that deprecated endpoints should be logged to the + // provided logger. + LogDeprecated bool + + // ResolvedRegion is used to override the region to be resolved, rather then the + // using the value passed to the ResolveEndpoint method. This value is used by the + // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative + // name. You must not set this value directly in your application. + ResolvedRegion string + + // DisableHTTPS informs the resolver to return an endpoint that does not use the + // HTTPS scheme. + DisableHTTPS bool + + // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. + UseDualStackEndpoint aws.DualStackEndpointState + + // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. + UseFIPSEndpoint aws.FIPSEndpointState +} + +func (o Options) GetResolvedRegion() string { + return o.ResolvedRegion +} + +func (o Options) GetDisableHTTPS() bool { + return o.DisableHTTPS +} + +func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { + return o.UseDualStackEndpoint +} + +func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { + return o.UseFIPSEndpoint +} + +func transformToSharedOptions(options Options) endpoints.Options { + return endpoints.Options{ + Logger: options.Logger, + LogDeprecated: options.LogDeprecated, + ResolvedRegion: options.ResolvedRegion, + DisableHTTPS: options.DisableHTTPS, + UseDualStackEndpoint: options.UseDualStackEndpoint, + UseFIPSEndpoint: options.UseFIPSEndpoint, + } +} + +// Resolver PrivateNetworks endpoint resolver +type Resolver struct { + partitions endpoints.Partitions +} + +// ResolveEndpoint resolves the service endpoint for the given region and options +func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { + if len(region) == 0 { + return endpoint, &aws.MissingRegionError{} + } + + opt := transformToSharedOptions(options) + return r.partitions.ResolveEndpoint(region, opt) +} + +// New returns a new Resolver +func New() *Resolver { + return &Resolver{ + partitions: defaultPartitions, + } +} + +var partitionRegexp = struct { + Aws *regexp.Regexp + AwsCn *regexp.Regexp + AwsIso *regexp.Regexp + AwsIsoB *regexp.Regexp + AwsUsGov *regexp.Regexp +}{ + + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"), + AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), + AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), + AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), + AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), +} + +var defaultPartitions = endpoints.Partitions{ + { + ID: "aws", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "private-networks.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "private-networks-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "private-networks-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "private-networks.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.Aws, + IsRegionalized: true, + }, + { + ID: "aws-cn", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "private-networks.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "private-networks-fips.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "private-networks-fips.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "private-networks.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsCn, + IsRegionalized: true, + }, + { + ID: "aws-iso", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "private-networks-fips.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "private-networks.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIso, + IsRegionalized: true, + }, + { + ID: "aws-iso-b", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "private-networks-fips.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "private-networks.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoB, + IsRegionalized: true, + }, + { + ID: "aws-us-gov", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "private-networks.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "private-networks-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "private-networks-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "private-networks.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsUsGov, + IsRegionalized: true, + }, +} diff --git a/service/privatenetworks/internal/endpoints/endpoints_test.go b/service/privatenetworks/internal/endpoints/endpoints_test.go new file mode 100644 index 00000000000..08e5da2d833 --- /dev/null +++ b/service/privatenetworks/internal/endpoints/endpoints_test.go @@ -0,0 +1,11 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "testing" +) + +func TestRegexCompile(t *testing.T) { + _ = defaultPartitions +} diff --git a/service/privatenetworks/protocol_test.go b/service/privatenetworks/protocol_test.go new file mode 100644 index 00000000000..2fca46dbe49 --- /dev/null +++ b/service/privatenetworks/protocol_test.go @@ -0,0 +1,3 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks diff --git a/service/privatenetworks/serializers.go b/service/privatenetworks/serializers.go new file mode 100644 index 00000000000..22afd147a21 --- /dev/null +++ b/service/privatenetworks/serializers.go @@ -0,0 +1,2201 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "bytes" + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/privatenetworks/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/encoding/httpbinding" + smithyjson "github.com/aws/smithy-go/encoding/json" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "math" +) + +type awsRestjson1_serializeOpAcknowledgeOrderReceipt struct { +} + +func (*awsRestjson1_serializeOpAcknowledgeOrderReceipt) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpAcknowledgeOrderReceipt) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*AcknowledgeOrderReceiptInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/orders/acknowledge") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentAcknowledgeOrderReceiptInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsAcknowledgeOrderReceiptInput(v *AcknowledgeOrderReceiptInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentAcknowledgeOrderReceiptInput(v *AcknowledgeOrderReceiptInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.OrderArn != nil { + ok := object.Key("orderArn") + ok.String(*v.OrderArn) + } + + return nil +} + +type awsRestjson1_serializeOpActivateDeviceIdentifier struct { +} + +func (*awsRestjson1_serializeOpActivateDeviceIdentifier) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpActivateDeviceIdentifier) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ActivateDeviceIdentifierInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/device-identifiers/activate") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentActivateDeviceIdentifierInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsActivateDeviceIdentifierInput(v *ActivateDeviceIdentifierInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentActivateDeviceIdentifierInput(v *ActivateDeviceIdentifierInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.DeviceIdentifierArn != nil { + ok := object.Key("deviceIdentifierArn") + ok.String(*v.DeviceIdentifierArn) + } + + return nil +} + +type awsRestjson1_serializeOpActivateNetworkSite struct { +} + +func (*awsRestjson1_serializeOpActivateNetworkSite) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpActivateNetworkSite) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ActivateNetworkSiteInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/network-sites/activate") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentActivateNetworkSiteInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsActivateNetworkSiteInput(v *ActivateNetworkSiteInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentActivateNetworkSiteInput(v *ActivateNetworkSiteInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.NetworkSiteArn != nil { + ok := object.Key("networkSiteArn") + ok.String(*v.NetworkSiteArn) + } + + if v.ShippingAddress != nil { + ok := object.Key("shippingAddress") + if err := awsRestjson1_serializeDocumentAddress(v.ShippingAddress, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpConfigureAccessPoint struct { +} + +func (*awsRestjson1_serializeOpConfigureAccessPoint) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpConfigureAccessPoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ConfigureAccessPointInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/network-resources/configure") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentConfigureAccessPointInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsConfigureAccessPointInput(v *ConfigureAccessPointInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentConfigureAccessPointInput(v *ConfigureAccessPointInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccessPointArn != nil { + ok := object.Key("accessPointArn") + ok.String(*v.AccessPointArn) + } + + if v.CpiSecretKey != nil { + ok := object.Key("cpiSecretKey") + ok.String(*v.CpiSecretKey) + } + + if v.CpiUserId != nil { + ok := object.Key("cpiUserId") + ok.String(*v.CpiUserId) + } + + if v.CpiUsername != nil { + ok := object.Key("cpiUsername") + ok.String(*v.CpiUsername) + } + + if v.CpiUserPassword != nil { + ok := object.Key("cpiUserPassword") + ok.String(*v.CpiUserPassword) + } + + if v.Position != nil { + ok := object.Key("position") + if err := awsRestjson1_serializeDocumentPosition(v.Position, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpCreateNetwork struct { +} + +func (*awsRestjson1_serializeOpCreateNetwork) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateNetwork) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateNetworkInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/networks") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateNetworkInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateNetworkInput(v *CreateNetworkInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateNetworkInput(v *CreateNetworkInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.NetworkName != nil { + ok := object.Key("networkName") + ok.String(*v.NetworkName) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpCreateNetworkSite struct { +} + +func (*awsRestjson1_serializeOpCreateNetworkSite) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateNetworkSite) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateNetworkSiteInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/network-sites") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateNetworkSiteInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateNetworkSiteInput(v *CreateNetworkSiteInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateNetworkSiteInput(v *CreateNetworkSiteInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AvailabilityZone != nil { + ok := object.Key("availabilityZone") + ok.String(*v.AvailabilityZone) + } + + if v.AvailabilityZoneId != nil { + ok := object.Key("availabilityZoneId") + ok.String(*v.AvailabilityZoneId) + } + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.NetworkArn != nil { + ok := object.Key("networkArn") + ok.String(*v.NetworkArn) + } + + if v.NetworkSiteName != nil { + ok := object.Key("networkSiteName") + ok.String(*v.NetworkSiteName) + } + + if v.PendingPlan != nil { + ok := object.Key("pendingPlan") + if err := awsRestjson1_serializeDocumentSitePlan(v.PendingPlan, ok); err != nil { + return err + } + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeactivateDeviceIdentifier struct { +} + +func (*awsRestjson1_serializeOpDeactivateDeviceIdentifier) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeactivateDeviceIdentifier) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeactivateDeviceIdentifierInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/device-identifiers/deactivate") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentDeactivateDeviceIdentifierInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeactivateDeviceIdentifierInput(v *DeactivateDeviceIdentifierInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDeactivateDeviceIdentifierInput(v *DeactivateDeviceIdentifierInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.DeviceIdentifierArn != nil { + ok := object.Key("deviceIdentifierArn") + ok.String(*v.DeviceIdentifierArn) + } + + return nil +} + +type awsRestjson1_serializeOpDeleteNetwork struct { +} + +func (*awsRestjson1_serializeOpDeleteNetwork) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteNetwork) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteNetworkInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/networks/{networkArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteNetworkInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteNetworkInput(v *DeleteNetworkInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ClientToken != nil { + encoder.SetQuery("clientToken").String(*v.ClientToken) + } + + if v.NetworkArn == nil || len(*v.NetworkArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member networkArn must not be empty")} + } + if v.NetworkArn != nil { + if err := encoder.SetURI("networkArn").String(*v.NetworkArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteNetworkSite struct { +} + +func (*awsRestjson1_serializeOpDeleteNetworkSite) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteNetworkSite) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteNetworkSiteInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/network-sites/{networkSiteArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteNetworkSiteInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteNetworkSiteInput(v *DeleteNetworkSiteInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ClientToken != nil { + encoder.SetQuery("clientToken").String(*v.ClientToken) + } + + if v.NetworkSiteArn == nil || len(*v.NetworkSiteArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member networkSiteArn must not be empty")} + } + if v.NetworkSiteArn != nil { + if err := encoder.SetURI("networkSiteArn").String(*v.NetworkSiteArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetDeviceIdentifier struct { +} + +func (*awsRestjson1_serializeOpGetDeviceIdentifier) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetDeviceIdentifier) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetDeviceIdentifierInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/device-identifiers/{deviceIdentifierArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetDeviceIdentifierInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetDeviceIdentifierInput(v *GetDeviceIdentifierInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DeviceIdentifierArn == nil || len(*v.DeviceIdentifierArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member deviceIdentifierArn must not be empty")} + } + if v.DeviceIdentifierArn != nil { + if err := encoder.SetURI("deviceIdentifierArn").String(*v.DeviceIdentifierArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetNetwork struct { +} + +func (*awsRestjson1_serializeOpGetNetwork) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetNetwork) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetNetworkInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/networks/{networkArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetNetworkInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetNetworkInput(v *GetNetworkInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.NetworkArn == nil || len(*v.NetworkArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member networkArn must not be empty")} + } + if v.NetworkArn != nil { + if err := encoder.SetURI("networkArn").String(*v.NetworkArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetNetworkResource struct { +} + +func (*awsRestjson1_serializeOpGetNetworkResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetNetworkResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetNetworkResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/network-resources/{networkResourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetNetworkResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetNetworkResourceInput(v *GetNetworkResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.NetworkResourceArn == nil || len(*v.NetworkResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member networkResourceArn must not be empty")} + } + if v.NetworkResourceArn != nil { + if err := encoder.SetURI("networkResourceArn").String(*v.NetworkResourceArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetNetworkSite struct { +} + +func (*awsRestjson1_serializeOpGetNetworkSite) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetNetworkSite) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetNetworkSiteInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/network-sites/{networkSiteArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetNetworkSiteInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetNetworkSiteInput(v *GetNetworkSiteInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.NetworkSiteArn == nil || len(*v.NetworkSiteArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member networkSiteArn must not be empty")} + } + if v.NetworkSiteArn != nil { + if err := encoder.SetURI("networkSiteArn").String(*v.NetworkSiteArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetOrder struct { +} + +func (*awsRestjson1_serializeOpGetOrder) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetOrder) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetOrderInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/orders/{orderArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetOrderInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetOrderInput(v *GetOrderInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.OrderArn == nil || len(*v.OrderArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member orderArn must not be empty")} + } + if v.OrderArn != nil { + if err := encoder.SetURI("orderArn").String(*v.OrderArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpListDeviceIdentifiers struct { +} + +func (*awsRestjson1_serializeOpListDeviceIdentifiers) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListDeviceIdentifiers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListDeviceIdentifiersInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/device-identifiers/list") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentListDeviceIdentifiersInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListDeviceIdentifiersInput(v *ListDeviceIdentifiersInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListDeviceIdentifiersInput(v *ListDeviceIdentifiersInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("filters") + if err := awsRestjson1_serializeDocumentDeviceIdentifierFilters(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NetworkArn != nil { + ok := object.Key("networkArn") + ok.String(*v.NetworkArn) + } + + if v.StartToken != nil { + ok := object.Key("startToken") + ok.String(*v.StartToken) + } + + return nil +} + +type awsRestjson1_serializeOpListNetworkResources struct { +} + +func (*awsRestjson1_serializeOpListNetworkResources) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListNetworkResources) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListNetworkResourcesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/network-resources") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentListNetworkResourcesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListNetworkResourcesInput(v *ListNetworkResourcesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListNetworkResourcesInput(v *ListNetworkResourcesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("filters") + if err := awsRestjson1_serializeDocumentNetworkResourceFilters(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NetworkArn != nil { + ok := object.Key("networkArn") + ok.String(*v.NetworkArn) + } + + if v.StartToken != nil { + ok := object.Key("startToken") + ok.String(*v.StartToken) + } + + return nil +} + +type awsRestjson1_serializeOpListNetworks struct { +} + +func (*awsRestjson1_serializeOpListNetworks) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListNetworks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListNetworksInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/networks/list") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentListNetworksInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListNetworksInput(v *ListNetworksInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListNetworksInput(v *ListNetworksInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("filters") + if err := awsRestjson1_serializeDocumentNetworkFilters(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.StartToken != nil { + ok := object.Key("startToken") + ok.String(*v.StartToken) + } + + return nil +} + +type awsRestjson1_serializeOpListNetworkSites struct { +} + +func (*awsRestjson1_serializeOpListNetworkSites) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListNetworkSites) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListNetworkSitesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/network-sites/list") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentListNetworkSitesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListNetworkSitesInput(v *ListNetworkSitesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListNetworkSitesInput(v *ListNetworkSitesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("filters") + if err := awsRestjson1_serializeDocumentNetworkSiteFilters(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NetworkArn != nil { + ok := object.Key("networkArn") + ok.String(*v.NetworkArn) + } + + if v.StartToken != nil { + ok := object.Key("startToken") + ok.String(*v.StartToken) + } + + return nil +} + +type awsRestjson1_serializeOpListOrders struct { +} + +func (*awsRestjson1_serializeOpListOrders) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListOrders) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListOrdersInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/orders/list") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentListOrdersInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListOrdersInput(v *ListOrdersInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListOrdersInput(v *ListOrdersInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("filters") + if err := awsRestjson1_serializeDocumentOrderFilters(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NetworkArn != nil { + ok := object.Key("networkArn") + ok.String(*v.NetworkArn) + } + + if v.StartToken != nil { + ok := object.Key("startToken") + ok.String(*v.StartToken) + } + + return nil +} + +type awsRestjson1_serializeOpListTagsForResource struct { +} + +func (*awsRestjson1_serializeOpListTagsForResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListTagsForResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpPing struct { +} + +func (*awsRestjson1_serializeOpPing) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPing) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PingInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/ping") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsPingInput(v *PingInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestjson1_serializeOpTagResource struct { +} + +func (*awsRestjson1_serializeOpTagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*TagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpUntagResource struct { +} + +func (*awsRestjson1_serializeOpUntagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UntagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + if v.TagKeys != nil { + for i := range v.TagKeys { + encoder.AddQuery("tagKeys").String(v.TagKeys[i]) + } + } + + return nil +} + +type awsRestjson1_serializeOpUpdateNetworkSite struct { +} + +func (*awsRestjson1_serializeOpUpdateNetworkSite) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateNetworkSite) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateNetworkSiteInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/network-sites/site") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateNetworkSiteInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateNetworkSiteInput(v *UpdateNetworkSiteInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateNetworkSiteInput(v *UpdateNetworkSiteInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.NetworkSiteArn != nil { + ok := object.Key("networkSiteArn") + ok.String(*v.NetworkSiteArn) + } + + return nil +} + +type awsRestjson1_serializeOpUpdateNetworkSitePlan struct { +} + +func (*awsRestjson1_serializeOpUpdateNetworkSitePlan) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateNetworkSitePlan) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateNetworkSitePlanInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/network-sites/plan") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateNetworkSitePlanInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateNetworkSitePlanInput(v *UpdateNetworkSitePlanInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateNetworkSitePlanInput(v *UpdateNetworkSitePlanInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.NetworkSiteArn != nil { + ok := object.Key("networkSiteArn") + ok.String(*v.NetworkSiteArn) + } + + if v.PendingPlan != nil { + ok := object.Key("pendingPlan") + if err := awsRestjson1_serializeDocumentSitePlan(v.PendingPlan, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentAddress(v *types.Address, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.City != nil { + ok := object.Key("city") + ok.String(*v.City) + } + + if v.Company != nil { + ok := object.Key("company") + ok.String(*v.Company) + } + + if v.Country != nil { + ok := object.Key("country") + ok.String(*v.Country) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.PhoneNumber != nil { + ok := object.Key("phoneNumber") + ok.String(*v.PhoneNumber) + } + + if v.PostalCode != nil { + ok := object.Key("postalCode") + ok.String(*v.PostalCode) + } + + if v.StateOrProvince != nil { + ok := object.Key("stateOrProvince") + ok.String(*v.StateOrProvince) + } + + if v.Street1 != nil { + ok := object.Key("street1") + ok.String(*v.Street1) + } + + if v.Street2 != nil { + ok := object.Key("street2") + ok.String(*v.Street2) + } + + if v.Street3 != nil { + ok := object.Key("street3") + ok.String(*v.Street3) + } + + return nil +} + +func awsRestjson1_serializeDocumentDeviceIdentifierFilters(v map[string][]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + if vv := v[key]; vv == nil { + continue + } + if err := awsRestjson1_serializeDocumentDeviceIdentifierFilterValues(v[key], om); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentDeviceIdentifierFilterValues(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentNameValuePair(v *types.NameValuePair, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Value != nil { + ok := object.Key("value") + ok.String(*v.Value) + } + + return nil +} + +func awsRestjson1_serializeDocumentNetworkFilters(v map[string][]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + if vv := v[key]; vv == nil { + continue + } + if err := awsRestjson1_serializeDocumentNetworkFilterValues(v[key], om); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentNetworkFilterValues(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentNetworkResourceDefinition(v *types.NetworkResourceDefinition, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Count != nil { + ok := object.Key("count") + ok.Integer(*v.Count) + } + + if v.Options != nil { + ok := object.Key("options") + if err := awsRestjson1_serializeDocumentOptions(v.Options, ok); err != nil { + return err + } + } + + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + return nil +} + +func awsRestjson1_serializeDocumentNetworkResourceDefinitions(v []types.NetworkResourceDefinition, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentNetworkResourceDefinition(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentNetworkResourceFilters(v map[string][]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + if vv := v[key]; vv == nil { + continue + } + if err := awsRestjson1_serializeDocumentNetworkResourceFilterValues(v[key], om); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentNetworkResourceFilterValues(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentNetworkSiteFilters(v map[string][]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + if vv := v[key]; vv == nil { + continue + } + if err := awsRestjson1_serializeDocumentNetworkSiteFilterValues(v[key], om); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentNetworkSiteFilterValues(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentOptions(v []types.NameValuePair, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentNameValuePair(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentOrderFilters(v map[string][]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + if vv := v[key]; vv == nil { + continue + } + if err := awsRestjson1_serializeDocumentOrderFilterValues(v[key], om); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentOrderFilterValues(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentPosition(v *types.Position, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Elevation != nil { + ok := object.Key("elevation") + switch { + case math.IsNaN(*v.Elevation): + ok.String("NaN") + + case math.IsInf(*v.Elevation, 1): + ok.String("Infinity") + + case math.IsInf(*v.Elevation, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.Elevation) + + } + } + + if len(v.ElevationReference) > 0 { + ok := object.Key("elevationReference") + ok.String(string(v.ElevationReference)) + } + + if len(v.ElevationUnit) > 0 { + ok := object.Key("elevationUnit") + ok.String(string(v.ElevationUnit)) + } + + if v.Latitude != nil { + ok := object.Key("latitude") + switch { + case math.IsNaN(*v.Latitude): + ok.String("NaN") + + case math.IsInf(*v.Latitude, 1): + ok.String("Infinity") + + case math.IsInf(*v.Latitude, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.Latitude) + + } + } + + if v.Longitude != nil { + ok := object.Key("longitude") + switch { + case math.IsNaN(*v.Longitude): + ok.String("NaN") + + case math.IsInf(*v.Longitude, 1): + ok.String("Infinity") + + case math.IsInf(*v.Longitude, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.Longitude) + + } + } + + return nil +} + +func awsRestjson1_serializeDocumentSitePlan(v *types.SitePlan, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Options != nil { + ok := object.Key("options") + if err := awsRestjson1_serializeDocumentOptions(v.Options, ok); err != nil { + return err + } + } + + if v.ResourceDefinitions != nil { + ok := object.Key("resourceDefinitions") + if err := awsRestjson1_serializeDocumentNetworkResourceDefinitions(v.ResourceDefinitions, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentTagMap(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} diff --git a/service/privatenetworks/types/enums.go b/service/privatenetworks/types/enums.go new file mode 100644 index 00000000000..9c45b6b1dc6 --- /dev/null +++ b/service/privatenetworks/types/enums.go @@ -0,0 +1,321 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type AcknowledgmentStatus string + +// Enum values for AcknowledgmentStatus +const ( + AcknowledgmentStatusAcknowledging AcknowledgmentStatus = "ACKNOWLEDGING" + AcknowledgmentStatusAcknowledged AcknowledgmentStatus = "ACKNOWLEDGED" + AcknowledgmentStatusUnacknowledged AcknowledgmentStatus = "UNACKNOWLEDGED" +) + +// Values returns all known values for AcknowledgmentStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (AcknowledgmentStatus) Values() []AcknowledgmentStatus { + return []AcknowledgmentStatus{ + "ACKNOWLEDGING", + "ACKNOWLEDGED", + "UNACKNOWLEDGED", + } +} + +type DeviceIdentifierFilterKeys string + +// Enum values for DeviceIdentifierFilterKeys +const ( + DeviceIdentifierFilterKeysStatus DeviceIdentifierFilterKeys = "STATUS" + DeviceIdentifierFilterKeysOrder DeviceIdentifierFilterKeys = "ORDER" + DeviceIdentifierFilterKeysTrafficGroup DeviceIdentifierFilterKeys = "TRAFFIC_GROUP" +) + +// Values returns all known values for DeviceIdentifierFilterKeys. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// The ordering of this slice is not guaranteed to be stable across updates. +func (DeviceIdentifierFilterKeys) Values() []DeviceIdentifierFilterKeys { + return []DeviceIdentifierFilterKeys{ + "STATUS", + "ORDER", + "TRAFFIC_GROUP", + } +} + +type DeviceIdentifierStatus string + +// Enum values for DeviceIdentifierStatus +const ( + DeviceIdentifierStatusActive DeviceIdentifierStatus = "ACTIVE" + DeviceIdentifierStatusInactive DeviceIdentifierStatus = "INACTIVE" +) + +// Values returns all known values for DeviceIdentifierStatus. Note that this can +// be expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (DeviceIdentifierStatus) Values() []DeviceIdentifierStatus { + return []DeviceIdentifierStatus{ + "ACTIVE", + "INACTIVE", + } +} + +type ElevationReference string + +// Enum values for ElevationReference +const ( + ElevationReferenceAgl ElevationReference = "AGL" + ElevationReferenceAmsl ElevationReference = "AMSL" +) + +// Values returns all known values for ElevationReference. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ElevationReference) Values() []ElevationReference { + return []ElevationReference{ + "AGL", + "AMSL", + } +} + +type ElevationUnit string + +// Enum values for ElevationUnit +const ( + // Feet. + ElevationUnitFeet ElevationUnit = "FEET" +) + +// Values returns all known values for ElevationUnit. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ElevationUnit) Values() []ElevationUnit { + return []ElevationUnit{ + "FEET", + } +} + +type HealthStatus string + +// Enum values for HealthStatus +const ( + HealthStatusInitial HealthStatus = "INITIAL" + HealthStatusHealthy HealthStatus = "HEALTHY" + HealthStatusUnhealthy HealthStatus = "UNHEALTHY" +) + +// Values returns all known values for HealthStatus. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (HealthStatus) Values() []HealthStatus { + return []HealthStatus{ + "INITIAL", + "HEALTHY", + "UNHEALTHY", + } +} + +type NetworkFilterKeys string + +// Enum values for NetworkFilterKeys +const ( + NetworkFilterKeysStatus NetworkFilterKeys = "STATUS" +) + +// Values returns all known values for NetworkFilterKeys. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (NetworkFilterKeys) Values() []NetworkFilterKeys { + return []NetworkFilterKeys{ + "STATUS", + } +} + +type NetworkResourceDefinitionType string + +// Enum values for NetworkResourceDefinitionType +const ( + NetworkResourceDefinitionTypeRadioUnit NetworkResourceDefinitionType = "RADIO_UNIT" + NetworkResourceDefinitionTypeDeviceIdentifier NetworkResourceDefinitionType = "DEVICE_IDENTIFIER" +) + +// Values returns all known values for NetworkResourceDefinitionType. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. The ordering of this slice is not guaranteed to be stable across +// updates. +func (NetworkResourceDefinitionType) Values() []NetworkResourceDefinitionType { + return []NetworkResourceDefinitionType{ + "RADIO_UNIT", + "DEVICE_IDENTIFIER", + } +} + +type NetworkResourceFilterKeys string + +// Enum values for NetworkResourceFilterKeys +const ( + NetworkResourceFilterKeysOrder NetworkResourceFilterKeys = "ORDER" + NetworkResourceFilterKeysStatus NetworkResourceFilterKeys = "STATUS" +) + +// Values returns all known values for NetworkResourceFilterKeys. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// The ordering of this slice is not guaranteed to be stable across updates. +func (NetworkResourceFilterKeys) Values() []NetworkResourceFilterKeys { + return []NetworkResourceFilterKeys{ + "ORDER", + "STATUS", + } +} + +type NetworkResourceStatus string + +// Enum values for NetworkResourceStatus +const ( + NetworkResourceStatusPending NetworkResourceStatus = "PENDING" + NetworkResourceStatusShipped NetworkResourceStatus = "SHIPPED" + NetworkResourceStatusProvisioning NetworkResourceStatus = "PROVISIONING" + NetworkResourceStatusProvisioned NetworkResourceStatus = "PROVISIONED" + NetworkResourceStatusAvailable NetworkResourceStatus = "AVAILABLE" + NetworkResourceStatusDeleting NetworkResourceStatus = "DELETING" + NetworkResourceStatusPendingReturn NetworkResourceStatus = "PENDING_RETURN" + NetworkResourceStatusDeleted NetworkResourceStatus = "DELETED" +) + +// Values returns all known values for NetworkResourceStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (NetworkResourceStatus) Values() []NetworkResourceStatus { + return []NetworkResourceStatus{ + "PENDING", + "SHIPPED", + "PROVISIONING", + "PROVISIONED", + "AVAILABLE", + "DELETING", + "PENDING_RETURN", + "DELETED", + } +} + +type NetworkResourceType string + +// Enum values for NetworkResourceType +const ( + NetworkResourceTypeRadioUnit NetworkResourceType = "RADIO_UNIT" +) + +// Values returns all known values for NetworkResourceType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (NetworkResourceType) Values() []NetworkResourceType { + return []NetworkResourceType{ + "RADIO_UNIT", + } +} + +type NetworkSiteFilterKeys string + +// Enum values for NetworkSiteFilterKeys +const ( + NetworkSiteFilterKeysStatus NetworkSiteFilterKeys = "STATUS" +) + +// Values returns all known values for NetworkSiteFilterKeys. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (NetworkSiteFilterKeys) Values() []NetworkSiteFilterKeys { + return []NetworkSiteFilterKeys{ + "STATUS", + } +} + +type NetworkSiteStatus string + +// Enum values for NetworkSiteStatus +const ( + NetworkSiteStatusCreated NetworkSiteStatus = "CREATED" + NetworkSiteStatusProvisioning NetworkSiteStatus = "PROVISIONING" + NetworkSiteStatusAvailable NetworkSiteStatus = "AVAILABLE" + NetworkSiteStatusDeprovisioning NetworkSiteStatus = "DEPROVISIONING" + NetworkSiteStatusDeleted NetworkSiteStatus = "DELETED" +) + +// Values returns all known values for NetworkSiteStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (NetworkSiteStatus) Values() []NetworkSiteStatus { + return []NetworkSiteStatus{ + "CREATED", + "PROVISIONING", + "AVAILABLE", + "DEPROVISIONING", + "DELETED", + } +} + +type NetworkStatus string + +// Enum values for NetworkStatus +const ( + NetworkStatusCreated NetworkStatus = "CREATED" + NetworkStatusProvisioning NetworkStatus = "PROVISIONING" + NetworkStatusAvailable NetworkStatus = "AVAILABLE" + NetworkStatusDeprovisioning NetworkStatus = "DEPROVISIONING" + NetworkStatusDeleted NetworkStatus = "DELETED" +) + +// Values returns all known values for NetworkStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (NetworkStatus) Values() []NetworkStatus { + return []NetworkStatus{ + "CREATED", + "PROVISIONING", + "AVAILABLE", + "DEPROVISIONING", + "DELETED", + } +} + +type OrderFilterKeys string + +// Enum values for OrderFilterKeys +const ( + OrderFilterKeysStatus OrderFilterKeys = "STATUS" + OrderFilterKeysNetworkSite OrderFilterKeys = "NETWORK_SITE" +) + +// Values returns all known values for OrderFilterKeys. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (OrderFilterKeys) Values() []OrderFilterKeys { + return []OrderFilterKeys{ + "STATUS", + "NETWORK_SITE", + } +} + +type ValidationExceptionReason string + +// Enum values for ValidationExceptionReason +const ( + ValidationExceptionReasonUnknownOperation ValidationExceptionReason = "UNKNOWN_OPERATION" + ValidationExceptionReasonCannotParse ValidationExceptionReason = "CANNOT_PARSE" + ValidationExceptionReasonCannotAssumeRole ValidationExceptionReason = "CANNOT_ASSUME_ROLE" + ValidationExceptionReasonFieldValidationFailed ValidationExceptionReason = "FIELD_VALIDATION_FAILED" + ValidationExceptionReasonOther ValidationExceptionReason = "OTHER" +) + +// Values returns all known values for ValidationExceptionReason. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// The ordering of this slice is not guaranteed to be stable across updates. +func (ValidationExceptionReason) Values() []ValidationExceptionReason { + return []ValidationExceptionReason{ + "UNKNOWN_OPERATION", + "CANNOT_PARSE", + "CANNOT_ASSUME_ROLE", + "FIELD_VALIDATION_FAILED", + "OTHER", + } +} diff --git a/service/privatenetworks/types/errors.go b/service/privatenetworks/types/errors.go new file mode 100644 index 00000000000..5ae605762ab --- /dev/null +++ b/service/privatenetworks/types/errors.go @@ -0,0 +1,130 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "fmt" + smithy "github.com/aws/smithy-go" +) + +// You do not have permission to perform this operation. +type AccessDeniedException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *AccessDeniedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AccessDeniedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AccessDeniedException) ErrorCode() string { return "AccessDeniedException" } +func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Information about an internal error. +type InternalServerException struct { + Message *string + + RetryAfterSeconds *int32 + + noSmithyDocumentSerde +} + +func (e *InternalServerException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InternalServerException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InternalServerException) ErrorCode() string { return "InternalServerException" } +func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// The limit was exceeded. +type LimitExceededException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *LimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *LimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *LimitExceededException) ErrorCode() string { return "LimitExceededException" } +func (e *LimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The resource was not found. +type ResourceNotFoundException struct { + Message *string + + ResourceId *string + ResourceType *string + + noSmithyDocumentSerde +} + +func (e *ResourceNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceNotFoundException) ErrorCode() string { return "ResourceNotFoundException" } +func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request was denied due to request throttling. +type ThrottlingException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *ThrottlingException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ThrottlingException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ThrottlingException) ErrorCode() string { return "ThrottlingException" } +func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request failed validation. +type ValidationException struct { + Message *string + + Reason ValidationExceptionReason + FieldList []ValidationExceptionField + + noSmithyDocumentSerde +} + +func (e *ValidationException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ValidationException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ValidationException) ErrorCode() string { return "ValidationException" } +func (e *ValidationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/service/privatenetworks/types/types.go b/service/privatenetworks/types/types.go new file mode 100644 index 00000000000..d77138c76f9 --- /dev/null +++ b/service/privatenetworks/types/types.go @@ -0,0 +1,343 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + smithydocument "github.com/aws/smithy-go/document" + "time" +) + +// Information about an address. +type Address struct { + + // The city for this address. + // + // This member is required. + City *string + + // The country for this address. + // + // This member is required. + Country *string + + // The recipient's name for this address. + // + // This member is required. + Name *string + + // The postal code for this address. + // + // This member is required. + PostalCode *string + + // The state or province for this address. + // + // This member is required. + StateOrProvince *string + + // The first line of the street address. + // + // This member is required. + Street1 *string + + // The company name for this address. + Company *string + + // The phone number for this address. + PhoneNumber *string + + // The second line of the street address. + Street2 *string + + // The third line of the street address. + Street3 *string + + noSmithyDocumentSerde +} + +// Information about a subscriber of a device that can use a network. +type DeviceIdentifier struct { + + // The creation time of this device identifier. + CreatedAt *time.Time + + // The Amazon Resource Name (ARN) of the device identifier. + DeviceIdentifierArn *string + + // The Integrated Circuit Card Identifier of the device identifier. + Iccid *string + + // The International Mobile Subscriber Identity of the device identifier. + Imsi *string + + // The Amazon Resource Name (ARN) of the network on which the device identifier + // appears. + NetworkArn *string + + // The Amazon Resource Name (ARN) of the order used to purchase the device + // identifier. + OrderArn *string + + // The status of the device identifier. + Status DeviceIdentifierStatus + + // The Amazon Resource Name (ARN) of the traffic group to which the device + // identifier belongs. + TrafficGroupArn *string + + // The vendor of the device identifier. + Vendor *string + + noSmithyDocumentSerde +} + +// Information about a name/value pair. +type NameValuePair struct { + + // The name of the pair. + // + // This member is required. + Name *string + + // The value of the pair. + Value *string + + noSmithyDocumentSerde +} + +// Information about a network. +type Network struct { + + // The Amazon Resource Name (ARN) of the network. + // + // This member is required. + NetworkArn *string + + // The name of the network. + // + // This member is required. + NetworkName *string + + // The status of the network. + // + // This member is required. + Status NetworkStatus + + // The creation time of the network. + CreatedAt *time.Time + + // The description of the network. + Description *string + + // The status reason of the network. + StatusReason *string + + noSmithyDocumentSerde +} + +// Information about a network resource. +type NetworkResource struct { + + // The attributes of the network resource. + Attributes []NameValuePair + + // The creation time of the network resource. + CreatedAt *time.Time + + // The description of the network resource. + Description *string + + // The health of the network resource. + Health HealthStatus + + // The model of the network resource. + Model *string + + // The Amazon Resource Name (ARN) of the network on which this network resource + // appears. + NetworkArn *string + + // The Amazon Resource Name (ARN) of the network resource. + NetworkResourceArn *string + + // The Amazon Resource Name (ARN) of the network site on which this network + // resource appears. + NetworkSiteArn *string + + // The Amazon Resource Name (ARN) of the order used to purchase this network + // resource. + OrderArn *string + + // The position of the network resource. + Position *Position + + // The serial number of the network resource. + SerialNumber *string + + // The status of the network resource. + Status NetworkResourceStatus + + // The status reason of the network resource. + StatusReason *string + + // The type of the network resource. + Type NetworkResourceType + + // The vendor of the network resource. + Vendor *string + + noSmithyDocumentSerde +} + +// Information about a network resource definition. +type NetworkResourceDefinition struct { + + // The count in the network resource definition. + // + // This member is required. + Count *int32 + + // The type in the network resource definition. + // + // This member is required. + Type NetworkResourceDefinitionType + + // The options in the network resource definition. + Options []NameValuePair + + noSmithyDocumentSerde +} + +// Information about a network site. +type NetworkSite struct { + + // The Amazon Resource Name (ARN) of the network to which the network site belongs. + // + // This member is required. + NetworkArn *string + + // The Amazon Resource Name (ARN) of the network site. + // + // This member is required. + NetworkSiteArn *string + + // The name of the network site. + // + // This member is required. + NetworkSiteName *string + + // The status of the network site. + // + // This member is required. + Status NetworkSiteStatus + + // The parent Availability Zone for the network site. + AvailabilityZone *string + + // The parent Availability Zone ID for the network site. + AvailabilityZoneId *string + + // The creation time of the network site. + CreatedAt *time.Time + + // The current plan of the network site. + CurrentPlan *SitePlan + + // The description of the network site. + Description *string + + // The pending plan of the network site. + PendingPlan *SitePlan + + // The status reason of the network site. + StatusReason *string + + noSmithyDocumentSerde +} + +// Information about an order. +type Order struct { + + // The acknowledgement status of the order. + AcknowledgmentStatus AcknowledgmentStatus + + // The creation time of the order. + CreatedAt *time.Time + + // The Amazon Resource Name (ARN) of the network associated with this order. + NetworkArn *string + + // The Amazon Resource Name (ARN) of the network site associated with this order. + NetworkSiteArn *string + + // The Amazon Resource Name (ARN) of the order. + OrderArn *string + + // The shipping address of the order. + ShippingAddress *Address + + // The tracking information of the order. + TrackingInformation []TrackingInformation + + noSmithyDocumentSerde +} + +// Information about a position. +type Position struct { + + // The elevation of the equipment at this position. + Elevation *float64 + + // The reference point from which elevation is reported. + ElevationReference ElevationReference + + // The units used to measure the elevation of the position. + ElevationUnit ElevationUnit + + // The latitude of the position. + Latitude *float64 + + // The longitude of the position. + Longitude *float64 + + noSmithyDocumentSerde +} + +// Information about a site plan. +type SitePlan struct { + + // The options of the plan. + Options []NameValuePair + + // The resource definitions of the plan. + ResourceDefinitions []NetworkResourceDefinition + + noSmithyDocumentSerde +} + +// Information about tracking a shipment. +type TrackingInformation struct { + + // The tracking number of the shipment. + TrackingNumber *string + + noSmithyDocumentSerde +} + +// Information about a field that failed validation. +type ValidationExceptionField struct { + + // The message about the validation failure. + // + // This member is required. + Message *string + + // The field name that failed validation. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/service/privatenetworks/validators.go b/service/privatenetworks/validators.go new file mode 100644 index 00000000000..8a496563d9f --- /dev/null +++ b/service/privatenetworks/validators.go @@ -0,0 +1,1060 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package privatenetworks + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/privatenetworks/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +type validateOpAcknowledgeOrderReceipt struct { +} + +func (*validateOpAcknowledgeOrderReceipt) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAcknowledgeOrderReceipt) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AcknowledgeOrderReceiptInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAcknowledgeOrderReceiptInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpActivateDeviceIdentifier struct { +} + +func (*validateOpActivateDeviceIdentifier) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpActivateDeviceIdentifier) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ActivateDeviceIdentifierInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpActivateDeviceIdentifierInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpActivateNetworkSite struct { +} + +func (*validateOpActivateNetworkSite) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpActivateNetworkSite) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ActivateNetworkSiteInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpActivateNetworkSiteInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpConfigureAccessPoint struct { +} + +func (*validateOpConfigureAccessPoint) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpConfigureAccessPoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ConfigureAccessPointInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpConfigureAccessPointInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateNetwork struct { +} + +func (*validateOpCreateNetwork) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateNetwork) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateNetworkInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateNetworkInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateNetworkSite struct { +} + +func (*validateOpCreateNetworkSite) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateNetworkSite) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateNetworkSiteInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateNetworkSiteInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeactivateDeviceIdentifier struct { +} + +func (*validateOpDeactivateDeviceIdentifier) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeactivateDeviceIdentifier) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeactivateDeviceIdentifierInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeactivateDeviceIdentifierInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteNetwork struct { +} + +func (*validateOpDeleteNetwork) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteNetwork) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteNetworkInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteNetworkInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteNetworkSite struct { +} + +func (*validateOpDeleteNetworkSite) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteNetworkSite) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteNetworkSiteInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteNetworkSiteInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetDeviceIdentifier struct { +} + +func (*validateOpGetDeviceIdentifier) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetDeviceIdentifier) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetDeviceIdentifierInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetDeviceIdentifierInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetNetwork struct { +} + +func (*validateOpGetNetwork) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetNetwork) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetNetworkInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetNetworkInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetNetworkResource struct { +} + +func (*validateOpGetNetworkResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetNetworkResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetNetworkResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetNetworkResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetNetworkSite struct { +} + +func (*validateOpGetNetworkSite) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetNetworkSite) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetNetworkSiteInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetNetworkSiteInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetOrder struct { +} + +func (*validateOpGetOrder) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetOrder) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetOrderInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetOrderInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListDeviceIdentifiers struct { +} + +func (*validateOpListDeviceIdentifiers) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListDeviceIdentifiers) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListDeviceIdentifiersInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListDeviceIdentifiersInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListNetworkResources struct { +} + +func (*validateOpListNetworkResources) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListNetworkResources) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListNetworkResourcesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListNetworkResourcesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListNetworkSites struct { +} + +func (*validateOpListNetworkSites) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListNetworkSites) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListNetworkSitesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListNetworkSitesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListOrders struct { +} + +func (*validateOpListOrders) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListOrders) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListOrdersInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListOrdersInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListTagsForResource struct { +} + +func (*validateOpListTagsForResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListTagsForResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListTagsForResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpTagResource struct { +} + +func (*validateOpTagResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TagResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTagResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUntagResource struct { +} + +func (*validateOpUntagResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UntagResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUntagResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateNetworkSite struct { +} + +func (*validateOpUpdateNetworkSite) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateNetworkSite) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateNetworkSiteInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateNetworkSiteInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateNetworkSitePlan struct { +} + +func (*validateOpUpdateNetworkSitePlan) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateNetworkSitePlan) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateNetworkSitePlanInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateNetworkSitePlanInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpAcknowledgeOrderReceiptValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAcknowledgeOrderReceipt{}, middleware.After) +} + +func addOpActivateDeviceIdentifierValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpActivateDeviceIdentifier{}, middleware.After) +} + +func addOpActivateNetworkSiteValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpActivateNetworkSite{}, middleware.After) +} + +func addOpConfigureAccessPointValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpConfigureAccessPoint{}, middleware.After) +} + +func addOpCreateNetworkValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateNetwork{}, middleware.After) +} + +func addOpCreateNetworkSiteValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateNetworkSite{}, middleware.After) +} + +func addOpDeactivateDeviceIdentifierValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeactivateDeviceIdentifier{}, middleware.After) +} + +func addOpDeleteNetworkValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteNetwork{}, middleware.After) +} + +func addOpDeleteNetworkSiteValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteNetworkSite{}, middleware.After) +} + +func addOpGetDeviceIdentifierValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetDeviceIdentifier{}, middleware.After) +} + +func addOpGetNetworkValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetNetwork{}, middleware.After) +} + +func addOpGetNetworkResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetNetworkResource{}, middleware.After) +} + +func addOpGetNetworkSiteValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetNetworkSite{}, middleware.After) +} + +func addOpGetOrderValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetOrder{}, middleware.After) +} + +func addOpListDeviceIdentifiersValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListDeviceIdentifiers{}, middleware.After) +} + +func addOpListNetworkResourcesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListNetworkResources{}, middleware.After) +} + +func addOpListNetworkSitesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListNetworkSites{}, middleware.After) +} + +func addOpListOrdersValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListOrders{}, middleware.After) +} + +func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) +} + +func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) +} + +func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) +} + +func addOpUpdateNetworkSiteValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateNetworkSite{}, middleware.After) +} + +func addOpUpdateNetworkSitePlanValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateNetworkSitePlan{}, middleware.After) +} + +func validateAddress(v *types.Address) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Address"} + if v.City == nil { + invalidParams.Add(smithy.NewErrParamRequired("City")) + } + if v.Country == nil { + invalidParams.Add(smithy.NewErrParamRequired("Country")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.PostalCode == nil { + invalidParams.Add(smithy.NewErrParamRequired("PostalCode")) + } + if v.StateOrProvince == nil { + invalidParams.Add(smithy.NewErrParamRequired("StateOrProvince")) + } + if v.Street1 == nil { + invalidParams.Add(smithy.NewErrParamRequired("Street1")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateNameValuePair(v *types.NameValuePair) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "NameValuePair"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateNetworkResourceDefinition(v *types.NetworkResourceDefinition) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "NetworkResourceDefinition"} + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if v.Options != nil { + if err := validateOptions(v.Options); err != nil { + invalidParams.AddNested("Options", err.(smithy.InvalidParamsError)) + } + } + if v.Count == nil { + invalidParams.Add(smithy.NewErrParamRequired("Count")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateNetworkResourceDefinitions(v []types.NetworkResourceDefinition) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "NetworkResourceDefinitions"} + for i := range v { + if err := validateNetworkResourceDefinition(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOptions(v []types.NameValuePair) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Options"} + for i := range v { + if err := validateNameValuePair(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSitePlan(v *types.SitePlan) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SitePlan"} + if v.ResourceDefinitions != nil { + if err := validateNetworkResourceDefinitions(v.ResourceDefinitions); err != nil { + invalidParams.AddNested("ResourceDefinitions", err.(smithy.InvalidParamsError)) + } + } + if v.Options != nil { + if err := validateOptions(v.Options); err != nil { + invalidParams.AddNested("Options", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpAcknowledgeOrderReceiptInput(v *AcknowledgeOrderReceiptInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AcknowledgeOrderReceiptInput"} + if v.OrderArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("OrderArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpActivateDeviceIdentifierInput(v *ActivateDeviceIdentifierInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ActivateDeviceIdentifierInput"} + if v.DeviceIdentifierArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("DeviceIdentifierArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpActivateNetworkSiteInput(v *ActivateNetworkSiteInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ActivateNetworkSiteInput"} + if v.NetworkSiteArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("NetworkSiteArn")) + } + if v.ShippingAddress == nil { + invalidParams.Add(smithy.NewErrParamRequired("ShippingAddress")) + } else if v.ShippingAddress != nil { + if err := validateAddress(v.ShippingAddress); err != nil { + invalidParams.AddNested("ShippingAddress", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpConfigureAccessPointInput(v *ConfigureAccessPointInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ConfigureAccessPointInput"} + if v.AccessPointArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccessPointArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateNetworkInput(v *CreateNetworkInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateNetworkInput"} + if v.NetworkName == nil { + invalidParams.Add(smithy.NewErrParamRequired("NetworkName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateNetworkSiteInput(v *CreateNetworkSiteInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateNetworkSiteInput"} + if v.NetworkSiteName == nil { + invalidParams.Add(smithy.NewErrParamRequired("NetworkSiteName")) + } + if v.NetworkArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("NetworkArn")) + } + if v.PendingPlan != nil { + if err := validateSitePlan(v.PendingPlan); err != nil { + invalidParams.AddNested("PendingPlan", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeactivateDeviceIdentifierInput(v *DeactivateDeviceIdentifierInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeactivateDeviceIdentifierInput"} + if v.DeviceIdentifierArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("DeviceIdentifierArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteNetworkInput(v *DeleteNetworkInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteNetworkInput"} + if v.NetworkArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("NetworkArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteNetworkSiteInput(v *DeleteNetworkSiteInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteNetworkSiteInput"} + if v.NetworkSiteArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("NetworkSiteArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetDeviceIdentifierInput(v *GetDeviceIdentifierInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetDeviceIdentifierInput"} + if v.DeviceIdentifierArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("DeviceIdentifierArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetNetworkInput(v *GetNetworkInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetNetworkInput"} + if v.NetworkArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("NetworkArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetNetworkResourceInput(v *GetNetworkResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetNetworkResourceInput"} + if v.NetworkResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("NetworkResourceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetNetworkSiteInput(v *GetNetworkSiteInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetNetworkSiteInput"} + if v.NetworkSiteArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("NetworkSiteArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetOrderInput(v *GetOrderInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetOrderInput"} + if v.OrderArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("OrderArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListDeviceIdentifiersInput(v *ListDeviceIdentifiersInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListDeviceIdentifiersInput"} + if v.NetworkArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("NetworkArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListNetworkResourcesInput(v *ListNetworkResourcesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListNetworkResourcesInput"} + if v.NetworkArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("NetworkArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListNetworkSitesInput(v *ListNetworkSitesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListNetworkSitesInput"} + if v.NetworkArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("NetworkArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListOrdersInput(v *ListOrdersInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListOrdersInput"} + if v.NetworkArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("NetworkArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpTagResourceInput(v *TagResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.Tags == nil { + invalidParams.Add(smithy.NewErrParamRequired("Tags")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUntagResourceInput(v *UntagResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.TagKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateNetworkSiteInput(v *UpdateNetworkSiteInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateNetworkSiteInput"} + if v.NetworkSiteArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("NetworkSiteArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateNetworkSitePlanInput(v *UpdateNetworkSitePlanInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateNetworkSitePlanInput"} + if v.NetworkSiteArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("NetworkSiteArn")) + } + if v.PendingPlan == nil { + invalidParams.Add(smithy.NewErrParamRequired("PendingPlan")) + } else if v.PendingPlan != nil { + if err := validateSitePlan(v.PendingPlan); err != nil { + invalidParams.AddNested("PendingPlan", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/proton/types/types.go b/service/proton/types/types.go index dd19241f527..b04655348f0 100644 --- a/service/proton/types/types.go +++ b/service/proton/types/types.go @@ -1548,7 +1548,8 @@ type TemplateSyncConfig struct { // Template version source data. // // The following types satisfy this interface: -// TemplateVersionSourceInputMemberS3 +// +// TemplateVersionSourceInputMemberS3 type TemplateVersionSourceInput interface { isTemplateVersionSourceInput() } diff --git a/service/quicksight/api_op_DeleteUserByPrincipalId.go b/service/quicksight/api_op_DeleteUserByPrincipalId.go index c681084e544..3e025687a5b 100644 --- a/service/quicksight/api_op_DeleteUserByPrincipalId.go +++ b/service/quicksight/api_op_DeleteUserByPrincipalId.go @@ -26,7 +26,6 @@ func (c *Client) DeleteUserByPrincipalId(ctx context.Context, params *DeleteUser return out, nil } -// type DeleteUserByPrincipalIdInput struct { // The ID for the Amazon Web Services account that the user is in. Currently, you diff --git a/service/quicksight/types/types.go b/service/quicksight/types/types.go index e9a163077f3..fcc93a15ce3 100644 --- a/service/quicksight/types/types.go +++ b/service/quicksight/types/types.go @@ -983,28 +983,29 @@ type DataSourceErrorInfo struct { // one of the attributes can be non-null. // // The following types satisfy this interface: -// DataSourceParametersMemberAmazonElasticsearchParameters -// DataSourceParametersMemberAmazonOpenSearchParameters -// DataSourceParametersMemberAthenaParameters -// DataSourceParametersMemberAuroraParameters -// DataSourceParametersMemberAuroraPostgreSqlParameters -// DataSourceParametersMemberAwsIotAnalyticsParameters -// DataSourceParametersMemberExasolParameters -// DataSourceParametersMemberJiraParameters -// DataSourceParametersMemberMariaDbParameters -// DataSourceParametersMemberMySqlParameters -// DataSourceParametersMemberOracleParameters -// DataSourceParametersMemberPostgreSqlParameters -// DataSourceParametersMemberPrestoParameters -// DataSourceParametersMemberRdsParameters -// DataSourceParametersMemberRedshiftParameters -// DataSourceParametersMemberS3Parameters -// DataSourceParametersMemberServiceNowParameters -// DataSourceParametersMemberSnowflakeParameters -// DataSourceParametersMemberSparkParameters -// DataSourceParametersMemberSqlServerParameters -// DataSourceParametersMemberTeradataParameters -// DataSourceParametersMemberTwitterParameters +// +// DataSourceParametersMemberAmazonElasticsearchParameters +// DataSourceParametersMemberAmazonOpenSearchParameters +// DataSourceParametersMemberAthenaParameters +// DataSourceParametersMemberAuroraParameters +// DataSourceParametersMemberAuroraPostgreSqlParameters +// DataSourceParametersMemberAwsIotAnalyticsParameters +// DataSourceParametersMemberExasolParameters +// DataSourceParametersMemberJiraParameters +// DataSourceParametersMemberMariaDbParameters +// DataSourceParametersMemberMySqlParameters +// DataSourceParametersMemberOracleParameters +// DataSourceParametersMemberPostgreSqlParameters +// DataSourceParametersMemberPrestoParameters +// DataSourceParametersMemberRdsParameters +// DataSourceParametersMemberRedshiftParameters +// DataSourceParametersMemberS3Parameters +// DataSourceParametersMemberServiceNowParameters +// DataSourceParametersMemberSnowflakeParameters +// DataSourceParametersMemberSparkParameters +// DataSourceParametersMemberSqlServerParameters +// DataSourceParametersMemberTeradataParameters +// DataSourceParametersMemberTwitterParameters type DataSourceParameters interface { isDataSourceParameters() } @@ -1860,9 +1861,10 @@ type Parameters struct { // be valid, only one of the attributes can be non-null. // // The following types satisfy this interface: -// PhysicalTableMemberCustomSql -// PhysicalTableMemberRelationalTable -// PhysicalTableMemberS3Source +// +// PhysicalTableMemberCustomSql +// PhysicalTableMemberRelationalTable +// PhysicalTableMemberS3Source type PhysicalTable interface { isPhysicalTable() } @@ -2887,13 +2889,14 @@ type TileStyle struct { // this structure to be valid, only one of the attributes can be non-null. // // The following types satisfy this interface: -// TransformOperationMemberCastColumnTypeOperation -// TransformOperationMemberCreateColumnsOperation -// TransformOperationMemberFilterOperation -// TransformOperationMemberProjectOperation -// TransformOperationMemberRenameColumnOperation -// TransformOperationMemberTagColumnOperation -// TransformOperationMemberUntagColumnOperation +// +// TransformOperationMemberCastColumnTypeOperation +// TransformOperationMemberCreateColumnsOperation +// TransformOperationMemberFilterOperation +// TransformOperationMemberProjectOperation +// TransformOperationMemberRenameColumnOperation +// TransformOperationMemberTagColumnOperation +// TransformOperationMemberUntagColumnOperation type TransformOperation interface { isTransformOperation() } diff --git a/service/rds/api_op_AddSourceIdentifierToSubscription.go b/service/rds/api_op_AddSourceIdentifierToSubscription.go index 47289989a1e..2bb90197b00 100644 --- a/service/rds/api_op_AddSourceIdentifierToSubscription.go +++ b/service/rds/api_op_AddSourceIdentifierToSubscription.go @@ -27,7 +27,6 @@ func (c *Client) AddSourceIdentifierToSubscription(ctx context.Context, params * return out, nil } -// type AddSourceIdentifierToSubscriptionInput struct { // The identifier of the event source to be added. Constraints: diff --git a/service/rds/api_op_AddTagsToResource.go b/service/rds/api_op_AddTagsToResource.go index 059470bf0a7..2582f617e0c 100644 --- a/service/rds/api_op_AddTagsToResource.go +++ b/service/rds/api_op_AddTagsToResource.go @@ -31,7 +31,6 @@ func (c *Client) AddTagsToResource(ctx context.Context, params *AddTagsToResourc return out, nil } -// type AddTagsToResourceInput struct { // The Amazon RDS resource that the tags are added to. This value is an Amazon diff --git a/service/rds/api_op_ApplyPendingMaintenanceAction.go b/service/rds/api_op_ApplyPendingMaintenanceAction.go index 46ce4b92c5a..41242cf774b 100644 --- a/service/rds/api_op_ApplyPendingMaintenanceAction.go +++ b/service/rds/api_op_ApplyPendingMaintenanceAction.go @@ -28,7 +28,6 @@ func (c *Client) ApplyPendingMaintenanceAction(ctx context.Context, params *Appl return out, nil } -// type ApplyPendingMaintenanceActionInput struct { // The pending maintenance action to apply to this resource. Valid values: diff --git a/service/rds/api_op_AuthorizeDBSecurityGroupIngress.go b/service/rds/api_op_AuthorizeDBSecurityGroupIngress.go index faba7f21202..a0612d1fb48 100644 --- a/service/rds/api_op_AuthorizeDBSecurityGroupIngress.go +++ b/service/rds/api_op_AuthorizeDBSecurityGroupIngress.go @@ -38,7 +38,6 @@ func (c *Client) AuthorizeDBSecurityGroupIngress(ctx context.Context, params *Au return out, nil } -// type AuthorizeDBSecurityGroupIngressInput struct { // The name of the DB security group to add authorization to. diff --git a/service/rds/api_op_BacktrackDBCluster.go b/service/rds/api_op_BacktrackDBCluster.go index b08319c2715..83752fcbd71 100644 --- a/service/rds/api_op_BacktrackDBCluster.go +++ b/service/rds/api_op_BacktrackDBCluster.go @@ -31,7 +31,6 @@ func (c *Client) BacktrackDBCluster(ctx context.Context, params *BacktrackDBClus return out, nil } -// type BacktrackDBClusterInput struct { // The timestamp of the time to backtrack the DB cluster to, specified in ISO 8601 diff --git a/service/rds/api_op_CopyDBClusterSnapshot.go b/service/rds/api_op_CopyDBClusterSnapshot.go index 6039ec55dab..5752b8a46c1 100644 --- a/service/rds/api_op_CopyDBClusterSnapshot.go +++ b/service/rds/api_op_CopyDBClusterSnapshot.go @@ -65,7 +65,6 @@ func (c *Client) CopyDBClusterSnapshot(ctx context.Context, params *CopyDBCluste return out, nil } -// type CopyDBClusterSnapshotInput struct { // The identifier of the DB cluster snapshot to copy. This parameter isn't diff --git a/service/rds/api_op_CopyDBParameterGroup.go b/service/rds/api_op_CopyDBParameterGroup.go index 4004055cb71..66b313857d8 100644 --- a/service/rds/api_op_CopyDBParameterGroup.go +++ b/service/rds/api_op_CopyDBParameterGroup.go @@ -27,7 +27,6 @@ func (c *Client) CopyDBParameterGroup(ctx context.Context, params *CopyDBParamet return out, nil } -// type CopyDBParameterGroupInput struct { // The identifier or ARN for the source DB parameter group. For information about diff --git a/service/rds/api_op_CopyDBSnapshot.go b/service/rds/api_op_CopyDBSnapshot.go index 5ebf7bd970a..f2c488b60a8 100644 --- a/service/rds/api_op_CopyDBSnapshot.go +++ b/service/rds/api_op_CopyDBSnapshot.go @@ -36,7 +36,6 @@ func (c *Client) CopyDBSnapshot(ctx context.Context, params *CopyDBSnapshotInput return out, nil } -// type CopyDBSnapshotInput struct { // The identifier for the source DB snapshot. If the source snapshot is in the same diff --git a/service/rds/api_op_CopyOptionGroup.go b/service/rds/api_op_CopyOptionGroup.go index f7a3386f197..2f526c5a1ef 100644 --- a/service/rds/api_op_CopyOptionGroup.go +++ b/service/rds/api_op_CopyOptionGroup.go @@ -27,7 +27,6 @@ func (c *Client) CopyOptionGroup(ctx context.Context, params *CopyOptionGroupInp return out, nil } -// type CopyOptionGroupInput struct { // The identifier for the source option group. Constraints: diff --git a/service/rds/api_op_CreateDBCluster.go b/service/rds/api_op_CreateDBCluster.go index b5c71940080..430b7439f47 100644 --- a/service/rds/api_op_CreateDBCluster.go +++ b/service/rds/api_op_CreateDBCluster.go @@ -37,7 +37,6 @@ func (c *Client) CreateDBCluster(ctx context.Context, params *CreateDBClusterInp return out, nil } -// type CreateDBClusterInput struct { // The DB cluster identifier. This parameter is stored as a lowercase string. diff --git a/service/rds/api_op_CreateDBClusterParameterGroup.go b/service/rds/api_op_CreateDBClusterParameterGroup.go index 9eaa0c47381..10ec90c0142 100644 --- a/service/rds/api_op_CreateDBClusterParameterGroup.go +++ b/service/rds/api_op_CreateDBClusterParameterGroup.go @@ -55,7 +55,6 @@ func (c *Client) CreateDBClusterParameterGroup(ctx context.Context, params *Crea return out, nil } -// type CreateDBClusterParameterGroupInput struct { // The name of the DB cluster parameter group. Constraints: diff --git a/service/rds/api_op_CreateDBClusterSnapshot.go b/service/rds/api_op_CreateDBClusterSnapshot.go index b1d6a99cb5c..5382d98adc1 100644 --- a/service/rds/api_op_CreateDBClusterSnapshot.go +++ b/service/rds/api_op_CreateDBClusterSnapshot.go @@ -33,7 +33,6 @@ func (c *Client) CreateDBClusterSnapshot(ctx context.Context, params *CreateDBCl return out, nil } -// type CreateDBClusterSnapshotInput struct { // The identifier of the DB cluster to create a snapshot for. This parameter isn't diff --git a/service/rds/api_op_CreateDBInstance.go b/service/rds/api_op_CreateDBInstance.go index 03fcc67c6c2..b10ad790c7b 100644 --- a/service/rds/api_op_CreateDBInstance.go +++ b/service/rds/api_op_CreateDBInstance.go @@ -36,7 +36,6 @@ func (c *Client) CreateDBInstance(ctx context.Context, params *CreateDBInstanceI return out, nil } -// type CreateDBInstanceInput struct { // The compute and memory capacity of the DB instance, for example db.m5.large. Not diff --git a/service/rds/api_op_CreateDBParameterGroup.go b/service/rds/api_op_CreateDBParameterGroup.go index 276098065ff..274453d7d2c 100644 --- a/service/rds/api_op_CreateDBParameterGroup.go +++ b/service/rds/api_op_CreateDBParameterGroup.go @@ -44,7 +44,6 @@ func (c *Client) CreateDBParameterGroup(ctx context.Context, params *CreateDBPar return out, nil } -// type CreateDBParameterGroupInput struct { // The DB parameter group family name. A DB parameter group can be associated with diff --git a/service/rds/api_op_CreateDBSecurityGroup.go b/service/rds/api_op_CreateDBSecurityGroup.go index 4f5551ae8bf..fd72c39c1f8 100644 --- a/service/rds/api_op_CreateDBSecurityGroup.go +++ b/service/rds/api_op_CreateDBSecurityGroup.go @@ -29,7 +29,6 @@ func (c *Client) CreateDBSecurityGroup(ctx context.Context, params *CreateDBSecu return out, nil } -// type CreateDBSecurityGroupInput struct { // The description for the DB security group. diff --git a/service/rds/api_op_CreateDBSnapshot.go b/service/rds/api_op_CreateDBSnapshot.go index 5034cf30c58..be30c2c3ebb 100644 --- a/service/rds/api_op_CreateDBSnapshot.go +++ b/service/rds/api_op_CreateDBSnapshot.go @@ -28,7 +28,6 @@ func (c *Client) CreateDBSnapshot(ctx context.Context, params *CreateDBSnapshotI return out, nil } -// type CreateDBSnapshotInput struct { // The identifier of the DB instance that you want to create the snapshot of. diff --git a/service/rds/api_op_CreateDBSubnetGroup.go b/service/rds/api_op_CreateDBSubnetGroup.go index 4d73288e626..61507fda4fc 100644 --- a/service/rds/api_op_CreateDBSubnetGroup.go +++ b/service/rds/api_op_CreateDBSubnetGroup.go @@ -28,7 +28,6 @@ func (c *Client) CreateDBSubnetGroup(ctx context.Context, params *CreateDBSubnet return out, nil } -// type CreateDBSubnetGroupInput struct { // The description for the DB subnet group. diff --git a/service/rds/api_op_CreateEventSubscription.go b/service/rds/api_op_CreateEventSubscription.go index c9a3bc2953d..85686128299 100644 --- a/service/rds/api_op_CreateEventSubscription.go +++ b/service/rds/api_op_CreateEventSubscription.go @@ -44,7 +44,6 @@ func (c *Client) CreateEventSubscription(ctx context.Context, params *CreateEven return out, nil } -// type CreateEventSubscriptionInput struct { // The Amazon Resource Name (ARN) of the SNS topic created for event notification. diff --git a/service/rds/api_op_CreateOptionGroup.go b/service/rds/api_op_CreateOptionGroup.go index 8be45722537..76a55febb4c 100644 --- a/service/rds/api_op_CreateOptionGroup.go +++ b/service/rds/api_op_CreateOptionGroup.go @@ -28,7 +28,6 @@ func (c *Client) CreateOptionGroup(ctx context.Context, params *CreateOptionGrou return out, nil } -// type CreateOptionGroupInput struct { // Specifies the name of the engine that this option group should be associated diff --git a/service/rds/api_op_DeleteDBCluster.go b/service/rds/api_op_DeleteDBCluster.go index 37237af2376..1003309e889 100644 --- a/service/rds/api_op_DeleteDBCluster.go +++ b/service/rds/api_op_DeleteDBCluster.go @@ -35,7 +35,6 @@ func (c *Client) DeleteDBCluster(ctx context.Context, params *DeleteDBClusterInp return out, nil } -// type DeleteDBClusterInput struct { // The DB cluster identifier for the DB cluster to be deleted. This parameter isn't diff --git a/service/rds/api_op_DeleteDBClusterParameterGroup.go b/service/rds/api_op_DeleteDBClusterParameterGroup.go index 2799e136e82..536fdda7535 100644 --- a/service/rds/api_op_DeleteDBClusterParameterGroup.go +++ b/service/rds/api_op_DeleteDBClusterParameterGroup.go @@ -33,7 +33,6 @@ func (c *Client) DeleteDBClusterParameterGroup(ctx context.Context, params *Dele return out, nil } -// type DeleteDBClusterParameterGroupInput struct { // The name of the DB cluster parameter group. Constraints: diff --git a/service/rds/api_op_DeleteDBClusterSnapshot.go b/service/rds/api_op_DeleteDBClusterSnapshot.go index 6ec73ebd01d..af2cc9ca2ba 100644 --- a/service/rds/api_op_DeleteDBClusterSnapshot.go +++ b/service/rds/api_op_DeleteDBClusterSnapshot.go @@ -35,7 +35,6 @@ func (c *Client) DeleteDBClusterSnapshot(ctx context.Context, params *DeleteDBCl return out, nil } -// type DeleteDBClusterSnapshotInput struct { // The identifier of the DB cluster snapshot to delete. Constraints: Must be the diff --git a/service/rds/api_op_DeleteDBInstance.go b/service/rds/api_op_DeleteDBInstance.go index 10daaf4588e..eb7502558ef 100644 --- a/service/rds/api_op_DeleteDBInstance.go +++ b/service/rds/api_op_DeleteDBInstance.go @@ -49,7 +49,6 @@ func (c *Client) DeleteDBInstance(ctx context.Context, params *DeleteDBInstanceI return out, nil } -// type DeleteDBInstanceInput struct { // The DB instance identifier for the DB instance to be deleted. This parameter diff --git a/service/rds/api_op_DeleteDBParameterGroup.go b/service/rds/api_op_DeleteDBParameterGroup.go index 5cf874c7988..f10dcfa9ef6 100644 --- a/service/rds/api_op_DeleteDBParameterGroup.go +++ b/service/rds/api_op_DeleteDBParameterGroup.go @@ -27,7 +27,6 @@ func (c *Client) DeleteDBParameterGroup(ctx context.Context, params *DeleteDBPar return out, nil } -// type DeleteDBParameterGroupInput struct { // The name of the DB parameter group. Constraints: diff --git a/service/rds/api_op_DeleteDBSecurityGroup.go b/service/rds/api_op_DeleteDBSecurityGroup.go index bfd249dc4ab..122af6daa31 100644 --- a/service/rds/api_op_DeleteDBSecurityGroup.go +++ b/service/rds/api_op_DeleteDBSecurityGroup.go @@ -27,7 +27,6 @@ func (c *Client) DeleteDBSecurityGroup(ctx context.Context, params *DeleteDBSecu return out, nil } -// type DeleteDBSecurityGroupInput struct { // The name of the DB security group to delete. You can't delete the default DB diff --git a/service/rds/api_op_DeleteDBSnapshot.go b/service/rds/api_op_DeleteDBSnapshot.go index e404373c418..146d3a123d5 100644 --- a/service/rds/api_op_DeleteDBSnapshot.go +++ b/service/rds/api_op_DeleteDBSnapshot.go @@ -28,7 +28,6 @@ func (c *Client) DeleteDBSnapshot(ctx context.Context, params *DeleteDBSnapshotI return out, nil } -// type DeleteDBSnapshotInput struct { // The DB snapshot identifier. Constraints: Must be the name of an existing DB diff --git a/service/rds/api_op_DeleteDBSubnetGroup.go b/service/rds/api_op_DeleteDBSubnetGroup.go index 10d95051094..86087feaf48 100644 --- a/service/rds/api_op_DeleteDBSubnetGroup.go +++ b/service/rds/api_op_DeleteDBSubnetGroup.go @@ -27,7 +27,6 @@ func (c *Client) DeleteDBSubnetGroup(ctx context.Context, params *DeleteDBSubnet return out, nil } -// type DeleteDBSubnetGroupInput struct { // The name of the database subnet group to delete. You can't delete the default diff --git a/service/rds/api_op_DeleteEventSubscription.go b/service/rds/api_op_DeleteEventSubscription.go index d6579a50938..52b538d98c1 100644 --- a/service/rds/api_op_DeleteEventSubscription.go +++ b/service/rds/api_op_DeleteEventSubscription.go @@ -27,7 +27,6 @@ func (c *Client) DeleteEventSubscription(ctx context.Context, params *DeleteEven return out, nil } -// type DeleteEventSubscriptionInput struct { // The name of the RDS event notification subscription you want to delete. diff --git a/service/rds/api_op_DeleteOptionGroup.go b/service/rds/api_op_DeleteOptionGroup.go index a8efbad9cff..0086bba5d71 100644 --- a/service/rds/api_op_DeleteOptionGroup.go +++ b/service/rds/api_op_DeleteOptionGroup.go @@ -26,7 +26,6 @@ func (c *Client) DeleteOptionGroup(ctx context.Context, params *DeleteOptionGrou return out, nil } -// type DeleteOptionGroupInput struct { // The name of the option group to be deleted. You can't delete default option diff --git a/service/rds/api_op_DescribeAccountAttributes.go b/service/rds/api_op_DescribeAccountAttributes.go index 334b902f4f7..d950fb295d3 100644 --- a/service/rds/api_op_DescribeAccountAttributes.go +++ b/service/rds/api_op_DescribeAccountAttributes.go @@ -30,7 +30,6 @@ func (c *Client) DescribeAccountAttributes(ctx context.Context, params *Describe return out, nil } -// type DescribeAccountAttributesInput struct { noSmithyDocumentSerde } diff --git a/service/rds/api_op_DescribeCertificates.go b/service/rds/api_op_DescribeCertificates.go index 501391b1c06..476c9da6530 100644 --- a/service/rds/api_op_DescribeCertificates.go +++ b/service/rds/api_op_DescribeCertificates.go @@ -29,7 +29,6 @@ func (c *Client) DescribeCertificates(ctx context.Context, params *DescribeCerti return out, nil } -// type DescribeCertificatesInput struct { // The user-supplied certificate identifier. If this parameter is specified, diff --git a/service/rds/api_op_DescribeDBClusterBacktracks.go b/service/rds/api_op_DescribeDBClusterBacktracks.go index 82f9d07b328..e928b45f74c 100644 --- a/service/rds/api_op_DescribeDBClusterBacktracks.go +++ b/service/rds/api_op_DescribeDBClusterBacktracks.go @@ -32,7 +32,6 @@ func (c *Client) DescribeDBClusterBacktracks(ctx context.Context, params *Descri return out, nil } -// type DescribeDBClusterBacktracksInput struct { // The DB cluster identifier of the DB cluster to be described. This parameter is diff --git a/service/rds/api_op_DescribeDBClusterParameterGroups.go b/service/rds/api_op_DescribeDBClusterParameterGroups.go index bc7048a57d0..4ba485a8823 100644 --- a/service/rds/api_op_DescribeDBClusterParameterGroups.go +++ b/service/rds/api_op_DescribeDBClusterParameterGroups.go @@ -36,7 +36,6 @@ func (c *Client) DescribeDBClusterParameterGroups(ctx context.Context, params *D return out, nil } -// type DescribeDBClusterParameterGroupsInput struct { // The name of a specific DB cluster parameter group to return details for. @@ -64,7 +63,6 @@ type DescribeDBClusterParameterGroupsInput struct { noSmithyDocumentSerde } -// type DescribeDBClusterParameterGroupsOutput struct { // A list of DB cluster parameter groups. diff --git a/service/rds/api_op_DescribeDBClusterParameters.go b/service/rds/api_op_DescribeDBClusterParameters.go index 24df6230fb3..d2b85e883c0 100644 --- a/service/rds/api_op_DescribeDBClusterParameters.go +++ b/service/rds/api_op_DescribeDBClusterParameters.go @@ -34,7 +34,6 @@ func (c *Client) DescribeDBClusterParameters(ctx context.Context, params *Descri return out, nil } -// type DescribeDBClusterParametersInput struct { // The name of a specific DB cluster parameter group to return parameter details diff --git a/service/rds/api_op_DescribeDBClusterSnapshotAttributes.go b/service/rds/api_op_DescribeDBClusterSnapshotAttributes.go index 4baa489bca9..f12d66331b1 100644 --- a/service/rds/api_op_DescribeDBClusterSnapshotAttributes.go +++ b/service/rds/api_op_DescribeDBClusterSnapshotAttributes.go @@ -36,7 +36,6 @@ func (c *Client) DescribeDBClusterSnapshotAttributes(ctx context.Context, params return out, nil } -// type DescribeDBClusterSnapshotAttributesInput struct { // The identifier for the DB cluster snapshot to describe the attributes for. diff --git a/service/rds/api_op_DescribeDBClusterSnapshots.go b/service/rds/api_op_DescribeDBClusterSnapshots.go index 15f26887831..53cc2b06bef 100644 --- a/service/rds/api_op_DescribeDBClusterSnapshots.go +++ b/service/rds/api_op_DescribeDBClusterSnapshots.go @@ -41,7 +41,6 @@ func (c *Client) DescribeDBClusterSnapshots(ctx context.Context, params *Describ return out, nil } -// type DescribeDBClusterSnapshotsInput struct { // The ID of the DB cluster to retrieve the list of DB cluster snapshots for. This diff --git a/service/rds/api_op_DescribeDBClusters.go b/service/rds/api_op_DescribeDBClusters.go index 27bc8143fdf..7c705cc56e1 100644 --- a/service/rds/api_op_DescribeDBClusters.go +++ b/service/rds/api_op_DescribeDBClusters.go @@ -42,7 +42,6 @@ func (c *Client) DescribeDBClusters(ctx context.Context, params *DescribeDBClust return out, nil } -// type DescribeDBClustersInput struct { // The user-supplied DB cluster identifier. If this parameter is specified, diff --git a/service/rds/api_op_DescribeDBInstances.go b/service/rds/api_op_DescribeDBInstances.go index cd6c2ecc667..6c41a7540c2 100644 --- a/service/rds/api_op_DescribeDBInstances.go +++ b/service/rds/api_op_DescribeDBInstances.go @@ -37,7 +37,6 @@ func (c *Client) DescribeDBInstances(ctx context.Context, params *DescribeDBInst return out, nil } -// type DescribeDBInstancesInput struct { // The user-supplied instance identifier. If this parameter is specified, diff --git a/service/rds/api_op_DescribeDBLogFiles.go b/service/rds/api_op_DescribeDBLogFiles.go index ad2f25b99e9..7c5234815e0 100644 --- a/service/rds/api_op_DescribeDBLogFiles.go +++ b/service/rds/api_op_DescribeDBLogFiles.go @@ -29,7 +29,6 @@ func (c *Client) DescribeDBLogFiles(ctx context.Context, params *DescribeDBLogFi return out, nil } -// type DescribeDBLogFilesInput struct { // The customer-assigned name of the DB instance that contains the log files you diff --git a/service/rds/api_op_DescribeDBParameterGroups.go b/service/rds/api_op_DescribeDBParameterGroups.go index d855acd28f6..ab9882630c3 100644 --- a/service/rds/api_op_DescribeDBParameterGroups.go +++ b/service/rds/api_op_DescribeDBParameterGroups.go @@ -30,7 +30,6 @@ func (c *Client) DescribeDBParameterGroups(ctx context.Context, params *Describe return out, nil } -// type DescribeDBParameterGroupsInput struct { // The name of a specific DB parameter group to return details for. Constraints: diff --git a/service/rds/api_op_DescribeDBSecurityGroups.go b/service/rds/api_op_DescribeDBSecurityGroups.go index 5a5815e6407..23635b7efab 100644 --- a/service/rds/api_op_DescribeDBSecurityGroups.go +++ b/service/rds/api_op_DescribeDBSecurityGroups.go @@ -30,7 +30,6 @@ func (c *Client) DescribeDBSecurityGroups(ctx context.Context, params *DescribeD return out, nil } -// type DescribeDBSecurityGroupsInput struct { // The name of the DB security group to return details for. diff --git a/service/rds/api_op_DescribeDBSnapshotAttributes.go b/service/rds/api_op_DescribeDBSnapshotAttributes.go index 09958d3912b..215606666d0 100644 --- a/service/rds/api_op_DescribeDBSnapshotAttributes.go +++ b/service/rds/api_op_DescribeDBSnapshotAttributes.go @@ -35,7 +35,6 @@ func (c *Client) DescribeDBSnapshotAttributes(ctx context.Context, params *Descr return out, nil } -// type DescribeDBSnapshotAttributesInput struct { // The identifier for the DB snapshot to describe the attributes for. diff --git a/service/rds/api_op_DescribeDBSnapshots.go b/service/rds/api_op_DescribeDBSnapshots.go index a1f8ce09901..1de68abb50f 100644 --- a/service/rds/api_op_DescribeDBSnapshots.go +++ b/service/rds/api_op_DescribeDBSnapshots.go @@ -35,7 +35,6 @@ func (c *Client) DescribeDBSnapshots(ctx context.Context, params *DescribeDBSnap return out, nil } -// type DescribeDBSnapshotsInput struct { // The ID of the DB instance to retrieve the list of DB snapshots for. This diff --git a/service/rds/api_op_DescribeDBSubnetGroups.go b/service/rds/api_op_DescribeDBSubnetGroups.go index daafd8fdb7d..8009844f086 100644 --- a/service/rds/api_op_DescribeDBSubnetGroups.go +++ b/service/rds/api_op_DescribeDBSubnetGroups.go @@ -31,7 +31,6 @@ func (c *Client) DescribeDBSubnetGroups(ctx context.Context, params *DescribeDBS return out, nil } -// type DescribeDBSubnetGroupsInput struct { // The name of the DB subnet group to return details for. diff --git a/service/rds/api_op_DescribeEngineDefaultClusterParameters.go b/service/rds/api_op_DescribeEngineDefaultClusterParameters.go index b8e6601840b..4e8218b3313 100644 --- a/service/rds/api_op_DescribeEngineDefaultClusterParameters.go +++ b/service/rds/api_op_DescribeEngineDefaultClusterParameters.go @@ -31,7 +31,6 @@ func (c *Client) DescribeEngineDefaultClusterParameters(ctx context.Context, par return out, nil } -// type DescribeEngineDefaultClusterParametersInput struct { // The name of the DB cluster parameter group family to return engine parameter diff --git a/service/rds/api_op_DescribeEngineDefaultParameters.go b/service/rds/api_op_DescribeEngineDefaultParameters.go index b89c6baca3c..7a29a4afd0d 100644 --- a/service/rds/api_op_DescribeEngineDefaultParameters.go +++ b/service/rds/api_op_DescribeEngineDefaultParameters.go @@ -29,7 +29,6 @@ func (c *Client) DescribeEngineDefaultParameters(ctx context.Context, params *De return out, nil } -// type DescribeEngineDefaultParametersInput struct { // The name of the DB parameter group family. Valid Values: diff --git a/service/rds/api_op_DescribeEventCategories.go b/service/rds/api_op_DescribeEventCategories.go index a2c6d96ae05..e9a277f8283 100644 --- a/service/rds/api_op_DescribeEventCategories.go +++ b/service/rds/api_op_DescribeEventCategories.go @@ -32,7 +32,6 @@ func (c *Client) DescribeEventCategories(ctx context.Context, params *DescribeEv return out, nil } -// type DescribeEventCategoriesInput struct { // This parameter isn't currently supported. diff --git a/service/rds/api_op_DescribeEventSubscriptions.go b/service/rds/api_op_DescribeEventSubscriptions.go index de81347b05c..4e03de96e40 100644 --- a/service/rds/api_op_DescribeEventSubscriptions.go +++ b/service/rds/api_op_DescribeEventSubscriptions.go @@ -31,7 +31,6 @@ func (c *Client) DescribeEventSubscriptions(ctx context.Context, params *Describ return out, nil } -// type DescribeEventSubscriptionsInput struct { // This parameter isn't currently supported. diff --git a/service/rds/api_op_DescribeEvents.go b/service/rds/api_op_DescribeEvents.go index ccdae4e5eb2..314ad8d31ba 100644 --- a/service/rds/api_op_DescribeEvents.go +++ b/service/rds/api_op_DescribeEvents.go @@ -39,7 +39,6 @@ func (c *Client) DescribeEvents(ctx context.Context, params *DescribeEventsInput return out, nil } -// type DescribeEventsInput struct { // The number of minutes to retrieve events for. Default: 60 diff --git a/service/rds/api_op_DescribeOptionGroupOptions.go b/service/rds/api_op_DescribeOptionGroupOptions.go index fb8164267fe..50bb0bfa7af 100644 --- a/service/rds/api_op_DescribeOptionGroupOptions.go +++ b/service/rds/api_op_DescribeOptionGroupOptions.go @@ -28,7 +28,6 @@ func (c *Client) DescribeOptionGroupOptions(ctx context.Context, params *Describ return out, nil } -// type DescribeOptionGroupOptionsInput struct { // A required parameter. Options available for the given engine name are described. @@ -82,7 +81,6 @@ type DescribeOptionGroupOptionsInput struct { noSmithyDocumentSerde } -// type DescribeOptionGroupOptionsOutput struct { // An optional pagination token provided by a previous request. If this parameter diff --git a/service/rds/api_op_DescribeOptionGroups.go b/service/rds/api_op_DescribeOptionGroups.go index 55a86678568..e0f49927b2e 100644 --- a/service/rds/api_op_DescribeOptionGroups.go +++ b/service/rds/api_op_DescribeOptionGroups.go @@ -28,7 +28,6 @@ func (c *Client) DescribeOptionGroups(ctx context.Context, params *DescribeOptio return out, nil } -// type DescribeOptionGroupsInput struct { // Filters the list of option groups to only include groups associated with a diff --git a/service/rds/api_op_DescribeOrderableDBInstanceOptions.go b/service/rds/api_op_DescribeOrderableDBInstanceOptions.go index 497936a5f38..e40e3a8aad4 100644 --- a/service/rds/api_op_DescribeOrderableDBInstanceOptions.go +++ b/service/rds/api_op_DescribeOrderableDBInstanceOptions.go @@ -29,7 +29,6 @@ func (c *Client) DescribeOrderableDBInstanceOptions(ctx context.Context, params return out, nil } -// type DescribeOrderableDBInstanceOptionsInput struct { // The name of the engine to retrieve DB instance options for. Valid Values: diff --git a/service/rds/api_op_DescribePendingMaintenanceActions.go b/service/rds/api_op_DescribePendingMaintenanceActions.go index 01c0a994526..e48bf3996d6 100644 --- a/service/rds/api_op_DescribePendingMaintenanceActions.go +++ b/service/rds/api_op_DescribePendingMaintenanceActions.go @@ -29,7 +29,6 @@ func (c *Client) DescribePendingMaintenanceActions(ctx context.Context, params * return out, nil } -// type DescribePendingMaintenanceActionsInput struct { // A filter that specifies one or more resources to return pending maintenance diff --git a/service/rds/api_op_DescribeReservedDBInstances.go b/service/rds/api_op_DescribeReservedDBInstances.go index 161c4ca60a7..655ea1fafca 100644 --- a/service/rds/api_op_DescribeReservedDBInstances.go +++ b/service/rds/api_op_DescribeReservedDBInstances.go @@ -29,7 +29,6 @@ func (c *Client) DescribeReservedDBInstances(ctx context.Context, params *Descri return out, nil } -// type DescribeReservedDBInstancesInput struct { // The DB instance class filter value. Specify this parameter to show only those diff --git a/service/rds/api_op_DescribeReservedDBInstancesOfferings.go b/service/rds/api_op_DescribeReservedDBInstancesOfferings.go index 0c9e1f23ff8..311bea8e35b 100644 --- a/service/rds/api_op_DescribeReservedDBInstancesOfferings.go +++ b/service/rds/api_op_DescribeReservedDBInstancesOfferings.go @@ -28,7 +28,6 @@ func (c *Client) DescribeReservedDBInstancesOfferings(ctx context.Context, param return out, nil } -// type DescribeReservedDBInstancesOfferingsInput struct { // The DB instance class filter value. Specify this parameter to show only the diff --git a/service/rds/api_op_DescribeSourceRegions.go b/service/rds/api_op_DescribeSourceRegions.go index 8f5763a6cef..018e89dd323 100644 --- a/service/rds/api_op_DescribeSourceRegions.go +++ b/service/rds/api_op_DescribeSourceRegions.go @@ -30,7 +30,6 @@ func (c *Client) DescribeSourceRegions(ctx context.Context, params *DescribeSour return out, nil } -// type DescribeSourceRegionsInput struct { // This parameter isn't currently supported. diff --git a/service/rds/api_op_DescribeValidDBInstanceModifications.go b/service/rds/api_op_DescribeValidDBInstanceModifications.go index ad76eb771c1..16cd3354614 100644 --- a/service/rds/api_op_DescribeValidDBInstanceModifications.go +++ b/service/rds/api_op_DescribeValidDBInstanceModifications.go @@ -29,7 +29,6 @@ func (c *Client) DescribeValidDBInstanceModifications(ctx context.Context, param return out, nil } -// type DescribeValidDBInstanceModificationsInput struct { // The customer identifier or the ARN of your DB instance. diff --git a/service/rds/api_op_DownloadDBLogFilePortion.go b/service/rds/api_op_DownloadDBLogFilePortion.go index 89c97d235ba..44feb8e8767 100644 --- a/service/rds/api_op_DownloadDBLogFilePortion.go +++ b/service/rds/api_op_DownloadDBLogFilePortion.go @@ -28,7 +28,6 @@ func (c *Client) DownloadDBLogFilePortion(ctx context.Context, params *DownloadD return out, nil } -// type DownloadDBLogFilePortionInput struct { // The customer-assigned name of the DB instance that contains the log files you diff --git a/service/rds/api_op_FailoverDBCluster.go b/service/rds/api_op_FailoverDBCluster.go index e894b2fc5ea..04f408ac806 100644 --- a/service/rds/api_op_FailoverDBCluster.go +++ b/service/rds/api_op_FailoverDBCluster.go @@ -44,7 +44,6 @@ func (c *Client) FailoverDBCluster(ctx context.Context, params *FailoverDBCluste return out, nil } -// type FailoverDBClusterInput struct { // A DB cluster identifier to force a failover for. This parameter isn't diff --git a/service/rds/api_op_ListTagsForResource.go b/service/rds/api_op_ListTagsForResource.go index 5b9c2c73d80..d1c100b6558 100644 --- a/service/rds/api_op_ListTagsForResource.go +++ b/service/rds/api_op_ListTagsForResource.go @@ -30,7 +30,6 @@ func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForRes return out, nil } -// type ListTagsForResourceInput struct { // The Amazon RDS resource with tags to be listed. This value is an Amazon Resource @@ -48,7 +47,6 @@ type ListTagsForResourceInput struct { noSmithyDocumentSerde } -// type ListTagsForResourceOutput struct { // List of tags returned by the ListTagsForResource operation. diff --git a/service/rds/api_op_ModifyDBCluster.go b/service/rds/api_op_ModifyDBCluster.go index 4ee78268470..793a0a8916b 100644 --- a/service/rds/api_op_ModifyDBCluster.go +++ b/service/rds/api_op_ModifyDBCluster.go @@ -35,7 +35,6 @@ func (c *Client) ModifyDBCluster(ctx context.Context, params *ModifyDBClusterInp return out, nil } -// type ModifyDBClusterInput struct { // The DB cluster identifier for the cluster being modified. This parameter isn't diff --git a/service/rds/api_op_ModifyDBClusterParameterGroup.go b/service/rds/api_op_ModifyDBClusterParameterGroup.go index 6b81d6db2d0..7696620d13f 100644 --- a/service/rds/api_op_ModifyDBClusterParameterGroup.go +++ b/service/rds/api_op_ModifyDBClusterParameterGroup.go @@ -50,7 +50,6 @@ func (c *Client) ModifyDBClusterParameterGroup(ctx context.Context, params *Modi return out, nil } -// type ModifyDBClusterParameterGroupInput struct { // The name of the DB cluster parameter group to modify. @@ -73,7 +72,6 @@ type ModifyDBClusterParameterGroupInput struct { noSmithyDocumentSerde } -// type ModifyDBClusterParameterGroupOutput struct { // The name of the DB cluster parameter group. Constraints: diff --git a/service/rds/api_op_ModifyDBClusterSnapshotAttribute.go b/service/rds/api_op_ModifyDBClusterSnapshotAttribute.go index a84a672b8c1..9e0e0b7df9c 100644 --- a/service/rds/api_op_ModifyDBClusterSnapshotAttribute.go +++ b/service/rds/api_op_ModifyDBClusterSnapshotAttribute.go @@ -42,7 +42,6 @@ func (c *Client) ModifyDBClusterSnapshotAttribute(ctx context.Context, params *M return out, nil } -// type ModifyDBClusterSnapshotAttributeInput struct { // The name of the DB cluster snapshot attribute to modify. To manage authorization diff --git a/service/rds/api_op_ModifyDBInstance.go b/service/rds/api_op_ModifyDBInstance.go index cb44f3f0d11..34f289b5f7e 100644 --- a/service/rds/api_op_ModifyDBInstance.go +++ b/service/rds/api_op_ModifyDBInstance.go @@ -30,7 +30,6 @@ func (c *Client) ModifyDBInstance(ctx context.Context, params *ModifyDBInstanceI return out, nil } -// type ModifyDBInstanceInput struct { // The DB instance identifier. This value is stored as a lowercase string. diff --git a/service/rds/api_op_ModifyDBParameterGroup.go b/service/rds/api_op_ModifyDBParameterGroup.go index 985f69ff0c3..dd8fe8f6a1d 100644 --- a/service/rds/api_op_ModifyDBParameterGroup.go +++ b/service/rds/api_op_ModifyDBParameterGroup.go @@ -39,7 +39,6 @@ func (c *Client) ModifyDBParameterGroup(ctx context.Context, params *ModifyDBPar return out, nil } -// type ModifyDBParameterGroupInput struct { // The name of the DB parameter group. Constraints: diff --git a/service/rds/api_op_ModifyDBSnapshotAttribute.go b/service/rds/api_op_ModifyDBSnapshotAttribute.go index 1c9b4e5e5c5..b746008caaa 100644 --- a/service/rds/api_op_ModifyDBSnapshotAttribute.go +++ b/service/rds/api_op_ModifyDBSnapshotAttribute.go @@ -41,7 +41,6 @@ func (c *Client) ModifyDBSnapshotAttribute(ctx context.Context, params *ModifyDB return out, nil } -// type ModifyDBSnapshotAttributeInput struct { // The name of the DB snapshot attribute to modify. To manage authorization for diff --git a/service/rds/api_op_ModifyDBSubnetGroup.go b/service/rds/api_op_ModifyDBSubnetGroup.go index eff6a1711b2..ae1163f958c 100644 --- a/service/rds/api_op_ModifyDBSubnetGroup.go +++ b/service/rds/api_op_ModifyDBSubnetGroup.go @@ -28,7 +28,6 @@ func (c *Client) ModifyDBSubnetGroup(ctx context.Context, params *ModifyDBSubnet return out, nil } -// type ModifyDBSubnetGroupInput struct { // The name for the DB subnet group. This value is stored as a lowercase string. diff --git a/service/rds/api_op_ModifyEventSubscription.go b/service/rds/api_op_ModifyEventSubscription.go index c745d1e8f4b..697833d6817 100644 --- a/service/rds/api_op_ModifyEventSubscription.go +++ b/service/rds/api_op_ModifyEventSubscription.go @@ -33,7 +33,6 @@ func (c *Client) ModifyEventSubscription(ctx context.Context, params *ModifyEven return out, nil } -// type ModifyEventSubscriptionInput struct { // The name of the RDS event notification subscription. diff --git a/service/rds/api_op_ModifyOptionGroup.go b/service/rds/api_op_ModifyOptionGroup.go index 2a795bad996..a04b21a7b86 100644 --- a/service/rds/api_op_ModifyOptionGroup.go +++ b/service/rds/api_op_ModifyOptionGroup.go @@ -27,7 +27,6 @@ func (c *Client) ModifyOptionGroup(ctx context.Context, params *ModifyOptionGrou return out, nil } -// type ModifyOptionGroupInput struct { // The name of the option group to be modified. Permanent options, such as the TDE diff --git a/service/rds/api_op_PromoteReadReplica.go b/service/rds/api_op_PromoteReadReplica.go index 8d34913b0e7..9c427283fb8 100644 --- a/service/rds/api_op_PromoteReadReplica.go +++ b/service/rds/api_op_PromoteReadReplica.go @@ -39,7 +39,6 @@ func (c *Client) PromoteReadReplica(ctx context.Context, params *PromoteReadRepl return out, nil } -// type PromoteReadReplicaInput struct { // The DB instance identifier. This value is stored as a lowercase string. diff --git a/service/rds/api_op_PromoteReadReplicaDBCluster.go b/service/rds/api_op_PromoteReadReplicaDBCluster.go index 54faf7b3817..18686fcceee 100644 --- a/service/rds/api_op_PromoteReadReplicaDBCluster.go +++ b/service/rds/api_op_PromoteReadReplicaDBCluster.go @@ -27,7 +27,6 @@ func (c *Client) PromoteReadReplicaDBCluster(ctx context.Context, params *Promot return out, nil } -// type PromoteReadReplicaDBClusterInput struct { // The identifier of the DB cluster read replica to promote. This parameter isn't diff --git a/service/rds/api_op_PurchaseReservedDBInstancesOffering.go b/service/rds/api_op_PurchaseReservedDBInstancesOffering.go index d14e13cc8a5..7dabeff7bc6 100644 --- a/service/rds/api_op_PurchaseReservedDBInstancesOffering.go +++ b/service/rds/api_op_PurchaseReservedDBInstancesOffering.go @@ -27,7 +27,6 @@ func (c *Client) PurchaseReservedDBInstancesOffering(ctx context.Context, params return out, nil } -// type PurchaseReservedDBInstancesOfferingInput struct { // The ID of the Reserved DB instance offering to purchase. Example: diff --git a/service/rds/api_op_RebootDBInstance.go b/service/rds/api_op_RebootDBInstance.go index 1ab2141b8df..bf5f1749310 100644 --- a/service/rds/api_op_RebootDBInstance.go +++ b/service/rds/api_op_RebootDBInstance.go @@ -37,7 +37,6 @@ func (c *Client) RebootDBInstance(ctx context.Context, params *RebootDBInstanceI return out, nil } -// type RebootDBInstanceInput struct { // The DB instance identifier. This parameter is stored as a lowercase string. diff --git a/service/rds/api_op_RemoveSourceIdentifierFromSubscription.go b/service/rds/api_op_RemoveSourceIdentifierFromSubscription.go index 96546ff4741..022fadb39b1 100644 --- a/service/rds/api_op_RemoveSourceIdentifierFromSubscription.go +++ b/service/rds/api_op_RemoveSourceIdentifierFromSubscription.go @@ -28,7 +28,6 @@ func (c *Client) RemoveSourceIdentifierFromSubscription(ctx context.Context, par return out, nil } -// type RemoveSourceIdentifierFromSubscriptionInput struct { // The source identifier to be removed from the subscription, such as the DB diff --git a/service/rds/api_op_RemoveTagsFromResource.go b/service/rds/api_op_RemoveTagsFromResource.go index 0b622f1a7b1..a27e28cdff3 100644 --- a/service/rds/api_op_RemoveTagsFromResource.go +++ b/service/rds/api_op_RemoveTagsFromResource.go @@ -29,7 +29,6 @@ func (c *Client) RemoveTagsFromResource(ctx context.Context, params *RemoveTagsF return out, nil } -// type RemoveTagsFromResourceInput struct { // The Amazon RDS resource that the tags are removed from. This value is an Amazon diff --git a/service/rds/api_op_ResetDBClusterParameterGroup.go b/service/rds/api_op_ResetDBClusterParameterGroup.go index bb12489ff35..44cfa258338 100644 --- a/service/rds/api_op_ResetDBClusterParameterGroup.go +++ b/service/rds/api_op_ResetDBClusterParameterGroup.go @@ -41,7 +41,6 @@ func (c *Client) ResetDBClusterParameterGroup(ctx context.Context, params *Reset return out, nil } -// type ResetDBClusterParameterGroupInput struct { // The name of the DB cluster parameter group to reset. @@ -62,7 +61,6 @@ type ResetDBClusterParameterGroupInput struct { noSmithyDocumentSerde } -// type ResetDBClusterParameterGroupOutput struct { // The name of the DB cluster parameter group. Constraints: diff --git a/service/rds/api_op_ResetDBParameterGroup.go b/service/rds/api_op_ResetDBParameterGroup.go index b8f46c85f08..f485eeb0085 100644 --- a/service/rds/api_op_ResetDBParameterGroup.go +++ b/service/rds/api_op_ResetDBParameterGroup.go @@ -33,7 +33,6 @@ func (c *Client) ResetDBParameterGroup(ctx context.Context, params *ResetDBParam return out, nil } -// type ResetDBParameterGroupInput struct { // The name of the DB parameter group. Constraints: diff --git a/service/rds/api_op_RestoreDBClusterFromSnapshot.go b/service/rds/api_op_RestoreDBClusterFromSnapshot.go index a86c7734639..7f34318263e 100644 --- a/service/rds/api_op_RestoreDBClusterFromSnapshot.go +++ b/service/rds/api_op_RestoreDBClusterFromSnapshot.go @@ -41,7 +41,6 @@ func (c *Client) RestoreDBClusterFromSnapshot(ctx context.Context, params *Resto return out, nil } -// type RestoreDBClusterFromSnapshotInput struct { // The name of the DB cluster to create from the DB snapshot or DB cluster diff --git a/service/rds/api_op_RestoreDBClusterToPointInTime.go b/service/rds/api_op_RestoreDBClusterToPointInTime.go index cafa62beaa3..96ce7c25181 100644 --- a/service/rds/api_op_RestoreDBClusterToPointInTime.go +++ b/service/rds/api_op_RestoreDBClusterToPointInTime.go @@ -44,7 +44,6 @@ func (c *Client) RestoreDBClusterToPointInTime(ctx context.Context, params *Rest return out, nil } -// type RestoreDBClusterToPointInTimeInput struct { // The name of the new DB cluster to be created. Constraints: diff --git a/service/rds/api_op_RestoreDBInstanceFromDBSnapshot.go b/service/rds/api_op_RestoreDBInstanceFromDBSnapshot.go index 942d94021c3..2d4ae2a8ff7 100644 --- a/service/rds/api_op_RestoreDBInstanceFromDBSnapshot.go +++ b/service/rds/api_op_RestoreDBInstanceFromDBSnapshot.go @@ -43,7 +43,6 @@ func (c *Client) RestoreDBInstanceFromDBSnapshot(ctx context.Context, params *Re return out, nil } -// type RestoreDBInstanceFromDBSnapshotInput struct { // Name of the DB instance to create from the DB snapshot. This parameter isn't diff --git a/service/rds/api_op_RestoreDBInstanceToPointInTime.go b/service/rds/api_op_RestoreDBInstanceToPointInTime.go index b11b831d8b5..2cc7f0fab5a 100644 --- a/service/rds/api_op_RestoreDBInstanceToPointInTime.go +++ b/service/rds/api_op_RestoreDBInstanceToPointInTime.go @@ -38,7 +38,6 @@ func (c *Client) RestoreDBInstanceToPointInTime(ctx context.Context, params *Res return out, nil } -// type RestoreDBInstanceToPointInTimeInput struct { // The name of the new DB instance to be created. Constraints: diff --git a/service/rds/api_op_RevokeDBSecurityGroupIngress.go b/service/rds/api_op_RevokeDBSecurityGroupIngress.go index 1e6a5bf1d93..1734fcec8c6 100644 --- a/service/rds/api_op_RevokeDBSecurityGroupIngress.go +++ b/service/rds/api_op_RevokeDBSecurityGroupIngress.go @@ -30,7 +30,6 @@ func (c *Client) RevokeDBSecurityGroupIngress(ctx context.Context, params *Revok return out, nil } -// type RevokeDBSecurityGroupIngressInput struct { // The name of the DB security group to revoke ingress from. diff --git a/service/rds/types/types.go b/service/rds/types/types.go index 71f7933130f..b818181f3b4 100644 --- a/service/rds/types/types.go +++ b/service/rds/types/types.go @@ -2650,7 +2650,6 @@ type OptionConfiguration struct { noSmithyDocumentSerde } -// type OptionGroup struct { // Indicates whether this option group can be applied to both VPC and non-VPC diff --git a/service/rdsdata/types/types.go b/service/rdsdata/types/types.go index 52ea4aa24c0..73ae963eb20 100644 --- a/service/rdsdata/types/types.go +++ b/service/rdsdata/types/types.go @@ -9,11 +9,12 @@ import ( // Contains an array. // // The following types satisfy this interface: -// ArrayValueMemberArrayValues -// ArrayValueMemberBooleanValues -// ArrayValueMemberDoubleValues -// ArrayValueMemberLongValues -// ArrayValueMemberStringValues +// +// ArrayValueMemberArrayValues +// ArrayValueMemberBooleanValues +// ArrayValueMemberDoubleValues +// ArrayValueMemberLongValues +// ArrayValueMemberStringValues type ArrayValue interface { isArrayValue() } @@ -114,13 +115,14 @@ type ColumnMetadata struct { // Contains a value. // // The following types satisfy this interface: -// FieldMemberArrayValue -// FieldMemberBlobValue -// FieldMemberBooleanValue -// FieldMemberDoubleValue -// FieldMemberIsNull -// FieldMemberLongValue -// FieldMemberStringValue +// +// FieldMemberArrayValue +// FieldMemberBlobValue +// FieldMemberBooleanValue +// FieldMemberDoubleValue +// FieldMemberIsNull +// FieldMemberLongValue +// FieldMemberStringValue type Field interface { isField() } @@ -321,16 +323,17 @@ type UpdateResult struct { // ExecuteStatement operation instead. // // The following types satisfy this interface: -// ValueMemberArrayValues -// ValueMemberBigIntValue -// ValueMemberBitValue -// ValueMemberBlobValue -// ValueMemberDoubleValue -// ValueMemberIntValue -// ValueMemberIsNull -// ValueMemberRealValue -// ValueMemberStringValue -// ValueMemberStructValue +// +// ValueMemberArrayValues +// ValueMemberBigIntValue +// ValueMemberBitValue +// ValueMemberBlobValue +// ValueMemberDoubleValue +// ValueMemberIntValue +// ValueMemberIsNull +// ValueMemberRealValue +// ValueMemberStringValue +// ValueMemberStructValue type Value interface { isValue() } diff --git a/service/redshift/api_op_AuthorizeClusterSecurityGroupIngress.go b/service/redshift/api_op_AuthorizeClusterSecurityGroupIngress.go index 4d83f0ed4f2..095e40e1541 100644 --- a/service/redshift/api_op_AuthorizeClusterSecurityGroupIngress.go +++ b/service/redshift/api_op_AuthorizeClusterSecurityGroupIngress.go @@ -42,7 +42,6 @@ func (c *Client) AuthorizeClusterSecurityGroupIngress(ctx context.Context, param return out, nil } -// type AuthorizeClusterSecurityGroupIngressInput struct { // The name of the security group to which the ingress rule is added. diff --git a/service/redshift/api_op_AuthorizeSnapshotAccess.go b/service/redshift/api_op_AuthorizeSnapshotAccess.go index 184dd00c0cc..a79d0e6860d 100644 --- a/service/redshift/api_op_AuthorizeSnapshotAccess.go +++ b/service/redshift/api_op_AuthorizeSnapshotAccess.go @@ -31,7 +31,6 @@ func (c *Client) AuthorizeSnapshotAccess(ctx context.Context, params *AuthorizeS return out, nil } -// type AuthorizeSnapshotAccessInput struct { // The identifier of the Amazon Web Services account authorized to restore the diff --git a/service/redshift/api_op_CopyClusterSnapshot.go b/service/redshift/api_op_CopyClusterSnapshot.go index 9952d8dbc6c..9df7c4b1f01 100644 --- a/service/redshift/api_op_CopyClusterSnapshot.go +++ b/service/redshift/api_op_CopyClusterSnapshot.go @@ -36,7 +36,6 @@ func (c *Client) CopyClusterSnapshot(ctx context.Context, params *CopyClusterSna return out, nil } -// type CopyClusterSnapshotInput struct { // The identifier for the source snapshot. Constraints: diff --git a/service/redshift/api_op_CreateCluster.go b/service/redshift/api_op_CreateCluster.go index 55e3dff0a53..3a6f64625d2 100644 --- a/service/redshift/api_op_CreateCluster.go +++ b/service/redshift/api_op_CreateCluster.go @@ -33,7 +33,6 @@ func (c *Client) CreateCluster(ctx context.Context, params *CreateClusterInput, return out, nil } -// type CreateClusterInput struct { // A unique identifier for the cluster. You use this identifier to refer to the diff --git a/service/redshift/api_op_CreateClusterParameterGroup.go b/service/redshift/api_op_CreateClusterParameterGroup.go index 69270c307f9..8b4b4465728 100644 --- a/service/redshift/api_op_CreateClusterParameterGroup.go +++ b/service/redshift/api_op_CreateClusterParameterGroup.go @@ -35,7 +35,6 @@ func (c *Client) CreateClusterParameterGroup(ctx context.Context, params *Create return out, nil } -// type CreateClusterParameterGroupInput struct { // A description of the parameter group. diff --git a/service/redshift/api_op_CreateClusterSecurityGroup.go b/service/redshift/api_op_CreateClusterSecurityGroup.go index 85dd765e1d9..0c7171f9e42 100644 --- a/service/redshift/api_op_CreateClusterSecurityGroup.go +++ b/service/redshift/api_op_CreateClusterSecurityGroup.go @@ -31,7 +31,6 @@ func (c *Client) CreateClusterSecurityGroup(ctx context.Context, params *CreateC return out, nil } -// type CreateClusterSecurityGroupInput struct { // The name for the security group. Amazon Redshift stores the value as a lowercase diff --git a/service/redshift/api_op_CreateClusterSnapshot.go b/service/redshift/api_op_CreateClusterSnapshot.go index 7cbd31939e1..a025d2aa6aa 100644 --- a/service/redshift/api_op_CreateClusterSnapshot.go +++ b/service/redshift/api_op_CreateClusterSnapshot.go @@ -31,7 +31,6 @@ func (c *Client) CreateClusterSnapshot(ctx context.Context, params *CreateCluste return out, nil } -// type CreateClusterSnapshotInput struct { // The cluster identifier for which you want a snapshot. diff --git a/service/redshift/api_op_CreateClusterSubnetGroup.go b/service/redshift/api_op_CreateClusterSubnetGroup.go index f3b1366ef7a..534571ebc08 100644 --- a/service/redshift/api_op_CreateClusterSubnetGroup.go +++ b/service/redshift/api_op_CreateClusterSubnetGroup.go @@ -32,7 +32,6 @@ func (c *Client) CreateClusterSubnetGroup(ctx context.Context, params *CreateClu return out, nil } -// type CreateClusterSubnetGroupInput struct { // The name for the subnet group. Amazon Redshift stores the value as a lowercase diff --git a/service/redshift/api_op_CreateEventSubscription.go b/service/redshift/api_op_CreateEventSubscription.go index 8e3b6a50b4f..01242c05263 100644 --- a/service/redshift/api_op_CreateEventSubscription.go +++ b/service/redshift/api_op_CreateEventSubscription.go @@ -45,7 +45,6 @@ func (c *Client) CreateEventSubscription(ctx context.Context, params *CreateEven return out, nil } -// type CreateEventSubscriptionInput struct { // The Amazon Resource Name (ARN) of the Amazon SNS topic used to transmit the diff --git a/service/redshift/api_op_CreateHsmClientCertificate.go b/service/redshift/api_op_CreateHsmClientCertificate.go index d850243430e..d66912229f4 100644 --- a/service/redshift/api_op_CreateHsmClientCertificate.go +++ b/service/redshift/api_op_CreateHsmClientCertificate.go @@ -35,7 +35,6 @@ func (c *Client) CreateHsmClientCertificate(ctx context.Context, params *CreateH return out, nil } -// type CreateHsmClientCertificateInput struct { // The identifier to be assigned to the new HSM client certificate that the cluster diff --git a/service/redshift/api_op_CreateHsmConfiguration.go b/service/redshift/api_op_CreateHsmConfiguration.go index 746ddd8d11e..d35570f196f 100644 --- a/service/redshift/api_op_CreateHsmConfiguration.go +++ b/service/redshift/api_op_CreateHsmConfiguration.go @@ -35,7 +35,6 @@ func (c *Client) CreateHsmConfiguration(ctx context.Context, params *CreateHsmCo return out, nil } -// type CreateHsmConfigurationInput struct { // A text description of the HSM configuration to be created. diff --git a/service/redshift/api_op_DeleteCluster.go b/service/redshift/api_op_DeleteCluster.go index a72ea8e4553..a3b7886f440 100644 --- a/service/redshift/api_op_DeleteCluster.go +++ b/service/redshift/api_op_DeleteCluster.go @@ -41,7 +41,6 @@ func (c *Client) DeleteCluster(ctx context.Context, params *DeleteClusterInput, return out, nil } -// type DeleteClusterInput struct { // The identifier of the cluster to be deleted. Constraints: diff --git a/service/redshift/api_op_DeleteClusterParameterGroup.go b/service/redshift/api_op_DeleteClusterParameterGroup.go index 9e0277140ca..aae874743c1 100644 --- a/service/redshift/api_op_DeleteClusterParameterGroup.go +++ b/service/redshift/api_op_DeleteClusterParameterGroup.go @@ -27,7 +27,6 @@ func (c *Client) DeleteClusterParameterGroup(ctx context.Context, params *Delete return out, nil } -// type DeleteClusterParameterGroupInput struct { // The name of the parameter group to be deleted. Constraints: diff --git a/service/redshift/api_op_DeleteClusterSecurityGroup.go b/service/redshift/api_op_DeleteClusterSecurityGroup.go index efa80fc5865..e3c14e93532 100644 --- a/service/redshift/api_op_DeleteClusterSecurityGroup.go +++ b/service/redshift/api_op_DeleteClusterSecurityGroup.go @@ -31,7 +31,6 @@ func (c *Client) DeleteClusterSecurityGroup(ctx context.Context, params *DeleteC return out, nil } -// type DeleteClusterSecurityGroupInput struct { // The name of the cluster security group to be deleted. diff --git a/service/redshift/api_op_DeleteClusterSnapshot.go b/service/redshift/api_op_DeleteClusterSnapshot.go index 7ef25f803b9..0d76234b0dd 100644 --- a/service/redshift/api_op_DeleteClusterSnapshot.go +++ b/service/redshift/api_op_DeleteClusterSnapshot.go @@ -33,7 +33,6 @@ func (c *Client) DeleteClusterSnapshot(ctx context.Context, params *DeleteCluste return out, nil } -// type DeleteClusterSnapshotInput struct { // The unique identifier of the manual snapshot to be deleted. Constraints: Must be diff --git a/service/redshift/api_op_DeleteClusterSubnetGroup.go b/service/redshift/api_op_DeleteClusterSubnetGroup.go index 36ce8e21ba8..d618a2caed3 100644 --- a/service/redshift/api_op_DeleteClusterSubnetGroup.go +++ b/service/redshift/api_op_DeleteClusterSubnetGroup.go @@ -26,7 +26,6 @@ func (c *Client) DeleteClusterSubnetGroup(ctx context.Context, params *DeleteClu return out, nil } -// type DeleteClusterSubnetGroupInput struct { // The name of the cluster subnet group name to be deleted. diff --git a/service/redshift/api_op_DeleteEventSubscription.go b/service/redshift/api_op_DeleteEventSubscription.go index 1df2bfc6901..c94540f5ed9 100644 --- a/service/redshift/api_op_DeleteEventSubscription.go +++ b/service/redshift/api_op_DeleteEventSubscription.go @@ -26,7 +26,6 @@ func (c *Client) DeleteEventSubscription(ctx context.Context, params *DeleteEven return out, nil } -// type DeleteEventSubscriptionInput struct { // The name of the Amazon Redshift event notification subscription to be deleted. diff --git a/service/redshift/api_op_DeleteHsmClientCertificate.go b/service/redshift/api_op_DeleteHsmClientCertificate.go index 67c2d4f4468..f25c4751e64 100644 --- a/service/redshift/api_op_DeleteHsmClientCertificate.go +++ b/service/redshift/api_op_DeleteHsmClientCertificate.go @@ -26,7 +26,6 @@ func (c *Client) DeleteHsmClientCertificate(ctx context.Context, params *DeleteH return out, nil } -// type DeleteHsmClientCertificateInput struct { // The identifier of the HSM client certificate to be deleted. diff --git a/service/redshift/api_op_DeleteHsmConfiguration.go b/service/redshift/api_op_DeleteHsmConfiguration.go index 95679a7824c..4da22da6f9c 100644 --- a/service/redshift/api_op_DeleteHsmConfiguration.go +++ b/service/redshift/api_op_DeleteHsmConfiguration.go @@ -26,7 +26,6 @@ func (c *Client) DeleteHsmConfiguration(ctx context.Context, params *DeleteHsmCo return out, nil } -// type DeleteHsmConfigurationInput struct { // The identifier of the Amazon Redshift HSM configuration to be deleted. diff --git a/service/redshift/api_op_DescribeClusterParameterGroups.go b/service/redshift/api_op_DescribeClusterParameterGroups.go index 5275ee84b6e..c957fa574e0 100644 --- a/service/redshift/api_op_DescribeClusterParameterGroups.go +++ b/service/redshift/api_op_DescribeClusterParameterGroups.go @@ -41,7 +41,6 @@ func (c *Client) DescribeClusterParameterGroups(ctx context.Context, params *Des return out, nil } -// type DescribeClusterParameterGroupsInput struct { // An optional parameter that specifies the starting point to return a set of diff --git a/service/redshift/api_op_DescribeClusterParameters.go b/service/redshift/api_op_DescribeClusterParameters.go index 027a3dd188b..f55481bc494 100644 --- a/service/redshift/api_op_DescribeClusterParameters.go +++ b/service/redshift/api_op_DescribeClusterParameters.go @@ -37,7 +37,6 @@ func (c *Client) DescribeClusterParameters(ctx context.Context, params *Describe return out, nil } -// type DescribeClusterParametersInput struct { // The name of a cluster parameter group for which to return details. diff --git a/service/redshift/api_op_DescribeClusterSecurityGroups.go b/service/redshift/api_op_DescribeClusterSecurityGroups.go index f9cdfded89d..34004696e7f 100644 --- a/service/redshift/api_op_DescribeClusterSecurityGroups.go +++ b/service/redshift/api_op_DescribeClusterSecurityGroups.go @@ -39,7 +39,6 @@ func (c *Client) DescribeClusterSecurityGroups(ctx context.Context, params *Desc return out, nil } -// type DescribeClusterSecurityGroupsInput struct { // The name of a cluster security group for which you are requesting details. You @@ -82,7 +81,6 @@ type DescribeClusterSecurityGroupsInput struct { noSmithyDocumentSerde } -// type DescribeClusterSecurityGroupsOutput struct { // A list of ClusterSecurityGroup instances. diff --git a/service/redshift/api_op_DescribeClusterSnapshots.go b/service/redshift/api_op_DescribeClusterSnapshots.go index 0c5a7813ffe..207a3bf69f5 100644 --- a/service/redshift/api_op_DescribeClusterSnapshots.go +++ b/service/redshift/api_op_DescribeClusterSnapshots.go @@ -43,7 +43,6 @@ func (c *Client) DescribeClusterSnapshots(ctx context.Context, params *DescribeC return out, nil } -// type DescribeClusterSnapshotsInput struct { // A value that indicates whether to return snapshots only for an existing cluster. diff --git a/service/redshift/api_op_DescribeClusterSubnetGroups.go b/service/redshift/api_op_DescribeClusterSubnetGroups.go index fb039dca7c4..3f48ecc1206 100644 --- a/service/redshift/api_op_DescribeClusterSubnetGroups.go +++ b/service/redshift/api_op_DescribeClusterSubnetGroups.go @@ -37,7 +37,6 @@ func (c *Client) DescribeClusterSubnetGroups(ctx context.Context, params *Descri return out, nil } -// type DescribeClusterSubnetGroupsInput struct { // The name of the cluster subnet group for which information is requested. diff --git a/service/redshift/api_op_DescribeClusterVersions.go b/service/redshift/api_op_DescribeClusterVersions.go index f2b766839da..f8bc849de43 100644 --- a/service/redshift/api_op_DescribeClusterVersions.go +++ b/service/redshift/api_op_DescribeClusterVersions.go @@ -33,7 +33,6 @@ func (c *Client) DescribeClusterVersions(ctx context.Context, params *DescribeCl return out, nil } -// type DescribeClusterVersionsInput struct { // The name of a specific cluster parameter group family to return details for. diff --git a/service/redshift/api_op_DescribeClusters.go b/service/redshift/api_op_DescribeClusters.go index 0191588b727..aaa79b34a06 100644 --- a/service/redshift/api_op_DescribeClusters.go +++ b/service/redshift/api_op_DescribeClusters.go @@ -45,7 +45,6 @@ func (c *Client) DescribeClusters(ctx context.Context, params *DescribeClustersI return out, nil } -// type DescribeClustersInput struct { // The unique identifier of a cluster whose properties you are requesting. This diff --git a/service/redshift/api_op_DescribeDefaultClusterParameters.go b/service/redshift/api_op_DescribeDefaultClusterParameters.go index 6b2750a51fa..0591fd03bcc 100644 --- a/service/redshift/api_op_DescribeDefaultClusterParameters.go +++ b/service/redshift/api_op_DescribeDefaultClusterParameters.go @@ -32,7 +32,6 @@ func (c *Client) DescribeDefaultClusterParameters(ctx context.Context, params *D return out, nil } -// type DescribeDefaultClusterParametersInput struct { // The name of the cluster parameter group family. diff --git a/service/redshift/api_op_DescribeEventCategories.go b/service/redshift/api_op_DescribeEventCategories.go index 43269f0e82d..ac00d7fddd5 100644 --- a/service/redshift/api_op_DescribeEventCategories.go +++ b/service/redshift/api_op_DescribeEventCategories.go @@ -30,7 +30,6 @@ func (c *Client) DescribeEventCategories(ctx context.Context, params *DescribeEv return out, nil } -// type DescribeEventCategoriesInput struct { // The source type, such as cluster or parameter group, to which the described @@ -41,7 +40,6 @@ type DescribeEventCategoriesInput struct { noSmithyDocumentSerde } -// type DescribeEventCategoriesOutput struct { // A list of event categories descriptions. diff --git a/service/redshift/api_op_DescribeEventSubscriptions.go b/service/redshift/api_op_DescribeEventSubscriptions.go index d2d6a0df157..7e873185b6d 100644 --- a/service/redshift/api_op_DescribeEventSubscriptions.go +++ b/service/redshift/api_op_DescribeEventSubscriptions.go @@ -37,7 +37,6 @@ func (c *Client) DescribeEventSubscriptions(ctx context.Context, params *Describ return out, nil } -// type DescribeEventSubscriptionsInput struct { // An optional parameter that specifies the starting point to return a set of @@ -77,7 +76,6 @@ type DescribeEventSubscriptionsInput struct { noSmithyDocumentSerde } -// type DescribeEventSubscriptionsOutput struct { // A list of event subscriptions. diff --git a/service/redshift/api_op_DescribeEvents.go b/service/redshift/api_op_DescribeEvents.go index 886e47d794e..0d1334c3489 100644 --- a/service/redshift/api_op_DescribeEvents.go +++ b/service/redshift/api_op_DescribeEvents.go @@ -32,7 +32,6 @@ func (c *Client) DescribeEvents(ctx context.Context, params *DescribeEventsInput return out, nil } -// type DescribeEventsInput struct { // The number of minutes prior to the time of the request for which to retrieve @@ -103,7 +102,6 @@ type DescribeEventsInput struct { noSmithyDocumentSerde } -// type DescribeEventsOutput struct { // A list of Event instances. diff --git a/service/redshift/api_op_DescribeHsmClientCertificates.go b/service/redshift/api_op_DescribeHsmClientCertificates.go index bd6571cef33..627b66034fa 100644 --- a/service/redshift/api_op_DescribeHsmClientCertificates.go +++ b/service/redshift/api_op_DescribeHsmClientCertificates.go @@ -37,7 +37,6 @@ func (c *Client) DescribeHsmClientCertificates(ctx context.Context, params *Desc return out, nil } -// type DescribeHsmClientCertificatesInput struct { // The identifier of a specific HSM client certificate for which you want @@ -79,7 +78,6 @@ type DescribeHsmClientCertificatesInput struct { noSmithyDocumentSerde } -// type DescribeHsmClientCertificatesOutput struct { // A list of the identifiers for one or more HSM client certificates used by Amazon diff --git a/service/redshift/api_op_DescribeHsmConfigurations.go b/service/redshift/api_op_DescribeHsmConfigurations.go index a3d6202ae25..70f3b3890ad 100644 --- a/service/redshift/api_op_DescribeHsmConfigurations.go +++ b/service/redshift/api_op_DescribeHsmConfigurations.go @@ -37,7 +37,6 @@ func (c *Client) DescribeHsmConfigurations(ctx context.Context, params *Describe return out, nil } -// type DescribeHsmConfigurationsInput struct { // The identifier of a specific Amazon Redshift HSM configuration to be described. @@ -79,7 +78,6 @@ type DescribeHsmConfigurationsInput struct { noSmithyDocumentSerde } -// type DescribeHsmConfigurationsOutput struct { // A list of HsmConfiguration objects. diff --git a/service/redshift/api_op_DescribeLoggingStatus.go b/service/redshift/api_op_DescribeLoggingStatus.go index 8701c4246ec..a48db30cbcd 100644 --- a/service/redshift/api_op_DescribeLoggingStatus.go +++ b/service/redshift/api_op_DescribeLoggingStatus.go @@ -29,7 +29,6 @@ func (c *Client) DescribeLoggingStatus(ctx context.Context, params *DescribeLogg return out, nil } -// type DescribeLoggingStatusInput struct { // The identifier of the cluster from which to get the logging status. Example: diff --git a/service/redshift/api_op_DescribeOrderableClusterOptions.go b/service/redshift/api_op_DescribeOrderableClusterOptions.go index 004d415e83c..503b0928c04 100644 --- a/service/redshift/api_op_DescribeOrderableClusterOptions.go +++ b/service/redshift/api_op_DescribeOrderableClusterOptions.go @@ -37,7 +37,6 @@ func (c *Client) DescribeOrderableClusterOptions(ctx context.Context, params *De return out, nil } -// type DescribeOrderableClusterOptionsInput struct { // The version filter value. Specify this parameter to show only the available diff --git a/service/redshift/api_op_DescribeReservedNodeOfferings.go b/service/redshift/api_op_DescribeReservedNodeOfferings.go index d3c702b3ec0..7cf4232e68e 100644 --- a/service/redshift/api_op_DescribeReservedNodeOfferings.go +++ b/service/redshift/api_op_DescribeReservedNodeOfferings.go @@ -37,7 +37,6 @@ func (c *Client) DescribeReservedNodeOfferings(ctx context.Context, params *Desc return out, nil } -// type DescribeReservedNodeOfferingsInput struct { // An optional parameter that specifies the starting point to return a set of @@ -61,7 +60,6 @@ type DescribeReservedNodeOfferingsInput struct { noSmithyDocumentSerde } -// type DescribeReservedNodeOfferingsOutput struct { // A value that indicates the starting point for the next set of response records diff --git a/service/redshift/api_op_DescribeReservedNodes.go b/service/redshift/api_op_DescribeReservedNodes.go index 3375b2b922d..2f5e3619a71 100644 --- a/service/redshift/api_op_DescribeReservedNodes.go +++ b/service/redshift/api_op_DescribeReservedNodes.go @@ -28,7 +28,6 @@ func (c *Client) DescribeReservedNodes(ctx context.Context, params *DescribeRese return out, nil } -// type DescribeReservedNodesInput struct { // An optional parameter that specifies the starting point to return a set of @@ -52,7 +51,6 @@ type DescribeReservedNodesInput struct { noSmithyDocumentSerde } -// type DescribeReservedNodesOutput struct { // A value that indicates the starting point for the next set of response records diff --git a/service/redshift/api_op_DescribeResize.go b/service/redshift/api_op_DescribeResize.go index 3b4d5b965dd..70890eb19fd 100644 --- a/service/redshift/api_op_DescribeResize.go +++ b/service/redshift/api_op_DescribeResize.go @@ -31,7 +31,6 @@ func (c *Client) DescribeResize(ctx context.Context, params *DescribeResizeInput return out, nil } -// type DescribeResizeInput struct { // The unique identifier of a cluster whose resize progress you are requesting. diff --git a/service/redshift/api_op_DescribeSnapshotCopyGrants.go b/service/redshift/api_op_DescribeSnapshotCopyGrants.go index 4f145d4eb72..b660f2cee4c 100644 --- a/service/redshift/api_op_DescribeSnapshotCopyGrants.go +++ b/service/redshift/api_op_DescribeSnapshotCopyGrants.go @@ -71,7 +71,6 @@ type DescribeSnapshotCopyGrantsInput struct { noSmithyDocumentSerde } -// type DescribeSnapshotCopyGrantsOutput struct { // An optional parameter that specifies the starting point to return a set of diff --git a/service/redshift/api_op_DescribeTableRestoreStatus.go b/service/redshift/api_op_DescribeTableRestoreStatus.go index b31b03565bd..a1109a88d32 100644 --- a/service/redshift/api_op_DescribeTableRestoreStatus.go +++ b/service/redshift/api_op_DescribeTableRestoreStatus.go @@ -33,7 +33,6 @@ func (c *Client) DescribeTableRestoreStatus(ctx context.Context, params *Describ return out, nil } -// type DescribeTableRestoreStatusInput struct { // The Amazon Redshift cluster that the table is being restored to. @@ -57,7 +56,6 @@ type DescribeTableRestoreStatusInput struct { noSmithyDocumentSerde } -// type DescribeTableRestoreStatusOutput struct { // A pagination token that can be used in a subsequent DescribeTableRestoreStatus diff --git a/service/redshift/api_op_DescribeTags.go b/service/redshift/api_op_DescribeTags.go index 1fa1575bca1..4ada4ff6937 100644 --- a/service/redshift/api_op_DescribeTags.go +++ b/service/redshift/api_op_DescribeTags.go @@ -48,7 +48,6 @@ func (c *Client) DescribeTags(ctx context.Context, params *DescribeTagsInput, op return out, nil } -// type DescribeTagsInput struct { // A value that indicates the starting point for the next set of response records @@ -117,7 +116,6 @@ type DescribeTagsInput struct { noSmithyDocumentSerde } -// type DescribeTagsOutput struct { // A value that indicates the starting point for the next set of response records diff --git a/service/redshift/api_op_DisableLogging.go b/service/redshift/api_op_DisableLogging.go index 4cb9c6883c5..9acc7eb9965 100644 --- a/service/redshift/api_op_DisableLogging.go +++ b/service/redshift/api_op_DisableLogging.go @@ -29,7 +29,6 @@ func (c *Client) DisableLogging(ctx context.Context, params *DisableLoggingInput return out, nil } -// type DisableLoggingInput struct { // The identifier of the cluster on which logging is to be stopped. Example: diff --git a/service/redshift/api_op_DisableSnapshotCopy.go b/service/redshift/api_op_DisableSnapshotCopy.go index b35216d2009..8646abb772f 100644 --- a/service/redshift/api_op_DisableSnapshotCopy.go +++ b/service/redshift/api_op_DisableSnapshotCopy.go @@ -31,7 +31,6 @@ func (c *Client) DisableSnapshotCopy(ctx context.Context, params *DisableSnapsho return out, nil } -// type DisableSnapshotCopyInput struct { // The unique identifier of the source cluster that you want to disable copying of diff --git a/service/redshift/api_op_EnableLogging.go b/service/redshift/api_op_EnableLogging.go index 885cd8c1fab..3aa81eaa0ba 100644 --- a/service/redshift/api_op_EnableLogging.go +++ b/service/redshift/api_op_EnableLogging.go @@ -29,7 +29,6 @@ func (c *Client) EnableLogging(ctx context.Context, params *EnableLoggingInput, return out, nil } -// type EnableLoggingInput struct { // The identifier of the cluster on which logging is to be started. Example: diff --git a/service/redshift/api_op_EnableSnapshotCopy.go b/service/redshift/api_op_EnableSnapshotCopy.go index 200e6d2cd03..ba12ee33850 100644 --- a/service/redshift/api_op_EnableSnapshotCopy.go +++ b/service/redshift/api_op_EnableSnapshotCopy.go @@ -28,7 +28,6 @@ func (c *Client) EnableSnapshotCopy(ctx context.Context, params *EnableSnapshotC return out, nil } -// type EnableSnapshotCopyInput struct { // The unique identifier of the source cluster to copy snapshots from. Constraints: diff --git a/service/redshift/api_op_GetReservedNodeExchangeOfferings.go b/service/redshift/api_op_GetReservedNodeExchangeOfferings.go index 1887e1e6089..3cd8f46b818 100644 --- a/service/redshift/api_op_GetReservedNodeExchangeOfferings.go +++ b/service/redshift/api_op_GetReservedNodeExchangeOfferings.go @@ -29,7 +29,6 @@ func (c *Client) GetReservedNodeExchangeOfferings(ctx context.Context, params *G return out, nil } -// type GetReservedNodeExchangeOfferingsInput struct { // A string representing the node identifier for the DC1 Reserved Node to be diff --git a/service/redshift/api_op_ModifyCluster.go b/service/redshift/api_op_ModifyCluster.go index 9536da8b161..623dd117024 100644 --- a/service/redshift/api_op_ModifyCluster.go +++ b/service/redshift/api_op_ModifyCluster.go @@ -36,7 +36,6 @@ func (c *Client) ModifyCluster(ctx context.Context, params *ModifyClusterInput, return out, nil } -// type ModifyClusterInput struct { // The unique identifier of the cluster to be modified. Example: examplecluster diff --git a/service/redshift/api_op_ModifyClusterIamRoles.go b/service/redshift/api_op_ModifyClusterIamRoles.go index b93f2d21385..df930afcef7 100644 --- a/service/redshift/api_op_ModifyClusterIamRoles.go +++ b/service/redshift/api_op_ModifyClusterIamRoles.go @@ -32,7 +32,6 @@ func (c *Client) ModifyClusterIamRoles(ctx context.Context, params *ModifyCluste return out, nil } -// type ModifyClusterIamRolesInput struct { // The unique identifier of the cluster for which you want to associate or diff --git a/service/redshift/api_op_ModifyClusterParameterGroup.go b/service/redshift/api_op_ModifyClusterParameterGroup.go index 907070d3e04..8abb170affe 100644 --- a/service/redshift/api_op_ModifyClusterParameterGroup.go +++ b/service/redshift/api_op_ModifyClusterParameterGroup.go @@ -51,7 +51,6 @@ type ModifyClusterParameterGroupInput struct { noSmithyDocumentSerde } -// type ModifyClusterParameterGroupOutput struct { // The name of the cluster parameter group. diff --git a/service/redshift/api_op_ModifyClusterSubnetGroup.go b/service/redshift/api_op_ModifyClusterSubnetGroup.go index be001076904..4ec391306f7 100644 --- a/service/redshift/api_op_ModifyClusterSubnetGroup.go +++ b/service/redshift/api_op_ModifyClusterSubnetGroup.go @@ -29,7 +29,6 @@ func (c *Client) ModifyClusterSubnetGroup(ctx context.Context, params *ModifyClu return out, nil } -// type ModifyClusterSubnetGroupInput struct { // The name of the subnet group to be modified. diff --git a/service/redshift/api_op_ModifyEventSubscription.go b/service/redshift/api_op_ModifyEventSubscription.go index c1a8ae302af..4b49130212f 100644 --- a/service/redshift/api_op_ModifyEventSubscription.go +++ b/service/redshift/api_op_ModifyEventSubscription.go @@ -27,7 +27,6 @@ func (c *Client) ModifyEventSubscription(ctx context.Context, params *ModifyEven return out, nil } -// type ModifyEventSubscriptionInput struct { // The name of the modified Amazon Redshift event notification subscription. diff --git a/service/redshift/api_op_ModifySnapshotCopyRetentionPeriod.go b/service/redshift/api_op_ModifySnapshotCopyRetentionPeriod.go index 37590f1ed10..d517825d42d 100644 --- a/service/redshift/api_op_ModifySnapshotCopyRetentionPeriod.go +++ b/service/redshift/api_op_ModifySnapshotCopyRetentionPeriod.go @@ -34,7 +34,6 @@ func (c *Client) ModifySnapshotCopyRetentionPeriod(ctx context.Context, params * return out, nil } -// type ModifySnapshotCopyRetentionPeriodInput struct { // The unique identifier of the cluster for which you want to change the retention diff --git a/service/redshift/api_op_PurchaseReservedNodeOffering.go b/service/redshift/api_op_PurchaseReservedNodeOffering.go index 9e0990b9f6a..02d355ed92e 100644 --- a/service/redshift/api_op_PurchaseReservedNodeOffering.go +++ b/service/redshift/api_op_PurchaseReservedNodeOffering.go @@ -34,7 +34,6 @@ func (c *Client) PurchaseReservedNodeOffering(ctx context.Context, params *Purch return out, nil } -// type PurchaseReservedNodeOfferingInput struct { // The unique identifier of the reserved node offering you want to purchase. diff --git a/service/redshift/api_op_RebootCluster.go b/service/redshift/api_op_RebootCluster.go index e774f1a8451..2e363f65d05 100644 --- a/service/redshift/api_op_RebootCluster.go +++ b/service/redshift/api_op_RebootCluster.go @@ -33,7 +33,6 @@ func (c *Client) RebootCluster(ctx context.Context, params *RebootClusterInput, return out, nil } -// type RebootClusterInput struct { // The cluster identifier. diff --git a/service/redshift/api_op_ResetClusterParameterGroup.go b/service/redshift/api_op_ResetClusterParameterGroup.go index fb1871964de..ec8e0766d6d 100644 --- a/service/redshift/api_op_ResetClusterParameterGroup.go +++ b/service/redshift/api_op_ResetClusterParameterGroup.go @@ -30,7 +30,6 @@ func (c *Client) ResetClusterParameterGroup(ctx context.Context, params *ResetCl return out, nil } -// type ResetClusterParameterGroupInput struct { // The name of the cluster parameter group to be reset. @@ -50,7 +49,6 @@ type ResetClusterParameterGroupInput struct { noSmithyDocumentSerde } -// type ResetClusterParameterGroupOutput struct { // The name of the cluster parameter group. diff --git a/service/redshift/api_op_RestoreFromClusterSnapshot.go b/service/redshift/api_op_RestoreFromClusterSnapshot.go index 71a96679fbb..45343f36438 100644 --- a/service/redshift/api_op_RestoreFromClusterSnapshot.go +++ b/service/redshift/api_op_RestoreFromClusterSnapshot.go @@ -38,7 +38,6 @@ func (c *Client) RestoreFromClusterSnapshot(ctx context.Context, params *Restore return out, nil } -// type RestoreFromClusterSnapshotInput struct { // The identifier of the cluster that will be created from restoring the snapshot. diff --git a/service/redshift/api_op_RestoreTableFromClusterSnapshot.go b/service/redshift/api_op_RestoreTableFromClusterSnapshot.go index 0a5ea241d49..39506edc17d 100644 --- a/service/redshift/api_op_RestoreTableFromClusterSnapshot.go +++ b/service/redshift/api_op_RestoreTableFromClusterSnapshot.go @@ -37,7 +37,6 @@ func (c *Client) RestoreTableFromClusterSnapshot(ctx context.Context, params *Re return out, nil } -// type RestoreTableFromClusterSnapshotInput struct { // The identifier of the Amazon Redshift cluster to restore the table to. diff --git a/service/redshift/api_op_RevokeClusterSecurityGroupIngress.go b/service/redshift/api_op_RevokeClusterSecurityGroupIngress.go index 1eec1bf68ca..575b247fd38 100644 --- a/service/redshift/api_op_RevokeClusterSecurityGroupIngress.go +++ b/service/redshift/api_op_RevokeClusterSecurityGroupIngress.go @@ -32,7 +32,6 @@ func (c *Client) RevokeClusterSecurityGroupIngress(ctx context.Context, params * return out, nil } -// type RevokeClusterSecurityGroupIngressInput struct { // The name of the security Group from which to revoke the ingress rule. diff --git a/service/redshift/api_op_RevokeSnapshotAccess.go b/service/redshift/api_op_RevokeSnapshotAccess.go index 331d131a005..29685331cdc 100644 --- a/service/redshift/api_op_RevokeSnapshotAccess.go +++ b/service/redshift/api_op_RevokeSnapshotAccess.go @@ -32,7 +32,6 @@ func (c *Client) RevokeSnapshotAccess(ctx context.Context, params *RevokeSnapsho return out, nil } -// type RevokeSnapshotAccessInput struct { // The identifier of the Amazon Web Services account that can no longer restore the diff --git a/service/redshift/api_op_RotateEncryptionKey.go b/service/redshift/api_op_RotateEncryptionKey.go index 75adbfc3042..7243ce7d240 100644 --- a/service/redshift/api_op_RotateEncryptionKey.go +++ b/service/redshift/api_op_RotateEncryptionKey.go @@ -27,7 +27,6 @@ func (c *Client) RotateEncryptionKey(ctx context.Context, params *RotateEncrypti return out, nil } -// type RotateEncryptionKeyInput struct { // The unique identifier of the cluster that you want to rotate the encryption keys diff --git a/service/redshift/types/types.go b/service/redshift/types/types.go index dc32eb31b96..4b59ff163f7 100644 --- a/service/redshift/types/types.go +++ b/service/redshift/types/types.go @@ -366,7 +366,6 @@ type Cluster struct { noSmithyDocumentSerde } -// type ClusterAssociatedToSchedule struct { // @@ -722,7 +721,6 @@ type DeferredMaintenanceWindow struct { noSmithyDocumentSerde } -// type DeleteClusterSnapshotMessage struct { // The unique identifier of the manual snapshot to be deleted. Constraints: Must be diff --git a/service/redshiftdata/types/types.go b/service/redshiftdata/types/types.go index a1edfff8efe..9245c31580a 100644 --- a/service/redshiftdata/types/types.go +++ b/service/redshiftdata/types/types.go @@ -55,12 +55,13 @@ type ColumnMetadata struct { // A data value in a column. // // The following types satisfy this interface: -// FieldMemberBlobValue -// FieldMemberBooleanValue -// FieldMemberDoubleValue -// FieldMemberIsNull -// FieldMemberLongValue -// FieldMemberStringValue +// +// FieldMemberBlobValue +// FieldMemberBooleanValue +// FieldMemberDoubleValue +// FieldMemberIsNull +// FieldMemberLongValue +// FieldMemberStringValue type Field interface { isField() } diff --git a/service/rekognition/api_op_DetectLabels.go b/service/rekognition/api_op_DetectLabels.go index 130f460013c..667e91925fd 100644 --- a/service/rekognition/api_op_DetectLabels.go +++ b/service/rekognition/api_op_DetectLabels.go @@ -27,7 +27,8 @@ import ( // example, suppose the input image has a lighthouse, the sea, and a rock. The // response includes all three labels, one for each object. {Name: lighthouse, // Confidence: 98.4629} -// {Name: rock,Confidence: 79.2097} +// +// {Name: rock,Confidence: 79.2097} // // {Name: // sea,Confidence: 75.061} In the preceding example, the operation returns one @@ -35,7 +36,9 @@ import ( // labels for the same object in the image. For example, if the input image shows a // flower (for example, a tulip), the operation might return the following three // labels. {Name: flower,Confidence: 99.0562} -// {Name: plant,Confidence: +// +// {Name: plant,Confidence: +// // 99.0562} // // {Name: tulip,Confidence: 99.0562} In this example, the detection diff --git a/service/rekognition/doc.go b/service/rekognition/doc.go index b5f31913575..93e6cf3d8eb 100644 --- a/service/rekognition/doc.go +++ b/service/rekognition/doc.go @@ -14,7 +14,7 @@ // provides descriptions of actions, data types, common parameters, and common // errors. // -// Amazon Rekognition Image +// # Amazon Rekognition Image // // * CompareFaces // (https://docs.aws.amazon.com/rekognition/latest/APIReference/API_CompareFaces.html) diff --git a/service/rekognition/types/types.go b/service/rekognition/types/types.go index f22e7611d00..8eb0a86925e 100644 --- a/service/rekognition/types/types.go +++ b/service/rekognition/types/types.go @@ -1629,7 +1629,6 @@ type StartTextDetectionFilters struct { noSmithyDocumentSerde } -// type StreamProcessingStartSelector struct { // Specifies the starting point in the stream to start processing. This can be done diff --git a/service/rolesanywhere/types/types.go b/service/rolesanywhere/types/types.go index 36558940795..859323bb43c 100644 --- a/service/rolesanywhere/types/types.go +++ b/service/rolesanywhere/types/types.go @@ -153,8 +153,9 @@ type Source struct { // The data field of the trust anchor depending on its type. // // The following types satisfy this interface: -// SourceDataMemberAcmPcaArn -// SourceDataMemberX509CertificateData +// +// SourceDataMemberAcmPcaArn +// SourceDataMemberX509CertificateData type SourceData interface { isSourceData() } diff --git a/service/route53/internal/customizations/custom_error_deser.go b/service/route53/internal/customizations/custom_error_deser.go index 3926aa499a2..466627d5d0b 100644 --- a/service/route53/internal/customizations/custom_error_deser.go +++ b/service/route53/internal/customizations/custom_error_deser.go @@ -21,7 +21,6 @@ import ( // HandleCustomErrorDeserialization check if Route53 response is an error and needs // custom error deserialization. -// func HandleCustomErrorDeserialization(stack *middleware.Stack) error { return stack.Deserialize.Insert(&processResponse{}, "OperationDeserializer", middleware.After) } diff --git a/service/route53/internal/customizations/doc.go b/service/route53/internal/customizations/doc.go index c2aa919c61d..a787a631cd4 100644 --- a/service/route53/internal/customizations/doc.go +++ b/service/route53/internal/customizations/doc.go @@ -2,11 +2,10 @@ // // This package provides support for following customizations // -// Process Response Middleware: used for custom error deserializing -// Sanitize URL Middleware: used for sanitizing url with HostedZoneID member +// Process Response Middleware: used for custom error deserializing +// Sanitize URL Middleware: used for sanitizing url with HostedZoneID member // -// -// Process Response Middleware +// # Process Response Middleware // // Route53 operation "ChangeResourceRecordSets" can have an error response returned in // a slightly different format. This customization is only applicable to @@ -14,13 +13,12 @@ // // Here's a sample error response: // -// -// -// -// Tried to create resource record set duplicate.example.com. type A, but it already exists -// -// -// +// +// +// +// Tried to create resource record set duplicate.example.com. type A, but it already exists +// +// // // The processResponse middleware customizations enables SDK to check for an error // response starting with "InvalidChangeBatch" tag prior to deserialization. @@ -30,17 +28,15 @@ // reverse order to the other stack steps its easier to consider that "after" means // "before". // -// Middleware layering: -// -// HTTP Response -> process response error -> deserialize +// Middleware layering: // +// HTTP Response -> process response error -> deserialize // // In case the returned error response has `InvalidChangeBatch` format, the error is // deserialized and returned. The operation deserializer does not attempt to deserialize // as an error is returned by the process response error middleware. // -// -// Sanitize URL Middleware +// # Sanitize URL Middleware // // Route53 operations may return a response containing an id member value appended with // a string, for example. an id 1234 may be returned as 'foo/1234'. While round-tripping such response @@ -51,9 +47,7 @@ // This customization thus is applied only for operations with id's targeting those target shapes. // This customization has to be applied before the input is serialized. // -// Middleware layering: +// Middleware layering: // // Input -> Sanitize URL Middleware -> serialize -> next -// -// package customizations diff --git a/service/route53resolver/types/errors.go b/service/route53resolver/types/errors.go index 1ca9da9cb5a..744a9c60c5d 100644 --- a/service/route53resolver/types/errors.go +++ b/service/route53resolver/types/errors.go @@ -27,7 +27,6 @@ func (e *AccessDeniedException) ErrorMessage() string { func (e *AccessDeniedException) ErrorCode() string { return "AccessDeniedException" } func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ConflictException struct { Message *string @@ -305,7 +304,6 @@ func (e *UnknownResourceException) ErrorMessage() string { func (e *UnknownResourceException) ErrorCode() string { return "UnknownResourceException" } func (e *UnknownResourceException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type ValidationException struct { Message *string diff --git a/service/s3/api_op_PutBucketAcl.go b/service/s3/api_op_PutBucketAcl.go index 0f669d2acbb..bc28a996004 100644 --- a/service/s3/api_op_PutBucketAcl.go +++ b/service/s3/api_op_PutBucketAcl.go @@ -142,7 +142,7 @@ import ( // (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) in the // Amazon Web Services General Reference. // -// Related Resources +// # Related Resources // // * CreateBucket // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html) diff --git a/service/s3/api_op_PutBucketAnalyticsConfiguration.go b/service/s3/api_op_PutBucketAnalyticsConfiguration.go index 45cec74ed1e..da70d547ee3 100644 --- a/service/s3/api_op_PutBucketAnalyticsConfiguration.go +++ b/service/s3/api_op_PutBucketAnalyticsConfiguration.go @@ -63,7 +63,7 @@ import ( // bucket, or you do not have the s3:PutAnalyticsConfiguration bucket permission to // set the configuration on the bucket. // -// Related Resources +// # Related Resources // // * // GetBucketAnalyticsConfiguration diff --git a/service/s3/api_op_PutBucketInventoryConfiguration.go b/service/s3/api_op_PutBucketInventoryConfiguration.go index afca60b9d10..bb1a903b5a8 100644 --- a/service/s3/api_op_PutBucketInventoryConfiguration.go +++ b/service/s3/api_op_PutBucketInventoryConfiguration.go @@ -64,7 +64,7 @@ import ( // of the specified bucket, or you do not have the s3:PutInventoryConfiguration // bucket permission to set the configuration on the bucket. // -// Related Resources +// # Related Resources // // * // GetBucketInventoryConfiguration diff --git a/service/s3/api_op_RestoreObject.go b/service/s3/api_op_RestoreObject.go index 01319757029..45a2aee6af7 100644 --- a/service/s3/api_op_RestoreObject.go +++ b/service/s3/api_op_RestoreObject.go @@ -191,7 +191,7 @@ import ( // * If the object is previously // restored, Amazon S3 returns 200 OK in the response. // -// Special Errors +// # Special Errors // // * Code: // RestoreAlreadyInProgress @@ -217,7 +217,7 @@ import ( // // * SOAP Fault Code Prefix: N/A // -// Related Resources +// # Related Resources // // * // PutBucketLifecycleConfiguration diff --git a/service/s3/api_op_UploadPart.go b/service/s3/api_op_UploadPart.go index 9c70d4c26b9..2617bed6036 100644 --- a/service/s3/api_op_UploadPart.go +++ b/service/s3/api_op_UploadPart.go @@ -79,7 +79,7 @@ import ( // * // x-amz-server-side-encryption-customer-key-MD5 // -// Special Errors +// # Special Errors // // * Code: // NoSuchUpload @@ -93,7 +93,7 @@ import ( // * SOAP Fault Code Prefix: // Client // -// Related Resources +// # Related Resources // // * CreateMultipartUpload // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html) diff --git a/service/s3/api_op_UploadPartCopy.go b/service/s3/api_op_UploadPartCopy.go index c2c58ce7950..f1fa1395471 100644 --- a/service/s3/api_op_UploadPartCopy.go +++ b/service/s3/api_op_UploadPartCopy.go @@ -97,7 +97,7 @@ import ( // * HTTP Status Code: 400 // Bad Request // -// Related Resources +// # Related Resources // // * CreateMultipartUpload // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html) diff --git a/service/s3/doc.go b/service/s3/doc.go index ce3203be5a9..d825a41a779 100644 --- a/service/s3/doc.go +++ b/service/s3/doc.go @@ -2,6 +2,4 @@ // Package s3 provides the API client, operations, and parameter types for Amazon // Simple Storage Service. -// -// package s3 diff --git a/service/s3/internal/customizations/doc.go b/service/s3/internal/customizations/doc.go index 4629e494f27..9a392d120ee 100644 --- a/service/s3/internal/customizations/doc.go +++ b/service/s3/internal/customizations/doc.go @@ -3,16 +3,15 @@ Package customizations provides customizations for the Amazon S3 API client. This package provides support for following S3 customizations - ProcessARN Middleware: processes an ARN if provided as input and updates the endpoint as per the arn type + ProcessARN Middleware: processes an ARN if provided as input and updates the endpoint as per the arn type - UpdateEndpoint Middleware: resolves a custom endpoint as per s3 config options + UpdateEndpoint Middleware: resolves a custom endpoint as per s3 config options - RemoveBucket Middleware: removes a serialized bucket name from request url path + RemoveBucket Middleware: removes a serialized bucket name from request url path - processResponseWith200Error Middleware: Deserializing response error with 200 status code + processResponseWith200Error Middleware: Deserializing response error with 200 status code - -Virtual Host style url addressing +# Virtual Host style url addressing Since serializers serialize by default as path style url, we use customization to modify the endpoint url when `UsePathStyle` option on S3Client is unset or @@ -24,8 +23,7 @@ UsePathStyle was enabled. This behavior is also used if UseDualStackEndpoint is https://docs.aws.amazon.com/AmazonS3/latest/dev/dual-stack-endpoints.html#dual-stack-endpoints-description - -Transfer acceleration +# Transfer acceleration By default S3 Transfer acceleration support is disabled. By enabling `UseAccelerate` option on S3Client, one can enable s3 transfer acceleration support. Transfer @@ -33,15 +31,12 @@ acceleration only works with Virtual Host style addressing, and thus `UsePathSty option if set is ignored. Transfer acceleration is not supported for S3 operations DeleteBucket, ListBuckets, and CreateBucket. - -Dualstack support +# Dualstack support By default dualstack support for s3 client is disabled. By enabling `UseDualstack` option on s3 client, you can enable dualstack endpoint support. - -Endpoint customizations - +# Endpoint customizations Customizations to lookup ARN, process ARN needs to happen before request serialization. UpdateEndpoint middleware which mutates resources based on Options such as @@ -49,25 +44,24 @@ UseDualstack, UseAccelerate for modifying resolved endpoint are executed after request serialization. Remove bucket middleware is executed after an request is serialized, and removes the serialized bucket name from request path - Middleware layering: - + Middleware layering: - Initialize : HTTP Request -> ARN Lookup -> Input-Validation -> Serialize step - Serialize : HTTP Request -> Process ARN -> operation serializer -> Update-Endpoint customization -> Remove-Bucket -> next middleware + Initialize : HTTP Request -> ARN Lookup -> Input-Validation -> Serialize step + Serialize : HTTP Request -> Process ARN -> operation serializer -> Update-Endpoint customization -> Remove-Bucket -> next middleware Customization options: - UseARNRegion (Disabled by Default) - UsePathStyle (Disabled by Default) + UseARNRegion (Disabled by Default) - UseAccelerate (Disabled by Default) + UsePathStyle (Disabled by Default) - UseDualstack (Disabled by Default) + UseAccelerate (Disabled by Default) + UseDualstack (Disabled by Default) -Handle Error response with 200 status code +# Handle Error response with 200 status code S3 operations: CopyObject, CompleteMultipartUpload, UploadPartCopy can have an error Response with status code 2xx. The processResponseWith200Error middleware @@ -79,9 +73,8 @@ than response deserialization. Since the behavior of Deserialization is in reverse order to the other stack steps its easier to consider that "after" means "before". - Middleware layering: - - HTTP Response -> handle 200 error customization -> deserialize + Middleware layering: + HTTP Response -> handle 200 error customization -> deserialize */ package customizations diff --git a/service/s3/types/types.go b/service/s3/types/types.go index a9692d00647..bcef62cec1a 100644 --- a/service/s3/types/types.go +++ b/service/s3/types/types.go @@ -114,9 +114,10 @@ type AnalyticsExportDestination struct { // filter is provided, all objects will be considered in any analysis. // // The following types satisfy this interface: -// AnalyticsFilterMemberAnd -// AnalyticsFilterMemberPrefix -// AnalyticsFilterMemberTag +// +// AnalyticsFilterMemberAnd +// AnalyticsFilterMemberPrefix +// AnalyticsFilterMemberTag type AnalyticsFilter interface { isAnalyticsFilter() } @@ -349,7 +350,6 @@ type Condition struct { noSmithyDocumentSerde } -// type ContinuationEvent struct { noSmithyDocumentSerde } @@ -2283,11 +2283,12 @@ type LifecycleRuleAndOperator struct { // Filter must have exactly one of Prefix, Tag, or And specified. // // The following types satisfy this interface: -// LifecycleRuleFilterMemberAnd -// LifecycleRuleFilterMemberObjectSizeGreaterThan -// LifecycleRuleFilterMemberObjectSizeLessThan -// LifecycleRuleFilterMemberPrefix -// LifecycleRuleFilterMemberTag +// +// LifecycleRuleFilterMemberAnd +// LifecycleRuleFilterMemberObjectSizeGreaterThan +// LifecycleRuleFilterMemberObjectSizeLessThan +// LifecycleRuleFilterMemberPrefix +// LifecycleRuleFilterMemberTag type LifecycleRuleFilter interface { isLifecycleRuleFilter() } @@ -2449,10 +2450,11 @@ type MetricsConfiguration struct { // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html). // // The following types satisfy this interface: -// MetricsFilterMemberAccessPointArn -// MetricsFilterMemberAnd -// MetricsFilterMemberPrefix -// MetricsFilterMemberTag +// +// MetricsFilterMemberAccessPointArn +// MetricsFilterMemberAnd +// MetricsFilterMemberPrefix +// MetricsFilterMemberTag type MetricsFilter interface { isMetricsFilter() } @@ -3234,9 +3236,10 @@ type ReplicationRuleAndOperator struct { // applies. A Filter must specify exactly one Prefix, Tag, or an And child element. // // The following types satisfy this interface: -// ReplicationRuleFilterMemberAnd -// ReplicationRuleFilterMemberPrefix -// ReplicationRuleFilterMemberTag +// +// ReplicationRuleFilterMemberAnd +// ReplicationRuleFilterMemberPrefix +// ReplicationRuleFilterMemberTag type ReplicationRuleFilter interface { isReplicationRuleFilter() } @@ -3452,11 +3455,12 @@ type ScanRange struct { // The container for selecting objects from a content event stream. // // The following types satisfy this interface: -// SelectObjectContentEventStreamMemberCont -// SelectObjectContentEventStreamMemberEnd -// SelectObjectContentEventStreamMemberProgress -// SelectObjectContentEventStreamMemberRecords -// SelectObjectContentEventStreamMemberStats +// +// SelectObjectContentEventStreamMemberCont +// SelectObjectContentEventStreamMemberEnd +// SelectObjectContentEventStreamMemberProgress +// SelectObjectContentEventStreamMemberRecords +// SelectObjectContentEventStreamMemberStats type SelectObjectContentEventStream interface { isSelectObjectContentEventStream() } diff --git a/service/s3control/internal/customizations/doc.go b/service/s3control/internal/customizations/doc.go index 09e4fbea278..9091b656ae3 100644 --- a/service/s3control/internal/customizations/doc.go +++ b/service/s3control/internal/customizations/doc.go @@ -3,38 +3,36 @@ Package customizations provides customizations for the Amazon S3-Control API cli This package provides support for following S3-Control customizations - BackfillInput Middleware: validates and backfills data from an ARN resource into a copy of operation input. + BackfillInput Middleware: validates and backfills data from an ARN resource into a copy of operation input. - ProcessOutpostID Middleware: applied on CreateBucket, ListRegionalBuckets operation, triggers a custom endpoint generation flow. + ProcessOutpostID Middleware: applied on CreateBucket, ListRegionalBuckets operation, triggers a custom endpoint generation flow. - ProcessARN Middleware: processes an ARN if provided as input and updates the endpoint as per the arn type. + ProcessARN Middleware: processes an ARN if provided as input and updates the endpoint as per the arn type. - UpdateEndpoint Middleware: resolves a custom endpoint as per s3-control config options. + UpdateEndpoint Middleware: resolves a custom endpoint as per s3-control config options. - -Dualstack support +# Dualstack support By default dualstack support for s3-control client is disabled. By enabling `UseDualstack` option on s3-control client, you can enable dualstack endpoint support. - -Endpoint customizations +# Endpoint customizations Customizations to lookup ARN, backfill input, process outpost id, process ARN needs to happen before request serialization. UpdateEndpoint middleware which mutates resources based on Options such as UseDualstack for modifying resolved endpoint are executed after request serialization. - Middleware layering: + Middleware layering: - Initialize : HTTP Request -> ARN Lookup -> BackfillInput -> Input-Validation -> Serialize step + Initialize : HTTP Request -> ARN Lookup -> BackfillInput -> Input-Validation -> Serialize step - Serialize : HTTP Request -> Process-OutpostID -> Process ARN -> operation serializer -> Update-Endpoint customization -> next middleware + Serialize : HTTP Request -> Process-OutpostID -> Process ARN -> operation serializer -> Update-Endpoint customization -> next middleware Customization option: - UseARNRegion (Disabled by Default) - UseDualstack (Disabled by Default) + UseARNRegion (Disabled by Default) + UseDualstack (Disabled by Default) */ package customizations diff --git a/service/s3control/types/errors.go b/service/s3control/types/errors.go index ad67764c047..be9801f930c 100644 --- a/service/s3control/types/errors.go +++ b/service/s3control/types/errors.go @@ -7,7 +7,6 @@ import ( smithy "github.com/aws/smithy-go" ) -// type BadRequestException struct { Message *string @@ -66,7 +65,6 @@ func (e *BucketAlreadyOwnedByYou) ErrorMessage() string { func (e *BucketAlreadyOwnedByYou) ErrorCode() string { return "BucketAlreadyOwnedByYou" } func (e *BucketAlreadyOwnedByYou) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type IdempotencyException struct { Message *string @@ -85,7 +83,6 @@ func (e *IdempotencyException) ErrorMessage() string { func (e *IdempotencyException) ErrorCode() string { return "IdempotencyException" } func (e *IdempotencyException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type InternalServiceException struct { Message *string @@ -104,7 +101,6 @@ func (e *InternalServiceException) ErrorMessage() string { func (e *InternalServiceException) ErrorCode() string { return "InternalServiceException" } func (e *InternalServiceException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } -// type InvalidNextTokenException struct { Message *string @@ -123,7 +119,6 @@ func (e *InvalidNextTokenException) ErrorMessage() string { func (e *InvalidNextTokenException) ErrorCode() string { return "InvalidNextTokenException" } func (e *InvalidNextTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type InvalidRequestException struct { Message *string @@ -142,7 +137,6 @@ func (e *InvalidRequestException) ErrorMessage() string { func (e *InvalidRequestException) ErrorCode() string { return "InvalidRequestException" } func (e *InvalidRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type JobStatusException struct { Message *string @@ -185,7 +179,6 @@ func (e *NoSuchPublicAccessBlockConfiguration) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type NotFoundException struct { Message *string @@ -204,7 +197,6 @@ func (e *NotFoundException) ErrorMessage() string { func (e *NotFoundException) ErrorCode() string { return "NotFoundException" } func (e *NotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type TooManyRequestsException struct { Message *string diff --git a/service/s3control/types/types.go b/service/s3control/types/types.go index bf614ea602a..176d5f6c8a9 100644 --- a/service/s3control/types/types.go +++ b/service/s3control/types/types.go @@ -442,7 +442,8 @@ type JobManifest struct { // Configures the type of the job's ManifestGenerator. // // The following types satisfy this interface: -// JobManifestGeneratorMemberS3JobManifestGenerator +// +// JobManifestGeneratorMemberS3JobManifestGenerator type JobManifestGenerator interface { isJobManifestGenerator() } @@ -919,7 +920,8 @@ type ObjectLambdaConfiguration struct { // A container for AwsLambdaTransformation. // // The following types satisfy this interface: -// ObjectLambdaContentTransformationMemberAwsLambda +// +// ObjectLambdaContentTransformationMemberAwsLambda type ObjectLambdaContentTransformation interface { isObjectLambdaContentTransformation() } @@ -1120,7 +1122,6 @@ type RegionReport struct { noSmithyDocumentSerde } -// type S3AccessControlList struct { // @@ -1134,7 +1135,6 @@ type S3AccessControlList struct { noSmithyDocumentSerde } -// type S3AccessControlPolicy struct { // @@ -1281,7 +1281,6 @@ type S3GeneratedManifestDescriptor struct { noSmithyDocumentSerde } -// type S3Grant struct { // @@ -1293,7 +1292,6 @@ type S3Grant struct { noSmithyDocumentSerde } -// type S3Grantee struct { // @@ -1403,7 +1401,6 @@ type S3ObjectLockLegalHold struct { noSmithyDocumentSerde } -// type S3ObjectMetadata struct { // @@ -1442,7 +1439,6 @@ type S3ObjectMetadata struct { noSmithyDocumentSerde } -// type S3ObjectOwner struct { // @@ -1545,7 +1541,6 @@ type S3SetObjectTaggingOperation struct { noSmithyDocumentSerde } -// type S3Tag struct { // @@ -1561,7 +1556,6 @@ type S3Tag struct { noSmithyDocumentSerde } -// type SelectionCriteria struct { // A container for the delimiter of the selection criteria being used. @@ -1577,7 +1571,6 @@ type SelectionCriteria struct { noSmithyDocumentSerde } -// type SSEKMS struct { // A container for the ARN of the SSE-KMS encryption. This property is read-only @@ -1603,7 +1596,6 @@ type SSEKMSEncryption struct { noSmithyDocumentSerde } -// type SSES3 struct { noSmithyDocumentSerde } @@ -1697,7 +1689,6 @@ type StorageLensDataExportEncryption struct { noSmithyDocumentSerde } -// type StorageLensTag struct { // @@ -1713,7 +1704,6 @@ type StorageLensTag struct { noSmithyDocumentSerde } -// type Tagging struct { // A collection for a set of tags. diff --git a/service/sagemaker/types/types.go b/service/sagemaker/types/types.go index 8526a5cd1c8..883e12e35c7 100644 --- a/service/sagemaker/types/types.go +++ b/service/sagemaker/types/types.go @@ -4327,9 +4327,10 @@ type FileSystemDataSource struct { // // "Name": "Metrics.accuracy", // -// "Operator": "GreaterThan", +// "Operator": "GreaterThan", +// +// "Value": // -// "Value": // "0.9" // // } HyperParameters To define a hyperparameter filter, enter a value with @@ -4337,13 +4338,16 @@ type FileSystemDataSource struct { // decimal in a comparison if the specified Value is also a decimal value. If the // specified Value is an integer, the decimal hyperparameter values are treated as // integers. For example, the following filter is satisfied by training jobs with a -// "learning_rate" hyperparameter that is less than "0.5": { -// "Name": +// +// "learning_rate" hyperparameter that is less than "0.5": { +// "Name": +// // "HyperParameters.learning_rate", // -// "Operator": "LessThan", +// "Operator": "LessThan", +// +// "Value": // -// "Value": // "0.5" // // } Tags To define a tag filter, enter a value with the form Tags.. @@ -13200,8 +13204,9 @@ type TrialComponentMetricSummary struct { // specified. This object is specified in the CreateTrialComponent request. // // The following types satisfy this interface: -// TrialComponentParameterValueMemberNumberValue -// TrialComponentParameterValueMemberStringValue +// +// TrialComponentParameterValueMemberNumberValue +// TrialComponentParameterValueMemberStringValue type TrialComponentParameterValue interface { isTrialComponentParameterValue() } diff --git a/service/sagemakeredge/types/types.go b/service/sagemakeredge/types/types.go index 33478c86907..40cbe6f6862 100644 --- a/service/sagemakeredge/types/types.go +++ b/service/sagemakeredge/types/types.go @@ -19,7 +19,6 @@ type Checksum struct { noSmithyDocumentSerde } -// type Definition struct { // The checksum information of the model. @@ -37,7 +36,6 @@ type Definition struct { noSmithyDocumentSerde } -// type DeploymentModel struct { // The desired state of the model. diff --git a/service/schemas/api_op_TagResource.go b/service/schemas/api_op_TagResource.go index d9500e4d4c6..c36e92421c2 100644 --- a/service/schemas/api_op_TagResource.go +++ b/service/schemas/api_op_TagResource.go @@ -26,7 +26,6 @@ func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optF return out, nil } -// type TagResourceInput struct { // The ARN of the resource. diff --git a/service/securityhub/types/types.go b/service/securityhub/types/types.go index f182b8e8178..c6e46e895cf 100644 --- a/service/securityhub/types/types.go +++ b/service/securityhub/types/types.go @@ -4237,7 +4237,6 @@ type AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails struct { noSmithyDocumentSerde } -// type AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationAuthorizationConfigDetails struct { // The Amazon EFS access point identifier to use. diff --git a/service/sesv2/api_op_PutDedicatedIpWarmupAttributes.go b/service/sesv2/api_op_PutDedicatedIpWarmupAttributes.go index e48186f5496..cc0f780071c 100644 --- a/service/sesv2/api_op_PutDedicatedIpWarmupAttributes.go +++ b/service/sesv2/api_op_PutDedicatedIpWarmupAttributes.go @@ -10,7 +10,6 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// func (c *Client) PutDedicatedIpWarmupAttributes(ctx context.Context, params *PutDedicatedIpWarmupAttributesInput, optFns ...func(*Options)) (*PutDedicatedIpWarmupAttributesOutput, error) { if params == nil { params = &PutDedicatedIpWarmupAttributesInput{} diff --git a/service/sfn/types/errors.go b/service/sfn/types/errors.go index 5545b84fad9..d0229df6748 100644 --- a/service/sfn/types/errors.go +++ b/service/sfn/types/errors.go @@ -182,7 +182,6 @@ func (e *InvalidExecutionInput) ErrorMessage() string { func (e *InvalidExecutionInput) ErrorCode() string { return "InvalidExecutionInput" } func (e *InvalidExecutionInput) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type InvalidLoggingConfiguration struct { Message *string @@ -398,7 +397,6 @@ func (e *StateMachineLimitExceeded) ErrorMessage() string { func (e *StateMachineLimitExceeded) ErrorCode() string { return "StateMachineLimitExceeded" } func (e *StateMachineLimitExceeded) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type StateMachineTypeNotSupported struct { Message *string diff --git a/service/sfn/types/types.go b/service/sfn/types/types.go index 6f29079ccfb..00f1ca4697e 100644 --- a/service/sfn/types/types.go +++ b/service/sfn/types/types.go @@ -150,7 +150,6 @@ type CloudWatchEventsExecutionDataDetails struct { noSmithyDocumentSerde } -// type CloudWatchLogsLogGroup struct { // The ARN of the the CloudWatch log group to which you want your logs emitted to. @@ -497,7 +496,6 @@ type LambdaFunctionTimedOutEventDetails struct { noSmithyDocumentSerde } -// type LogDestination struct { // An object describing a CloudWatch log group. For more information, see diff --git a/service/snowdevicemanagement/types/types.go b/service/snowdevicemanagement/types/types.go index fc7cf1c9657..d9fc035fb67 100644 --- a/service/snowdevicemanagement/types/types.go +++ b/service/snowdevicemanagement/types/types.go @@ -31,8 +31,9 @@ type Capacity struct { // The command given to the device to execute. // // The following types satisfy this interface: -// CommandMemberReboot -// CommandMemberUnlock +// +// CommandMemberReboot +// CommandMemberUnlock type Command interface { isCommand() } diff --git a/service/sqs/api_op_AddPermission.go b/service/sqs/api_op_AddPermission.go index 3194eb8f46f..971e29e1daf 100644 --- a/service/sqs/api_op_AddPermission.go +++ b/service/sqs/api_op_AddPermission.go @@ -55,7 +55,6 @@ func (c *Client) AddPermission(ctx context.Context, params *AddPermissionInput, return out, nil } -// type AddPermissionInput struct { // The Amazon Web Services account numbers of the principals diff --git a/service/sqs/api_op_ChangeMessageVisibilityBatch.go b/service/sqs/api_op_ChangeMessageVisibilityBatch.go index 0d8879b39f4..6781ca4aa61 100644 --- a/service/sqs/api_op_ChangeMessageVisibilityBatch.go +++ b/service/sqs/api_op_ChangeMessageVisibilityBatch.go @@ -37,7 +37,6 @@ func (c *Client) ChangeMessageVisibilityBatch(ctx context.Context, params *Chang return out, nil } -// type ChangeMessageVisibilityBatchInput struct { // A list of receipt handles of the messages for which the visibility timeout must diff --git a/service/sqs/api_op_CreateQueue.go b/service/sqs/api_op_CreateQueue.go index 6d9171e347c..950ec7c125b 100644 --- a/service/sqs/api_op_CreateQueue.go +++ b/service/sqs/api_op_CreateQueue.go @@ -68,7 +68,6 @@ func (c *Client) CreateQueue(ctx context.Context, params *CreateQueueInput, optF return out, nil } -// type CreateQueueInput struct { // The name of the new queue. The following limits apply to this name: diff --git a/service/sqs/api_op_DeleteMessage.go b/service/sqs/api_op_DeleteMessage.go index 38cd866ddaf..7d8e6fe9b78 100644 --- a/service/sqs/api_op_DeleteMessage.go +++ b/service/sqs/api_op_DeleteMessage.go @@ -42,7 +42,6 @@ func (c *Client) DeleteMessage(ctx context.Context, params *DeleteMessageInput, return out, nil } -// type DeleteMessageInput struct { // The URL of the Amazon SQS queue from which messages are deleted. Queue URLs and diff --git a/service/sqs/api_op_DeleteMessageBatch.go b/service/sqs/api_op_DeleteMessageBatch.go index d806737529a..2fe221baa9c 100644 --- a/service/sqs/api_op_DeleteMessageBatch.go +++ b/service/sqs/api_op_DeleteMessageBatch.go @@ -19,7 +19,8 @@ import ( // parameters. These lists are specified using the param.n notation. Values of n // are integers starting from 1. For example, a parameter list with two elements // looks like this: &AttributeName.1=first -// &AttributeName.2=second +// +// &AttributeName.2=second func (c *Client) DeleteMessageBatch(ctx context.Context, params *DeleteMessageBatchInput, optFns ...func(*Options)) (*DeleteMessageBatchOutput, error) { if params == nil { params = &DeleteMessageBatchInput{} @@ -35,7 +36,6 @@ func (c *Client) DeleteMessageBatch(ctx context.Context, params *DeleteMessageBa return out, nil } -// type DeleteMessageBatchInput struct { // A list of receipt handles for the messages to be deleted. diff --git a/service/sqs/api_op_DeleteQueue.go b/service/sqs/api_op_DeleteQueue.go index 07c3f085855..b5eab8d47e7 100644 --- a/service/sqs/api_op_DeleteQueue.go +++ b/service/sqs/api_op_DeleteQueue.go @@ -36,7 +36,6 @@ func (c *Client) DeleteQueue(ctx context.Context, params *DeleteQueueInput, optF return out, nil } -// type DeleteQueueInput struct { // The URL of the Amazon SQS queue to delete. Queue URLs and names are diff --git a/service/sqs/api_op_GetQueueAttributes.go b/service/sqs/api_op_GetQueueAttributes.go index 140aa1e14ad..82be851ba71 100644 --- a/service/sqs/api_op_GetQueueAttributes.go +++ b/service/sqs/api_op_GetQueueAttributes.go @@ -29,7 +29,6 @@ func (c *Client) GetQueueAttributes(ctx context.Context, params *GetQueueAttribu return out, nil } -// type GetQueueAttributesInput struct { // The URL of the Amazon SQS queue whose attribute information is retrieved. Queue diff --git a/service/sqs/api_op_GetQueueUrl.go b/service/sqs/api_op_GetQueueUrl.go index db11c4accce..b27b4153a8b 100644 --- a/service/sqs/api_op_GetQueueUrl.go +++ b/service/sqs/api_op_GetQueueUrl.go @@ -32,7 +32,6 @@ func (c *Client) GetQueueUrl(ctx context.Context, params *GetQueueUrlInput, optF return out, nil } -// type GetQueueUrlInput struct { // The name of the queue whose URL must be fetched. Maximum 80 characters. Valid diff --git a/service/sqs/api_op_ListDeadLetterSourceQueues.go b/service/sqs/api_op_ListDeadLetterSourceQueues.go index be568b74707..0a8481d45bb 100644 --- a/service/sqs/api_op_ListDeadLetterSourceQueues.go +++ b/service/sqs/api_op_ListDeadLetterSourceQueues.go @@ -38,7 +38,6 @@ func (c *Client) ListDeadLetterSourceQueues(ctx context.Context, params *ListDea return out, nil } -// type ListDeadLetterSourceQueuesInput struct { // The URL of a dead-letter queue. Queue URLs and names are case-sensitive. diff --git a/service/sqs/api_op_ListQueues.go b/service/sqs/api_op_ListQueues.go index 2e853b7f6fb..d11b23896cf 100644 --- a/service/sqs/api_op_ListQueues.go +++ b/service/sqs/api_op_ListQueues.go @@ -39,7 +39,6 @@ func (c *Client) ListQueues(ctx context.Context, params *ListQueuesInput, optFns return out, nil } -// type ListQueuesInput struct { // Maximum number of results to include in the response. Value range is 1 to 1000. diff --git a/service/sqs/api_op_PurgeQueue.go b/service/sqs/api_op_PurgeQueue.go index 703e04b543c..a582f773fee 100644 --- a/service/sqs/api_op_PurgeQueue.go +++ b/service/sqs/api_op_PurgeQueue.go @@ -32,7 +32,6 @@ func (c *Client) PurgeQueue(ctx context.Context, params *PurgeQueueInput, optFns return out, nil } -// type PurgeQueueInput struct { // The URL of the queue from which the PurgeQueue action deletes messages. Queue diff --git a/service/sqs/api_op_ReceiveMessage.go b/service/sqs/api_op_ReceiveMessage.go index 49d0c6d770b..411b164308e 100644 --- a/service/sqs/api_op_ReceiveMessage.go +++ b/service/sqs/api_op_ReceiveMessage.go @@ -71,7 +71,6 @@ func (c *Client) ReceiveMessage(ctx context.Context, params *ReceiveMessageInput return out, nil } -// type ReceiveMessageInput struct { // The URL of the Amazon SQS queue from which messages are received. Queue URLs and diff --git a/service/sqs/api_op_RemovePermission.go b/service/sqs/api_op_RemovePermission.go index 6273356457b..bb7f871287d 100644 --- a/service/sqs/api_op_RemovePermission.go +++ b/service/sqs/api_op_RemovePermission.go @@ -39,7 +39,6 @@ func (c *Client) RemovePermission(ctx context.Context, params *RemovePermissionI return out, nil } -// type RemovePermissionInput struct { // The identification of the permission to remove. This is the label added using diff --git a/service/sqs/api_op_SendMessage.go b/service/sqs/api_op_SendMessage.go index 23d9ca07fe3..60634ec15ee 100644 --- a/service/sqs/api_op_SendMessage.go +++ b/service/sqs/api_op_SendMessage.go @@ -31,7 +31,6 @@ func (c *Client) SendMessage(ctx context.Context, params *SendMessageInput, optF return out, nil } -// type SendMessageInput struct { // The message to send. The minimum size is one character. The maximum size is 256 diff --git a/service/sqs/api_op_SendMessageBatch.go b/service/sqs/api_op_SendMessageBatch.go index 2730be7f950..509d57814d2 100644 --- a/service/sqs/api_op_SendMessageBatch.go +++ b/service/sqs/api_op_SendMessageBatch.go @@ -45,7 +45,6 @@ func (c *Client) SendMessageBatch(ctx context.Context, params *SendMessageBatchI return out, nil } -// type SendMessageBatchInput struct { // A list of SendMessageBatchRequestEntry items. diff --git a/service/sqs/api_op_SetQueueAttributes.go b/service/sqs/api_op_SetQueueAttributes.go index 95b58905170..48c6bc993ab 100644 --- a/service/sqs/api_op_SetQueueAttributes.go +++ b/service/sqs/api_op_SetQueueAttributes.go @@ -43,7 +43,6 @@ func (c *Client) SetQueueAttributes(ctx context.Context, params *SetQueueAttribu return out, nil } -// type SetQueueAttributesInput struct { // A map of attributes to set. The following lists the names, descriptions, and diff --git a/service/sqs/cust_checksum_validation_test.go b/service/sqs/cust_checksum_validation_test.go index 7e6e5b66caf..006f9f63a84 100644 --- a/service/sqs/cust_checksum_validation_test.go +++ b/service/sqs/cust_checksum_validation_test.go @@ -456,9 +456,9 @@ func TestAddValidateSendMessageChecksum(t *testing.T) { } } -//****************** +// ****************** // Testing Utilities -//****************** +// ****************** type mockInitializeHandler struct { Output middleware.InitializeOutput Err error diff --git a/service/sqs/doc.go b/service/sqs/doc.go index e3af956cf10..f66e5a5d7aa 100644 --- a/service/sqs/doc.go +++ b/service/sqs/doc.go @@ -21,7 +21,7 @@ // // * Handle error responses // -// Additional information +// # Additional information // // * Amazon SQS Product // Page (http://aws.amazon.com/sqs/) diff --git a/service/sqs/types/types.go b/service/sqs/types/types.go index c5f10b4bba8..913b0ff6a5c 100644 --- a/service/sqs/types/types.go +++ b/service/sqs/types/types.go @@ -40,7 +40,6 @@ type BatchResultErrorEntry struct { // // &ChangeMessageVisibilityBatchRequestEntry.1.ReceiptHandle=your_receipt_handle // -// // &ChangeMessageVisibilityBatchRequestEntry.1.VisibilityTimeout=45 type ChangeMessageVisibilityBatchRequestEntry struct { diff --git a/service/ssm/api_op_CancelCommand.go b/service/ssm/api_op_CancelCommand.go index e7ecb2de06e..c76f861bb4a 100644 --- a/service/ssm/api_op_CancelCommand.go +++ b/service/ssm/api_op_CancelCommand.go @@ -28,7 +28,6 @@ func (c *Client) CancelCommand(ctx context.Context, params *CancelCommandInput, return out, nil } -// type CancelCommandInput struct { // The ID of the command you want to cancel. diff --git a/service/ssm/types/types.go b/service/ssm/types/types.go index 7804f71c0e0..8f62b98b7aa 100644 --- a/service/ssm/types/types.go +++ b/service/ssm/types/types.go @@ -1851,7 +1851,7 @@ type DocumentIdentifier struct { // * // ThirdParty // -// PlatformTypes +// # PlatformTypes // // * Linux // diff --git a/service/ssmincidents/types/types.go b/service/ssmincidents/types/types.go index 83f26b2c502..9a9d429377e 100644 --- a/service/ssmincidents/types/types.go +++ b/service/ssmincidents/types/types.go @@ -11,7 +11,8 @@ import ( // defines the action. // // The following types satisfy this interface: -// ActionMemberSsmAutomation +// +// ActionMemberSsmAutomation type Action interface { isAction() } @@ -44,8 +45,9 @@ type AddRegionAction struct { // Use the AttributeValueList to filter by string or integer values. // // The following types satisfy this interface: -// AttributeValueListMemberIntegerValues -// AttributeValueListMemberStringValues +// +// AttributeValueListMemberIntegerValues +// AttributeValueListMemberStringValues type AttributeValueList interface { isAttributeValueList() } @@ -72,7 +74,8 @@ func (*AttributeValueListMemberStringValues) isAttributeValueList() {} // beginning of the incident. // // The following types satisfy this interface: -// AutomationExecutionMemberSsmExecutionArn +// +// AutomationExecutionMemberSsmExecutionArn type AutomationExecution interface { isAutomationExecution() } @@ -89,8 +92,9 @@ func (*AutomationExecutionMemberSsmExecutionArn) isAutomationExecution() {} // The Chatbot chat channel used for collaboration during an incident. // // The following types satisfy this interface: -// ChatChannelMemberChatbotSns -// ChatChannelMemberEmpty +// +// ChatChannelMemberChatbotSns +// ChatChannelMemberEmpty type ChatChannel interface { isChatChannel() } @@ -121,9 +125,10 @@ func (*ChatChannelMemberEmpty) isChatChannel() {} // specified for a conditional, the values are ORd. // // The following types satisfy this interface: -// ConditionMemberAfter -// ConditionMemberBefore -// ConditionMemberEquals +// +// ConditionMemberAfter +// ConditionMemberBefore +// ConditionMemberEquals type Condition interface { isCondition() } @@ -171,7 +176,8 @@ type DeleteRegionAction struct { // The dynamic SSM parameter value. // // The following types satisfy this interface: -// DynamicSsmParameterValueMemberVariable +// +// DynamicSsmParameterValueMemberVariable type DynamicSsmParameterValue interface { isDynamicSsmParameterValue() } @@ -423,9 +429,10 @@ type ItemIdentifier struct { // Describes a related item. // // The following types satisfy this interface: -// ItemValueMemberArn -// ItemValueMemberMetricDefinition -// ItemValueMemberUrl +// +// ItemValueMemberArn +// ItemValueMemberMetricDefinition +// ItemValueMemberUrl type ItemValue interface { isItemValue() } @@ -461,7 +468,8 @@ func (*ItemValueMemberUrl) isItemValue() {} // The SNS targets that are notified when updates are made to an incident. // // The following types satisfy this interface: -// NotificationTargetItemMemberSnsTopicArn +// +// NotificationTargetItemMemberSnsTopicArn type NotificationTargetItem interface { isNotificationTargetItem() } @@ -526,8 +534,9 @@ type RelatedItem struct { // Details about the related item you're adding. // // The following types satisfy this interface: -// RelatedItemsUpdateMemberItemToAdd -// RelatedItemsUpdateMemberItemToRemove +// +// RelatedItemsUpdateMemberItemToAdd +// RelatedItemsUpdateMemberItemToRemove type RelatedItemsUpdate interface { isRelatedItemsUpdate() } @@ -738,8 +747,9 @@ type TriggerDetails struct { // Details used when updating the replication set. // // The following types satisfy this interface: -// UpdateReplicationSetActionMemberAddRegionAction -// UpdateReplicationSetActionMemberDeleteRegionAction +// +// UpdateReplicationSetActionMemberAddRegionAction +// UpdateReplicationSetActionMemberDeleteRegionAction type UpdateReplicationSetAction interface { isUpdateReplicationSetAction() } diff --git a/service/ssoadmin/doc.go b/service/ssoadmin/doc.go index 8e72dba49d4..e8395f0f97a 100644 --- a/service/ssoadmin/doc.go +++ b/service/ssoadmin/doc.go @@ -2,6 +2,4 @@ // Package ssoadmin provides the API client, operations, and parameter types for // AWS Single Sign-On Admin. -// -// package ssoadmin diff --git a/service/support/api_op_DescribeTrustedAdvisorCheckResult.go b/service/support/api_op_DescribeTrustedAdvisorCheckResult.go index 18df3484054..f9d9424c84d 100644 --- a/service/support/api_op_DescribeTrustedAdvisorCheckResult.go +++ b/service/support/api_op_DescribeTrustedAdvisorCheckResult.go @@ -59,7 +59,6 @@ func (c *Client) DescribeTrustedAdvisorCheckResult(ctx context.Context, params * return out, nil } -// type DescribeTrustedAdvisorCheckResultInput struct { // The unique identifier for the Trusted Advisor check. diff --git a/service/support/api_op_RefreshTrustedAdvisorCheck.go b/service/support/api_op_RefreshTrustedAdvisorCheck.go index 73a5c042907..dfeece7b106 100644 --- a/service/support/api_op_RefreshTrustedAdvisorCheck.go +++ b/service/support/api_op_RefreshTrustedAdvisorCheck.go @@ -41,7 +41,6 @@ func (c *Client) RefreshTrustedAdvisorCheck(ctx context.Context, params *Refresh return out, nil } -// type RefreshTrustedAdvisorCheckInput struct { // The unique identifier for the Trusted Advisor check to refresh. Specifying the diff --git a/service/textract/types/types.go b/service/textract/types/types.go index 7ac80c66943..d51cf709298 100644 --- a/service/textract/types/types.go +++ b/service/textract/types/types.go @@ -514,7 +514,6 @@ type Point struct { noSmithyDocumentSerde } -// type QueriesConfig struct { // diff --git a/service/transcribe/types/types.go b/service/transcribe/types/types.go index 3562347e168..e9b68194af9 100644 --- a/service/transcribe/types/types.go +++ b/service/transcribe/types/types.go @@ -962,10 +962,11 @@ type RelativeTimeRange struct { // (https://docs.aws.amazon.com/transcribe/latest/dg/call-analytics.html). // // The following types satisfy this interface: -// RuleMemberInterruptionFilter -// RuleMemberNonTalkTimeFilter -// RuleMemberSentimentFilter -// RuleMemberTranscriptFilter +// +// RuleMemberInterruptionFilter +// RuleMemberNonTalkTimeFilter +// RuleMemberSentimentFilter +// RuleMemberTranscriptFilter type Rule interface { isRule() } diff --git a/service/transcribestreaming/types/types.go b/service/transcribestreaming/types/types.go index ef4bc09cae9..b80aa05feae 100644 --- a/service/transcribestreaming/types/types.go +++ b/service/transcribestreaming/types/types.go @@ -39,7 +39,8 @@ type AudioEvent struct { // Represents the audio stream from your application to Amazon Transcribe. // // The following types satisfy this interface: -// AudioStreamMemberAudioEvent +// +// AudioStreamMemberAudioEvent type AudioStream interface { isAudioStream() } @@ -278,7 +279,8 @@ type MedicalTranscriptEvent struct { // your application. // // The following types satisfy this interface: -// MedicalTranscriptResultStreamMemberTranscriptEvent +// +// MedicalTranscriptResultStreamMemberTranscriptEvent type MedicalTranscriptResultStream interface { isMedicalTranscriptResultStream() } @@ -359,7 +361,8 @@ type TranscriptEvent struct { // application. // // The following types satisfy this interface: -// TranscriptResultStreamMemberTranscriptEvent +// +// TranscriptResultStreamMemberTranscriptEvent type TranscriptResultStream interface { isTranscriptResultStream() } diff --git a/service/waf/types/errors.go b/service/waf/types/errors.go index 871f5311092..e1f2b94c12a 100644 --- a/service/waf/types/errors.go +++ b/service/waf/types/errors.go @@ -7,7 +7,6 @@ import ( smithy "github.com/aws/smithy-go" ) -// type WAFBadRequestException struct { Message *string @@ -492,7 +491,6 @@ func (e *WAFSubscriptionNotFoundException) ErrorCode() string { } func (e *WAFSubscriptionNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type WAFTagOperationException struct { Message *string @@ -511,7 +509,6 @@ func (e *WAFTagOperationException) ErrorMessage() string { func (e *WAFTagOperationException) ErrorCode() string { return "WAFTagOperationException" } func (e *WAFTagOperationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type WAFTagOperationInternalErrorException struct { Message *string diff --git a/service/wafregional/types/errors.go b/service/wafregional/types/errors.go index 78a18fd9102..2a71e532113 100644 --- a/service/wafregional/types/errors.go +++ b/service/wafregional/types/errors.go @@ -7,7 +7,6 @@ import ( smithy "github.com/aws/smithy-go" ) -// type WAFBadRequestException struct { Message *string @@ -492,7 +491,6 @@ func (e *WAFSubscriptionNotFoundException) ErrorCode() string { } func (e *WAFSubscriptionNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type WAFTagOperationException struct { Message *string @@ -511,7 +509,6 @@ func (e *WAFTagOperationException) ErrorMessage() string { func (e *WAFTagOperationException) ErrorCode() string { return "WAFTagOperationException" } func (e *WAFTagOperationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// type WAFTagOperationInternalErrorException struct { Message *string diff --git a/service/wisdom/types/types.go b/service/wisdom/types/types.go index b9e686e8906..b33ae6cdec2 100644 --- a/service/wisdom/types/types.go +++ b/service/wisdom/types/types.go @@ -81,7 +81,8 @@ type AssistantAssociationData struct { // The data that is input into Wisdom as a result of the assistant association. // // The following types satisfy this interface: -// AssistantAssociationInputDataMemberKnowledgeBaseId +// +// AssistantAssociationInputDataMemberKnowledgeBaseId type AssistantAssociationInputData interface { isAssistantAssociationInputData() } @@ -98,7 +99,8 @@ func (*AssistantAssociationInputDataMemberKnowledgeBaseId) isAssistantAssociatio // The data that is output as a result of the assistant association. // // The following types satisfy this interface: -// AssistantAssociationOutputDataMemberKnowledgeBaseAssociation +// +// AssistantAssociationOutputDataMemberKnowledgeBaseAssociation type AssistantAssociationOutputData interface { isAssistantAssociationOutputData() } @@ -646,7 +648,8 @@ type RecommendationTrigger struct { // A union type containing information related to the trigger. // // The following types satisfy this interface: -// RecommendationTriggerDataMemberQuery +// +// RecommendationTriggerDataMemberQuery type RecommendationTriggerData interface { isRecommendationTriggerData() } @@ -777,7 +780,8 @@ type SessionSummary struct { // Configuration information about the external data source. // // The following types satisfy this interface: -// SourceConfigurationMemberAppIntegrations +// +// SourceConfigurationMemberAppIntegrations type SourceConfiguration interface { isSourceConfiguration() } diff --git a/service/xray/types/types.go b/service/xray/types/types.go index 11b9de3c878..e1c1532cc58 100644 --- a/service/xray/types/types.go +++ b/service/xray/types/types.go @@ -26,9 +26,10 @@ type Alias struct { // String. // // The following types satisfy this interface: -// AnnotationValueMemberBooleanValue -// AnnotationValueMemberNumberValue -// AnnotationValueMemberStringValue +// +// AnnotationValueMemberBooleanValue +// AnnotationValueMemberNumberValue +// AnnotationValueMemberStringValue type AnnotationValue interface { isAnnotationValue() } @@ -78,7 +79,6 @@ type AvailabilityZoneDetail struct { noSmithyDocumentSerde } -// type BackendConnectionErrors struct { // @@ -991,7 +991,6 @@ type Service struct { noSmithyDocumentSerde } -// type ServiceId struct { // @@ -1063,7 +1062,6 @@ type Tag struct { noSmithyDocumentSerde } -// type TelemetryRecord struct { //