diff --git a/.changelog/2fdabcd8e7d343df9e995fd25b44833f.json b/.changelog/2fdabcd8e7d343df9e995fd25b44833f.json
new file mode 100644
index 00000000000..5aced0bd450
--- /dev/null
+++ b/.changelog/2fdabcd8e7d343df9e995fd25b44833f.json
@@ -0,0 +1,8 @@
+{
+ "id": "2fdabcd8-e7d3-43df-9e99-5fd25b44833f",
+ "type": "feature",
+ "description": "Adds sensitive trait to various shapes in Jetstream Connections API model.",
+ "modules": [
+ "service/eventbridge"
+ ]
+}
\ No newline at end of file
diff --git a/.changelog/aa033833dd1348e58213f77c5c7fc5c3.json b/.changelog/aa033833dd1348e58213f77c5c7fc5c3.json
new file mode 100644
index 00000000000..74be5de9438
--- /dev/null
+++ b/.changelog/aa033833dd1348e58213f77c5c7fc5c3.json
@@ -0,0 +1,8 @@
+{
+ "id": "aa033833-dd13-48e5-8213-f77c5c7fc5c3",
+ "type": "feature",
+ "description": "This release adds support for restricting public sharing of AMIs through AMI Block Public Access",
+ "modules": [
+ "service/ec2"
+ ]
+}
\ No newline at end of file
diff --git a/.changelog/c0302ed6924e4c62a0730815f9726cfd.json b/.changelog/c0302ed6924e4c62a0730815f9726cfd.json
new file mode 100644
index 00000000000..1b482d276f5
--- /dev/null
+++ b/.changelog/c0302ed6924e4c62a0730815f9726cfd.json
@@ -0,0 +1,8 @@
+{
+ "id": "c0302ed6-924e-4c62-a073-0815f9726cfd",
+ "type": "feature",
+ "description": "Amazon Kendra now supports confidence score buckets for retrieved passage results using the Retrieve API.",
+ "modules": [
+ "service/kendra"
+ ]
+}
\ No newline at end of file
diff --git a/internal/protocoltest/awsrestjson/api_op_AllQueryStringTypes_test.go b/internal/protocoltest/awsrestjson/api_op_AllQueryStringTypes_test.go
index b24830c6ddf..954cae09222 100644
--- a/internal/protocoltest/awsrestjson/api_op_AllQueryStringTypes_test.go
+++ b/internal/protocoltest/awsrestjson/api_op_AllQueryStringTypes_test.go
@@ -247,17 +247,17 @@ func TestClient_AllQueryStringTypes_awsRestjson1Serialize(t *testing.T) {
// Handles escaping all required characters in the query string.
"RestJsonQueryStringEscaping": {
Params: &AllQueryStringTypesInput{
- QueryString: ptr.String("%:/?#[]@!$&'()*+,;=😹"),
+ QueryString: ptr.String(" %:/?#[]@!$&'()*+,;=😹"),
QueryParamsMapOfStringList: map[string][]string{
"String": {
- "%:/?#[]@!$&'()*+,;=😹",
+ " %:/?#[]@!$&'()*+,;=😹",
},
},
},
ExpectMethod: "GET",
ExpectURIPath: "/AllQueryStringTypesInput",
ExpectQuery: []smithytesting.QueryItem{
- {Key: "String", Value: "%25%3A%2F%3F%23%5B%5D%40%21%24%26%27%28%29%2A%2B%2C%3B%3D%F0%9F%98%B9"},
+ {Key: "String", Value: "%20%25%3A%2F%3F%23%5B%5D%40%21%24%26%27%28%29%2A%2B%2C%3B%3D%F0%9F%98%B9"},
},
BodyAssert: func(actual io.Reader) error {
return smithytesting.CompareReaderEmpty(actual)
diff --git a/internal/protocoltest/awsrestjson/api_op_FractionalSeconds.go b/internal/protocoltest/awsrestjson/api_op_FractionalSeconds.go
new file mode 100644
index 00000000000..5f2886d2f6f
--- /dev/null
+++ b/internal/protocoltest/awsrestjson/api_op_FractionalSeconds.go
@@ -0,0 +1,110 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package awsrestjson
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+func (c *Client) FractionalSeconds(ctx context.Context, params *FractionalSecondsInput, optFns ...func(*Options)) (*FractionalSecondsOutput, error) {
+ if params == nil {
+ params = &FractionalSecondsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "FractionalSeconds", params, optFns, c.addOperationFractionalSecondsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*FractionalSecondsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type FractionalSecondsInput struct {
+ noSmithyDocumentSerde
+}
+
+type FractionalSecondsOutput struct {
+ Datetime *time.Time
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationFractionalSecondsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpFractionalSeconds{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpFractionalSeconds{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addlegacyEndpointContextSetter(stack, options); 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 = addRetryMiddlewares(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, options); 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_opFractionalSeconds(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecursionDetection(stack); 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
+ }
+ if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opFractionalSeconds(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "FractionalSeconds",
+ }
+}
diff --git a/internal/protocoltest/awsrestjson/api_op_FractionalSeconds_test.go b/internal/protocoltest/awsrestjson/api_op_FractionalSeconds_test.go
new file mode 100644
index 00000000000..c6adeb00db4
--- /dev/null
+++ b/internal/protocoltest/awsrestjson/api_op_FractionalSeconds_test.go
@@ -0,0 +1,114 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package awsrestjson
+
+import (
+ "bytes"
+ "context"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ smithydocument "github.com/aws/smithy-go/document"
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
+ smithyrand "github.com/aws/smithy-go/rand"
+ smithytesting "github.com/aws/smithy-go/testing"
+ smithytime "github.com/aws/smithy-go/time"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "github.com/google/go-cmp/cmp"
+ "github.com/google/go-cmp/cmp/cmpopts"
+ "io/ioutil"
+ "math"
+ "net/http"
+ "testing"
+)
+
+func TestClient_FractionalSeconds_awsRestjson1Deserialize(t *testing.T) {
+ cases := map[string]struct {
+ StatusCode int
+ Header http.Header
+ BodyMediaType string
+ Body []byte
+ ExpectResult *FractionalSecondsOutput
+ }{
+ // Ensures that clients can correctly parse datetime timestamps with fractional
+ // seconds
+ "RestJsonDateTimeWithFractionalSeconds": {
+ StatusCode: 200,
+ BodyMediaType: "application/json",
+ Body: []byte(` {
+ "datetime": "2000-01-02T20:34:56.123Z"
+ }
+ `),
+ ExpectResult: &FractionalSecondsOutput{
+ Datetime: ptr.Time(smithytime.ParseEpochSeconds(9.46845296123e8)),
+ },
+ },
+ }
+ for name, c := range cases {
+ t.Run(name, func(t *testing.T) {
+ serverURL := "http://localhost:8888/"
+ client := New(Options{
+ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) {
+ headers := http.Header{}
+ for k, vs := range c.Header {
+ for _, v := range vs {
+ headers.Add(k, v)
+ }
+ }
+ if len(c.BodyMediaType) != 0 && len(headers.Values("Content-Type")) == 0 {
+ headers.Set("Content-Type", c.BodyMediaType)
+ }
+ response := &http.Response{
+ StatusCode: c.StatusCode,
+ Header: headers,
+ Request: r,
+ }
+ if len(c.Body) != 0 {
+ response.ContentLength = int64(len(c.Body))
+ response.Body = ioutil.NopCloser(bytes.NewReader(c.Body))
+ } else {
+
+ response.Body = http.NoBody
+ }
+ return response, nil
+ }),
+ APIOptions: []func(*middleware.Stack) error{
+ func(s *middleware.Stack) error {
+ s.Finalize.Clear()
+ s.Initialize.Remove(`OperationInputValidation`)
+ return nil
+ },
+ },
+ EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) {
+ e.URL = serverURL
+ e.SigningRegion = "us-west-2"
+ return e, err
+ }),
+ IdempotencyTokenProvider: smithyrand.NewUUIDIdempotencyToken(&smithytesting.ByteLoop{}),
+ Region: "us-west-2",
+ })
+ var params FractionalSecondsInput
+ result, err := client.FractionalSeconds(context.Background(), ¶ms)
+ if err != nil {
+ t.Fatalf("expect nil err, got %v", err)
+ }
+ if result == nil {
+ t.Fatalf("expect not nil result")
+ }
+ opts := cmp.Options{
+ cmpopts.IgnoreUnexported(
+ middleware.Metadata{},
+ ),
+ cmp.FilterValues(func(x, y float64) bool {
+ return math.IsNaN(x) && math.IsNaN(y)
+ }, cmp.Comparer(func(_, _ interface{}) bool { return true })),
+ cmp.FilterValues(func(x, y float32) bool {
+ return math.IsNaN(float64(x)) && math.IsNaN(float64(y))
+ }, cmp.Comparer(func(_, _ interface{}) bool { return true })),
+ cmpopts.IgnoreTypes(smithydocument.NoSerde{}),
+ }
+ if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil {
+ t.Errorf("expect c.ExpectResult value match:\n%v", err)
+ }
+ })
+ }
+}
diff --git a/internal/protocoltest/awsrestjson/api_op_HttpRequestWithLabels_test.go b/internal/protocoltest/awsrestjson/api_op_HttpRequestWithLabels_test.go
index 3903ff0ea6e..af3cdbe53cf 100644
--- a/internal/protocoltest/awsrestjson/api_op_HttpRequestWithLabels_test.go
+++ b/internal/protocoltest/awsrestjson/api_op_HttpRequestWithLabels_test.go
@@ -55,7 +55,7 @@ func TestClient_HttpRequestWithLabels_awsRestjson1Serialize(t *testing.T) {
// Sends a GET request that uses URI label bindings
"RestJsonHttpRequestLabelEscaping": {
Params: &HttpRequestWithLabelsInput{
- String_: ptr.String("%:/?#[]@!$&'()*+,;=😹"),
+ String_: ptr.String(" %:/?#[]@!$&'()*+,;=😹"),
Short: ptr.Int16(1),
Integer: ptr.Int32(2),
Long: ptr.Int64(3),
@@ -65,7 +65,7 @@ func TestClient_HttpRequestWithLabels_awsRestjson1Serialize(t *testing.T) {
Timestamp: ptr.Time(smithytime.ParseEpochSeconds(1576540098)),
},
ExpectMethod: "GET",
- ExpectURIPath: "/HttpRequestWithLabels/%25%3A%2F%3F%23%5B%5D%40%21%24%26%27%28%29%2A%2B%2C%3B%3D%F0%9F%98%B9/1/2/3/4.1/5.1/true/2019-12-16T23%3A48%3A18Z",
+ ExpectURIPath: "/HttpRequestWithLabels/%20%25%3A%2F%3F%23%5B%5D%40%21%24%26%27%28%29%2A%2B%2C%3B%3D%F0%9F%98%B9/1/2/3/4.1/5.1/true/2019-12-16T23%3A48%3A18Z",
ExpectQuery: []smithytesting.QueryItem{},
BodyAssert: func(actual io.Reader) error {
return smithytesting.CompareReaderEmpty(actual)
diff --git a/internal/protocoltest/awsrestjson/api_op_OmitsSerializingEmptyLists.go b/internal/protocoltest/awsrestjson/api_op_OmitsSerializingEmptyLists.go
new file mode 100644
index 00000000000..e36d735a843
--- /dev/null
+++ b/internal/protocoltest/awsrestjson/api_op_OmitsSerializingEmptyLists.go
@@ -0,0 +1,125 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package awsrestjson
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/internal/protocoltest/awsrestjson/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// Omits serializing empty lists. Because empty strings are serilized as Foo= ,
+// empty lists cannot also be serialized as Foo= and instead must be omitted.
+func (c *Client) OmitsSerializingEmptyLists(ctx context.Context, params *OmitsSerializingEmptyListsInput, optFns ...func(*Options)) (*OmitsSerializingEmptyListsOutput, error) {
+ if params == nil {
+ params = &OmitsSerializingEmptyListsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "OmitsSerializingEmptyLists", params, optFns, c.addOperationOmitsSerializingEmptyListsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*OmitsSerializingEmptyListsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type OmitsSerializingEmptyListsInput struct {
+ QueryBooleanList []bool
+
+ QueryDoubleList []float64
+
+ QueryEnumList []types.FooEnum
+
+ QueryIntegerEnumList []types.IntegerEnum
+
+ QueryIntegerList []int32
+
+ QueryStringList []string
+
+ QueryTimestampList []time.Time
+
+ noSmithyDocumentSerde
+}
+
+type OmitsSerializingEmptyListsOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationOmitsSerializingEmptyListsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpOmitsSerializingEmptyLists{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpOmitsSerializingEmptyLists{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addlegacyEndpointContextSetter(stack, options); 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 = addRetryMiddlewares(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, options); 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_opOmitsSerializingEmptyLists(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecursionDetection(stack); 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
+ }
+ if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opOmitsSerializingEmptyLists(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "OmitsSerializingEmptyLists",
+ }
+}
diff --git a/internal/protocoltest/awsrestjson/api_op_OmitsSerializingEmptyLists_test.go b/internal/protocoltest/awsrestjson/api_op_OmitsSerializingEmptyLists_test.go
new file mode 100644
index 00000000000..841a7eb9b6d
--- /dev/null
+++ b/internal/protocoltest/awsrestjson/api_op_OmitsSerializingEmptyLists_test.go
@@ -0,0 +1,117 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package awsrestjson
+
+import (
+ "context"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest"
+ "github.com/aws/aws-sdk-go-v2/internal/protocoltest/awsrestjson/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyprivateprotocol "github.com/aws/smithy-go/private/protocol"
+ smithyrand "github.com/aws/smithy-go/rand"
+ smithytesting "github.com/aws/smithy-go/testing"
+ "io"
+ "net/http"
+ "net/url"
+ "testing"
+ "time"
+)
+
+func TestClient_OmitsSerializingEmptyLists_awsRestjson1Serialize(t *testing.T) {
+ cases := map[string]struct {
+ Params *OmitsSerializingEmptyListsInput
+ ExpectMethod string
+ ExpectURIPath string
+ ExpectQuery []smithytesting.QueryItem
+ RequireQuery []string
+ ForbidQuery []string
+ ExpectHeader http.Header
+ RequireHeader []string
+ ForbidHeader []string
+ Host *url.URL
+ BodyMediaType string
+ BodyAssert func(io.Reader) error
+ }{
+ // Supports omitting empty lists.
+ "RestJsonOmitsEmptyListQueryValues": {
+ Params: &OmitsSerializingEmptyListsInput{
+ QueryStringList: []string{},
+ QueryIntegerList: []int32{},
+ QueryDoubleList: []float64{},
+ QueryBooleanList: []bool{},
+ QueryTimestampList: []time.Time{},
+ QueryEnumList: []types.FooEnum{},
+ QueryIntegerEnumList: []types.IntegerEnum{},
+ },
+ ExpectMethod: "POST",
+ ExpectURIPath: "/OmitsSerializingEmptyLists",
+ ExpectQuery: []smithytesting.QueryItem{},
+ BodyAssert: func(actual io.Reader) error {
+ return smithytesting.CompareReaderEmpty(actual)
+ },
+ },
+ }
+ for name, c := range cases {
+ t.Run(name, func(t *testing.T) {
+ actualReq := &http.Request{}
+ serverURL := "http://localhost:8888/"
+ if c.Host != nil {
+ u, err := url.Parse(serverURL)
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
+ u.Path = c.Host.Path
+ u.RawPath = c.Host.RawPath
+ u.RawQuery = c.Host.RawQuery
+ serverURL = u.String()
+ }
+ client := New(Options{
+ APIOptions: []func(*middleware.Stack) error{
+ func(s *middleware.Stack) error {
+ s.Finalize.Clear()
+ s.Initialize.Remove(`OperationInputValidation`)
+ return nil
+ },
+ },
+ EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) {
+ e.URL = serverURL
+ e.SigningRegion = "us-west-2"
+ return e, err
+ }),
+ HTTPClient: protocoltesthttp.NewClient(),
+ IdempotencyTokenProvider: smithyrand.NewUUIDIdempotencyToken(&smithytesting.ByteLoop{}),
+ Region: "us-west-2",
+ })
+ result, err := client.OmitsSerializingEmptyLists(context.Background(), c.Params, func(options *Options) {
+ options.APIOptions = append(options.APIOptions, func(stack *middleware.Stack) error {
+ return smithyprivateprotocol.AddCaptureRequestMiddleware(stack, actualReq)
+ })
+ })
+ if err != nil {
+ t.Fatalf("expect nil err, got %v", err)
+ }
+ if result == nil {
+ t.Fatalf("expect not nil result")
+ }
+ if e, a := c.ExpectMethod, actualReq.Method; e != a {
+ t.Errorf("expect %v method, got %v", e, a)
+ }
+ if e, a := c.ExpectURIPath, actualReq.URL.RawPath; e != a {
+ t.Errorf("expect %v path, got %v", e, a)
+ }
+ queryItems := smithytesting.ParseRawQuery(actualReq.URL.RawQuery)
+ smithytesting.AssertHasQuery(t, c.ExpectQuery, queryItems)
+ smithytesting.AssertHasQueryKeys(t, c.RequireQuery, queryItems)
+ smithytesting.AssertNotHaveQueryKeys(t, c.ForbidQuery, queryItems)
+ smithytesting.AssertHasHeader(t, c.ExpectHeader, actualReq.Header)
+ smithytesting.AssertHasHeaderKeys(t, c.RequireHeader, actualReq.Header)
+ smithytesting.AssertNotHaveHeaderKeys(t, c.ForbidHeader, actualReq.Header)
+ if c.BodyAssert != nil {
+ if err := c.BodyAssert(actualReq.Body); err != nil {
+ t.Errorf("expect body equal, got %v", err)
+ }
+ }
+ })
+ }
+}
diff --git a/internal/protocoltest/awsrestjson/api_op_PutWithContentEncoding.go b/internal/protocoltest/awsrestjson/api_op_PutWithContentEncoding.go
new file mode 100644
index 00000000000..3870a1fba6b
--- /dev/null
+++ b/internal/protocoltest/awsrestjson/api_op_PutWithContentEncoding.go
@@ -0,0 +1,111 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package awsrestjson
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+func (c *Client) PutWithContentEncoding(ctx context.Context, params *PutWithContentEncodingInput, optFns ...func(*Options)) (*PutWithContentEncodingOutput, error) {
+ if params == nil {
+ params = &PutWithContentEncodingInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutWithContentEncoding", params, optFns, c.addOperationPutWithContentEncodingMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutWithContentEncodingOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutWithContentEncodingInput struct {
+ Data *string
+
+ Encoding *string
+
+ noSmithyDocumentSerde
+}
+
+type PutWithContentEncodingOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutWithContentEncodingMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpPutWithContentEncoding{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutWithContentEncoding{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addlegacyEndpointContextSetter(stack, options); 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 = addRetryMiddlewares(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, options); 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_opPutWithContentEncoding(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecursionDetection(stack); 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
+ }
+ if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutWithContentEncoding(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "PutWithContentEncoding",
+ }
+}
diff --git a/internal/protocoltest/awsrestjson/api_op_PutWithContentEncoding_test.go b/internal/protocoltest/awsrestjson/api_op_PutWithContentEncoding_test.go
new file mode 100644
index 00000000000..e4196233a43
--- /dev/null
+++ b/internal/protocoltest/awsrestjson/api_op_PutWithContentEncoding_test.go
@@ -0,0 +1,133 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package awsrestjson
+
+import (
+ "context"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest"
+ "github.com/aws/smithy-go/middleware"
+ smithyprivateprotocol "github.com/aws/smithy-go/private/protocol"
+ "github.com/aws/smithy-go/ptr"
+ smithyrand "github.com/aws/smithy-go/rand"
+ smithytesting "github.com/aws/smithy-go/testing"
+ "io"
+ "net/http"
+ "net/url"
+ "testing"
+)
+
+func TestClient_PutWithContentEncoding_awsRestjson1Serialize(t *testing.T) {
+ cases := map[string]struct {
+ Params *PutWithContentEncodingInput
+ ExpectMethod string
+ ExpectURIPath string
+ ExpectQuery []smithytesting.QueryItem
+ RequireQuery []string
+ ForbidQuery []string
+ ExpectHeader http.Header
+ RequireHeader []string
+ ForbidHeader []string
+ Host *url.URL
+ BodyMediaType string
+ BodyAssert func(io.Reader) error
+ }{
+ // Compression algorithm encoding is appended to the Content-Encoding header.
+ "SDKAppliedContentEncoding_restJson1": {
+ Params: &PutWithContentEncodingInput{
+ Data: ptr.String("RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8\n5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1\n2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi\ngIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozyUFpg1ez6pyWP8ssWVfFrckREIM\nMb0cTUVqSVSM8bnFiF9SoXM6ZoGMKfX1mT708OYk7SqZ1JlCTkecDJDoR5ED2q2MWKUGR6jjnEV0GtD8\nWJO6AcF0DptY9Hk16Bav3z6c5FeBvrGDrxTFVgRUk8SychzjrcqJ4qskwN8rL3zslC0oqobQRnLFOvwJ\nprSzBIwdH2yAuxokXAdVRa1u9NGNRvfWJfKkwbbVz8yV76RUF9KNhAUmwyYDrLnxNj8ROl8B7dv8Gans\n7Bit52wcdiJyjBW1pAodB7zqqVwtBx5RaSpF7k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zIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n"),
+ },
+ ExpectMethod: "POST",
+ ExpectURIPath: "/requestcompression/putcontentwithencoding",
+ ExpectQuery: []smithytesting.QueryItem{},
+ ExpectHeader: http.Header{
+ "Content-Encoding": []string{"gzip"},
+ },
+ },
+ // Compression algorithm encoding is appended to the Content-Encoding header, and
+ // the user-provided content-encoding is in the Content-Encoding header before the
+ // request compression encoding from the HTTP binding.
+ "SDKAppendedGzipAfterProvidedEncoding_restJson1": {
+ Params: &PutWithContentEncodingInput{
+ Encoding: ptr.String("custom"),
+ Data: ptr.String("RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8\n5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1\n2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi\ngIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozyUFpg1ez6pyWP8ssWVfFrckREIM\nMb0cTUVqSVSM8bnFiF9SoXM6ZoGMKfX1mT708OYk7SqZ1JlCTkecDJDoR5ED2q2MWKUGR6jjnEV0GtD8\nWJO6AcF0DptY9Hk16Bav3z6c5FeBvrGDrxTFVgRUk8SychzjrcqJ4qskwN8rL3zslC0oqobQRnLFOvwJ\nprSzBIwdH2yAuxokXAdVRa1u9NGNRvfWJfKkwbbVz8yV76RUF9KNhAUmwyYDrLnxNj8ROl8B7dv8Gans\n7Bit52wcdiJyjBW1pAodB7zqqVwtBx5RaSpF7kEMXexYXp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cffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n"),
+ },
+ ExpectMethod: "POST",
+ ExpectURIPath: "/requestcompression/putcontentwithencoding",
+ ExpectQuery: []smithytesting.QueryItem{},
+ ExpectHeader: http.Header{
+ "Content-Encoding": []string{"custom, gzip"},
+ },
+ },
+ }
+ for name, c := range cases {
+ t.Run(name, func(t *testing.T) {
+ if name == "SDKAppliedContentEncoding_restJson1" {
+ t.Skip("disabled test aws.protocoltests.restjson#RestJson aws.protocoltests.restjson#PutWithContentEncoding")
+ }
+
+ if name == "SDKAppendedGzipAfterProvidedEncoding_restJson1" {
+ t.Skip("disabled test aws.protocoltests.restjson#RestJson aws.protocoltests.restjson#PutWithContentEncoding")
+ }
+
+ actualReq := &http.Request{}
+ serverURL := "http://localhost:8888/"
+ if c.Host != nil {
+ u, err := url.Parse(serverURL)
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
+ u.Path = c.Host.Path
+ u.RawPath = c.Host.RawPath
+ u.RawQuery = c.Host.RawQuery
+ serverURL = u.String()
+ }
+ client := New(Options{
+ APIOptions: []func(*middleware.Stack) error{
+ func(s *middleware.Stack) error {
+ s.Finalize.Clear()
+ s.Initialize.Remove(`OperationInputValidation`)
+ return nil
+ },
+ },
+ EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) {
+ e.URL = serverURL
+ e.SigningRegion = "us-west-2"
+ return e, err
+ }),
+ HTTPClient: protocoltesthttp.NewClient(),
+ IdempotencyTokenProvider: smithyrand.NewUUIDIdempotencyToken(&smithytesting.ByteLoop{}),
+ Region: "us-west-2",
+ })
+ result, err := client.PutWithContentEncoding(context.Background(), c.Params, func(options *Options) {
+ options.APIOptions = append(options.APIOptions, func(stack *middleware.Stack) error {
+ return smithyprivateprotocol.AddCaptureRequestMiddleware(stack, actualReq)
+ })
+ })
+ if err != nil {
+ t.Fatalf("expect nil err, got %v", err)
+ }
+ if result == nil {
+ t.Fatalf("expect not nil result")
+ }
+ if e, a := c.ExpectMethod, actualReq.Method; e != a {
+ t.Errorf("expect %v method, got %v", e, a)
+ }
+ if e, a := c.ExpectURIPath, actualReq.URL.RawPath; e != a {
+ t.Errorf("expect %v path, got %v", e, a)
+ }
+ queryItems := smithytesting.ParseRawQuery(actualReq.URL.RawQuery)
+ smithytesting.AssertHasQuery(t, c.ExpectQuery, queryItems)
+ smithytesting.AssertHasQueryKeys(t, c.RequireQuery, queryItems)
+ smithytesting.AssertNotHaveQueryKeys(t, c.ForbidQuery, queryItems)
+ smithytesting.AssertHasHeader(t, c.ExpectHeader, actualReq.Header)
+ smithytesting.AssertHasHeaderKeys(t, c.RequireHeader, actualReq.Header)
+ smithytesting.AssertNotHaveHeaderKeys(t, c.ForbidHeader, actualReq.Header)
+ if c.BodyAssert != nil {
+ if err := c.BodyAssert(actualReq.Body); err != nil {
+ t.Errorf("expect body equal, got %v", err)
+ }
+ }
+ })
+ }
+}
diff --git a/internal/protocoltest/awsrestjson/deserializers.go b/internal/protocoltest/awsrestjson/deserializers.go
index ff0ca8cfbf8..4893968c612 100644
--- a/internal/protocoltest/awsrestjson/deserializers.go
+++ b/internal/protocoltest/awsrestjson/deserializers.go
@@ -985,6 +985,158 @@ func awsRestjson1_deserializeOpErrorEndpointWithHostLabelOperation(response *smi
}
}
+type awsRestjson1_deserializeOpFractionalSeconds struct {
+}
+
+func (*awsRestjson1_deserializeOpFractionalSeconds) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpFractionalSeconds) 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_deserializeOpErrorFractionalSeconds(response, &metadata)
+ }
+ output := &FractionalSecondsOutput{}
+ 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_deserializeOpDocumentFractionalSecondsOutput(&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_deserializeOpErrorFractionalSeconds(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
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, 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(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentFractionalSecondsOutput(v **FractionalSecondsOutput, 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 *FractionalSecondsOutput
+ if *v == nil {
+ sv = &FractionalSecondsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "datetime":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected DateTime to be of type string, got %T instead", value)
+ }
+ t, err := smithytime.ParseDateTime(jtv)
+ if err != nil {
+ return err
+ }
+ sv.Datetime = ptr.Time(t)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
type awsRestjson1_deserializeOpGreetingWithErrors struct {
}
@@ -7863,6 +8015,92 @@ func awsRestjson1_deserializeOpErrorOmitsNullSerializesEmptyString(response *smi
}
}
+type awsRestjson1_deserializeOpOmitsSerializingEmptyLists struct {
+}
+
+func (*awsRestjson1_deserializeOpOmitsSerializingEmptyLists) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpOmitsSerializingEmptyLists) 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_deserializeOpErrorOmitsSerializingEmptyLists(response, &metadata)
+ }
+ output := &OmitsSerializingEmptyListsOutput{}
+ 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_deserializeOpErrorOmitsSerializingEmptyLists(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
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, 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(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
type awsRestjson1_deserializeOpPostPlayerAction struct {
}
@@ -8151,6 +8389,92 @@ func awsRestjson1_deserializeOpDocumentPostUnionWithJsonNameOutput(v **PostUnion
return nil
}
+type awsRestjson1_deserializeOpPutWithContentEncoding struct {
+}
+
+func (*awsRestjson1_deserializeOpPutWithContentEncoding) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpPutWithContentEncoding) 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_deserializeOpErrorPutWithContentEncoding(response, &metadata)
+ }
+ output := &PutWithContentEncodingOutput{}
+ 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_deserializeOpErrorPutWithContentEncoding(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
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, 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(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
type awsRestjson1_deserializeOpQueryIdempotencyTokenAutoFill struct {
}
diff --git a/internal/protocoltest/awsrestjson/generated.json b/internal/protocoltest/awsrestjson/generated.json
index 4ea61518384..847f654a1b3 100644
--- a/internal/protocoltest/awsrestjson/generated.json
+++ b/internal/protocoltest/awsrestjson/generated.json
@@ -27,6 +27,8 @@
"api_op_EndpointOperation_test.go",
"api_op_EndpointWithHostLabelOperation.go",
"api_op_EndpointWithHostLabelOperation_test.go",
+ "api_op_FractionalSeconds.go",
+ "api_op_FractionalSeconds_test.go",
"api_op_GreetingWithErrors.go",
"api_op_GreetingWithErrors_test.go",
"api_op_HostWithPathOperation.go",
@@ -120,10 +122,14 @@
"api_op_NullAndEmptyHeadersServer.go",
"api_op_OmitsNullSerializesEmptyString.go",
"api_op_OmitsNullSerializesEmptyString_test.go",
+ "api_op_OmitsSerializingEmptyLists.go",
+ "api_op_OmitsSerializingEmptyLists_test.go",
"api_op_PostPlayerAction.go",
"api_op_PostPlayerAction_test.go",
"api_op_PostUnionWithJsonName.go",
"api_op_PostUnionWithJsonName_test.go",
+ "api_op_PutWithContentEncoding.go",
+ "api_op_PutWithContentEncoding_test.go",
"api_op_QueryIdempotencyTokenAutoFill.go",
"api_op_QueryIdempotencyTokenAutoFill_test.go",
"api_op_QueryParamsAsStringListMap.go",
diff --git a/internal/protocoltest/awsrestjson/serializers.go b/internal/protocoltest/awsrestjson/serializers.go
index 4822ea73ce6..f7f6ee6713e 100644
--- a/internal/protocoltest/awsrestjson/serializers.go
+++ b/internal/protocoltest/awsrestjson/serializers.go
@@ -699,6 +699,58 @@ func awsRestjson1_serializeOpDocumentEndpointWithHostLabelOperationInput(v *Endp
return nil
}
+type awsRestjson1_serializeOpFractionalSeconds struct {
+}
+
+func (*awsRestjson1_serializeOpFractionalSeconds) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpFractionalSeconds) 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.(*FractionalSecondsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/FractionalSeconds")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, 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_serializeOpHttpBindingsFractionalSecondsInput(v *FractionalSecondsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ return nil
+}
+
type awsRestjson1_serializeOpGreetingWithErrors struct {
}
@@ -5604,6 +5656,104 @@ func awsRestjson1_serializeOpHttpBindingsOmitsNullSerializesEmptyStringInput(v *
return nil
}
+type awsRestjson1_serializeOpOmitsSerializingEmptyLists struct {
+}
+
+func (*awsRestjson1_serializeOpOmitsSerializingEmptyLists) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpOmitsSerializingEmptyLists) 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.(*OmitsSerializingEmptyListsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/OmitsSerializingEmptyLists")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsOmitsSerializingEmptyListsInput(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_serializeOpHttpBindingsOmitsSerializingEmptyListsInput(v *OmitsSerializingEmptyListsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.QueryBooleanList != nil {
+ for i := range v.QueryBooleanList {
+ encoder.AddQuery("BooleanList").Boolean(v.QueryBooleanList[i])
+ }
+ }
+
+ if v.QueryDoubleList != nil {
+ for i := range v.QueryDoubleList {
+ encoder.AddQuery("DoubleList").Double(v.QueryDoubleList[i])
+ }
+ }
+
+ if v.QueryEnumList != nil {
+ for i := range v.QueryEnumList {
+ encoder.AddQuery("EnumList").String(string(v.QueryEnumList[i]))
+ }
+ }
+
+ if v.QueryIntegerEnumList != nil {
+ for i := range v.QueryIntegerEnumList {
+ encoder.AddQuery("IntegerEnumList").Integer(v.QueryIntegerEnumList[i])
+ }
+ }
+
+ if v.QueryIntegerList != nil {
+ for i := range v.QueryIntegerList {
+ encoder.AddQuery("IntegerList").Integer(v.QueryIntegerList[i])
+ }
+ }
+
+ if v.QueryStringList != nil {
+ for i := range v.QueryStringList {
+ encoder.AddQuery("StringList").String(v.QueryStringList[i])
+ }
+ }
+
+ if v.QueryTimestampList != nil {
+ for i := range v.QueryTimestampList {
+ encoder.AddQuery("TimestampList").String(smithytime.FormatDateTime(v.QueryTimestampList[i]))
+ }
+ }
+
+ return nil
+}
+
type awsRestjson1_serializeOpPostPlayerAction struct {
}
@@ -5758,6 +5908,90 @@ func awsRestjson1_serializeOpDocumentPostUnionWithJsonNameInput(v *PostUnionWith
return nil
}
+type awsRestjson1_serializeOpPutWithContentEncoding struct {
+}
+
+func (*awsRestjson1_serializeOpPutWithContentEncoding) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpPutWithContentEncoding) 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.(*PutWithContentEncodingInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/requestcompression/putcontentwithencoding")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsPutWithContentEncodingInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentPutWithContentEncodingInput(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_serializeOpHttpBindingsPutWithContentEncodingInput(v *PutWithContentEncodingInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Encoding != nil && len(*v.Encoding) > 0 {
+ locationName := "Content-Encoding"
+ encoder.SetHeader(locationName).String(*v.Encoding)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentPutWithContentEncodingInput(v *PutWithContentEncodingInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.Data != nil {
+ ok := object.Key("data")
+ ok.String(*v.Data)
+ }
+
+ return nil
+}
+
type awsRestjson1_serializeOpQueryIdempotencyTokenAutoFill struct {
}
diff --git a/internal/protocoltest/ec2query/api_op_FractionalSeconds.go b/internal/protocoltest/ec2query/api_op_FractionalSeconds.go
new file mode 100644
index 00000000000..94aa413a375
--- /dev/null
+++ b/internal/protocoltest/ec2query/api_op_FractionalSeconds.go
@@ -0,0 +1,110 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2query
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+func (c *Client) FractionalSeconds(ctx context.Context, params *FractionalSecondsInput, optFns ...func(*Options)) (*FractionalSecondsOutput, error) {
+ if params == nil {
+ params = &FractionalSecondsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "FractionalSeconds", params, optFns, c.addOperationFractionalSecondsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*FractionalSecondsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type FractionalSecondsInput struct {
+ noSmithyDocumentSerde
+}
+
+type FractionalSecondsOutput struct {
+ Datetime *time.Time
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationFractionalSecondsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpFractionalSeconds{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpFractionalSeconds{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addlegacyEndpointContextSetter(stack, options); 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 = addRetryMiddlewares(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, options); 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_opFractionalSeconds(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecursionDetection(stack); 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
+ }
+ if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opFractionalSeconds(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "FractionalSeconds",
+ }
+}
diff --git a/internal/protocoltest/ec2query/api_op_FractionalSeconds_test.go b/internal/protocoltest/ec2query/api_op_FractionalSeconds_test.go
new file mode 100644
index 00000000000..a1176fcba4d
--- /dev/null
+++ b/internal/protocoltest/ec2query/api_op_FractionalSeconds_test.go
@@ -0,0 +1,118 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2query
+
+import (
+ "bytes"
+ "context"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ smithydocument "github.com/aws/smithy-go/document"
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
+ smithyrand "github.com/aws/smithy-go/rand"
+ smithytesting "github.com/aws/smithy-go/testing"
+ smithytime "github.com/aws/smithy-go/time"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "github.com/google/go-cmp/cmp"
+ "github.com/google/go-cmp/cmp/cmpopts"
+ "io/ioutil"
+ "math"
+ "net/http"
+ "testing"
+)
+
+func TestClient_FractionalSeconds_awsEc2queryDeserialize(t *testing.T) {
+ cases := map[string]struct {
+ StatusCode int
+ Header http.Header
+ BodyMediaType string
+ Body []byte
+ ExpectResult *FractionalSecondsOutput
+ }{
+ // Ensures that clients can correctly parse datetime timestamps with fractional
+ // seconds
+ "Ec2QueryDateTimeWithFractionalSeconds": {
+ StatusCode: 200,
+ Header: http.Header{
+ "Content-Type": []string{"text/xml;charset=UTF-8"},
+ },
+ BodyMediaType: "application/xml",
+ Body: []byte(`
+ 2000-01-02T20:34:56.123Z
+ requestid
+
+ `),
+ ExpectResult: &FractionalSecondsOutput{
+ Datetime: ptr.Time(smithytime.ParseEpochSeconds(9.46845296123e8)),
+ },
+ },
+ }
+ for name, c := range cases {
+ t.Run(name, func(t *testing.T) {
+ serverURL := "http://localhost:8888/"
+ client := New(Options{
+ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) {
+ headers := http.Header{}
+ for k, vs := range c.Header {
+ for _, v := range vs {
+ headers.Add(k, v)
+ }
+ }
+ if len(c.BodyMediaType) != 0 && len(headers.Values("Content-Type")) == 0 {
+ headers.Set("Content-Type", c.BodyMediaType)
+ }
+ response := &http.Response{
+ StatusCode: c.StatusCode,
+ Header: headers,
+ Request: r,
+ }
+ if len(c.Body) != 0 {
+ response.ContentLength = int64(len(c.Body))
+ response.Body = ioutil.NopCloser(bytes.NewReader(c.Body))
+ } else {
+
+ response.Body = http.NoBody
+ }
+ return response, nil
+ }),
+ APIOptions: []func(*middleware.Stack) error{
+ func(s *middleware.Stack) error {
+ s.Finalize.Clear()
+ s.Initialize.Remove(`OperationInputValidation`)
+ return nil
+ },
+ },
+ EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) {
+ e.URL = serverURL
+ e.SigningRegion = "us-west-2"
+ return e, err
+ }),
+ IdempotencyTokenProvider: smithyrand.NewUUIDIdempotencyToken(&smithytesting.ByteLoop{}),
+ Region: "us-west-2",
+ })
+ var params FractionalSecondsInput
+ result, err := client.FractionalSeconds(context.Background(), ¶ms)
+ if err != nil {
+ t.Fatalf("expect nil err, got %v", err)
+ }
+ if result == nil {
+ t.Fatalf("expect not nil result")
+ }
+ opts := cmp.Options{
+ cmpopts.IgnoreUnexported(
+ middleware.Metadata{},
+ ),
+ cmp.FilterValues(func(x, y float64) bool {
+ return math.IsNaN(x) && math.IsNaN(y)
+ }, cmp.Comparer(func(_, _ interface{}) bool { return true })),
+ cmp.FilterValues(func(x, y float32) bool {
+ return math.IsNaN(float64(x)) && math.IsNaN(float64(y))
+ }, cmp.Comparer(func(_, _ interface{}) bool { return true })),
+ cmpopts.IgnoreTypes(smithydocument.NoSerde{}),
+ }
+ if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil {
+ t.Errorf("expect c.ExpectResult value match:\n%v", err)
+ }
+ })
+ }
+}
diff --git a/internal/protocoltest/ec2query/api_op_PutWithContentEncoding.go b/internal/protocoltest/ec2query/api_op_PutWithContentEncoding.go
new file mode 100644
index 00000000000..b6e0413f0b5
--- /dev/null
+++ b/internal/protocoltest/ec2query/api_op_PutWithContentEncoding.go
@@ -0,0 +1,111 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2query
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+func (c *Client) PutWithContentEncoding(ctx context.Context, params *PutWithContentEncodingInput, optFns ...func(*Options)) (*PutWithContentEncodingOutput, error) {
+ if params == nil {
+ params = &PutWithContentEncodingInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutWithContentEncoding", params, optFns, c.addOperationPutWithContentEncodingMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutWithContentEncodingOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutWithContentEncodingInput struct {
+ Data *string
+
+ Encoding *string
+
+ noSmithyDocumentSerde
+}
+
+type PutWithContentEncodingOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutWithContentEncodingMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpPutWithContentEncoding{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpPutWithContentEncoding{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addlegacyEndpointContextSetter(stack, options); 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 = addRetryMiddlewares(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, options); 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_opPutWithContentEncoding(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecursionDetection(stack); 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
+ }
+ if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutWithContentEncoding(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "PutWithContentEncoding",
+ }
+}
diff --git a/internal/protocoltest/ec2query/api_op_PutWithContentEncoding_test.go b/internal/protocoltest/ec2query/api_op_PutWithContentEncoding_test.go
new file mode 100644
index 00000000000..aa4434875c0
--- /dev/null
+++ b/internal/protocoltest/ec2query/api_op_PutWithContentEncoding_test.go
@@ -0,0 +1,133 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2query
+
+import (
+ "context"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest"
+ "github.com/aws/smithy-go/middleware"
+ smithyprivateprotocol "github.com/aws/smithy-go/private/protocol"
+ "github.com/aws/smithy-go/ptr"
+ smithyrand "github.com/aws/smithy-go/rand"
+ smithytesting "github.com/aws/smithy-go/testing"
+ "io"
+ "net/http"
+ "net/url"
+ "testing"
+)
+
+func TestClient_PutWithContentEncoding_awsEc2querySerialize(t *testing.T) {
+ cases := map[string]struct {
+ Params *PutWithContentEncodingInput
+ ExpectMethod string
+ ExpectURIPath string
+ ExpectQuery []smithytesting.QueryItem
+ RequireQuery []string
+ ForbidQuery []string
+ ExpectHeader http.Header
+ RequireHeader []string
+ ForbidHeader []string
+ Host *url.URL
+ BodyMediaType string
+ BodyAssert func(io.Reader) error
+ }{
+ // Compression algorithm encoding is appended to the Content-Encoding header.
+ "SDKAppliedContentEncoding_ec2Query": {
+ Params: &PutWithContentEncodingInput{
+ Data: ptr.String("RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8\n5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1\n2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi\ngIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozyUFpg1ez6pyWP8ssWVfFrckREIM\nMb0cTUVqSVSM8bnFiF9SoXM6ZoGMKfX1mT708OYk7SqZ1JlCTkecDJDoR5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5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh\nhvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n"),
+ },
+ ExpectMethod: "POST",
+ ExpectURIPath: "/",
+ ExpectQuery: []smithytesting.QueryItem{},
+ ExpectHeader: http.Header{
+ "Content-Encoding": []string{"gzip"},
+ },
+ },
+ // Compression algorithm encoding is appended to the Content-Encoding header, and
+ // the user-provided content-encoding is NOT in the Content-Encoding header since
+ // HTTP binding traits are ignored in the ec2Query protocol.
+ "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_ec2Query": {
+ Params: &PutWithContentEncodingInput{
+ Encoding: ptr.String("custom"),
+ Data: ptr.String("RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8\n5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1\n2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi\ngIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozyUFpg1ez6pyWP8ssWVfFrckREIM\nMb0cTUVqSVSM8bnFiF9SoXM6ZoGMKfX1mT708OYk7SqZ1JlCTkecDJDoR5ED2q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QsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh\nhvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n"),
+ },
+ ExpectMethod: "POST",
+ ExpectURIPath: "/",
+ ExpectQuery: []smithytesting.QueryItem{},
+ ExpectHeader: http.Header{
+ "Content-Encoding": []string{"gzip"},
+ },
+ },
+ }
+ for name, c := range cases {
+ t.Run(name, func(t *testing.T) {
+ if name == "SDKAppliedContentEncoding_ec2Query" {
+ t.Skip("disabled test aws.protocoltests.ec2#AwsEc2 aws.protocoltests.ec2#PutWithContentEncoding")
+ }
+
+ if name == "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_ec2Query" {
+ t.Skip("disabled test aws.protocoltests.ec2#AwsEc2 aws.protocoltests.ec2#PutWithContentEncoding")
+ }
+
+ actualReq := &http.Request{}
+ serverURL := "http://localhost:8888/"
+ if c.Host != nil {
+ u, err := url.Parse(serverURL)
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
+ u.Path = c.Host.Path
+ u.RawPath = c.Host.RawPath
+ u.RawQuery = c.Host.RawQuery
+ serverURL = u.String()
+ }
+ client := New(Options{
+ APIOptions: []func(*middleware.Stack) error{
+ func(s *middleware.Stack) error {
+ s.Finalize.Clear()
+ s.Initialize.Remove(`OperationInputValidation`)
+ return nil
+ },
+ },
+ EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) {
+ e.URL = serverURL
+ e.SigningRegion = "us-west-2"
+ return e, err
+ }),
+ HTTPClient: protocoltesthttp.NewClient(),
+ IdempotencyTokenProvider: smithyrand.NewUUIDIdempotencyToken(&smithytesting.ByteLoop{}),
+ Region: "us-west-2",
+ })
+ result, err := client.PutWithContentEncoding(context.Background(), c.Params, func(options *Options) {
+ options.APIOptions = append(options.APIOptions, func(stack *middleware.Stack) error {
+ return smithyprivateprotocol.AddCaptureRequestMiddleware(stack, actualReq)
+ })
+ })
+ if err != nil {
+ t.Fatalf("expect nil err, got %v", err)
+ }
+ if result == nil {
+ t.Fatalf("expect not nil result")
+ }
+ if e, a := c.ExpectMethod, actualReq.Method; e != a {
+ t.Errorf("expect %v method, got %v", e, a)
+ }
+ if e, a := c.ExpectURIPath, actualReq.URL.RawPath; e != a {
+ t.Errorf("expect %v path, got %v", e, a)
+ }
+ queryItems := smithytesting.ParseRawQuery(actualReq.URL.RawQuery)
+ smithytesting.AssertHasQuery(t, c.ExpectQuery, queryItems)
+ smithytesting.AssertHasQueryKeys(t, c.RequireQuery, queryItems)
+ smithytesting.AssertNotHaveQueryKeys(t, c.ForbidQuery, queryItems)
+ smithytesting.AssertHasHeader(t, c.ExpectHeader, actualReq.Header)
+ smithytesting.AssertHasHeaderKeys(t, c.RequireHeader, actualReq.Header)
+ smithytesting.AssertNotHaveHeaderKeys(t, c.ForbidHeader, actualReq.Header)
+ if c.BodyAssert != nil {
+ if err := c.BodyAssert(actualReq.Body); err != nil {
+ t.Errorf("expect body equal, got %v", err)
+ }
+ }
+ })
+ }
+}
diff --git a/internal/protocoltest/ec2query/deserializers.go b/internal/protocoltest/ec2query/deserializers.go
index 826110efa26..00cd34f88fa 100644
--- a/internal/protocoltest/ec2query/deserializers.go
+++ b/internal/protocoltest/ec2query/deserializers.go
@@ -343,6 +343,97 @@ func awsEc2query_deserializeOpErrorEndpointWithHostLabelOperation(response *smit
}
}
+type awsEc2query_deserializeOpFractionalSeconds struct {
+}
+
+func (*awsEc2query_deserializeOpFractionalSeconds) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpFractionalSeconds) 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, awsEc2query_deserializeOpErrorFractionalSeconds(response, &metadata)
+ }
+ output := &FractionalSecondsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsEc2query_deserializeOpDocumentFractionalSecondsOutput(&output, 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 out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorFractionalSeconds(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
+
+ errorComponents, err := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
type awsEc2query_deserializeOpGreetingWithErrors struct {
}
@@ -758,6 +849,74 @@ func awsEc2query_deserializeOpErrorNoInputAndOutput(response *smithyhttp.Respons
}
}
+type awsEc2query_deserializeOpPutWithContentEncoding struct {
+}
+
+func (*awsEc2query_deserializeOpPutWithContentEncoding) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpPutWithContentEncoding) 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, awsEc2query_deserializeOpErrorPutWithContentEncoding(response, &metadata)
+ }
+ output := &PutWithContentEncodingOutput{}
+ 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 awsEc2query_deserializeOpErrorPutWithContentEncoding(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
+
+ errorComponents, err := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
type awsEc2query_deserializeOpQueryIdempotencyTokenAutoFill struct {
}
@@ -3929,6 +4088,59 @@ func awsEc2query_deserializeOpDocumentEmptyInputAndEmptyOutputOutput(v **EmptyIn
return nil
}
+func awsEc2query_deserializeOpDocumentFractionalSecondsOutput(v **FractionalSecondsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *FractionalSecondsOutput
+ if *v == nil {
+ sv = &FractionalSecondsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("datetime", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ t, err := smithytime.ParseDateTime(xtv)
+ if err != nil {
+ return err
+ }
+ sv.Datetime = ptr.Time(t)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
func awsEc2query_deserializeOpDocumentGreetingWithErrorsOutput(v **GreetingWithErrorsOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
diff --git a/internal/protocoltest/ec2query/generated.json b/internal/protocoltest/ec2query/generated.json
index 4730e08934a..bc595f01115 100644
--- a/internal/protocoltest/ec2query/generated.json
+++ b/internal/protocoltest/ec2query/generated.json
@@ -17,6 +17,8 @@
"api_op_EndpointOperation_test.go",
"api_op_EndpointWithHostLabelOperation.go",
"api_op_EndpointWithHostLabelOperation_test.go",
+ "api_op_FractionalSeconds.go",
+ "api_op_FractionalSeconds_test.go",
"api_op_GreetingWithErrors.go",
"api_op_GreetingWithErrors_test.go",
"api_op_HostWithPathOperation.go",
@@ -27,6 +29,8 @@
"api_op_NestedStructures_test.go",
"api_op_NoInputAndOutput.go",
"api_op_NoInputAndOutput_test.go",
+ "api_op_PutWithContentEncoding.go",
+ "api_op_PutWithContentEncoding_test.go",
"api_op_QueryIdempotencyTokenAutoFill.go",
"api_op_QueryIdempotencyTokenAutoFill_test.go",
"api_op_QueryLists.go",
diff --git a/internal/protocoltest/ec2query/serializers.go b/internal/protocoltest/ec2query/serializers.go
index 7937158a09b..efdc72e96ad 100644
--- a/internal/protocoltest/ec2query/serializers.go
+++ b/internal/protocoltest/ec2query/serializers.go
@@ -261,6 +261,66 @@ func (m *awsEc2query_serializeOpEndpointWithHostLabelOperation) HandleSerialize(
return next.HandleSerialize(ctx, in)
}
+type awsEc2query_serializeOpFractionalSeconds struct {
+}
+
+func (*awsEc2query_serializeOpFractionalSeconds) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpFractionalSeconds) 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.(*FractionalSecondsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("FractionalSeconds")
+ body.Key("Version").String("2020-01-08")
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
type awsEc2query_serializeOpGreetingWithErrors struct {
}
@@ -565,6 +625,70 @@ func (m *awsEc2query_serializeOpNoInputAndOutput) HandleSerialize(ctx context.Co
return next.HandleSerialize(ctx, in)
}
+type awsEc2query_serializeOpPutWithContentEncoding struct {
+}
+
+func (*awsEc2query_serializeOpPutWithContentEncoding) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpPutWithContentEncoding) 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.(*PutWithContentEncodingInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("PutWithContentEncoding")
+ body.Key("Version").String("2020-01-08")
+
+ if err := awsEc2query_serializeOpDocumentPutWithContentEncodingInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
type awsEc2query_serializeOpQueryIdempotencyTokenAutoFill struct {
}
@@ -1535,6 +1659,23 @@ func awsEc2query_serializeOpDocumentNestedStructuresInput(v *NestedStructuresInp
return nil
}
+func awsEc2query_serializeOpDocumentPutWithContentEncodingInput(v *PutWithContentEncodingInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Data != nil {
+ objectKey := object.Key("Data")
+ objectKey.String(*v.Data)
+ }
+
+ if v.Encoding != nil {
+ objectKey := object.Key("Encoding")
+ objectKey.String(*v.Encoding)
+ }
+
+ return nil
+}
+
func awsEc2query_serializeOpDocumentQueryIdempotencyTokenAutoFillInput(v *QueryIdempotencyTokenAutoFillInput, value query.Value) error {
object := value.Object()
_ = object
diff --git a/internal/protocoltest/jsonrpc/api_op_FractionalSeconds.go b/internal/protocoltest/jsonrpc/api_op_FractionalSeconds.go
new file mode 100644
index 00000000000..f859a0f9e12
--- /dev/null
+++ b/internal/protocoltest/jsonrpc/api_op_FractionalSeconds.go
@@ -0,0 +1,118 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package jsonrpc
+
+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"
+ "time"
+)
+
+func (c *Client) FractionalSeconds(ctx context.Context, params *FractionalSecondsInput, optFns ...func(*Options)) (*FractionalSecondsOutput, error) {
+ if params == nil {
+ params = &FractionalSecondsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "FractionalSeconds", params, optFns, c.addOperationFractionalSecondsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*FractionalSecondsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type FractionalSecondsInput struct {
+ noSmithyDocumentSerde
+}
+
+type FractionalSecondsOutput struct {
+ Datetime *time.Time
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationFractionalSecondsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpFractionalSeconds{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpFractionalSeconds{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addlegacyEndpointContextSetter(stack, options); 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, options); 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_opFractionalSeconds(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecursionDetection(stack); 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
+ }
+ if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opFractionalSeconds(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "foo",
+ OperationName: "FractionalSeconds",
+ }
+}
diff --git a/internal/protocoltest/jsonrpc/api_op_FractionalSeconds_test.go b/internal/protocoltest/jsonrpc/api_op_FractionalSeconds_test.go
new file mode 100644
index 00000000000..44e2ceb2cf8
--- /dev/null
+++ b/internal/protocoltest/jsonrpc/api_op_FractionalSeconds_test.go
@@ -0,0 +1,115 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package jsonrpc
+
+import (
+ "bytes"
+ "context"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ smithydocument "github.com/aws/smithy-go/document"
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
+ smithytesting "github.com/aws/smithy-go/testing"
+ smithytime "github.com/aws/smithy-go/time"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "github.com/google/go-cmp/cmp"
+ "github.com/google/go-cmp/cmp/cmpopts"
+ "io/ioutil"
+ "math"
+ "net/http"
+ "testing"
+)
+
+func TestClient_FractionalSeconds_awsAwsjson11Deserialize(t *testing.T) {
+ cases := map[string]struct {
+ StatusCode int
+ Header http.Header
+ BodyMediaType string
+ Body []byte
+ ExpectResult *FractionalSecondsOutput
+ }{
+ // Ensures that clients can correctly parse datetime timestamps with fractional
+ // seconds
+ "AwsJson11DateTimeWithFractionalSeconds": {
+ StatusCode: 200,
+ Header: http.Header{
+ "Content-Type": []string{"application/x-amz-json-1.1"},
+ },
+ BodyMediaType: "application/json",
+ Body: []byte(` {
+ "datetime": "2000-01-02T20:34:56.123Z"
+ }
+ `),
+ ExpectResult: &FractionalSecondsOutput{
+ Datetime: ptr.Time(smithytime.ParseEpochSeconds(9.46845296123e8)),
+ },
+ },
+ }
+ for name, c := range cases {
+ t.Run(name, func(t *testing.T) {
+ serverURL := "http://localhost:8888/"
+ client := New(Options{
+ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) {
+ headers := http.Header{}
+ for k, vs := range c.Header {
+ for _, v := range vs {
+ headers.Add(k, v)
+ }
+ }
+ if len(c.BodyMediaType) != 0 && len(headers.Values("Content-Type")) == 0 {
+ headers.Set("Content-Type", c.BodyMediaType)
+ }
+ response := &http.Response{
+ StatusCode: c.StatusCode,
+ Header: headers,
+ Request: r,
+ }
+ if len(c.Body) != 0 {
+ response.ContentLength = int64(len(c.Body))
+ response.Body = ioutil.NopCloser(bytes.NewReader(c.Body))
+ } else {
+
+ response.Body = http.NoBody
+ }
+ return response, nil
+ }),
+ APIOptions: []func(*middleware.Stack) error{
+ func(s *middleware.Stack) error {
+ s.Finalize.Clear()
+ s.Initialize.Remove(`OperationInputValidation`)
+ return nil
+ },
+ },
+ EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) {
+ e.URL = serverURL
+ e.SigningRegion = "us-west-2"
+ return e, err
+ }),
+ Region: "us-west-2",
+ })
+ var params FractionalSecondsInput
+ result, err := client.FractionalSeconds(context.Background(), ¶ms)
+ if err != nil {
+ t.Fatalf("expect nil err, got %v", err)
+ }
+ if result == nil {
+ t.Fatalf("expect not nil result")
+ }
+ opts := cmp.Options{
+ cmpopts.IgnoreUnexported(
+ middleware.Metadata{},
+ ),
+ cmp.FilterValues(func(x, y float64) bool {
+ return math.IsNaN(x) && math.IsNaN(y)
+ }, cmp.Comparer(func(_, _ interface{}) bool { return true })),
+ cmp.FilterValues(func(x, y float32) bool {
+ return math.IsNaN(float64(x)) && math.IsNaN(float64(y))
+ }, cmp.Comparer(func(_, _ interface{}) bool { return true })),
+ cmpopts.IgnoreTypes(smithydocument.NoSerde{}),
+ }
+ if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil {
+ t.Errorf("expect c.ExpectResult value match:\n%v", err)
+ }
+ })
+ }
+}
diff --git a/internal/protocoltest/jsonrpc/api_op_KitchenSinkOperation_test.go b/internal/protocoltest/jsonrpc/api_op_KitchenSinkOperation_test.go
index 2dad3286209..139e4dce7b0 100644
--- a/internal/protocoltest/jsonrpc/api_op_KitchenSinkOperation_test.go
+++ b/internal/protocoltest/jsonrpc/api_op_KitchenSinkOperation_test.go
@@ -886,7 +886,7 @@ func TestClient_KitchenSinkOperation_awsAwsjson11Deserialize(t *testing.T) {
"Content-Type": []string{"application/x-amz-json-1.1"},
},
BodyMediaType: "application/json",
- Body: []byte(`{"Iso8601Timestamp":"2000-01-02T20:34:56.000Z"}`),
+ Body: []byte(`{"Iso8601Timestamp":"2000-01-02T20:34:56Z"}`),
ExpectResult: &KitchenSinkOperationOutput{
Iso8601Timestamp: ptr.Time(smithytime.ParseEpochSeconds(946845296)),
},
@@ -898,7 +898,7 @@ func TestClient_KitchenSinkOperation_awsAwsjson11Deserialize(t *testing.T) {
"Content-Type": []string{"application/x-amz-json-1.1"},
},
BodyMediaType: "application/json",
- Body: []byte(`{"HttpdateTimestamp":"Sun, 02 Jan 2000 20:34:56.000 GMT"}`),
+ Body: []byte(`{"HttpdateTimestamp":"Sun, 02 Jan 2000 20:34:56 GMT"}`),
ExpectResult: &KitchenSinkOperationOutput{
HttpdateTimestamp: ptr.Time(smithytime.ParseEpochSeconds(946845296)),
},
diff --git a/internal/protocoltest/jsonrpc/api_op_PutWithContentEncoding.go b/internal/protocoltest/jsonrpc/api_op_PutWithContentEncoding.go
new file mode 100644
index 00000000000..a0db9a0178e
--- /dev/null
+++ b/internal/protocoltest/jsonrpc/api_op_PutWithContentEncoding.go
@@ -0,0 +1,119 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package jsonrpc
+
+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"
+)
+
+func (c *Client) PutWithContentEncoding(ctx context.Context, params *PutWithContentEncodingInput, optFns ...func(*Options)) (*PutWithContentEncodingOutput, error) {
+ if params == nil {
+ params = &PutWithContentEncodingInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutWithContentEncoding", params, optFns, c.addOperationPutWithContentEncodingMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutWithContentEncodingOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutWithContentEncodingInput struct {
+ Data *string
+
+ Encoding *string
+
+ noSmithyDocumentSerde
+}
+
+type PutWithContentEncodingOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutWithContentEncodingMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutWithContentEncoding{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutWithContentEncoding{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addlegacyEndpointContextSetter(stack, options); 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, options); 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_opPutWithContentEncoding(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecursionDetection(stack); 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
+ }
+ if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutWithContentEncoding(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "foo",
+ OperationName: "PutWithContentEncoding",
+ }
+}
diff --git a/internal/protocoltest/jsonrpc/api_op_PutWithContentEncoding_test.go b/internal/protocoltest/jsonrpc/api_op_PutWithContentEncoding_test.go
new file mode 100644
index 00000000000..a89d4b8cc01
--- /dev/null
+++ b/internal/protocoltest/jsonrpc/api_op_PutWithContentEncoding_test.go
@@ -0,0 +1,131 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package jsonrpc
+
+import (
+ "context"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest"
+ "github.com/aws/smithy-go/middleware"
+ smithyprivateprotocol "github.com/aws/smithy-go/private/protocol"
+ "github.com/aws/smithy-go/ptr"
+ smithytesting "github.com/aws/smithy-go/testing"
+ "io"
+ "net/http"
+ "net/url"
+ "testing"
+)
+
+func TestClient_PutWithContentEncoding_awsAwsjson11Serialize(t *testing.T) {
+ cases := map[string]struct {
+ Params *PutWithContentEncodingInput
+ ExpectMethod string
+ ExpectURIPath string
+ ExpectQuery []smithytesting.QueryItem
+ RequireQuery []string
+ ForbidQuery []string
+ ExpectHeader http.Header
+ RequireHeader []string
+ ForbidHeader []string
+ Host *url.URL
+ BodyMediaType string
+ BodyAssert func(io.Reader) error
+ }{
+ // Compression algorithm encoding is appended to the Content-Encoding header.
+ "SDKAppliedContentEncoding_awsJson1_1": {
+ Params: &PutWithContentEncodingInput{
+ Data: ptr.String("RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8\n5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1\n2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi\ngIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozyUFpg1ez6pyWP8ssWVfFrckREIM\nMb0cTUVqSVSM8bnFiF9SoXM6ZoGMKfX1mT708OYk7SqZ1JlCTkecDJDoR5ED2q2MWKUGR6jjnEV0GtD8\nWJO6AcF0DptY9Hk16Bav3z6c5FeBvrGDrxTFVgRUk8SychzjrcqJ4qskwN8rL3zslC0oqobQRnLFOvwJ\nprSzBIwdH2yAuxokXAdVRa1u9NGNRvfWJfKkwbbVz8yV76RUF9KNhAUmwyYDrLnxNj8ROl8B7dv8Gans\n7Bit52wcdiJyjBW1pAodB7zqqVwtBx5RaSpF7kEMXexYXp9N0J1jlXzdeg5Wgg4pO7TJNr2joiPVAiFf\nefwMMCNBkYx2z7cRxVxCJZMXXzxSKMGgdTN24bJ5UgE0TxyV52RC0wGWG49S1x5jGrvmxKCIgYPs0w3Z\n0I3XcdB0WEj4x4xRztB9Cx2Mc4qFYQdzS9kOioAgNBti1rBySZ8lFZM2zqxvBsJTTJsmc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2dHp0A7dtkocCZdQp9FKR9XdJAFIbVSHzIF1ZogeZlc0pXuNE0tagvD57xwDRFkAuoQyMu\nYDdZasXrpSmEE5UjHVkyYsISn8QsfXurzDybX468aoRoks654jjmRY5zi1oB8TcMdC2c3sicNaqfeuhd\nH1nPX7l4RpdqWMR7gGx9slXtG8S3KxpOi4qCD7yg3saD66nun4dzksQURoTUdXyrJR5UpHsfIlTF1aJa\nMdXyQtQnrkl00TeghQd00rRFZsCnhi0qrCSKiBfB2EVrd9RPpbgwJGZHuIQecdBmNetc2ylSEClqVBPR\nGOPPIxrnswEZjmnS0jxKW9VSM1QVxSPJnPFswCqT95SoKD6CP4xdX28WIUGiNaIKodXXJHEIsXBCxLsr\nPwWPCtoplC6hhpKmW5dQo92iCTyY2KioKzO8XR6FKm6qonMKVEwQNtlYE9c97KMtEnp25VOdMP46SQXS\nYsSVp7vm8LP87VYI8SOKcW3s2oedYFtt45rvDzoTF0GmS6wELQ9uo98HhjQAI1Dt91cgjJOwygNmLoZE\nX5K2zQiNA163uMCl5xzaBqY4YTL0wgALg3IFdYSp0RFYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn\nOdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh\nhvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n"),
+ },
+ ExpectMethod: "POST",
+ ExpectURIPath: "/",
+ ExpectQuery: []smithytesting.QueryItem{},
+ ExpectHeader: http.Header{
+ "Content-Encoding": []string{"gzip"},
+ },
+ },
+ // Compression algorithm encoding is appended to the Content-Encoding header, and
+ // the user-provided content-encoding is NOT in the Content-Encoding header since
+ // HTTP binding traits are ignored in the awsJson1_1 protocol.
+ "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsJson1_1": {
+ Params: &PutWithContentEncodingInput{
+ Encoding: ptr.String("custom"),
+ Data: ptr.String("RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8\n5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1\n2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi\ngIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozyUFpg1ez6pyWP8ssWVfFrckREIM\nMb0cTUVqSVSM8bnFiF9SoXM6ZoGMKfX1mT708OYk7SqZ1JlCTkecDJDoR5ED2q2MWKUGR6jjnEV0GtD8\nWJO6AcF0DptY9Hk16Bav3z6c5FeBvrGDrxTFVgRUk8SychzjrcqJ4qskwN8rL3zslC0oqobQRnLFOvwJ\nprSzBIwdH2yAuxokXAdVRa1u9NGNRvfWJfKkwbbVz8yV76RUF9KNhAUmwyYDrLnxNj8ROl8B7dv8Gans\n7Bit52wcdiJyjBW1pAodB7zqqVwtBx5RaSpF7kEMXexYXp9N0J1jlXzdeg5Wgg4pO7TJNr2joiPVAiFf\nefwMMCNBkYx2z7cRxVxCJZMXXzxSKMGgdTN24bJ5UgE0TxyV52RC0wGWG49S1x5jGrvmxKCIgYPs0w3Z\n0I3XcdB0WEj4x4xRztB9Cx2Mc4qFYQdzS9kOioAgNBti1rBySZ8lFZM2zqxvBsJTTJsm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w2dHp0A7dtkocCZdQp9FKR9XdJAFIbVSHzIF1ZogeZlc0pXuNE0tagvD57xwDRFkAuoQyMu\nYDdZasXrpSmEE5UjHVkyYsISn8QsfXurzDybX468aoRoks654jjmRY5zi1oB8TcMdC2c3sicNaqfeuhd\nH1nPX7l4RpdqWMR7gGx9slXtG8S3KxpOi4qCD7yg3saD66nun4dzksQURoTUdXyrJR5UpHsfIlTF1aJa\nMdXyQtQnrkl00TeghQd00rRFZsCnhi0qrCSKiBfB2EVrd9RPpbgwJGZHuIQecdBmNetc2ylSEClqVBPR\nGOPPIxrnswEZjmnS0jxKW9VSM1QVxSPJnPFswCqT95SoKD6CP4xdX28WIUGiNaIKodXXJHEIsXBCxLsr\nPwWPCtoplC6hhpKmW5dQo92iCTyY2KioKzO8XR6FKm6qonMKVEwQNtlYE9c97KMtEnp25VOdMP46SQXS\nYsSVp7vm8LP87VYI8SOKcW3s2oedYFtt45rvDzoTF0GmS6wELQ9uo98HhjQAI1Dt91cgjJOwygNmLoZE\nX5K2zQiNA163uMCl5xzaBqY4YTL0wgALg3IFdYSp0RFYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn\nOdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh\nhvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n"),
+ },
+ ExpectMethod: "POST",
+ ExpectURIPath: "/",
+ ExpectQuery: []smithytesting.QueryItem{},
+ ExpectHeader: http.Header{
+ "Content-Encoding": []string{"gzip"},
+ },
+ },
+ }
+ for name, c := range cases {
+ t.Run(name, func(t *testing.T) {
+ if name == "SDKAppliedContentEncoding_awsJson1_1" {
+ t.Skip("disabled test aws.protocoltests.json#JsonProtocol aws.protocoltests.json#PutWithContentEncoding")
+ }
+
+ if name == "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsJson1_1" {
+ t.Skip("disabled test aws.protocoltests.json#JsonProtocol aws.protocoltests.json#PutWithContentEncoding")
+ }
+
+ actualReq := &http.Request{}
+ serverURL := "http://localhost:8888/"
+ if c.Host != nil {
+ u, err := url.Parse(serverURL)
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
+ u.Path = c.Host.Path
+ u.RawPath = c.Host.RawPath
+ u.RawQuery = c.Host.RawQuery
+ serverURL = u.String()
+ }
+ client := New(Options{
+ APIOptions: []func(*middleware.Stack) error{
+ func(s *middleware.Stack) error {
+ s.Finalize.Clear()
+ s.Initialize.Remove(`OperationInputValidation`)
+ return nil
+ },
+ },
+ EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) {
+ e.URL = serverURL
+ e.SigningRegion = "us-west-2"
+ return e, err
+ }),
+ HTTPClient: protocoltesthttp.NewClient(),
+ Region: "us-west-2",
+ })
+ result, err := client.PutWithContentEncoding(context.Background(), c.Params, func(options *Options) {
+ options.APIOptions = append(options.APIOptions, func(stack *middleware.Stack) error {
+ return smithyprivateprotocol.AddCaptureRequestMiddleware(stack, actualReq)
+ })
+ })
+ if err != nil {
+ t.Fatalf("expect nil err, got %v", err)
+ }
+ if result == nil {
+ t.Fatalf("expect not nil result")
+ }
+ if e, a := c.ExpectMethod, actualReq.Method; e != a {
+ t.Errorf("expect %v method, got %v", e, a)
+ }
+ if e, a := c.ExpectURIPath, actualReq.URL.RawPath; e != a {
+ t.Errorf("expect %v path, got %v", e, a)
+ }
+ queryItems := smithytesting.ParseRawQuery(actualReq.URL.RawQuery)
+ smithytesting.AssertHasQuery(t, c.ExpectQuery, queryItems)
+ smithytesting.AssertHasQueryKeys(t, c.RequireQuery, queryItems)
+ smithytesting.AssertNotHaveQueryKeys(t, c.ForbidQuery, queryItems)
+ smithytesting.AssertHasHeader(t, c.ExpectHeader, actualReq.Header)
+ smithytesting.AssertHasHeaderKeys(t, c.RequireHeader, actualReq.Header)
+ smithytesting.AssertNotHaveHeaderKeys(t, c.ForbidHeader, actualReq.Header)
+ if c.BodyAssert != nil {
+ if err := c.BodyAssert(actualReq.Body); err != nil {
+ t.Errorf("expect body equal, got %v", err)
+ }
+ }
+ })
+ }
+}
diff --git a/internal/protocoltest/jsonrpc/deserializers.go b/internal/protocoltest/jsonrpc/deserializers.go
index 9e56dd59bb7..02cb41fb258 100644
--- a/internal/protocoltest/jsonrpc/deserializers.go
+++ b/internal/protocoltest/jsonrpc/deserializers.go
@@ -391,6 +391,114 @@ func awsAwsjson11_deserializeOpErrorEndpointWithHostLabelOperation(response *smi
}
}
+type awsAwsjson11_deserializeOpFractionalSeconds struct {
+}
+
+func (*awsAwsjson11_deserializeOpFractionalSeconds) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpFractionalSeconds) 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, awsAwsjson11_deserializeOpErrorFractionalSeconds(response, &metadata)
+ }
+ output := &FractionalSecondsOutput{}
+ 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 = awsAwsjson11_deserializeOpDocumentFractionalSecondsOutput(&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 out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorFractionalSeconds(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
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, 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(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
type awsAwsjson11_deserializeOpGreetingWithErrors struct {
}
@@ -1248,6 +1356,92 @@ func awsAwsjson11_deserializeOpErrorPutAndGetInlineDocuments(response *smithyhtt
}
}
+type awsAwsjson11_deserializeOpPutWithContentEncoding struct {
+}
+
+func (*awsAwsjson11_deserializeOpPutWithContentEncoding) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpPutWithContentEncoding) 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, awsAwsjson11_deserializeOpErrorPutWithContentEncoding(response, &metadata)
+ }
+ output := &PutWithContentEncodingOutput{}
+ 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 awsAwsjson11_deserializeOpErrorPutWithContentEncoding(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
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, 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(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
type awsAwsjson11_deserializeOpSimpleScalarProperties struct {
}
@@ -3037,6 +3231,50 @@ func awsAwsjson11_deserializeOpDocumentDatetimeOffsetsOutput(v **DatetimeOffsets
return nil
}
+func awsAwsjson11_deserializeOpDocumentFractionalSecondsOutput(v **FractionalSecondsOutput, 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 *FractionalSecondsOutput
+ if *v == nil {
+ sv = &FractionalSecondsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "datetime":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected DateTime to be of type string, got %T instead", value)
+ }
+ t, err := smithytime.ParseDateTime(jtv)
+ if err != nil {
+ return err
+ }
+ sv.Datetime = ptr.Time(t)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
func awsAwsjson11_deserializeOpDocumentGreetingWithErrorsOutput(v **GreetingWithErrorsOutput, value interface{}) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
diff --git a/internal/protocoltest/jsonrpc/generated.json b/internal/protocoltest/jsonrpc/generated.json
index ae94266afe9..7afc769320c 100644
--- a/internal/protocoltest/jsonrpc/generated.json
+++ b/internal/protocoltest/jsonrpc/generated.json
@@ -17,6 +17,8 @@
"api_op_EndpointOperation_test.go",
"api_op_EndpointWithHostLabelOperation.go",
"api_op_EndpointWithHostLabelOperation_test.go",
+ "api_op_FractionalSeconds.go",
+ "api_op_FractionalSeconds_test.go",
"api_op_GreetingWithErrors.go",
"api_op_GreetingWithErrors_test.go",
"api_op_HostWithPathOperation.go",
@@ -33,6 +35,8 @@
"api_op_OperationWithOptionalInputOutput_test.go",
"api_op_PutAndGetInlineDocuments.go",
"api_op_PutAndGetInlineDocuments_test.go",
+ "api_op_PutWithContentEncoding.go",
+ "api_op_PutWithContentEncoding_test.go",
"api_op_SimpleScalarProperties.go",
"api_op_SimpleScalarProperties_test.go",
"deserializers.go",
diff --git a/internal/protocoltest/jsonrpc/serializers.go b/internal/protocoltest/jsonrpc/serializers.go
index f4a400ea30f..f18b86c6df9 100644
--- a/internal/protocoltest/jsonrpc/serializers.go
+++ b/internal/protocoltest/jsonrpc/serializers.go
@@ -225,6 +225,56 @@ func (m *awsAwsjson11_serializeOpEndpointWithHostLabelOperation) HandleSerialize
return next.HandleSerialize(ctx, in)
}
+type awsAwsjson11_serializeOpFractionalSeconds struct {
+}
+
+func (*awsAwsjson11_serializeOpFractionalSeconds) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpFractionalSeconds) 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.(*FractionalSecondsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("JsonProtocol.FractionalSeconds")
+
+ if request, err = request.SetStream(strings.NewReader(`{}`)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
type awsAwsjson11_serializeOpGreetingWithErrors struct {
}
@@ -655,6 +705,61 @@ func (m *awsAwsjson11_serializeOpPutAndGetInlineDocuments) HandleSerialize(ctx c
return next.HandleSerialize(ctx, in)
}
+type awsAwsjson11_serializeOpPutWithContentEncoding struct {
+}
+
+func (*awsAwsjson11_serializeOpPutWithContentEncoding) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpPutWithContentEncoding) 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.(*PutWithContentEncodingInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("JsonProtocol.PutWithContentEncoding")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentPutWithContentEncodingInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
type awsAwsjson11_serializeOpSimpleScalarProperties struct {
}
@@ -1549,6 +1654,23 @@ func awsAwsjson11_serializeOpDocumentPutAndGetInlineDocumentsInput(v *PutAndGetI
return nil
}
+func awsAwsjson11_serializeOpDocumentPutWithContentEncodingInput(v *PutWithContentEncodingInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.Data != nil {
+ ok := object.Key("data")
+ ok.String(*v.Data)
+ }
+
+ if v.Encoding != nil {
+ ok := object.Key("encoding")
+ ok.String(*v.Encoding)
+ }
+
+ return nil
+}
+
func awsAwsjson11_serializeOpDocumentSimpleScalarPropertiesInput(v *SimpleScalarPropertiesInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
diff --git a/internal/protocoltest/jsonrpc10/api_op_PutWithContentEncoding.go b/internal/protocoltest/jsonrpc10/api_op_PutWithContentEncoding.go
new file mode 100644
index 00000000000..c2fe14c6168
--- /dev/null
+++ b/internal/protocoltest/jsonrpc10/api_op_PutWithContentEncoding.go
@@ -0,0 +1,111 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package jsonrpc10
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+func (c *Client) PutWithContentEncoding(ctx context.Context, params *PutWithContentEncodingInput, optFns ...func(*Options)) (*PutWithContentEncodingOutput, error) {
+ if params == nil {
+ params = &PutWithContentEncodingInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutWithContentEncoding", params, optFns, c.addOperationPutWithContentEncodingMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutWithContentEncodingOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutWithContentEncodingInput struct {
+ Data *string
+
+ Encoding *string
+
+ noSmithyDocumentSerde
+}
+
+type PutWithContentEncodingOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutWithContentEncodingMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsjson10_serializeOpPutWithContentEncoding{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpPutWithContentEncoding{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addlegacyEndpointContextSetter(stack, options); 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 = addRetryMiddlewares(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, options); 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_opPutWithContentEncoding(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecursionDetection(stack); 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
+ }
+ if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutWithContentEncoding(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "PutWithContentEncoding",
+ }
+}
diff --git a/internal/protocoltest/jsonrpc10/api_op_PutWithContentEncoding_test.go b/internal/protocoltest/jsonrpc10/api_op_PutWithContentEncoding_test.go
new file mode 100644
index 00000000000..e930a32b999
--- /dev/null
+++ b/internal/protocoltest/jsonrpc10/api_op_PutWithContentEncoding_test.go
@@ -0,0 +1,131 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package jsonrpc10
+
+import (
+ "context"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest"
+ "github.com/aws/smithy-go/middleware"
+ smithyprivateprotocol "github.com/aws/smithy-go/private/protocol"
+ "github.com/aws/smithy-go/ptr"
+ smithytesting "github.com/aws/smithy-go/testing"
+ "io"
+ "net/http"
+ "net/url"
+ "testing"
+)
+
+func TestClient_PutWithContentEncoding_awsAwsjson10Serialize(t *testing.T) {
+ cases := map[string]struct {
+ Params *PutWithContentEncodingInput
+ ExpectMethod string
+ ExpectURIPath string
+ ExpectQuery []smithytesting.QueryItem
+ RequireQuery []string
+ ForbidQuery []string
+ ExpectHeader http.Header
+ RequireHeader []string
+ ForbidHeader []string
+ Host *url.URL
+ BodyMediaType string
+ BodyAssert func(io.Reader) error
+ }{
+ // Compression algorithm encoding is appended to the Content-Encoding header.
+ "SDKAppliedContentEncoding_awsJson1_0": {
+ Params: &PutWithContentEncodingInput{
+ Data: ptr.String("RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8\n5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1\n2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi\ngIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozyUFpg1ez6pyWP8ssWVfFrckREIM\nMb0cTUVqSVSM8bnFiF9SoXM6ZoGMKfX1mT708OYk7SqZ1JlCTkecDJDoR5ED2q2MWKUGR6jjnEV0GtD8\nWJO6AcF0DptY9Hk16Bav3z6c5FeBvrGDrxTFVgRUk8Sychzjrcq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DAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n"),
+ },
+ ExpectMethod: "POST",
+ ExpectURIPath: "/",
+ ExpectQuery: []smithytesting.QueryItem{},
+ ExpectHeader: http.Header{
+ "Content-Encoding": []string{"gzip"},
+ },
+ },
+ // Compression algorithm encoding is appended to the Content-Encoding header, and
+ // the user-provided content-encoding is NOT in the Content-Encoding header since
+ // HTTP binding traits are ignored in the awsJson1_0 protocol.
+ "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsJson1_0": {
+ Params: &PutWithContentEncodingInput{
+ Encoding: ptr.String("custom"),
+ Data: ptr.String("RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8\n5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1\n2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi\ngIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozyUFpg1ez6pyWP8ssWVfFrckREIM\nMb0cTUVqSVSM8bnFiF9SoXM6ZoGMKfX1mT708OYk7SqZ1JlCTkecDJDoR5ED2q2MWKUGR6jjnEV0GtD8\nWJO6AcF0DptY9Hk16Bav3z6c5FeBvrGDrxTFVgRUk8Sychzjrc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EDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n"),
+ },
+ ExpectMethod: "POST",
+ ExpectURIPath: "/",
+ ExpectQuery: []smithytesting.QueryItem{},
+ ExpectHeader: http.Header{
+ "Content-Encoding": []string{"gzip"},
+ },
+ },
+ }
+ for name, c := range cases {
+ t.Run(name, func(t *testing.T) {
+ if name == "SDKAppliedContentEncoding_awsJson1_0" {
+ t.Skip("disabled test aws.protocoltests.json10#JsonRpc10 aws.protocoltests.json10#PutWithContentEncoding")
+ }
+
+ if name == "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsJson1_0" {
+ t.Skip("disabled test aws.protocoltests.json10#JsonRpc10 aws.protocoltests.json10#PutWithContentEncoding")
+ }
+
+ actualReq := &http.Request{}
+ serverURL := "http://localhost:8888/"
+ if c.Host != nil {
+ u, err := url.Parse(serverURL)
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
+ u.Path = c.Host.Path
+ u.RawPath = c.Host.RawPath
+ u.RawQuery = c.Host.RawQuery
+ serverURL = u.String()
+ }
+ client := New(Options{
+ APIOptions: []func(*middleware.Stack) error{
+ func(s *middleware.Stack) error {
+ s.Finalize.Clear()
+ s.Initialize.Remove(`OperationInputValidation`)
+ return nil
+ },
+ },
+ EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) {
+ e.URL = serverURL
+ e.SigningRegion = "us-west-2"
+ return e, err
+ }),
+ HTTPClient: protocoltesthttp.NewClient(),
+ Region: "us-west-2",
+ })
+ result, err := client.PutWithContentEncoding(context.Background(), c.Params, func(options *Options) {
+ options.APIOptions = append(options.APIOptions, func(stack *middleware.Stack) error {
+ return smithyprivateprotocol.AddCaptureRequestMiddleware(stack, actualReq)
+ })
+ })
+ if err != nil {
+ t.Fatalf("expect nil err, got %v", err)
+ }
+ if result == nil {
+ t.Fatalf("expect not nil result")
+ }
+ if e, a := c.ExpectMethod, actualReq.Method; e != a {
+ t.Errorf("expect %v method, got %v", e, a)
+ }
+ if e, a := c.ExpectURIPath, actualReq.URL.RawPath; e != a {
+ t.Errorf("expect %v path, got %v", e, a)
+ }
+ queryItems := smithytesting.ParseRawQuery(actualReq.URL.RawQuery)
+ smithytesting.AssertHasQuery(t, c.ExpectQuery, queryItems)
+ smithytesting.AssertHasQueryKeys(t, c.RequireQuery, queryItems)
+ smithytesting.AssertNotHaveQueryKeys(t, c.ForbidQuery, queryItems)
+ smithytesting.AssertHasHeader(t, c.ExpectHeader, actualReq.Header)
+ smithytesting.AssertHasHeaderKeys(t, c.RequireHeader, actualReq.Header)
+ smithytesting.AssertNotHaveHeaderKeys(t, c.ForbidHeader, actualReq.Header)
+ if c.BodyAssert != nil {
+ if err := c.BodyAssert(actualReq.Body); err != nil {
+ t.Errorf("expect body equal, got %v", err)
+ }
+ }
+ })
+ }
+}
diff --git a/internal/protocoltest/jsonrpc10/deserializers.go b/internal/protocoltest/jsonrpc10/deserializers.go
index 2e68ff7da6d..2632c69dece 100644
--- a/internal/protocoltest/jsonrpc10/deserializers.go
+++ b/internal/protocoltest/jsonrpc10/deserializers.go
@@ -808,6 +808,92 @@ func awsAwsjson10_deserializeOpErrorNoInputAndOutput(response *smithyhttp.Respon
}
}
+type awsAwsjson10_deserializeOpPutWithContentEncoding struct {
+}
+
+func (*awsAwsjson10_deserializeOpPutWithContentEncoding) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson10_deserializeOpPutWithContentEncoding) 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, awsAwsjson10_deserializeOpErrorPutWithContentEncoding(response, &metadata)
+ }
+ output := &PutWithContentEncodingOutput{}
+ 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 awsAwsjson10_deserializeOpErrorPutWithContentEncoding(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
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, 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(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
type awsAwsjson10_deserializeOpSimpleScalarProperties struct {
}
diff --git a/internal/protocoltest/jsonrpc10/generated.json b/internal/protocoltest/jsonrpc10/generated.json
index f0992692d0f..246dcad2909 100644
--- a/internal/protocoltest/jsonrpc10/generated.json
+++ b/internal/protocoltest/jsonrpc10/generated.json
@@ -25,6 +25,8 @@
"api_op_NoInputAndNoOutput_test.go",
"api_op_NoInputAndOutput.go",
"api_op_NoInputAndOutput_test.go",
+ "api_op_PutWithContentEncoding.go",
+ "api_op_PutWithContentEncoding_test.go",
"api_op_SimpleScalarProperties.go",
"api_op_SimpleScalarProperties_test.go",
"deserializers.go",
diff --git a/internal/protocoltest/jsonrpc10/serializers.go b/internal/protocoltest/jsonrpc10/serializers.go
index d0cc6ef14c7..64380aa2ad7 100644
--- a/internal/protocoltest/jsonrpc10/serializers.go
+++ b/internal/protocoltest/jsonrpc10/serializers.go
@@ -438,6 +438,61 @@ func (m *awsAwsjson10_serializeOpNoInputAndOutput) HandleSerialize(ctx context.C
return next.HandleSerialize(ctx, in)
}
+type awsAwsjson10_serializeOpPutWithContentEncoding struct {
+}
+
+func (*awsAwsjson10_serializeOpPutWithContentEncoding) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson10_serializeOpPutWithContentEncoding) 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.(*PutWithContentEncodingInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("JsonRpc10.PutWithContentEncoding")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson10_serializeOpDocumentPutWithContentEncodingInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
type awsAwsjson10_serializeOpSimpleScalarProperties struct {
}
@@ -629,6 +684,23 @@ func awsAwsjson10_serializeOpDocumentJsonUnionsInput(v *JsonUnionsInput, value s
return nil
}
+func awsAwsjson10_serializeOpDocumentPutWithContentEncodingInput(v *PutWithContentEncodingInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.Data != nil {
+ ok := object.Key("data")
+ ok.String(*v.Data)
+ }
+
+ if v.Encoding != nil {
+ ok := object.Key("encoding")
+ ok.String(*v.Encoding)
+ }
+
+ return nil
+}
+
func awsAwsjson10_serializeOpDocumentSimpleScalarPropertiesInput(v *SimpleScalarPropertiesInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
diff --git a/internal/protocoltest/query/api_op_FractionalSeconds.go b/internal/protocoltest/query/api_op_FractionalSeconds.go
new file mode 100644
index 00000000000..048294d3446
--- /dev/null
+++ b/internal/protocoltest/query/api_op_FractionalSeconds.go
@@ -0,0 +1,110 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package query
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+func (c *Client) FractionalSeconds(ctx context.Context, params *FractionalSecondsInput, optFns ...func(*Options)) (*FractionalSecondsOutput, error) {
+ if params == nil {
+ params = &FractionalSecondsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "FractionalSeconds", params, optFns, c.addOperationFractionalSecondsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*FractionalSecondsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type FractionalSecondsInput struct {
+ noSmithyDocumentSerde
+}
+
+type FractionalSecondsOutput struct {
+ Datetime *time.Time
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationFractionalSecondsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpFractionalSeconds{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpFractionalSeconds{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addlegacyEndpointContextSetter(stack, options); 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 = addRetryMiddlewares(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, options); 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_opFractionalSeconds(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecursionDetection(stack); 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
+ }
+ if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opFractionalSeconds(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "FractionalSeconds",
+ }
+}
diff --git a/internal/protocoltest/query/api_op_FractionalSeconds_test.go b/internal/protocoltest/query/api_op_FractionalSeconds_test.go
new file mode 100644
index 00000000000..d2330eae5c9
--- /dev/null
+++ b/internal/protocoltest/query/api_op_FractionalSeconds_test.go
@@ -0,0 +1,119 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package query
+
+import (
+ "bytes"
+ "context"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ smithydocument "github.com/aws/smithy-go/document"
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
+ smithyrand "github.com/aws/smithy-go/rand"
+ smithytesting "github.com/aws/smithy-go/testing"
+ smithytime "github.com/aws/smithy-go/time"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "github.com/google/go-cmp/cmp"
+ "github.com/google/go-cmp/cmp/cmpopts"
+ "io/ioutil"
+ "math"
+ "net/http"
+ "testing"
+)
+
+func TestClient_FractionalSeconds_awsAwsqueryDeserialize(t *testing.T) {
+ cases := map[string]struct {
+ StatusCode int
+ Header http.Header
+ BodyMediaType string
+ Body []byte
+ ExpectResult *FractionalSecondsOutput
+ }{
+ // Ensures that clients can correctly parse datetime timestamps with fractional
+ // seconds
+ "AwsQueryDateTimeWithFractionalSeconds": {
+ StatusCode: 200,
+ Header: http.Header{
+ "Content-Type": []string{"text/xml"},
+ },
+ BodyMediaType: "application/xml",
+ Body: []byte(`
+
+ 2000-01-02T20:34:56.123Z
+
+
+ `),
+ ExpectResult: &FractionalSecondsOutput{
+ Datetime: ptr.Time(smithytime.ParseEpochSeconds(9.46845296123e8)),
+ },
+ },
+ }
+ for name, c := range cases {
+ t.Run(name, func(t *testing.T) {
+ serverURL := "http://localhost:8888/"
+ client := New(Options{
+ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) {
+ headers := http.Header{}
+ for k, vs := range c.Header {
+ for _, v := range vs {
+ headers.Add(k, v)
+ }
+ }
+ if len(c.BodyMediaType) != 0 && len(headers.Values("Content-Type")) == 0 {
+ headers.Set("Content-Type", c.BodyMediaType)
+ }
+ response := &http.Response{
+ StatusCode: c.StatusCode,
+ Header: headers,
+ Request: r,
+ }
+ if len(c.Body) != 0 {
+ response.ContentLength = int64(len(c.Body))
+ response.Body = ioutil.NopCloser(bytes.NewReader(c.Body))
+ } else {
+
+ response.Body = http.NoBody
+ }
+ return response, nil
+ }),
+ APIOptions: []func(*middleware.Stack) error{
+ func(s *middleware.Stack) error {
+ s.Finalize.Clear()
+ s.Initialize.Remove(`OperationInputValidation`)
+ return nil
+ },
+ },
+ EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) {
+ e.URL = serverURL
+ e.SigningRegion = "us-west-2"
+ return e, err
+ }),
+ IdempotencyTokenProvider: smithyrand.NewUUIDIdempotencyToken(&smithytesting.ByteLoop{}),
+ Region: "us-west-2",
+ })
+ var params FractionalSecondsInput
+ result, err := client.FractionalSeconds(context.Background(), ¶ms)
+ if err != nil {
+ t.Fatalf("expect nil err, got %v", err)
+ }
+ if result == nil {
+ t.Fatalf("expect not nil result")
+ }
+ opts := cmp.Options{
+ cmpopts.IgnoreUnexported(
+ middleware.Metadata{},
+ ),
+ cmp.FilterValues(func(x, y float64) bool {
+ return math.IsNaN(x) && math.IsNaN(y)
+ }, cmp.Comparer(func(_, _ interface{}) bool { return true })),
+ cmp.FilterValues(func(x, y float32) bool {
+ return math.IsNaN(float64(x)) && math.IsNaN(float64(y))
+ }, cmp.Comparer(func(_, _ interface{}) bool { return true })),
+ cmpopts.IgnoreTypes(smithydocument.NoSerde{}),
+ }
+ if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil {
+ t.Errorf("expect c.ExpectResult value match:\n%v", err)
+ }
+ })
+ }
+}
diff --git a/internal/protocoltest/query/api_op_PutWithContentEncoding.go b/internal/protocoltest/query/api_op_PutWithContentEncoding.go
new file mode 100644
index 00000000000..20fe77fc4bf
--- /dev/null
+++ b/internal/protocoltest/query/api_op_PutWithContentEncoding.go
@@ -0,0 +1,111 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package query
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+func (c *Client) PutWithContentEncoding(ctx context.Context, params *PutWithContentEncodingInput, optFns ...func(*Options)) (*PutWithContentEncodingOutput, error) {
+ if params == nil {
+ params = &PutWithContentEncodingInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutWithContentEncoding", params, optFns, c.addOperationPutWithContentEncodingMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutWithContentEncodingOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutWithContentEncodingInput struct {
+ Data *string
+
+ Encoding *string
+
+ noSmithyDocumentSerde
+}
+
+type PutWithContentEncodingOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutWithContentEncodingMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpPutWithContentEncoding{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpPutWithContentEncoding{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addlegacyEndpointContextSetter(stack, options); 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 = addRetryMiddlewares(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, options); 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_opPutWithContentEncoding(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecursionDetection(stack); 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
+ }
+ if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutWithContentEncoding(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "PutWithContentEncoding",
+ }
+}
diff --git a/internal/protocoltest/query/api_op_PutWithContentEncoding_test.go b/internal/protocoltest/query/api_op_PutWithContentEncoding_test.go
new file mode 100644
index 00000000000..31c033483ce
--- /dev/null
+++ b/internal/protocoltest/query/api_op_PutWithContentEncoding_test.go
@@ -0,0 +1,133 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package query
+
+import (
+ "context"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest"
+ "github.com/aws/smithy-go/middleware"
+ smithyprivateprotocol "github.com/aws/smithy-go/private/protocol"
+ "github.com/aws/smithy-go/ptr"
+ smithyrand "github.com/aws/smithy-go/rand"
+ smithytesting "github.com/aws/smithy-go/testing"
+ "io"
+ "net/http"
+ "net/url"
+ "testing"
+)
+
+func TestClient_PutWithContentEncoding_awsAwsquerySerialize(t *testing.T) {
+ cases := map[string]struct {
+ Params *PutWithContentEncodingInput
+ ExpectMethod string
+ ExpectURIPath string
+ ExpectQuery []smithytesting.QueryItem
+ RequireQuery []string
+ ForbidQuery []string
+ ExpectHeader http.Header
+ RequireHeader []string
+ ForbidHeader []string
+ Host *url.URL
+ BodyMediaType string
+ BodyAssert func(io.Reader) error
+ }{
+ // Compression algorithm encoding is appended to the Content-Encoding header.
+ "SDKAppliedContentEncoding_awsQuery": {
+ Params: &PutWithContentEncodingInput{
+ Data: ptr.String("RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFK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xrnswEZjmnS0jxKW9VSM1QVxSPJnPFswCqT95SoKD6CP4xdX28WIUGiNaIKodXXJHEIsXBCxLsr\nPwWPCtoplC6hhpKmW5dQo92iCTyY2KioKzO8XR6FKm6qonMKVEwQNtlYE9c97KMtEnp25VOdMP46SQXS\nYsSVp7vm8LP87VYI8SOKcW3s2oedYFtt45rvDzoTF0GmS6wELQ9uo98HhjQAI1Dt91cgjJOwygNmLoZE\nX5K2zQiNA163uMCl5xzaBqY4YTL0wgALg3IFdYSp0RFYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn\nOdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh\nhvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n"),
+ },
+ ExpectMethod: "POST",
+ ExpectURIPath: "/",
+ ExpectQuery: []smithytesting.QueryItem{},
+ ExpectHeader: http.Header{
+ "Content-Encoding": []string{"gzip"},
+ },
+ },
+ // Compression algorithm encoding is appended to the Content-Encoding header, and
+ // the user-provided content-encoding is NOT in the Content-Encoding header since
+ // HTTP binding traits are ignored in the awsQuery protocol.
+ "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsQuery": {
+ Params: &PutWithContentEncodingInput{
+ Encoding: ptr.String("custom"),
+ Data: ptr.String("RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xj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EZjmnS0jxKW9VSM1QVxSPJnPFswCqT95SoKD6CP4xdX28WIUGiNaIKodXXJHEIsXBCxLsr\nPwWPCtoplC6hhpKmW5dQo92iCTyY2KioKzO8XR6FKm6qonMKVEwQNtlYE9c97KMtEnp25VOdMP46SQXS\nYsSVp7vm8LP87VYI8SOKcW3s2oedYFtt45rvDzoTF0GmS6wELQ9uo98HhjQAI1Dt91cgjJOwygNmLoZE\nX5K2zQiNA163uMCl5xzaBqY4YTL0wgALg3IFdYSp0RFYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn\nOdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh\nhvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n"),
+ },
+ ExpectMethod: "POST",
+ ExpectURIPath: "/",
+ ExpectQuery: []smithytesting.QueryItem{},
+ ExpectHeader: http.Header{
+ "Content-Encoding": []string{"gzip"},
+ },
+ },
+ }
+ for name, c := range cases {
+ t.Run(name, func(t *testing.T) {
+ if name == "SDKAppliedContentEncoding_awsQuery" {
+ t.Skip("disabled test aws.protocoltests.query#AwsQuery aws.protocoltests.query#PutWithContentEncoding")
+ }
+
+ if name == "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsQuery" {
+ t.Skip("disabled test aws.protocoltests.query#AwsQuery aws.protocoltests.query#PutWithContentEncoding")
+ }
+
+ actualReq := &http.Request{}
+ serverURL := "http://localhost:8888/"
+ if c.Host != nil {
+ u, err := url.Parse(serverURL)
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
+ u.Path = c.Host.Path
+ u.RawPath = c.Host.RawPath
+ u.RawQuery = c.Host.RawQuery
+ serverURL = u.String()
+ }
+ client := New(Options{
+ APIOptions: []func(*middleware.Stack) error{
+ func(s *middleware.Stack) error {
+ s.Finalize.Clear()
+ s.Initialize.Remove(`OperationInputValidation`)
+ return nil
+ },
+ },
+ EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) {
+ e.URL = serverURL
+ e.SigningRegion = "us-west-2"
+ return e, err
+ }),
+ HTTPClient: protocoltesthttp.NewClient(),
+ IdempotencyTokenProvider: smithyrand.NewUUIDIdempotencyToken(&smithytesting.ByteLoop{}),
+ Region: "us-west-2",
+ })
+ result, err := client.PutWithContentEncoding(context.Background(), c.Params, func(options *Options) {
+ options.APIOptions = append(options.APIOptions, func(stack *middleware.Stack) error {
+ return smithyprivateprotocol.AddCaptureRequestMiddleware(stack, actualReq)
+ })
+ })
+ if err != nil {
+ t.Fatalf("expect nil err, got %v", err)
+ }
+ if result == nil {
+ t.Fatalf("expect not nil result")
+ }
+ if e, a := c.ExpectMethod, actualReq.Method; e != a {
+ t.Errorf("expect %v method, got %v", e, a)
+ }
+ if e, a := c.ExpectURIPath, actualReq.URL.RawPath; e != a {
+ t.Errorf("expect %v path, got %v", e, a)
+ }
+ queryItems := smithytesting.ParseRawQuery(actualReq.URL.RawQuery)
+ smithytesting.AssertHasQuery(t, c.ExpectQuery, queryItems)
+ smithytesting.AssertHasQueryKeys(t, c.RequireQuery, queryItems)
+ smithytesting.AssertNotHaveQueryKeys(t, c.ForbidQuery, queryItems)
+ smithytesting.AssertHasHeader(t, c.ExpectHeader, actualReq.Header)
+ smithytesting.AssertHasHeaderKeys(t, c.RequireHeader, actualReq.Header)
+ smithytesting.AssertNotHaveHeaderKeys(t, c.ForbidHeader, actualReq.Header)
+ if c.BodyAssert != nil {
+ if err := c.BodyAssert(actualReq.Body); err != nil {
+ t.Errorf("expect body equal, got %v", err)
+ }
+ }
+ })
+ }
+}
diff --git a/internal/protocoltest/query/deserializers.go b/internal/protocoltest/query/deserializers.go
index e4f1cf9e72f..88707bb5af1 100644
--- a/internal/protocoltest/query/deserializers.go
+++ b/internal/protocoltest/query/deserializers.go
@@ -690,6 +690,111 @@ func awsAwsquery_deserializeOpErrorFlattenedXmlMapWithXmlNamespace(response *smi
}
}
+type awsAwsquery_deserializeOpFractionalSeconds struct {
+}
+
+func (*awsAwsquery_deserializeOpFractionalSeconds) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpFractionalSeconds) 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, awsAwsquery_deserializeOpErrorFractionalSeconds(response, &metadata)
+ }
+ output := &FractionalSecondsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ t, err = decoder.GetElement("FractionalSecondsResult")
+ 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 out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentFractionalSecondsOutput(&output, 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 out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorFractionalSeconds(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
+
+ errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
+ if err != nil {
+ return err
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
type awsAwsquery_deserializeOpGreetingWithErrors struct {
}
@@ -1224,6 +1329,76 @@ func awsAwsquery_deserializeOpErrorNoInputAndOutput(response *smithyhttp.Respons
}
}
+type awsAwsquery_deserializeOpPutWithContentEncoding struct {
+}
+
+func (*awsAwsquery_deserializeOpPutWithContentEncoding) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpPutWithContentEncoding) 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, awsAwsquery_deserializeOpErrorPutWithContentEncoding(response, &metadata)
+ }
+ output := &PutWithContentEncodingOutput{}
+ 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 awsAwsquery_deserializeOpErrorPutWithContentEncoding(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
+
+ errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
+ if err != nil {
+ return err
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
type awsAwsquery_deserializeOpQueryIdempotencyTokenAutoFill struct {
}
@@ -5558,6 +5733,59 @@ func awsAwsquery_deserializeOpDocumentFlattenedXmlMapWithXmlNamespaceOutput(v **
return nil
}
+func awsAwsquery_deserializeOpDocumentFractionalSecondsOutput(v **FractionalSecondsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *FractionalSecondsOutput
+ if *v == nil {
+ sv = &FractionalSecondsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("datetime", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ t, err := smithytime.ParseDateTime(xtv)
+ if err != nil {
+ return err
+ }
+ sv.Datetime = ptr.Time(t)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
func awsAwsquery_deserializeOpDocumentGreetingWithErrorsOutput(v **GreetingWithErrorsOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
diff --git a/internal/protocoltest/query/generated.json b/internal/protocoltest/query/generated.json
index 407b9f3b27e..3dcff8497f9 100644
--- a/internal/protocoltest/query/generated.json
+++ b/internal/protocoltest/query/generated.json
@@ -23,6 +23,8 @@
"api_op_FlattenedXmlMapWithXmlNamespace.go",
"api_op_FlattenedXmlMapWithXmlNamespace_test.go",
"api_op_FlattenedXmlMap_test.go",
+ "api_op_FractionalSeconds.go",
+ "api_op_FractionalSeconds_test.go",
"api_op_GreetingWithErrors.go",
"api_op_GreetingWithErrors_test.go",
"api_op_HostWithPathOperation.go",
@@ -35,6 +37,8 @@
"api_op_NoInputAndNoOutput_test.go",
"api_op_NoInputAndOutput.go",
"api_op_NoInputAndOutput_test.go",
+ "api_op_PutWithContentEncoding.go",
+ "api_op_PutWithContentEncoding_test.go",
"api_op_QueryIdempotencyTokenAutoFill.go",
"api_op_QueryIdempotencyTokenAutoFill_test.go",
"api_op_QueryLists.go",
diff --git a/internal/protocoltest/query/serializers.go b/internal/protocoltest/query/serializers.go
index 0a3468dd839..19b659f54c5 100644
--- a/internal/protocoltest/query/serializers.go
+++ b/internal/protocoltest/query/serializers.go
@@ -442,6 +442,66 @@ func (m *awsAwsquery_serializeOpFlattenedXmlMapWithXmlNamespace) HandleSerialize
return next.HandleSerialize(ctx, in)
}
+type awsAwsquery_serializeOpFractionalSeconds struct {
+}
+
+func (*awsAwsquery_serializeOpFractionalSeconds) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpFractionalSeconds) 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.(*FractionalSecondsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("FractionalSeconds")
+ body.Key("Version").String("2020-01-08")
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
type awsAwsquery_serializeOpGreetingWithErrors struct {
}
@@ -806,6 +866,70 @@ func (m *awsAwsquery_serializeOpNoInputAndOutput) HandleSerialize(ctx context.Co
return next.HandleSerialize(ctx, in)
}
+type awsAwsquery_serializeOpPutWithContentEncoding struct {
+}
+
+func (*awsAwsquery_serializeOpPutWithContentEncoding) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpPutWithContentEncoding) 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.(*PutWithContentEncodingInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("PutWithContentEncoding")
+ body.Key("Version").String("2020-01-08")
+
+ if err := awsAwsquery_serializeOpDocumentPutWithContentEncodingInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
type awsAwsquery_serializeOpQueryIdempotencyTokenAutoFill struct {
}
@@ -2125,6 +2249,23 @@ func awsAwsquery_serializeOpDocumentNoInputAndOutputInput(v *NoInputAndOutputInp
return nil
}
+func awsAwsquery_serializeOpDocumentPutWithContentEncodingInput(v *PutWithContentEncodingInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Data != nil {
+ objectKey := object.Key("data")
+ objectKey.String(*v.Data)
+ }
+
+ if v.Encoding != nil {
+ objectKey := object.Key("encoding")
+ objectKey.String(*v.Encoding)
+ }
+
+ return nil
+}
+
func awsAwsquery_serializeOpDocumentQueryIdempotencyTokenAutoFillInput(v *QueryIdempotencyTokenAutoFillInput, value query.Value) error {
object := value.Object()
_ = object
diff --git a/internal/protocoltest/restxml/api_op_AllQueryStringTypes_test.go b/internal/protocoltest/restxml/api_op_AllQueryStringTypes_test.go
index ebbf010cebf..c0a9cda7aaa 100644
--- a/internal/protocoltest/restxml/api_op_AllQueryStringTypes_test.go
+++ b/internal/protocoltest/restxml/api_op_AllQueryStringTypes_test.go
@@ -158,6 +158,20 @@ func TestClient_AllQueryStringTypes_awsRestxmlSerialize(t *testing.T) {
return smithytesting.CompareReaderEmpty(actual)
},
},
+ // Handles escaping all required characters in the query string.
+ "RestXmlQueryStringEscaping": {
+ Params: &AllQueryStringTypesInput{
+ QueryString: ptr.String(" %:/?#[]@!$&'()*+,;=😹"),
+ },
+ ExpectMethod: "GET",
+ ExpectURIPath: "/AllQueryStringTypesInput",
+ ExpectQuery: []smithytesting.QueryItem{
+ {Key: "String", Value: "%20%25%3A%2F%3F%23%5B%5D%40%21%24%26%27%28%29%2A%2B%2C%3B%3D%F0%9F%98%B9"},
+ },
+ BodyAssert: func(actual io.Reader) error {
+ return smithytesting.CompareReaderEmpty(actual)
+ },
+ },
// Supports handling NaN float query values.
"RestXmlSupportsNaNFloatQueryValues": {
Params: &AllQueryStringTypesInput{
diff --git a/internal/protocoltest/restxml/api_op_FractionalSeconds.go b/internal/protocoltest/restxml/api_op_FractionalSeconds.go
new file mode 100644
index 00000000000..6a6b925d4ab
--- /dev/null
+++ b/internal/protocoltest/restxml/api_op_FractionalSeconds.go
@@ -0,0 +1,110 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package restxml
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+func (c *Client) FractionalSeconds(ctx context.Context, params *FractionalSecondsInput, optFns ...func(*Options)) (*FractionalSecondsOutput, error) {
+ if params == nil {
+ params = &FractionalSecondsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "FractionalSeconds", params, optFns, c.addOperationFractionalSecondsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*FractionalSecondsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type FractionalSecondsInput struct {
+ noSmithyDocumentSerde
+}
+
+type FractionalSecondsOutput struct {
+ Datetime *time.Time
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationFractionalSecondsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpFractionalSeconds{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpFractionalSeconds{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addlegacyEndpointContextSetter(stack, options); 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 = addRetryMiddlewares(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, options); 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_opFractionalSeconds(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecursionDetection(stack); 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
+ }
+ if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opFractionalSeconds(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "FractionalSeconds",
+ }
+}
diff --git a/internal/protocoltest/restxml/api_op_FractionalSeconds_test.go b/internal/protocoltest/restxml/api_op_FractionalSeconds_test.go
new file mode 100644
index 00000000000..21c0b18a104
--- /dev/null
+++ b/internal/protocoltest/restxml/api_op_FractionalSeconds_test.go
@@ -0,0 +1,117 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package restxml
+
+import (
+ "bytes"
+ "context"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ smithydocument "github.com/aws/smithy-go/document"
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
+ smithyrand "github.com/aws/smithy-go/rand"
+ smithytesting "github.com/aws/smithy-go/testing"
+ smithytime "github.com/aws/smithy-go/time"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "github.com/google/go-cmp/cmp"
+ "github.com/google/go-cmp/cmp/cmpopts"
+ "io/ioutil"
+ "math"
+ "net/http"
+ "testing"
+)
+
+func TestClient_FractionalSeconds_awsRestxmlDeserialize(t *testing.T) {
+ cases := map[string]struct {
+ StatusCode int
+ Header http.Header
+ BodyMediaType string
+ Body []byte
+ ExpectResult *FractionalSecondsOutput
+ }{
+ // Ensures that clients can correctly parse datetime timestamps with fractional
+ // seconds
+ "RestXmlDateTimeWithFractionalSeconds": {
+ StatusCode: 200,
+ Header: http.Header{
+ "Content-Type": []string{"application/xml"},
+ },
+ BodyMediaType: "application/xml",
+ Body: []byte(`
+ 2000-01-02T20:34:56.123Z
+
+ `),
+ ExpectResult: &FractionalSecondsOutput{
+ Datetime: ptr.Time(smithytime.ParseEpochSeconds(9.46845296123e8)),
+ },
+ },
+ }
+ for name, c := range cases {
+ t.Run(name, func(t *testing.T) {
+ serverURL := "http://localhost:8888/"
+ client := New(Options{
+ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) {
+ headers := http.Header{}
+ for k, vs := range c.Header {
+ for _, v := range vs {
+ headers.Add(k, v)
+ }
+ }
+ if len(c.BodyMediaType) != 0 && len(headers.Values("Content-Type")) == 0 {
+ headers.Set("Content-Type", c.BodyMediaType)
+ }
+ response := &http.Response{
+ StatusCode: c.StatusCode,
+ Header: headers,
+ Request: r,
+ }
+ if len(c.Body) != 0 {
+ response.ContentLength = int64(len(c.Body))
+ response.Body = ioutil.NopCloser(bytes.NewReader(c.Body))
+ } else {
+
+ response.Body = http.NoBody
+ }
+ return response, nil
+ }),
+ APIOptions: []func(*middleware.Stack) error{
+ func(s *middleware.Stack) error {
+ s.Finalize.Clear()
+ s.Initialize.Remove(`OperationInputValidation`)
+ return nil
+ },
+ },
+ EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) {
+ e.URL = serverURL
+ e.SigningRegion = "us-west-2"
+ return e, err
+ }),
+ IdempotencyTokenProvider: smithyrand.NewUUIDIdempotencyToken(&smithytesting.ByteLoop{}),
+ Region: "us-west-2",
+ })
+ var params FractionalSecondsInput
+ result, err := client.FractionalSeconds(context.Background(), ¶ms)
+ if err != nil {
+ t.Fatalf("expect nil err, got %v", err)
+ }
+ if result == nil {
+ t.Fatalf("expect not nil result")
+ }
+ opts := cmp.Options{
+ cmpopts.IgnoreUnexported(
+ middleware.Metadata{},
+ ),
+ cmp.FilterValues(func(x, y float64) bool {
+ return math.IsNaN(x) && math.IsNaN(y)
+ }, cmp.Comparer(func(_, _ interface{}) bool { return true })),
+ cmp.FilterValues(func(x, y float32) bool {
+ return math.IsNaN(float64(x)) && math.IsNaN(float64(y))
+ }, cmp.Comparer(func(_, _ interface{}) bool { return true })),
+ cmpopts.IgnoreTypes(smithydocument.NoSerde{}),
+ }
+ if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil {
+ t.Errorf("expect c.ExpectResult value match:\n%v", err)
+ }
+ })
+ }
+}
diff --git a/internal/protocoltest/restxml/api_op_HttpRequestWithLabels_test.go b/internal/protocoltest/restxml/api_op_HttpRequestWithLabels_test.go
index 4986cb62945..3d329729166 100644
--- a/internal/protocoltest/restxml/api_op_HttpRequestWithLabels_test.go
+++ b/internal/protocoltest/restxml/api_op_HttpRequestWithLabels_test.go
@@ -52,6 +52,25 @@ func TestClient_HttpRequestWithLabels_awsRestxmlSerialize(t *testing.T) {
return smithytesting.CompareReaderEmpty(actual)
},
},
+ // Sends a GET request that uses URI label bindings
+ "HttpRequestLabelEscaping": {
+ Params: &HttpRequestWithLabelsInput{
+ String_: ptr.String(" %:/?#[]@!$&'()*+,;=😹"),
+ Short: ptr.Int16(1),
+ Integer: ptr.Int32(2),
+ Long: ptr.Int64(3),
+ Float: ptr.Float32(4.1),
+ Double: ptr.Float64(5.1),
+ Boolean: ptr.Bool(true),
+ Timestamp: ptr.Time(smithytime.ParseEpochSeconds(1576540098)),
+ },
+ ExpectMethod: "GET",
+ ExpectURIPath: "/HttpRequestWithLabels/%20%25%3A%2F%3F%23%5B%5D%40%21%24%26%27%28%29%2A%2B%2C%3B%3D%F0%9F%98%B9/1/2/3/4.1/5.1/true/2019-12-16T23%3A48%3A18Z",
+ ExpectQuery: []smithytesting.QueryItem{},
+ BodyAssert: func(actual io.Reader) error {
+ return smithytesting.CompareReaderEmpty(actual)
+ },
+ },
}
for name, c := range cases {
t.Run(name, func(t *testing.T) {
diff --git a/internal/protocoltest/restxml/api_op_PutWithContentEncoding.go b/internal/protocoltest/restxml/api_op_PutWithContentEncoding.go
new file mode 100644
index 00000000000..849eb99a6cf
--- /dev/null
+++ b/internal/protocoltest/restxml/api_op_PutWithContentEncoding.go
@@ -0,0 +1,111 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package restxml
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+func (c *Client) PutWithContentEncoding(ctx context.Context, params *PutWithContentEncodingInput, optFns ...func(*Options)) (*PutWithContentEncodingOutput, error) {
+ if params == nil {
+ params = &PutWithContentEncodingInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutWithContentEncoding", params, optFns, c.addOperationPutWithContentEncodingMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutWithContentEncodingOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutWithContentEncodingInput struct {
+ Data *string
+
+ Encoding *string
+
+ noSmithyDocumentSerde
+}
+
+type PutWithContentEncodingOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutWithContentEncodingMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpPutWithContentEncoding{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpPutWithContentEncoding{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addlegacyEndpointContextSetter(stack, options); 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 = addRetryMiddlewares(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, options); 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_opPutWithContentEncoding(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecursionDetection(stack); 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
+ }
+ if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutWithContentEncoding(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "PutWithContentEncoding",
+ }
+}
diff --git a/internal/protocoltest/restxml/api_op_PutWithContentEncoding_test.go b/internal/protocoltest/restxml/api_op_PutWithContentEncoding_test.go
new file mode 100644
index 00000000000..571b34f314e
--- /dev/null
+++ b/internal/protocoltest/restxml/api_op_PutWithContentEncoding_test.go
@@ -0,0 +1,133 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package restxml
+
+import (
+ "context"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest"
+ "github.com/aws/smithy-go/middleware"
+ smithyprivateprotocol "github.com/aws/smithy-go/private/protocol"
+ "github.com/aws/smithy-go/ptr"
+ smithyrand "github.com/aws/smithy-go/rand"
+ smithytesting "github.com/aws/smithy-go/testing"
+ "io"
+ "net/http"
+ "net/url"
+ "testing"
+)
+
+func TestClient_PutWithContentEncoding_awsRestxmlSerialize(t *testing.T) {
+ cases := map[string]struct {
+ Params *PutWithContentEncodingInput
+ ExpectMethod string
+ ExpectURIPath string
+ ExpectQuery []smithytesting.QueryItem
+ RequireQuery []string
+ ForbidQuery []string
+ ExpectHeader http.Header
+ RequireHeader []string
+ ForbidHeader []string
+ Host *url.URL
+ BodyMediaType string
+ BodyAssert func(io.Reader) error
+ }{
+ // Compression algorithm encoding is appended to the Content-Encoding header.
+ "SDKAppliedContentEncoding_restXml": {
+ Params: &PutWithContentEncodingInput{
+ Data: ptr.String("RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8\n5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1\n2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi\ngIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozyUFpg1ez6pyWP8ssWVfFrckREIM\nMb0cTUVqSVSM8bnFiF9SoXM6ZoGMKfX1mT708OYk7SqZ1JlCTkecDJDoR5ED2q2MWKUGR6jjnEV0GtD8\nWJO6AcF0DptY9Hk16Bav3z6c5FeBvrGDrxTFVgRUk8SychzjrcqJ4qskwN8rL3zslC0oqobQRnLFOvwJ\nprSzBIwdH2yAuxokXAdVRa1u9NGNRvfWJfKkwbbVz8yV76RUF9KNhAUmwyYDrLnxNj8ROl8B7dv8Gans\n7Bit52wcdiJyjBW1pAodB7zqqVwtBx5RaSpF7kEMXexYXp9N0J1jlXzdeg5Wgg4pO7TJNr2joiPVAiFf\nefwMMCNBkYx2z7cRxVxCJZMXXzxSKMGgdTN24bJ5UgE0TxyV52RC0wGWG49S1x5jGrvmxKCIgYPs0w3Z\n0I3XcdB0WEj4x4xRztB9Cx2Mc4qFYQdzS9kOioAgNBti1rBySZ8lFZM2zqxvBsJTTJsmcKPr1crqiXjM\noVWdM4Ob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R9XdJAFIbVSHzIF1ZogeZlc0pXuNE0tagvD57xwDRFkAuoQyMu\nYDdZasXrpSmEE5UjHVkyYsISn8QsfXurzDybX468aoRoks654jjmRY5zi1oB8TcMdC2c3sicNaqfeuhd\nH1nPX7l4RpdqWMR7gGx9slXtG8S3KxpOi4qCD7yg3saD66nun4dzksQURoTUdXyrJR5UpHsfIlTF1aJa\nMdXyQtQnrkl00TeghQd00rRFZsCnhi0qrCSKiBfB2EVrd9RPpbgwJGZHuIQecdBmNetc2ylSEClqVBPR\nGOPPIxrnswEZjmnS0jxKW9VSM1QVxSPJnPFswCqT95SoKD6CP4xdX28WIUGiNaIKodXXJHEIsXBCxLsr\nPwWPCtoplC6hhpKmW5dQo92iCTyY2KioKzO8XR6FKm6qonMKVEwQNtlYE9c97KMtEnp25VOdMP46SQXS\nYsSVp7vm8LP87VYI8SOKcW3s2oedYFtt45rvDzoTF0GmS6wELQ9uo98HhjQAI1Dt91cgjJOwygNmLoZE\nX5K2zQiNA163uMCl5xzaBqY4YTL0wgALg3IFdYSp0RFYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn\nOdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh\nhvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n"),
+ },
+ ExpectMethod: "POST",
+ ExpectURIPath: "/requestcompression/putcontentwithencoding",
+ ExpectQuery: []smithytesting.QueryItem{},
+ ExpectHeader: http.Header{
+ "Content-Encoding": []string{"gzip"},
+ },
+ },
+ // Compression algorithm encoding is appended to the Content-Encoding header, and
+ // the user-provided content-encoding is in the Content-Encoding header before the
+ // request compression encoding from the HTTP binding.
+ "SDKAppendedGzipAfterProvidedEncoding_restXml": {
+ Params: &PutWithContentEncodingInput{
+ Encoding: ptr.String("custom"),
+ Data: ptr.String("RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8\n5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1\n2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi\ngIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozyUFpg1ez6pyWP8ssWVfFrckREIM\nMb0cTUVqSVSM8bnFiF9SoXM6ZoGMKfX1mT708OYk7SqZ1JlCTkecDJDoR5ED2q2MWKUGR6jjnEV0GtD8\nWJO6AcF0DptY9Hk16Bav3z6c5FeBvrGDrxTFVgRUk8SychzjrcqJ4qskwN8rL3zslC0oqobQRnLFOvwJ\nprSzBIwdH2yAuxokXAdVRa1u9NGNRvfWJfKkwbbVz8yV76RUF9KNhAUmwyYDrLnxNj8ROl8B7dv8Gans\n7Bit52wcdiJyjBW1pAodB7zqqVwtBx5RaSpF7kEMXexYXp9N0J1jlXzdeg5Wgg4pO7TJNr2joiPVAiFf\nefwMMCNBkYx2z7cRxVxCJZMXXzxSKMGgdTN24bJ5UgE0TxyV52RC0wGWG49S1x5jGrvmxKCIgYPs0w3Z\n0I3XcdB0WEj4x4xRztB9Cx2Mc4qFYQdzS9kOioAgNBti1rBySZ8lFZM2zqxvBsJTTJsmcKPr1crqiXjM\noVWdM4ObOO6QA7P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bVSHzIF1ZogeZlc0pXuNE0tagvD57xwDRFkAuoQyMu\nYDdZasXrpSmEE5UjHVkyYsISn8QsfXurzDybX468aoRoks654jjmRY5zi1oB8TcMdC2c3sicNaqfeuhd\nH1nPX7l4RpdqWMR7gGx9slXtG8S3KxpOi4qCD7yg3saD66nun4dzksQURoTUdXyrJR5UpHsfIlTF1aJa\nMdXyQtQnrkl00TeghQd00rRFZsCnhi0qrCSKiBfB2EVrd9RPpbgwJGZHuIQecdBmNetc2ylSEClqVBPR\nGOPPIxrnswEZjmnS0jxKW9VSM1QVxSPJnPFswCqT95SoKD6CP4xdX28WIUGiNaIKodXXJHEIsXBCxLsr\nPwWPCtoplC6hhpKmW5dQo92iCTyY2KioKzO8XR6FKm6qonMKVEwQNtlYE9c97KMtEnp25VOdMP46SQXS\nYsSVp7vm8LP87VYI8SOKcW3s2oedYFtt45rvDzoTF0GmS6wELQ9uo98HhjQAI1Dt91cgjJOwygNmLoZE\nX5K2zQiNA163uMCl5xzaBqY4YTL0wgALg3IFdYSp0RFYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn\nOdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh\nhvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n"),
+ },
+ ExpectMethod: "POST",
+ ExpectURIPath: "/requestcompression/putcontentwithencoding",
+ ExpectQuery: []smithytesting.QueryItem{},
+ ExpectHeader: http.Header{
+ "Content-Encoding": []string{"custom, gzip"},
+ },
+ },
+ }
+ for name, c := range cases {
+ t.Run(name, func(t *testing.T) {
+ if name == "SDKAppliedContentEncoding_restXml" {
+ t.Skip("disabled test aws.protocoltests.restxml#RestXml aws.protocoltests.restxml#PutWithContentEncoding")
+ }
+
+ if name == "SDKAppendedGzipAfterProvidedEncoding_restXml" {
+ t.Skip("disabled test aws.protocoltests.restxml#RestXml aws.protocoltests.restxml#PutWithContentEncoding")
+ }
+
+ actualReq := &http.Request{}
+ serverURL := "http://localhost:8888/"
+ if c.Host != nil {
+ u, err := url.Parse(serverURL)
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
+ u.Path = c.Host.Path
+ u.RawPath = c.Host.RawPath
+ u.RawQuery = c.Host.RawQuery
+ serverURL = u.String()
+ }
+ client := New(Options{
+ APIOptions: []func(*middleware.Stack) error{
+ func(s *middleware.Stack) error {
+ s.Finalize.Clear()
+ s.Initialize.Remove(`OperationInputValidation`)
+ return nil
+ },
+ },
+ EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) {
+ e.URL = serverURL
+ e.SigningRegion = "us-west-2"
+ return e, err
+ }),
+ HTTPClient: protocoltesthttp.NewClient(),
+ IdempotencyTokenProvider: smithyrand.NewUUIDIdempotencyToken(&smithytesting.ByteLoop{}),
+ Region: "us-west-2",
+ })
+ result, err := client.PutWithContentEncoding(context.Background(), c.Params, func(options *Options) {
+ options.APIOptions = append(options.APIOptions, func(stack *middleware.Stack) error {
+ return smithyprivateprotocol.AddCaptureRequestMiddleware(stack, actualReq)
+ })
+ })
+ if err != nil {
+ t.Fatalf("expect nil err, got %v", err)
+ }
+ if result == nil {
+ t.Fatalf("expect not nil result")
+ }
+ if e, a := c.ExpectMethod, actualReq.Method; e != a {
+ t.Errorf("expect %v method, got %v", e, a)
+ }
+ if e, a := c.ExpectURIPath, actualReq.URL.RawPath; e != a {
+ t.Errorf("expect %v path, got %v", e, a)
+ }
+ queryItems := smithytesting.ParseRawQuery(actualReq.URL.RawQuery)
+ smithytesting.AssertHasQuery(t, c.ExpectQuery, queryItems)
+ smithytesting.AssertHasQueryKeys(t, c.RequireQuery, queryItems)
+ smithytesting.AssertNotHaveQueryKeys(t, c.ForbidQuery, queryItems)
+ smithytesting.AssertHasHeader(t, c.ExpectHeader, actualReq.Header)
+ smithytesting.AssertHasHeaderKeys(t, c.RequireHeader, actualReq.Header)
+ smithytesting.AssertNotHaveHeaderKeys(t, c.ForbidHeader, actualReq.Header)
+ if c.BodyAssert != nil {
+ if err := c.BodyAssert(actualReq.Body); err != nil {
+ t.Errorf("expect body equal, got %v", err)
+ }
+ }
+ })
+ }
+}
diff --git a/internal/protocoltest/restxml/deserializers.go b/internal/protocoltest/restxml/deserializers.go
index aecd5dbfb94..2bbe50e30b8 100644
--- a/internal/protocoltest/restxml/deserializers.go
+++ b/internal/protocoltest/restxml/deserializers.go
@@ -1190,6 +1190,151 @@ func awsRestxml_deserializeOpDocumentFlattenedXmlMapWithXmlNamespaceOutput(v **F
return nil
}
+type awsRestxml_deserializeOpFractionalSeconds struct {
+}
+
+func (*awsRestxml_deserializeOpFractionalSeconds) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpFractionalSeconds) 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, awsRestxml_deserializeOpErrorFractionalSeconds(response, &metadata)
+ }
+ output := &FractionalSecondsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeOpDocumentFractionalSecondsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorFractionalSeconds(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
+
+ errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
+ if err != nil {
+ return err
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentFractionalSecondsOutput(v **FractionalSecondsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *FractionalSecondsOutput
+ if *v == nil {
+ sv = &FractionalSecondsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("datetime", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ t, err := smithytime.ParseDateTime(xtv)
+ if err != nil {
+ return err
+ }
+ sv.Datetime = ptr.Time(t)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
type awsRestxml_deserializeOpGreetingWithErrors struct {
}
@@ -3571,6 +3716,76 @@ func awsRestxml_deserializeOpErrorOmitsNullSerializesEmptyString(response *smith
}
}
+type awsRestxml_deserializeOpPutWithContentEncoding struct {
+}
+
+func (*awsRestxml_deserializeOpPutWithContentEncoding) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpPutWithContentEncoding) 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, awsRestxml_deserializeOpErrorPutWithContentEncoding(response, &metadata)
+ }
+ output := &PutWithContentEncodingOutput{}
+ 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 awsRestxml_deserializeOpErrorPutWithContentEncoding(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
+
+ errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
+ if err != nil {
+ return err
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
type awsRestxml_deserializeOpQueryIdempotencyTokenAutoFill struct {
}
diff --git a/internal/protocoltest/restxml/generated.json b/internal/protocoltest/restxml/generated.json
index c89f339f9b8..04cb6f7b9e8 100644
--- a/internal/protocoltest/restxml/generated.json
+++ b/internal/protocoltest/restxml/generated.json
@@ -33,6 +33,8 @@
"api_op_FlattenedXmlMapWithXmlNamespace.go",
"api_op_FlattenedXmlMapWithXmlNamespace_test.go",
"api_op_FlattenedXmlMap_test.go",
+ "api_op_FractionalSeconds.go",
+ "api_op_FractionalSeconds_test.go",
"api_op_GreetingWithErrors.go",
"api_op_GreetingWithErrors_test.go",
"api_op_HttpPayloadTraits.go",
@@ -76,6 +78,8 @@
"api_op_NullAndEmptyHeadersServer.go",
"api_op_OmitsNullSerializesEmptyString.go",
"api_op_OmitsNullSerializesEmptyString_test.go",
+ "api_op_PutWithContentEncoding.go",
+ "api_op_PutWithContentEncoding_test.go",
"api_op_QueryIdempotencyTokenAutoFill.go",
"api_op_QueryIdempotencyTokenAutoFill_test.go",
"api_op_QueryParamsAsStringListMap.go",
diff --git a/internal/protocoltest/restxml/serializers.go b/internal/protocoltest/restxml/serializers.go
index 899fa8afdef..1e4c1a4c58d 100644
--- a/internal/protocoltest/restxml/serializers.go
+++ b/internal/protocoltest/restxml/serializers.go
@@ -927,6 +927,58 @@ func awsRestxml_serializeOpHttpBindingsFlattenedXmlMapWithXmlNamespaceInput(v *F
return nil
}
+type awsRestxml_serializeOpFractionalSeconds struct {
+}
+
+func (*awsRestxml_serializeOpFractionalSeconds) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpFractionalSeconds) 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.(*FractionalSecondsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/FractionalSeconds")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, 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 awsRestxml_serializeOpHttpBindingsFractionalSecondsInput(v *FractionalSecondsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ return nil
+}
+
type awsRestxml_serializeOpGreetingWithErrors struct {
}
@@ -2674,6 +2726,100 @@ func awsRestxml_serializeOpHttpBindingsOmitsNullSerializesEmptyStringInput(v *Om
return nil
}
+type awsRestxml_serializeOpPutWithContentEncoding struct {
+}
+
+func (*awsRestxml_serializeOpPutWithContentEncoding) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpPutWithContentEncoding) 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.(*PutWithContentEncodingInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/requestcompression/putcontentwithencoding")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsPutWithContentEncodingInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/xml")
+
+ xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "PutWithContentEncodingInput",
+ },
+ Attr: rootAttr,
+ }
+ if err := awsRestxml_serializeOpDocumentPutWithContentEncodingInput(input, xmlEncoder.RootElement(root)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ if request, err = request.SetStream(bytes.NewReader(xmlEncoder.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 awsRestxml_serializeOpHttpBindingsPutWithContentEncodingInput(v *PutWithContentEncodingInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Encoding != nil && len(*v.Encoding) > 0 {
+ locationName := "Content-Encoding"
+ encoder.SetHeader(locationName).String(*v.Encoding)
+ }
+
+ return nil
+}
+
+func awsRestxml_serializeOpDocumentPutWithContentEncodingInput(v *PutWithContentEncodingInput, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Data != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "data",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Data)
+ }
+ return nil
+}
+
type awsRestxml_serializeOpQueryIdempotencyTokenAutoFill struct {
}
diff --git a/service/ec2/api_op_DisableImageBlockPublicAccess.go b/service/ec2/api_op_DisableImageBlockPublicAccess.go
new file mode 100644
index 00000000000..41918e15d0c
--- /dev/null
+++ b/service/ec2/api_op_DisableImageBlockPublicAccess.go
@@ -0,0 +1,268 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ internalauth "github.com/aws/aws-sdk-go-v2/internal/auth"
+ "github.com/aws/aws-sdk-go-v2/service/ec2/types"
+ smithyendpoints "github.com/aws/smithy-go/endpoints"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Disables block public access for AMIs at the account level in the specified
+// Amazon Web Services Region. This removes the block public access restriction
+// from your account. With the restriction removed, you can publicly share your
+// AMIs in the specified Amazon Web Services Region. The API can take up to 10
+// minutes to configure this setting. During this time, if you run
+// GetImageBlockPublicAccessState (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetImageBlockPublicAccessState.html)
+// , the response will be block-new-sharing . When the API has completed the
+// configuration, the response will be unblocked . For more information, see Block
+// public access to your AMIs (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sharingamis-intro.html#block-public-access-to-amis)
+// in the Amazon EC2 User Guide.
+func (c *Client) DisableImageBlockPublicAccess(ctx context.Context, params *DisableImageBlockPublicAccessInput, optFns ...func(*Options)) (*DisableImageBlockPublicAccessOutput, error) {
+ if params == nil {
+ params = &DisableImageBlockPublicAccessInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DisableImageBlockPublicAccess", params, optFns, c.addOperationDisableImageBlockPublicAccessMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DisableImageBlockPublicAccessOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DisableImageBlockPublicAccessInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation . Otherwise, it is
+ // UnauthorizedOperation .
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DisableImageBlockPublicAccessOutput struct {
+
+ // Returns unblocked if the request succeeds; otherwise, it returns an error.
+ ImageBlockPublicAccessState types.ImageBlockPublicAccessDisabledState
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDisableImageBlockPublicAccessMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDisableImageBlockPublicAccess{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisableImageBlockPublicAccess{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addlegacyEndpointContextSetter(stack, options); 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, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addDisableImageBlockPublicAccessResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableImageBlockPublicAccess(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecursionDetection(stack); 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
+ }
+ if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDisableImageBlockPublicAccess(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DisableImageBlockPublicAccess",
+ }
+}
+
+type opDisableImageBlockPublicAccessResolveEndpointMiddleware struct {
+ EndpointResolver EndpointResolverV2
+ BuiltInResolver builtInParameterResolver
+}
+
+func (*opDisableImageBlockPublicAccessResolveEndpointMiddleware) ID() string {
+ return "ResolveEndpointV2"
+}
+
+func (m *opDisableImageBlockPublicAccessResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ if awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
+ return next.HandleSerialize(ctx, in)
+ }
+
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.EndpointResolver == nil {
+ return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
+ }
+
+ params := EndpointParameters{}
+
+ m.BuiltInResolver.ResolveBuiltIns(¶ms)
+
+ var resolvedEndpoint smithyendpoints.Endpoint
+ resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
+ }
+
+ req.URL = &resolvedEndpoint.URI
+
+ for k := range resolvedEndpoint.Headers {
+ req.Header.Set(
+ k,
+ resolvedEndpoint.Headers.Get(k),
+ )
+ }
+
+ authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties)
+ if err != nil {
+ var nfe *internalauth.NoAuthenticationSchemesFoundError
+ if errors.As(err, &nfe) {
+ // if no auth scheme is found, default to sigv4
+ signingName := "ec2"
+ signingRegion := m.BuiltInResolver.(*builtInResolver).Region
+ ctx = awsmiddleware.SetSigningName(ctx, signingName)
+ ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion)
+
+ }
+ var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError
+ if errors.As(err, &ue) {
+ return out, metadata, fmt.Errorf(
+ "This operation requests signer version(s) %v but the client only supports %v",
+ ue.UnsupportedSchemes,
+ internalauth.SupportedSchemes,
+ )
+ }
+ }
+
+ for _, authScheme := range authSchemes {
+ switch authScheme.(type) {
+ case *internalauth.AuthenticationSchemeV4:
+ v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4)
+ var signingName, signingRegion string
+ if v4Scheme.SigningName == nil {
+ signingName = "ec2"
+ } else {
+ signingName = *v4Scheme.SigningName
+ }
+ if v4Scheme.SigningRegion == nil {
+ signingRegion = m.BuiltInResolver.(*builtInResolver).Region
+ } else {
+ signingRegion = *v4Scheme.SigningRegion
+ }
+ if v4Scheme.DisableDoubleEncoding != nil {
+ // The signer sets an equivalent value at client initialization time.
+ // Setting this context value will cause the signer to extract it
+ // and override the value set at client initialization time.
+ ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding)
+ }
+ ctx = awsmiddleware.SetSigningName(ctx, signingName)
+ ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion)
+ break
+ case *internalauth.AuthenticationSchemeV4A:
+ v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A)
+ if v4aScheme.SigningName == nil {
+ v4aScheme.SigningName = aws.String("ec2")
+ }
+ if v4aScheme.DisableDoubleEncoding != nil {
+ // The signer sets an equivalent value at client initialization time.
+ // Setting this context value will cause the signer to extract it
+ // and override the value set at client initialization time.
+ ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding)
+ }
+ ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName)
+ ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0])
+ break
+ case *internalauth.AuthenticationSchemeNone:
+ break
+ }
+ }
+
+ return next.HandleSerialize(ctx, in)
+}
+
+func addDisableImageBlockPublicAccessResolveEndpointMiddleware(stack *middleware.Stack, options Options) error {
+ return stack.Serialize.Insert(&opDisableImageBlockPublicAccessResolveEndpointMiddleware{
+ EndpointResolver: options.EndpointResolverV2,
+ BuiltInResolver: &builtInResolver{
+ Region: options.Region,
+ UseDualStack: options.EndpointOptions.UseDualStackEndpoint,
+ UseFIPS: options.EndpointOptions.UseFIPSEndpoint,
+ Endpoint: options.BaseEndpoint,
+ },
+ }, "ResolveEndpoint", middleware.After)
+}
diff --git a/service/ec2/api_op_EnableImageBlockPublicAccess.go b/service/ec2/api_op_EnableImageBlockPublicAccess.go
new file mode 100644
index 00000000000..7572d15eedd
--- /dev/null
+++ b/service/ec2/api_op_EnableImageBlockPublicAccess.go
@@ -0,0 +1,278 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ internalauth "github.com/aws/aws-sdk-go-v2/internal/auth"
+ "github.com/aws/aws-sdk-go-v2/service/ec2/types"
+ smithyendpoints "github.com/aws/smithy-go/endpoints"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Enables block public access for AMIs at the account level in the specified
+// Amazon Web Services Region. This prevents the public sharing of your AMIs.
+// However, if you already have public AMIs, they will remain publicly available.
+// The API can take up to 10 minutes to configure this setting. During this time,
+// if you run GetImageBlockPublicAccessState (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetImageBlockPublicAccessState.html)
+// , the response will be unblocked . When the API has completed the configuration,
+// the response will be block-new-sharing . For more information, see Block public
+// access to your AMIs (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sharingamis-intro.html#block-public-access-to-amis)
+// in the Amazon EC2 User Guide.
+func (c *Client) EnableImageBlockPublicAccess(ctx context.Context, params *EnableImageBlockPublicAccessInput, optFns ...func(*Options)) (*EnableImageBlockPublicAccessOutput, error) {
+ if params == nil {
+ params = &EnableImageBlockPublicAccessInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "EnableImageBlockPublicAccess", params, optFns, c.addOperationEnableImageBlockPublicAccessMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*EnableImageBlockPublicAccessOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type EnableImageBlockPublicAccessInput struct {
+
+ // Specify block-new-sharing to enable block public access for AMIs at the account
+ // level in the specified Region. This will block any attempt to publicly share
+ // your AMIs in the specified Region.
+ //
+ // This member is required.
+ ImageBlockPublicAccessState types.ImageBlockPublicAccessEnabledState
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation . Otherwise, it is
+ // UnauthorizedOperation .
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type EnableImageBlockPublicAccessOutput struct {
+
+ // Returns block-new-sharing if the request succeeds; otherwise, it returns an
+ // error.
+ ImageBlockPublicAccessState types.ImageBlockPublicAccessEnabledState
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationEnableImageBlockPublicAccessMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpEnableImageBlockPublicAccess{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpEnableImageBlockPublicAccess{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addlegacyEndpointContextSetter(stack, options); 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, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addEnableImageBlockPublicAccessResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpEnableImageBlockPublicAccessValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableImageBlockPublicAccess(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecursionDetection(stack); 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
+ }
+ if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opEnableImageBlockPublicAccess(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "EnableImageBlockPublicAccess",
+ }
+}
+
+type opEnableImageBlockPublicAccessResolveEndpointMiddleware struct {
+ EndpointResolver EndpointResolverV2
+ BuiltInResolver builtInParameterResolver
+}
+
+func (*opEnableImageBlockPublicAccessResolveEndpointMiddleware) ID() string {
+ return "ResolveEndpointV2"
+}
+
+func (m *opEnableImageBlockPublicAccessResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ if awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
+ return next.HandleSerialize(ctx, in)
+ }
+
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.EndpointResolver == nil {
+ return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
+ }
+
+ params := EndpointParameters{}
+
+ m.BuiltInResolver.ResolveBuiltIns(¶ms)
+
+ var resolvedEndpoint smithyendpoints.Endpoint
+ resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
+ }
+
+ req.URL = &resolvedEndpoint.URI
+
+ for k := range resolvedEndpoint.Headers {
+ req.Header.Set(
+ k,
+ resolvedEndpoint.Headers.Get(k),
+ )
+ }
+
+ authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties)
+ if err != nil {
+ var nfe *internalauth.NoAuthenticationSchemesFoundError
+ if errors.As(err, &nfe) {
+ // if no auth scheme is found, default to sigv4
+ signingName := "ec2"
+ signingRegion := m.BuiltInResolver.(*builtInResolver).Region
+ ctx = awsmiddleware.SetSigningName(ctx, signingName)
+ ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion)
+
+ }
+ var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError
+ if errors.As(err, &ue) {
+ return out, metadata, fmt.Errorf(
+ "This operation requests signer version(s) %v but the client only supports %v",
+ ue.UnsupportedSchemes,
+ internalauth.SupportedSchemes,
+ )
+ }
+ }
+
+ for _, authScheme := range authSchemes {
+ switch authScheme.(type) {
+ case *internalauth.AuthenticationSchemeV4:
+ v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4)
+ var signingName, signingRegion string
+ if v4Scheme.SigningName == nil {
+ signingName = "ec2"
+ } else {
+ signingName = *v4Scheme.SigningName
+ }
+ if v4Scheme.SigningRegion == nil {
+ signingRegion = m.BuiltInResolver.(*builtInResolver).Region
+ } else {
+ signingRegion = *v4Scheme.SigningRegion
+ }
+ if v4Scheme.DisableDoubleEncoding != nil {
+ // The signer sets an equivalent value at client initialization time.
+ // Setting this context value will cause the signer to extract it
+ // and override the value set at client initialization time.
+ ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding)
+ }
+ ctx = awsmiddleware.SetSigningName(ctx, signingName)
+ ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion)
+ break
+ case *internalauth.AuthenticationSchemeV4A:
+ v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A)
+ if v4aScheme.SigningName == nil {
+ v4aScheme.SigningName = aws.String("ec2")
+ }
+ if v4aScheme.DisableDoubleEncoding != nil {
+ // The signer sets an equivalent value at client initialization time.
+ // Setting this context value will cause the signer to extract it
+ // and override the value set at client initialization time.
+ ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding)
+ }
+ ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName)
+ ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0])
+ break
+ case *internalauth.AuthenticationSchemeNone:
+ break
+ }
+ }
+
+ return next.HandleSerialize(ctx, in)
+}
+
+func addEnableImageBlockPublicAccessResolveEndpointMiddleware(stack *middleware.Stack, options Options) error {
+ return stack.Serialize.Insert(&opEnableImageBlockPublicAccessResolveEndpointMiddleware{
+ EndpointResolver: options.EndpointResolverV2,
+ BuiltInResolver: &builtInResolver{
+ Region: options.Region,
+ UseDualStack: options.EndpointOptions.UseDualStackEndpoint,
+ UseFIPS: options.EndpointOptions.UseFIPSEndpoint,
+ Endpoint: options.BaseEndpoint,
+ },
+ }, "ResolveEndpoint", middleware.After)
+}
diff --git a/service/ec2/api_op_GetImageBlockPublicAccessState.go b/service/ec2/api_op_GetImageBlockPublicAccessState.go
new file mode 100644
index 00000000000..bfc877d98c0
--- /dev/null
+++ b/service/ec2/api_op_GetImageBlockPublicAccessState.go
@@ -0,0 +1,265 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ internalauth "github.com/aws/aws-sdk-go-v2/internal/auth"
+ smithyendpoints "github.com/aws/smithy-go/endpoints"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Gets the current state of block public access for AMIs at the account level in
+// the specified Amazon Web Services Region. For more information, see Block
+// public access to your AMIs (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sharingamis-intro.html#block-public-access-to-amis)
+// in the Amazon EC2 User Guide.
+func (c *Client) GetImageBlockPublicAccessState(ctx context.Context, params *GetImageBlockPublicAccessStateInput, optFns ...func(*Options)) (*GetImageBlockPublicAccessStateOutput, error) {
+ if params == nil {
+ params = &GetImageBlockPublicAccessStateInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetImageBlockPublicAccessState", params, optFns, c.addOperationGetImageBlockPublicAccessStateMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetImageBlockPublicAccessStateOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetImageBlockPublicAccessStateInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation . Otherwise, it is
+ // UnauthorizedOperation .
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type GetImageBlockPublicAccessStateOutput struct {
+
+ // The current state of block public access for AMIs at the account level in the
+ // specified Amazon Web Services Region. Possible values:
+ // - block-new-sharing - Any attempt to publicly share your AMIs in the specified
+ // Region is blocked.
+ // - unblocked - Your AMIs in the specified Region can be publicly shared.
+ ImageBlockPublicAccessState *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetImageBlockPublicAccessStateMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpGetImageBlockPublicAccessState{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetImageBlockPublicAccessState{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addlegacyEndpointContextSetter(stack, options); 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, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetImageBlockPublicAccessStateResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetImageBlockPublicAccessState(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecursionDetection(stack); 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
+ }
+ if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetImageBlockPublicAccessState(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "GetImageBlockPublicAccessState",
+ }
+}
+
+type opGetImageBlockPublicAccessStateResolveEndpointMiddleware struct {
+ EndpointResolver EndpointResolverV2
+ BuiltInResolver builtInParameterResolver
+}
+
+func (*opGetImageBlockPublicAccessStateResolveEndpointMiddleware) ID() string {
+ return "ResolveEndpointV2"
+}
+
+func (m *opGetImageBlockPublicAccessStateResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ if awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
+ return next.HandleSerialize(ctx, in)
+ }
+
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.EndpointResolver == nil {
+ return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
+ }
+
+ params := EndpointParameters{}
+
+ m.BuiltInResolver.ResolveBuiltIns(¶ms)
+
+ var resolvedEndpoint smithyendpoints.Endpoint
+ resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
+ }
+
+ req.URL = &resolvedEndpoint.URI
+
+ for k := range resolvedEndpoint.Headers {
+ req.Header.Set(
+ k,
+ resolvedEndpoint.Headers.Get(k),
+ )
+ }
+
+ authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties)
+ if err != nil {
+ var nfe *internalauth.NoAuthenticationSchemesFoundError
+ if errors.As(err, &nfe) {
+ // if no auth scheme is found, default to sigv4
+ signingName := "ec2"
+ signingRegion := m.BuiltInResolver.(*builtInResolver).Region
+ ctx = awsmiddleware.SetSigningName(ctx, signingName)
+ ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion)
+
+ }
+ var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError
+ if errors.As(err, &ue) {
+ return out, metadata, fmt.Errorf(
+ "This operation requests signer version(s) %v but the client only supports %v",
+ ue.UnsupportedSchemes,
+ internalauth.SupportedSchemes,
+ )
+ }
+ }
+
+ for _, authScheme := range authSchemes {
+ switch authScheme.(type) {
+ case *internalauth.AuthenticationSchemeV4:
+ v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4)
+ var signingName, signingRegion string
+ if v4Scheme.SigningName == nil {
+ signingName = "ec2"
+ } else {
+ signingName = *v4Scheme.SigningName
+ }
+ if v4Scheme.SigningRegion == nil {
+ signingRegion = m.BuiltInResolver.(*builtInResolver).Region
+ } else {
+ signingRegion = *v4Scheme.SigningRegion
+ }
+ if v4Scheme.DisableDoubleEncoding != nil {
+ // The signer sets an equivalent value at client initialization time.
+ // Setting this context value will cause the signer to extract it
+ // and override the value set at client initialization time.
+ ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding)
+ }
+ ctx = awsmiddleware.SetSigningName(ctx, signingName)
+ ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion)
+ break
+ case *internalauth.AuthenticationSchemeV4A:
+ v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A)
+ if v4aScheme.SigningName == nil {
+ v4aScheme.SigningName = aws.String("ec2")
+ }
+ if v4aScheme.DisableDoubleEncoding != nil {
+ // The signer sets an equivalent value at client initialization time.
+ // Setting this context value will cause the signer to extract it
+ // and override the value set at client initialization time.
+ ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding)
+ }
+ ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName)
+ ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0])
+ break
+ case *internalauth.AuthenticationSchemeNone:
+ break
+ }
+ }
+
+ return next.HandleSerialize(ctx, in)
+}
+
+func addGetImageBlockPublicAccessStateResolveEndpointMiddleware(stack *middleware.Stack, options Options) error {
+ return stack.Serialize.Insert(&opGetImageBlockPublicAccessStateResolveEndpointMiddleware{
+ EndpointResolver: options.EndpointResolverV2,
+ BuiltInResolver: &builtInResolver{
+ Region: options.Region,
+ UseDualStack: options.EndpointOptions.UseDualStackEndpoint,
+ UseFIPS: options.EndpointOptions.UseFIPSEndpoint,
+ Endpoint: options.BaseEndpoint,
+ },
+ }, "ResolveEndpoint", middleware.After)
+}
diff --git a/service/ec2/deserializers.go b/service/ec2/deserializers.go
index dfb48428173..a4b80ac78e0 100644
--- a/service/ec2/deserializers.go
+++ b/service/ec2/deserializers.go
@@ -33277,6 +33277,97 @@ func awsEc2query_deserializeOpErrorDisableFastSnapshotRestores(response *smithyh
}
}
+type awsEc2query_deserializeOpDisableImageBlockPublicAccess struct {
+}
+
+func (*awsEc2query_deserializeOpDisableImageBlockPublicAccess) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDisableImageBlockPublicAccess) 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, awsEc2query_deserializeOpErrorDisableImageBlockPublicAccess(response, &metadata)
+ }
+ output := &DisableImageBlockPublicAccessOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsEc2query_deserializeOpDocumentDisableImageBlockPublicAccessOutput(&output, 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 out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDisableImageBlockPublicAccess(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
+
+ errorComponents, err := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
type awsEc2query_deserializeOpDisableImageDeprecation struct {
}
@@ -35574,6 +35665,97 @@ func awsEc2query_deserializeOpErrorEnableFastSnapshotRestores(response *smithyht
}
}
+type awsEc2query_deserializeOpEnableImageBlockPublicAccess struct {
+}
+
+func (*awsEc2query_deserializeOpEnableImageBlockPublicAccess) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpEnableImageBlockPublicAccess) 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, awsEc2query_deserializeOpErrorEnableImageBlockPublicAccess(response, &metadata)
+ }
+ output := &EnableImageBlockPublicAccessOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsEc2query_deserializeOpDocumentEnableImageBlockPublicAccessOutput(&output, 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 out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorEnableImageBlockPublicAccess(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
+
+ errorComponents, err := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
type awsEc2query_deserializeOpEnableImageDeprecation struct {
}
@@ -37894,6 +38076,97 @@ func awsEc2query_deserializeOpErrorGetHostReservationPurchasePreview(response *s
}
}
+type awsEc2query_deserializeOpGetImageBlockPublicAccessState struct {
+}
+
+func (*awsEc2query_deserializeOpGetImageBlockPublicAccessState) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpGetImageBlockPublicAccessState) 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, awsEc2query_deserializeOpErrorGetImageBlockPublicAccessState(response, &metadata)
+ }
+ output := &GetImageBlockPublicAccessStateOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsEc2query_deserializeOpDocumentGetImageBlockPublicAccessStateOutput(&output, 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 out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorGetImageBlockPublicAccessState(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
+
+ errorComponents, err := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
type awsEc2query_deserializeOpGetInstanceTypesFromInstanceRequirements struct {
}
@@ -151680,6 +151953,55 @@ func awsEc2query_deserializeOpDocumentDisableFastSnapshotRestoresOutput(v **Disa
return nil
}
+func awsEc2query_deserializeOpDocumentDisableImageBlockPublicAccessOutput(v **DisableImageBlockPublicAccessOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DisableImageBlockPublicAccessOutput
+ if *v == nil {
+ sv = &DisableImageBlockPublicAccessOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("imageBlockPublicAccessState", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ImageBlockPublicAccessState = types.ImageBlockPublicAccessDisabledState(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
func awsEc2query_deserializeOpDocumentDisableImageDeprecationOutput(v **DisableImageDeprecationOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
@@ -152918,6 +153240,55 @@ func awsEc2query_deserializeOpDocumentEnableFastSnapshotRestoresOutput(v **Enabl
return nil
}
+func awsEc2query_deserializeOpDocumentEnableImageBlockPublicAccessOutput(v **EnableImageBlockPublicAccessOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *EnableImageBlockPublicAccessOutput
+ if *v == nil {
+ sv = &EnableImageBlockPublicAccessOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("imageBlockPublicAccessState", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ImageBlockPublicAccessState = types.ImageBlockPublicAccessEnabledState(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
func awsEc2query_deserializeOpDocumentEnableImageDeprecationOutput(v **EnableImageDeprecationOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
@@ -154407,6 +154778,55 @@ func awsEc2query_deserializeOpDocumentGetHostReservationPurchasePreviewOutput(v
return nil
}
+func awsEc2query_deserializeOpDocumentGetImageBlockPublicAccessStateOutput(v **GetImageBlockPublicAccessStateOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetImageBlockPublicAccessStateOutput
+ if *v == nil {
+ sv = &GetImageBlockPublicAccessStateOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("imageBlockPublicAccessState", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ImageBlockPublicAccessState = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
func awsEc2query_deserializeOpDocumentGetInstanceTypesFromInstanceRequirementsOutput(v **GetInstanceTypesFromInstanceRequirementsOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
diff --git a/service/ec2/generated.json b/service/ec2/generated.json
index 9032e03217c..6d77e060390 100644
--- a/service/ec2/generated.json
+++ b/service/ec2/generated.json
@@ -385,6 +385,7 @@
"api_op_DisableEbsEncryptionByDefault.go",
"api_op_DisableFastLaunch.go",
"api_op_DisableFastSnapshotRestores.go",
+ "api_op_DisableImageBlockPublicAccess.go",
"api_op_DisableImageDeprecation.go",
"api_op_DisableIpamOrganizationAdminAccount.go",
"api_op_DisableSerialConsoleAccess.go",
@@ -411,6 +412,7 @@
"api_op_EnableEbsEncryptionByDefault.go",
"api_op_EnableFastLaunch.go",
"api_op_EnableFastSnapshotRestores.go",
+ "api_op_EnableImageBlockPublicAccess.go",
"api_op_EnableImageDeprecation.go",
"api_op_EnableIpamOrganizationAdminAccount.go",
"api_op_EnableReachabilityAnalyzerOrganizationSharing.go",
@@ -437,6 +439,7 @@
"api_op_GetFlowLogsIntegrationTemplate.go",
"api_op_GetGroupsForCapacityReservation.go",
"api_op_GetHostReservationPurchasePreview.go",
+ "api_op_GetImageBlockPublicAccessState.go",
"api_op_GetInstanceTypesFromInstanceRequirements.go",
"api_op_GetInstanceUefiData.go",
"api_op_GetIpamAddressHistory.go",
diff --git a/service/ec2/serializers.go b/service/ec2/serializers.go
index fa25e3e7bb3..fd944068dd5 100644
--- a/service/ec2/serializers.go
+++ b/service/ec2/serializers.go
@@ -23889,6 +23889,70 @@ func (m *awsEc2query_serializeOpDisableFastSnapshotRestores) HandleSerialize(ctx
return next.HandleSerialize(ctx, in)
}
+type awsEc2query_serializeOpDisableImageBlockPublicAccess struct {
+}
+
+func (*awsEc2query_serializeOpDisableImageBlockPublicAccess) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDisableImageBlockPublicAccess) 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.(*DisableImageBlockPublicAccessInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DisableImageBlockPublicAccess")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDisableImageBlockPublicAccessInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
type awsEc2query_serializeOpDisableImageDeprecation struct {
}
@@ -25553,6 +25617,70 @@ func (m *awsEc2query_serializeOpEnableFastSnapshotRestores) HandleSerialize(ctx
return next.HandleSerialize(ctx, in)
}
+type awsEc2query_serializeOpEnableImageBlockPublicAccess struct {
+}
+
+func (*awsEc2query_serializeOpEnableImageBlockPublicAccess) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpEnableImageBlockPublicAccess) 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.(*EnableImageBlockPublicAccessInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("EnableImageBlockPublicAccess")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentEnableImageBlockPublicAccessInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
type awsEc2query_serializeOpEnableImageDeprecation struct {
}
@@ -27217,6 +27345,70 @@ func (m *awsEc2query_serializeOpGetHostReservationPurchasePreview) HandleSeriali
return next.HandleSerialize(ctx, in)
}
+type awsEc2query_serializeOpGetImageBlockPublicAccessState struct {
+}
+
+func (*awsEc2query_serializeOpGetImageBlockPublicAccessState) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpGetImageBlockPublicAccessState) 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.(*GetImageBlockPublicAccessStateInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetImageBlockPublicAccessState")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentGetImageBlockPublicAccessStateInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
type awsEc2query_serializeOpGetInstanceTypesFromInstanceRequirements struct {
}
@@ -58922,6 +59114,18 @@ func awsEc2query_serializeOpDocumentDisableFastSnapshotRestoresInput(v *DisableF
return nil
}
+func awsEc2query_serializeOpDocumentDisableImageBlockPublicAccessInput(v *DisableImageBlockPublicAccessInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
func awsEc2query_serializeOpDocumentDisableImageDeprecationInput(v *DisableImageDeprecationInput, value query.Value) error {
object := value.Object()
_ = object
@@ -59463,6 +59667,23 @@ func awsEc2query_serializeOpDocumentEnableFastSnapshotRestoresInput(v *EnableFas
return nil
}
+func awsEc2query_serializeOpDocumentEnableImageBlockPublicAccessInput(v *EnableImageBlockPublicAccessInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if len(v.ImageBlockPublicAccessState) > 0 {
+ objectKey := object.Key("ImageBlockPublicAccessState")
+ objectKey.String(string(v.ImageBlockPublicAccessState))
+ }
+
+ return nil
+}
+
func awsEc2query_serializeOpDocumentEnableImageDeprecationInput(v *EnableImageDeprecationInput, value query.Value) error {
object := value.Object()
_ = object
@@ -60039,6 +60260,18 @@ func awsEc2query_serializeOpDocumentGetHostReservationPurchasePreviewInput(v *Ge
return nil
}
+func awsEc2query_serializeOpDocumentGetImageBlockPublicAccessStateInput(v *GetImageBlockPublicAccessStateInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
func awsEc2query_serializeOpDocumentGetInstanceTypesFromInstanceRequirementsInput(v *GetInstanceTypesFromInstanceRequirementsInput, value query.Value) error {
object := value.Object()
_ = object
diff --git a/service/ec2/types/enums.go b/service/ec2/types/enums.go
index f0bdbc478d7..b90e1b06b4d 100644
--- a/service/ec2/types/enums.go
+++ b/service/ec2/types/enums.go
@@ -2385,6 +2385,40 @@ func (ImageAttributeName) Values() []ImageAttributeName {
}
}
+type ImageBlockPublicAccessDisabledState string
+
+// Enum values for ImageBlockPublicAccessDisabledState
+const (
+ ImageBlockPublicAccessDisabledStateUnblocked ImageBlockPublicAccessDisabledState = "unblocked"
+)
+
+// Values returns all known values for ImageBlockPublicAccessDisabledState. 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 (ImageBlockPublicAccessDisabledState) Values() []ImageBlockPublicAccessDisabledState {
+ return []ImageBlockPublicAccessDisabledState{
+ "unblocked",
+ }
+}
+
+type ImageBlockPublicAccessEnabledState string
+
+// Enum values for ImageBlockPublicAccessEnabledState
+const (
+ ImageBlockPublicAccessEnabledStateBlockNewSharing ImageBlockPublicAccessEnabledState = "block-new-sharing"
+)
+
+// Values returns all known values for ImageBlockPublicAccessEnabledState. 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 (ImageBlockPublicAccessEnabledState) Values() []ImageBlockPublicAccessEnabledState {
+ return []ImageBlockPublicAccessEnabledState{
+ "block-new-sharing",
+ }
+}
+
type ImageState string
// Enum values for ImageState
diff --git a/service/ec2/validators.go b/service/ec2/validators.go
index 6cb2b405382..626c8123746 100644
--- a/service/ec2/validators.go
+++ b/service/ec2/validators.go
@@ -4890,6 +4890,26 @@ func (m *validateOpEnableFastSnapshotRestores) HandleInitialize(ctx context.Cont
return next.HandleInitialize(ctx, in)
}
+type validateOpEnableImageBlockPublicAccess struct {
+}
+
+func (*validateOpEnableImageBlockPublicAccess) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpEnableImageBlockPublicAccess) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*EnableImageBlockPublicAccessInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpEnableImageBlockPublicAccessInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
type validateOpEnableImageDeprecation struct {
}
@@ -9386,6 +9406,10 @@ func addOpEnableFastSnapshotRestoresValidationMiddleware(stack *middleware.Stack
return stack.Initialize.Add(&validateOpEnableFastSnapshotRestores{}, middleware.After)
}
+func addOpEnableImageBlockPublicAccessValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpEnableImageBlockPublicAccess{}, middleware.After)
+}
+
func addOpEnableImageDeprecationValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpEnableImageDeprecation{}, middleware.After)
}
@@ -15060,6 +15084,21 @@ func validateOpEnableFastSnapshotRestoresInput(v *EnableFastSnapshotRestoresInpu
}
}
+func validateOpEnableImageBlockPublicAccessInput(v *EnableImageBlockPublicAccessInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "EnableImageBlockPublicAccessInput"}
+ if len(v.ImageBlockPublicAccessState) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("ImageBlockPublicAccessState"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
func validateOpEnableImageDeprecationInput(v *EnableImageDeprecationInput) error {
if v == nil {
return nil
diff --git a/service/emr/internal/endpoints/endpoints.go b/service/emr/internal/endpoints/endpoints.go
index 975e049f5df..c41691fd27e 100644
--- a/service/emr/internal/endpoints/endpoints.go
+++ b/service/emr/internal/endpoints/endpoints.go
@@ -364,14 +364,45 @@ var defaultPartitions = endpoints.Partitions{
RegionRegex: partitionRegexp.AwsIso,
IsRegionalized: true,
Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "fips-us-iso-east-1",
+ }: endpoints.Endpoint{
+ Hostname: "elasticmapreduce.us-iso-east-1.c2s.ic.gov",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-iso-east-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "fips-us-iso-west-1",
+ }: endpoints.Endpoint{
+ Hostname: "elasticmapreduce.us-iso-west-1.c2s.ic.gov",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-iso-west-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
endpoints.EndpointKey{
Region: "us-iso-east-1",
}: endpoints.Endpoint{
Protocols: []string{"https"},
},
+ endpoints.EndpointKey{
+ Region: "us-iso-east-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "elasticmapreduce.us-iso-east-1.c2s.ic.gov",
+ Protocols: []string{"https"},
+ },
endpoints.EndpointKey{
Region: "us-iso-west-1",
}: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-iso-west-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "elasticmapreduce.us-iso-west-1.c2s.ic.gov",
+ },
},
},
{
@@ -395,9 +426,24 @@ var defaultPartitions = endpoints.Partitions{
RegionRegex: partitionRegexp.AwsIsoB,
IsRegionalized: true,
Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "fips-us-isob-east-1",
+ }: endpoints.Endpoint{
+ Hostname: "elasticmapreduce.us-isob-east-1.sc2s.sgov.gov",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-isob-east-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
endpoints.EndpointKey{
Region: "us-isob-east-1",
}: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-isob-east-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "elasticmapreduce.us-isob-east-1.sc2s.sgov.gov",
+ },
},
},
{
diff --git a/service/eventbridge/deserializers.go b/service/eventbridge/deserializers.go
index 56741effee9..3a28b1e40ab 100644
--- a/service/eventbridge/deserializers.go
+++ b/service/eventbridge/deserializers.go
@@ -7736,7 +7736,7 @@ func awsAwsjson11_deserializeDocumentConnectionBodyParameter(v **types.Connectio
if value != nil {
jtv, ok := value.(string)
if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value)
}
sv.Value = ptr.String(jtv)
}
@@ -7828,7 +7828,7 @@ func awsAwsjson11_deserializeDocumentConnectionHeaderParameter(v **types.Connect
if value != nil {
jtv, ok := value.(string)
if !ok {
- return fmt.Errorf("expected HeaderValue to be of type string, got %T instead", value)
+ return fmt.Errorf("expected HeaderValueSensitive to be of type string, got %T instead", value)
}
sv.Value = ptr.String(jtv)
}
@@ -8065,7 +8065,7 @@ func awsAwsjson11_deserializeDocumentConnectionQueryStringParameter(v **types.Co
if value != nil {
jtv, ok := value.(string)
if !ok {
- return fmt.Errorf("expected QueryStringValue to be of type string, got %T instead", value)
+ return fmt.Errorf("expected QueryStringValueSensitive to be of type string, got %T instead", value)
}
sv.Value = ptr.String(jtv)
}
diff --git a/service/kendra/api_op_BatchDeleteDocument.go b/service/kendra/api_op_BatchDeleteDocument.go
index a34c207a1b1..6a2b76ae9fb 100644
--- a/service/kendra/api_op_BatchDeleteDocument.go
+++ b/service/kendra/api_op_BatchDeleteDocument.go
@@ -19,8 +19,11 @@ import (
// Removes one or more documents from an index. The documents must have been added
// with the BatchPutDocument API. The documents are deleted asynchronously. You
// can see the progress of the deletion by using Amazon Web Services CloudWatch.
-// Any error messages related to the processing of the batch are sent to you
-// CloudWatch log.
+// Any error messages related to the processing of the batch are sent to your
+// Amazon Web Services CloudWatch log. You can also use the BatchGetDocumentStatus
+// API to monitor the progress of deleting your documents. Deleting documents from
+// an index using BatchDeleteDocument could take up to an hour or more, depending
+// on the number of documents you want to delete.
func (c *Client) BatchDeleteDocument(ctx context.Context, params *BatchDeleteDocumentInput, optFns ...func(*Options)) (*BatchDeleteDocumentOutput, error) {
if params == nil {
params = &BatchDeleteDocumentInput{}
diff --git a/service/kendra/api_op_BatchPutDocument.go b/service/kendra/api_op_BatchPutDocument.go
index eb8e8de0792..52a34116555 100644
--- a/service/kendra/api_op_BatchPutDocument.go
+++ b/service/kendra/api_op_BatchPutDocument.go
@@ -23,8 +23,9 @@ import (
// documents added to the index. The documents are indexed asynchronously. You can
// see the progress of the batch using Amazon Web Services CloudWatch. Any error
// messages related to processing the batch are sent to your Amazon Web Services
-// CloudWatch log. For an example of ingesting inline documents using Python and
-// Java SDKs, see Adding files directly to an index (https://docs.aws.amazon.com/kendra/latest/dg/in-adding-binary-doc.html)
+// CloudWatch log. You can also use the BatchGetDocumentStatus API to monitor the
+// progress of indexing your documents. For an example of ingesting inline
+// documents using Python and Java SDKs, see Adding files directly to an index (https://docs.aws.amazon.com/kendra/latest/dg/in-adding-binary-doc.html)
// .
func (c *Client) BatchPutDocument(ctx context.Context, params *BatchPutDocumentInput, optFns ...func(*Options)) (*BatchPutDocumentOutput, error) {
if params == nil {
@@ -82,7 +83,8 @@ type BatchPutDocumentOutput struct {
// indicates why the document couldn't be added to the index. If there was an error
// adding a document to an index the error is reported in your Amazon Web Services
// CloudWatch log. For more information, see Monitoring Amazon Kendra with Amazon
- // CloudWatch Logs (https://docs.aws.amazon.com/kendra/latest/dg/cloudwatch-logs.html)
+ // CloudWatch logs (https://docs.aws.amazon.com/kendra/latest/dg/cloudwatch-logs.html)
+ // .
FailedDocuments []types.BatchPutDocumentResponseFailedDocument
// Metadata pertaining to the operation's result.
diff --git a/service/kendra/api_op_CreateIndex.go b/service/kendra/api_op_CreateIndex.go
index d20dba31fa7..1d3ee96da3f 100644
--- a/service/kendra/api_op_CreateIndex.go
+++ b/service/kendra/api_op_CreateIndex.go
@@ -19,11 +19,11 @@ import (
// Creates an Amazon Kendra index. Index creation is an asynchronous API. To
// determine if index creation has completed, check the Status field returned from
// a call to DescribeIndex . The Status field is set to ACTIVE when the index is
-// ready to use. Once the index is active you can index your documents using the
-// BatchPutDocument API or using one of the supported data sources. For an example
-// of creating an index and data source using the Python SDK, see Getting started
-// with Python SDK (https://docs.aws.amazon.com/kendra/latest/dg/gs-python.html) .
-// For an example of creating an index and data source using the Java SDK, see
+// ready to use. Once the index is active, you can index your documents using the
+// BatchPutDocument API or using one of the supported data sources (https://docs.aws.amazon.com/kendra/latest/dg/data-sources.html)
+// . For an example of creating an index and data source using the Python SDK, see
+// Getting started with Python SDK (https://docs.aws.amazon.com/kendra/latest/dg/gs-python.html)
+// . For an example of creating an index and data source using the Java SDK, see
// Getting started with Java SDK (https://docs.aws.amazon.com/kendra/latest/dg/gs-java.html)
// .
func (c *Client) CreateIndex(ctx context.Context, params *CreateIndexInput, optFns ...func(*Options)) (*CreateIndexOutput, error) {
diff --git a/service/kendra/api_op_DeleteDataSource.go b/service/kendra/api_op_DeleteDataSource.go
index ea7f443088c..c8ae880f970 100644
--- a/service/kendra/api_op_DeleteDataSource.go
+++ b/service/kendra/api_op_DeleteDataSource.go
@@ -19,7 +19,9 @@ import (
// the data source is already being deleted. While the data source is being
// deleted, the Status field returned by a call to the DescribeDataSource API is
// set to DELETING . For more information, see Deleting Data Sources (https://docs.aws.amazon.com/kendra/latest/dg/delete-data-source.html)
-// .
+// . Deleting an entire data source or re-syncing your index after deleting
+// specific documents from a data source could take up to an hour or more,
+// depending on the number of documents you want to delete.
func (c *Client) DeleteDataSource(ctx context.Context, params *DeleteDataSourceInput, optFns ...func(*Options)) (*DeleteDataSourceOutput, error) {
if params == nil {
params = &DeleteDataSourceInput{}
diff --git a/service/kendra/api_op_Retrieve.go b/service/kendra/api_op_Retrieve.go
index de61f98ca2d..d8ecde0549f 100644
--- a/service/kendra/api_op_Retrieve.go
+++ b/service/kendra/api_op_Retrieve.go
@@ -24,14 +24,18 @@ import (
// include question-answer or FAQ type responses from your index. The passages are
// text excerpts that can be semantically extracted from multiple documents and
// multiple parts of the same document. If in extreme cases your documents produce
-// no relevant passages using the Retrieve API, you can alternatively use the Query
-// API. You can also do the following:
+// zero passages using the Retrieve API, you can alternatively use the Query API
+// and its types of responses. You can also do the following:
// - Override boosting at the index level
// - Filter based on document fields or attributes
// - Filter based on the user or their group access to documents
//
// You can also include certain fields in the response that might provide useful
-// additional information.
+// additional information. The Retrieve API shares the number of query capacity
+// units (https://docs.aws.amazon.com/kendra/latest/APIReference/API_CapacityUnitsConfiguration.html)
+// that you set for your index. For more information on what's included in a single
+// capacity unit and the default base capacity for an index, see Adjusting capacity (https://docs.aws.amazon.com/kendra/latest/dg/adjusting-capacity.html)
+// .
func (c *Client) Retrieve(ctx context.Context, params *RetrieveInput, optFns ...func(*Options)) (*RetrieveOutput, error) {
if params == nil {
params = &RetrieveInput{}
diff --git a/service/kendra/api_op_StartDataSourceSyncJob.go b/service/kendra/api_op_StartDataSourceSyncJob.go
index f1a9a54fd95..e3ee66d676d 100644
--- a/service/kendra/api_op_StartDataSourceSyncJob.go
+++ b/service/kendra/api_op_StartDataSourceSyncJob.go
@@ -17,7 +17,9 @@ import (
// Starts a synchronization job for a data source connector. If a synchronization
// job is already in progress, Amazon Kendra returns a ResourceInUseException
-// exception.
+// exception. Re-syncing your data source with your index after modifying, adding,
+// or deleting documents from your data source respository could take up to an hour
+// or more, depending on the number of documents to sync.
func (c *Client) StartDataSourceSyncJob(ctx context.Context, params *StartDataSourceSyncJobInput, optFns ...func(*Options)) (*StartDataSourceSyncJobOutput, error) {
if params == nil {
params = &StartDataSourceSyncJobInput{}
diff --git a/service/kendra/deserializers.go b/service/kendra/deserializers.go
index 36c04ba766d..c456c36c435 100644
--- a/service/kendra/deserializers.go
+++ b/service/kendra/deserializers.go
@@ -16656,6 +16656,11 @@ func awsAwsjson11_deserializeDocumentRetrieveResultItem(v **types.RetrieveResult
sv.Id = ptr.String(jtv)
}
+ case "ScoreAttributes":
+ if err := awsAwsjson11_deserializeDocumentScoreAttributes(&sv.ScoreAttributes, value); err != nil {
+ return err
+ }
+
default:
_, _ = key, value
diff --git a/service/kendra/types/types.go b/service/kendra/types/types.go
index facccacd437..502fa688b7f 100644
--- a/service/kendra/types/types.go
+++ b/service/kendra/types/types.go
@@ -168,50 +168,71 @@ type AlfrescoConfiguration struct {
noSmithyDocumentSerde
}
-// Provides filtering the query results based on document attributes or metadata
-// fields. When you use the AndAllFilters or OrAllFilters , filters you can use 2
-// layers under the first attribute filter. For example, you can use:
-// If you use more than 2 layers, you receive a ValidationException exception with
-// the message " AttributeFilter cannot have a depth of more than 2." If you use
-// more than 10 attribute filters in a given list for AndAllFilters or OrAllFilters
-// , you receive a ValidationException with the message " AttributeFilter cannot
-// have a length of more than 10".
+// Filters the search results based on document attributes or fields. You can
+// filter results using attributes for your particular documents. The attributes
+// must exist in your index. For example, if your documents include the custom
+// attribute "Department", you can filter documents that belong to the "HR"
+// department. You would use the EqualsTo operation to filter results or documents
+// with "Department" equals to "HR". You can use AndAllFilters and AndOrFilters in
+// combination with each other or with other operations such as EqualsTo . For
+// example: AndAllFilters
+// - EqualsTo : "Department", "HR"
+// - AndOrFilters
+// - ContainsAny : "Project Name", ["new hires", "new hiring"]
+//
+// This example filters results or documents that belong to the HR department and
+// belong to projects that contain "new hires" or "new hiring" in the project name
+// (must use ContainAny with StringListValue ). This example is filtering with a
+// depth of 2. You cannot filter more than a depth of 2, otherwise you receive a
+// ValidationException exception with the message "AttributeFilter cannot have a
+// depth of more than 2." Also, if you use more than 10 attribute filters in a
+// given list for AndAllFilters or OrAllFilters , you receive a ValidationException
+// with the message "AttributeFilter cannot have a length of more than 10". For
+// examples of using AttributeFilter , see Using document attributes to filter
+// search results (https://docs.aws.amazon.com/kendra/latest/dg/filtering.html#search-filtering)
+// .
type AttributeFilter struct {
- // Performs a logical AND operation on all supplied filters.
+ // Performs a logical AND operation on all filters that you specify.
AndAllFilters []AttributeFilter
- // Returns true when a document contains all of the specified document attributes
- // or metadata fields. This filter is only applicable to StringListValue metadata.
+ // Returns true when a document contains all of the specified document
+ // attributes/fields. This filter is only applicable to StringListValue (https://docs.aws.amazon.com/kendra/latest/APIReference/API_DocumentAttributeValue.html)
+ // .
ContainsAll *DocumentAttribute
- // Returns true when a document contains any of the specified document attributes
- // or metadata fields. This filter is only applicable to StringListValue metadata.
+ // Returns true when a document contains any of the specified document
+ // attributes/fields. This filter is only applicable to StringListValue (https://docs.aws.amazon.com/kendra/latest/APIReference/API_DocumentAttributeValue.html)
+ // .
ContainsAny *DocumentAttribute
- // Performs an equals operation on two document attributes or metadata fields.
+ // Performs an equals operation on document attributes/fields and their values.
EqualsTo *DocumentAttribute
- // Performs a greater than operation on two document attributes or metadata
- // fields. Use with a document attribute of type Date or Long .
+ // Performs a greater than operation on document attributes/fields and their
+ // values. Use with the document attribute type (https://docs.aws.amazon.com/kendra/latest/APIReference/API_DocumentAttributeValue.html)
+ // Date or Long .
GreaterThan *DocumentAttribute
- // Performs a greater or equals than operation on two document attributes or
- // metadata fields. Use with a document attribute of type Date or Long .
+ // Performs a greater or equals than operation on document attributes/fields and
+ // their values. Use with the document attribute type (https://docs.aws.amazon.com/kendra/latest/APIReference/API_DocumentAttributeValue.html)
+ // Date or Long .
GreaterThanOrEquals *DocumentAttribute
- // Performs a less than operation on two document attributes or metadata fields.
- // Use with a document attribute of type Date or Long .
+ // Performs a less than operation on document attributes/fields and their values.
+ // Use with the document attribute type (https://docs.aws.amazon.com/kendra/latest/APIReference/API_DocumentAttributeValue.html)
+ // Date or Long .
LessThan *DocumentAttribute
- // Performs a less than or equals operation on two document attributes or metadata
- // fields. Use with a document attribute of type Date or Long .
+ // Performs a less than or equals operation on document attributes/fields and
+ // their values. Use with the document attribute type (https://docs.aws.amazon.com/kendra/latest/APIReference/API_DocumentAttributeValue.html)
+ // Date or Long .
LessThanOrEquals *DocumentAttribute
- // Performs a logical NOT operation on all supplied filters.
+ // Performs a logical NOT operation on all filters that you specify.
NotFilter *AttributeFilter
- // Performs a logical OR operation on all supplied filters.
+ // Performs a logical OR operation on all filters that you specify.
OrAllFilters []AttributeFilter
noSmithyDocumentSerde
@@ -953,7 +974,8 @@ type CustomDocumentEnrichmentConfiguration struct {
noSmithyDocumentSerde
}
-// Provides the configuration information to connect to a index.
+// Provides the configuration information to an Amazon Kendra supported database (https://docs.aws.amazon.com/kendra/latest/dg/data-source-database.html)
+// .
type DatabaseConfiguration struct {
// Information about where the index should get the document information from the
@@ -1199,21 +1221,31 @@ type DataSourceSyncJobMetricTarget struct {
noSmithyDocumentSerde
}
-// Maps a column or attribute in the data source to an index field. You must first
-// create the fields in the index using the UpdateIndex API.
+// Maps attributes or field names of the documents synced from the data source to
+// Amazon Kendra index field names. You can set up field mappings for each data
+// source when calling CreateDataSource (https://docs.aws.amazon.com/kendra/latest/APIReference/API_CreateDataSource.html)
+// or UpdateDataSource (https://docs.aws.amazon.com/kendra/latest/APIReference/API_UpdateDataSource.html)
+// API. To create custom fields, use the UpdateIndex API to first create an index
+// field and then map to the data source field. For more information, see Mapping
+// data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html)
+// .
type DataSourceToIndexFieldMapping struct {
- // The name of the column or attribute in the data source.
+ // The name of the field in the data source. You must first create the index field
+ // using the UpdateIndex API.
//
// This member is required.
DataSourceFieldName *string
- // The name of the field in the index.
+ // The name of the index field to map to the data source field. The index field
+ // type must match the data source field type.
//
// This member is required.
IndexFieldName *string
- // The type of data stored in the column or attribute.
+ // The format for date fields in the data source. If the field specified in
+ // DataSourceFieldName is a date field, you must specify the date format. If the
+ // field is not a date field, an exception is thrown.
DateFieldFormat *string
noSmithyDocumentSerde
@@ -1400,18 +1432,18 @@ type DocumentAttributeValue struct {
noSmithyDocumentSerde
}
-// Provides the count of documents that match a particular attribute when doing a
-// faceted search.
+// Provides the count of documents that match a particular document attribute or
+// field when doing a faceted search.
type DocumentAttributeValueCountPair struct {
- // The number of documents in the response that have the attribute value for the
- // key.
+ // The number of documents in the response that have the attribute/field value for
+ // the key.
Count *int32
- // The value of the attribute. For example, "HR".
+ // The value of the attribute/field. For example, "HR".
DocumentAttributeValue *DocumentAttributeValue
- // Contains the results of a document attribute that is a nested facet. A
+ // Contains the results of a document attribute/field that is a nested facet. A
// FacetResult contains the counts for each facet nested within a facet. For
// example, the document attribute or facet "Department" includes a value called
// "Engineering". In addition, the document attribute or facet "SubDepartment"
@@ -1644,12 +1676,12 @@ type ExperiencesSummary struct {
noSmithyDocumentSerde
}
-// Information about a document attribute. You can use document attributes as
-// facets. For example, the document attribute or facet "Department" includes the
-// values "HR", "Engineering", and "Accounting". You can display these values in
-// the search results so that documents can be searched by department. You can
-// display up to 10 facet values per facet for a query. If you want to increase
-// this limit, contact Support (http://aws.amazon.com/contact-us/) .
+// Information about a document attribute or field. You can use document
+// attributes as facets. For example, the document attribute or facet "Department"
+// includes the values "HR", "Engineering", and "Accounting". You can display these
+// values in the search results so that documents can be searched by department.
+// You can display up to 10 facet values per facet for a query. If you want to
+// increase this limit, contact Support (http://aws.amazon.com/contact-us/) .
type Facet struct {
// The unique key for the document attribute.
@@ -3025,6 +3057,11 @@ type RetrieveResultItem struct {
// The identifier of the relevant passage result.
Id *string
+ // The confidence score bucket for a retrieved passage result. The confidence
+ // bucket provides a relative ranking that indicates how confident Amazon Kendra is
+ // that the response is relevant to the query.
+ ScoreAttributes *ScoreAttributes
+
noSmithyDocumentSerde
}