// Code generated by smithy-go-codegen DO NOT EDIT.

//go:build request_snapshot

package cloudwatchevents

import (
	"bytes"
	"context"
	"errors"
	"fmt"
	"github.com/aws/aws-sdk-go-v2/service/cloudwatchevents/types"
	smithyendpoints "github.com/aws/smithy-go/endpoints"
	"github.com/aws/smithy-go/middleware"
	"github.com/aws/smithy-go/ptr"
	smithyhttp "github.com/aws/smithy-go/transport/http"
	"io"
	"io/fs"
	"net/url"
	"os"
	"slices"
	"strings"
	"testing"
	"time"
)

const serdeSSPrefix = "request_snapshot"

// errSerdeSnapshotOK is returned by the capture middleware to abort the request
// pipeline once the serialized request has been captured, so no network call is
// made. It is a control signal, not a failure.
var errSerdeSnapshotOK = errors.New("serde snapshot: request captured")

func serdeCreatePath(path string) (*os.File, error) {
	if err := os.MkdirAll(serdeSSPrefix, 0700); err != nil && !errors.Is(err, fs.ErrExist) {
		return nil, err
	}
	return os.Create(path)
}

func serdeSSPath(op string) string {
	return fmt.Sprintf("%s/%s.request.snap", serdeSSPrefix, op)
}

type captureSerdeRequestMiddleware struct {
	body     *bytes.Buffer
	method   *string
	rawPath  *string
	rawQuery *string
	header   *map[string][]string
}

func (*captureSerdeRequestMiddleware) ID() string { return "captureSerdeRequest" }

func (m *captureSerdeRequestMiddleware) HandleFinalize(
	ctx context.Context, input middleware.FinalizeInput, next middleware.FinalizeHandler,
) (
	middleware.FinalizeOutput, middleware.Metadata, error,
) {
	req, ok := input.Request.(*smithyhttp.Request)
	if !ok {
		return middleware.FinalizeOutput{}, middleware.Metadata{}, fmt.Errorf("unexpected transport type %T", input.Request)
	}

	built := req.Build(ctx)
	*m.method = built.Method
	*m.rawPath = built.URL.RawPath
	if *m.rawPath == "" {
		*m.rawPath = built.URL.Path
	}
	*m.rawQuery = built.URL.RawQuery
	*m.header = built.Header

	if built.Body != nil {
		if _, err := io.Copy(m.body, built.Body); err != nil {
			return middleware.FinalizeOutput{}, middleware.Metadata{}, err
		}
	}

	return middleware.FinalizeOutput{}, middleware.Metadata{}, errSerdeSnapshotOK
}

func serdeFormatRequest(method, rawPath, rawQuery string, header map[string][]string, body []byte) string {
	skipHeaders := map[string]bool{
		"Authorization":         true,
		"User-Agent":            true,
		"X-Amz-Date":            true,
		"X-Amz-Security-Token":  true,
		"Amz-Sdk-Invocation-Id": true,
		"Amz-Sdk-Request":       true,
	}

	var sb strings.Builder
	sb.WriteString(method)
	sb.WriteString(" ")
	sb.WriteString(rawPath)
	if rawQuery != "" {
		sb.WriteString("?")
		sb.WriteString(rawQuery)
	}
	sb.WriteString("\n\n")

	keys := make([]string, 0, len(header))
	for k := range header {
		if skipHeaders[k] {
			continue
		}
		keys = append(keys, k)
	}
	slices.Sort(keys)
	for _, k := range keys {
		for _, v := range header[k] {
			sb.WriteString(k)
			sb.WriteString(": ")
			sb.WriteString(v)
			sb.WriteString("\n")
		}
	}
	sb.WriteString("\n")
	if len(body) > 0 {
		sb.Write(body)
	}
	return sb.String()
}

func serdeUpdateSnapshot(method, rawPath, rawQuery string, header map[string][]string, body []byte, operation string) error {
	content := serdeFormatRequest(method, rawPath, rawQuery, header, body)
	// Leave the snapshot untouched if it's semantically equal to the new one.
	// Some protocols (rpcv2Cbor) serialize map/struct fields in a nondeterministic
	// byte order, so a blind rewrite would churn the file on every run.
	if existing, err := os.ReadFile(serdeSSPath(operation)); err == nil {
		prefix := serdeFormatRequest(method, rawPath, rawQuery, header, nil)
		if strings.HasPrefix(string(existing), prefix) &&
			serdeBodyEqual(body, []byte(string(existing)[len(prefix):])) {
			return nil
		}
	}
	f, err := serdeCreatePath(serdeSSPath(operation))
	if err != nil {
		return err
	}
	defer f.Close()
	if _, err := f.Write([]byte(content)); err != nil {
		return err
	}
	return nil
}

func serdeTestSnapshot(method, rawPath, rawQuery string, header map[string][]string, body []byte, operation string) error {
	f, err := os.Open(serdeSSPath(operation))
	if errors.Is(err, fs.ErrNotExist) {
		return nil
	}
	if err != nil {
		return err
	}
	defer f.Close()
	expected, err := io.ReadAll(f)
	if err != nil {
		return err
	}
	prefix := serdeFormatRequest(method, rawPath, rawQuery, header, nil)
	if !strings.HasPrefix(string(expected), prefix) ||
		!serdeBodyEqual(body, []byte(string(expected)[len(prefix):])) {
		content := serdeFormatRequest(method, rawPath, rawQuery, header, body)
		return fmt.Errorf("serde snapshot mismatch for %s:\nGOT:\n%s:\nEXPECTED:\n%s", operation, content, string(expected))
	}
	return nil
}

type serdeEndpointResolver struct{}

func (*serdeEndpointResolver) ResolveEndpoint(ctx context.Context, params EndpointParameters) (smithyendpoints.Endpoint, error) {
	return smithyendpoints.Endpoint{URI: url.URL{Scheme: "https", Host: "test.example.com"}}, nil
}

func serdeNewClient() *Client {
	return New(Options{
		Region:             "us-east-1",
		EndpointResolverV2: &serdeEndpointResolver{},
	})
}
func serdeBodyEqual(got, expected []byte) bool {
	return bytes.Equal(got, expected)
}
func TestCheckRequestSnapshot_ActivateEventSource(t *testing.T) {
	input := &ActivateEventSourceInput{
		Name: ptr.String("__Name__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ActivateEventSource(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "ActivateEventSource"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_CancelReplay(t *testing.T) {
	input := &CancelReplayInput{
		ReplayName: ptr.String("__ReplayName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CancelReplay(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "CancelReplay"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_CreateApiDestination(t *testing.T) {
	input := &CreateApiDestinationInput{
		Name:                         ptr.String("__Name__"),
		Description:                  ptr.String("__Description__"),
		ConnectionArn:                ptr.String("__ConnectionArn__"),
		InvocationEndpoint:           ptr.String("__InvocationEndpoint__"),
		HttpMethod:                   types.ApiDestinationHttpMethod("POST"),
		InvocationRateLimitPerSecond: ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateApiDestination(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "CreateApiDestination"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_CreateArchive(t *testing.T) {
	input := &CreateArchiveInput{
		ArchiveName:    ptr.String("__ArchiveName__"),
		EventSourceArn: ptr.String("__EventSourceArn__"),
		Description:    ptr.String("__Description__"),
		EventPattern:   ptr.String("__EventPattern__"),
		RetentionDays:  ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateArchive(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "CreateArchive"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_CreateConnection(t *testing.T) {
	input := &CreateConnectionInput{
		Name:              ptr.String("__Name__"),
		Description:       ptr.String("__Description__"),
		AuthorizationType: types.ConnectionAuthorizationType("BASIC"),
		AuthParameters: &types.CreateConnectionAuthRequestParameters{
			BasicAuthParameters: &types.CreateConnectionBasicAuthRequestParameters{
				Username: ptr.String("__Username__"),
				Password: ptr.String("__Password__"),
			},
			OAuthParameters: &types.CreateConnectionOAuthRequestParameters{
				ClientParameters: &types.CreateConnectionOAuthClientRequestParameters{
					ClientID:     ptr.String("__ClientID__"),
					ClientSecret: ptr.String("__ClientSecret__"),
				},
				AuthorizationEndpoint: ptr.String("__AuthorizationEndpoint__"),
				HttpMethod:            types.ConnectionOAuthHttpMethod("GET"),
				OAuthHttpParameters: &types.ConnectionHttpParameters{
					HeaderParameters: []types.ConnectionHeaderParameter{
						{
							Key:           ptr.String("__Key__"),
							Value:         ptr.String("__Value__"),
							IsValueSecret: true,
						},
						{
							Key:           ptr.String("__Key__"),
							Value:         ptr.String("__Value__"),
							IsValueSecret: true,
						},
					},
					QueryStringParameters: []types.ConnectionQueryStringParameter{
						{
							Key:           ptr.String("__Key__"),
							Value:         ptr.String("__Value__"),
							IsValueSecret: true,
						},
						{
							Key:           ptr.String("__Key__"),
							Value:         ptr.String("__Value__"),
							IsValueSecret: true,
						},
					},
					BodyParameters: []types.ConnectionBodyParameter{
						{
							Key:           ptr.String("__Key__"),
							Value:         ptr.String("__Value__"),
							IsValueSecret: true,
						},
						{
							Key:           ptr.String("__Key__"),
							Value:         ptr.String("__Value__"),
							IsValueSecret: true,
						},
					},
				},
			},
			ApiKeyAuthParameters: &types.CreateConnectionApiKeyAuthRequestParameters{
				ApiKeyName:  ptr.String("__ApiKeyName__"),
				ApiKeyValue: ptr.String("__ApiKeyValue__"),
			},
			InvocationHttpParameters: &types.ConnectionHttpParameters{
				HeaderParameters: []types.ConnectionHeaderParameter{
					{
						Key:           ptr.String("__Key__"),
						Value:         ptr.String("__Value__"),
						IsValueSecret: true,
					},
					{
						Key:           ptr.String("__Key__"),
						Value:         ptr.String("__Value__"),
						IsValueSecret: true,
					},
				},
				QueryStringParameters: []types.ConnectionQueryStringParameter{
					{
						Key:           ptr.String("__Key__"),
						Value:         ptr.String("__Value__"),
						IsValueSecret: true,
					},
					{
						Key:           ptr.String("__Key__"),
						Value:         ptr.String("__Value__"),
						IsValueSecret: true,
					},
				},
				BodyParameters: []types.ConnectionBodyParameter{
					{
						Key:           ptr.String("__Key__"),
						Value:         ptr.String("__Value__"),
						IsValueSecret: true,
					},
					{
						Key:           ptr.String("__Key__"),
						Value:         ptr.String("__Value__"),
						IsValueSecret: true,
					},
				},
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateConnection(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "CreateConnection"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_CreateEventBus(t *testing.T) {
	input := &CreateEventBusInput{
		Name:            ptr.String("__Name__"),
		EventSourceName: ptr.String("__EventSourceName__"),
		Tags: []types.Tag{
			{
				Key:   ptr.String("__Key__"),
				Value: ptr.String("__Value__"),
			},
			{
				Key:   ptr.String("__Key__"),
				Value: ptr.String("__Value__"),
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateEventBus(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "CreateEventBus"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_CreatePartnerEventSource(t *testing.T) {
	input := &CreatePartnerEventSourceInput{
		Name:    ptr.String("__Name__"),
		Account: ptr.String("__Account__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreatePartnerEventSource(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "CreatePartnerEventSource"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DeactivateEventSource(t *testing.T) {
	input := &DeactivateEventSourceInput{
		Name: ptr.String("__Name__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeactivateEventSource(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DeactivateEventSource"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DeauthorizeConnection(t *testing.T) {
	input := &DeauthorizeConnectionInput{
		Name: ptr.String("__Name__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeauthorizeConnection(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DeauthorizeConnection"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DeleteApiDestination(t *testing.T) {
	input := &DeleteApiDestinationInput{
		Name: ptr.String("__Name__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteApiDestination(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DeleteApiDestination"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DeleteArchive(t *testing.T) {
	input := &DeleteArchiveInput{
		ArchiveName: ptr.String("__ArchiveName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteArchive(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DeleteArchive"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DeleteConnection(t *testing.T) {
	input := &DeleteConnectionInput{
		Name: ptr.String("__Name__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteConnection(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DeleteConnection"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DeleteEventBus(t *testing.T) {
	input := &DeleteEventBusInput{
		Name: ptr.String("__Name__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteEventBus(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DeleteEventBus"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DeletePartnerEventSource(t *testing.T) {
	input := &DeletePartnerEventSourceInput{
		Name:    ptr.String("__Name__"),
		Account: ptr.String("__Account__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeletePartnerEventSource(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DeletePartnerEventSource"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DeleteRule(t *testing.T) {
	input := &DeleteRuleInput{
		Name:         ptr.String("__Name__"),
		EventBusName: ptr.String("__EventBusName__"),
		Force:        true,
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteRule(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DeleteRule"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DescribeApiDestination(t *testing.T) {
	input := &DescribeApiDestinationInput{
		Name: ptr.String("__Name__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeApiDestination(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeApiDestination"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DescribeArchive(t *testing.T) {
	input := &DescribeArchiveInput{
		ArchiveName: ptr.String("__ArchiveName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeArchive(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeArchive"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DescribeConnection(t *testing.T) {
	input := &DescribeConnectionInput{
		Name: ptr.String("__Name__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeConnection(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeConnection"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DescribeEventBus(t *testing.T) {
	input := &DescribeEventBusInput{
		Name: ptr.String("__Name__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeEventBus(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeEventBus"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DescribeEventSource(t *testing.T) {
	input := &DescribeEventSourceInput{
		Name: ptr.String("__Name__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeEventSource(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeEventSource"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DescribePartnerEventSource(t *testing.T) {
	input := &DescribePartnerEventSourceInput{
		Name: ptr.String("__Name__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribePartnerEventSource(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribePartnerEventSource"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DescribeReplay(t *testing.T) {
	input := &DescribeReplayInput{
		ReplayName: ptr.String("__ReplayName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeReplay(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeReplay"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DescribeRule(t *testing.T) {
	input := &DescribeRuleInput{
		Name:         ptr.String("__Name__"),
		EventBusName: ptr.String("__EventBusName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeRule(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeRule"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DisableRule(t *testing.T) {
	input := &DisableRuleInput{
		Name:         ptr.String("__Name__"),
		EventBusName: ptr.String("__EventBusName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DisableRule(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DisableRule"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_EnableRule(t *testing.T) {
	input := &EnableRuleInput{
		Name:         ptr.String("__Name__"),
		EventBusName: ptr.String("__EventBusName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.EnableRule(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "EnableRule"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListApiDestinations(t *testing.T) {
	input := &ListApiDestinationsInput{
		NamePrefix:    ptr.String("__NamePrefix__"),
		ConnectionArn: ptr.String("__ConnectionArn__"),
		NextToken:     ptr.String("__NextToken__"),
		Limit:         ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListApiDestinations(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "ListApiDestinations"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListArchives(t *testing.T) {
	input := &ListArchivesInput{
		NamePrefix:     ptr.String("__NamePrefix__"),
		EventSourceArn: ptr.String("__EventSourceArn__"),
		State:          types.ArchiveState("ENABLED"),
		NextToken:      ptr.String("__NextToken__"),
		Limit:          ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListArchives(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "ListArchives"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListConnections(t *testing.T) {
	input := &ListConnectionsInput{
		NamePrefix:      ptr.String("__NamePrefix__"),
		ConnectionState: types.ConnectionState("CREATING"),
		NextToken:       ptr.String("__NextToken__"),
		Limit:           ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListConnections(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "ListConnections"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListEventBuses(t *testing.T) {
	input := &ListEventBusesInput{
		NamePrefix: ptr.String("__NamePrefix__"),
		NextToken:  ptr.String("__NextToken__"),
		Limit:      ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListEventBuses(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "ListEventBuses"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListEventSources(t *testing.T) {
	input := &ListEventSourcesInput{
		NamePrefix: ptr.String("__NamePrefix__"),
		NextToken:  ptr.String("__NextToken__"),
		Limit:      ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListEventSources(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "ListEventSources"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListPartnerEventSourceAccounts(t *testing.T) {
	input := &ListPartnerEventSourceAccountsInput{
		EventSourceName: ptr.String("__EventSourceName__"),
		NextToken:       ptr.String("__NextToken__"),
		Limit:           ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListPartnerEventSourceAccounts(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "ListPartnerEventSourceAccounts"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListPartnerEventSources(t *testing.T) {
	input := &ListPartnerEventSourcesInput{
		NamePrefix: ptr.String("__NamePrefix__"),
		NextToken:  ptr.String("__NextToken__"),
		Limit:      ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListPartnerEventSources(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "ListPartnerEventSources"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListReplays(t *testing.T) {
	input := &ListReplaysInput{
		NamePrefix:     ptr.String("__NamePrefix__"),
		State:          types.ReplayState("STARTING"),
		EventSourceArn: ptr.String("__EventSourceArn__"),
		NextToken:      ptr.String("__NextToken__"),
		Limit:          ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListReplays(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "ListReplays"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListRuleNamesByTarget(t *testing.T) {
	input := &ListRuleNamesByTargetInput{
		TargetArn:    ptr.String("__TargetArn__"),
		EventBusName: ptr.String("__EventBusName__"),
		NextToken:    ptr.String("__NextToken__"),
		Limit:        ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListRuleNamesByTarget(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "ListRuleNamesByTarget"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListRules(t *testing.T) {
	input := &ListRulesInput{
		NamePrefix:   ptr.String("__NamePrefix__"),
		EventBusName: ptr.String("__EventBusName__"),
		NextToken:    ptr.String("__NextToken__"),
		Limit:        ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListRules(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "ListRules"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListTagsForResource(t *testing.T) {
	input := &ListTagsForResourceInput{
		ResourceARN: ptr.String("__ResourceARN__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListTagsForResource(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "ListTagsForResource"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListTargetsByRule(t *testing.T) {
	input := &ListTargetsByRuleInput{
		Rule:         ptr.String("__Rule__"),
		EventBusName: ptr.String("__EventBusName__"),
		NextToken:    ptr.String("__NextToken__"),
		Limit:        ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListTargetsByRule(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "ListTargetsByRule"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_PutEvents(t *testing.T) {
	input := &PutEventsInput{
		Entries: []types.PutEventsRequestEntry{
			{
				Time:   ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				Source: ptr.String("__Source__"),
				Resources: []string{
					"__Member__",
					"__Member__",
				},
				DetailType:   ptr.String("__DetailType__"),
				Detail:       ptr.String("__Detail__"),
				EventBusName: ptr.String("__EventBusName__"),
				TraceHeader:  ptr.String("__TraceHeader__"),
			},
			{
				Time:   ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				Source: ptr.String("__Source__"),
				Resources: []string{
					"__Member__",
					"__Member__",
				},
				DetailType:   ptr.String("__DetailType__"),
				Detail:       ptr.String("__Detail__"),
				EventBusName: ptr.String("__EventBusName__"),
				TraceHeader:  ptr.String("__TraceHeader__"),
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.PutEvents(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "PutEvents"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_PutPartnerEvents(t *testing.T) {
	input := &PutPartnerEventsInput{
		Entries: []types.PutPartnerEventsRequestEntry{
			{
				Time:   ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				Source: ptr.String("__Source__"),
				Resources: []string{
					"__Member__",
					"__Member__",
				},
				DetailType: ptr.String("__DetailType__"),
				Detail:     ptr.String("__Detail__"),
			},
			{
				Time:   ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				Source: ptr.String("__Source__"),
				Resources: []string{
					"__Member__",
					"__Member__",
				},
				DetailType: ptr.String("__DetailType__"),
				Detail:     ptr.String("__Detail__"),
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.PutPartnerEvents(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "PutPartnerEvents"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_PutPermission(t *testing.T) {
	input := &PutPermissionInput{
		EventBusName: ptr.String("__EventBusName__"),
		Action:       ptr.String("__Action__"),
		Principal:    ptr.String("__Principal__"),
		StatementId:  ptr.String("__StatementId__"),
		Condition: &types.Condition{
			Type:  ptr.String("__Type__"),
			Key:   ptr.String("__Key__"),
			Value: ptr.String("__Value__"),
		},
		Policy: ptr.String("__Policy__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.PutPermission(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "PutPermission"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_PutRule(t *testing.T) {
	input := &PutRuleInput{
		Name:               ptr.String("__Name__"),
		ScheduleExpression: ptr.String("__ScheduleExpression__"),
		EventPattern:       ptr.String("__EventPattern__"),
		State:              types.RuleState("ENABLED"),
		Description:        ptr.String("__Description__"),
		RoleArn:            ptr.String("__RoleArn__"),
		Tags: []types.Tag{
			{
				Key:   ptr.String("__Key__"),
				Value: ptr.String("__Value__"),
			},
			{
				Key:   ptr.String("__Key__"),
				Value: ptr.String("__Value__"),
			},
		},
		EventBusName: ptr.String("__EventBusName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.PutRule(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "PutRule"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_PutTargets(t *testing.T) {
	input := &PutTargetsInput{
		Rule:         ptr.String("__Rule__"),
		EventBusName: ptr.String("__EventBusName__"),
		Targets: []types.Target{
			{
				Id:        ptr.String("__Id__"),
				Arn:       ptr.String("__Arn__"),
				RoleArn:   ptr.String("__RoleArn__"),
				Input:     ptr.String("__Input__"),
				InputPath: ptr.String("__InputPath__"),
				InputTransformer: &types.InputTransformer{
					InputPathsMap: map[string]string{
						"key0": "__Value__",
					},
					InputTemplate: ptr.String("__InputTemplate__"),
				},
				KinesisParameters: &types.KinesisParameters{
					PartitionKeyPath: ptr.String("__PartitionKeyPath__"),
				},
				RunCommandParameters: &types.RunCommandParameters{
					RunCommandTargets: []types.RunCommandTarget{
						{
							Key: ptr.String("__Key__"),
							Values: []string{
								"__Member__",
								"__Member__",
							},
						},
						{
							Key: ptr.String("__Key__"),
							Values: []string{
								"__Member__",
								"__Member__",
							},
						},
					},
				},
				EcsParameters: &types.EcsParameters{
					TaskDefinitionArn: ptr.String("__TaskDefinitionArn__"),
					TaskCount:         ptr.Int32(1),
					LaunchType:        types.LaunchType("EC2"),
					NetworkConfiguration: &types.NetworkConfiguration{
						AwsvpcConfiguration: &types.AwsVpcConfiguration{
							Subnets: []string{
								"__Member__",
								"__Member__",
							},
							SecurityGroups: []string{
								"__Member__",
								"__Member__",
							},
							AssignPublicIp: types.AssignPublicIp("ENABLED"),
						},
					},
					PlatformVersion: ptr.String("__PlatformVersion__"),
					Group:           ptr.String("__Group__"),
					CapacityProviderStrategy: []types.CapacityProviderStrategyItem{
						{
							CapacityProvider: ptr.String("__CapacityProvider__"),
							Weight:           1,
							Base:             1,
						},
						{
							CapacityProvider: ptr.String("__CapacityProvider__"),
							Weight:           1,
							Base:             1,
						},
					},
					EnableECSManagedTags: true,
					EnableExecuteCommand: true,
					PlacementConstraints: []types.PlacementConstraint{
						{
							Type:       types.PlacementConstraintType("distinctInstance"),
							Expression: ptr.String("__Expression__"),
						},
						{
							Type:       types.PlacementConstraintType("distinctInstance"),
							Expression: ptr.String("__Expression__"),
						},
					},
					PlacementStrategy: []types.PlacementStrategy{
						{
							Type:  types.PlacementStrategyType("random"),
							Field: ptr.String("__Field__"),
						},
						{
							Type:  types.PlacementStrategyType("random"),
							Field: ptr.String("__Field__"),
						},
					},
					PropagateTags: types.PropagateTags("TASK_DEFINITION"),
					ReferenceId:   ptr.String("__ReferenceId__"),
					Tags: []types.Tag{
						{
							Key:   ptr.String("__Key__"),
							Value: ptr.String("__Value__"),
						},
						{
							Key:   ptr.String("__Key__"),
							Value: ptr.String("__Value__"),
						},
					},
				},
				BatchParameters: &types.BatchParameters{
					JobDefinition: ptr.String("__JobDefinition__"),
					JobName:       ptr.String("__JobName__"),
					ArrayProperties: &types.BatchArrayProperties{
						Size: 1,
					},
					RetryStrategy: &types.BatchRetryStrategy{
						Attempts: 1,
					},
				},
				SqsParameters: &types.SqsParameters{
					MessageGroupId: ptr.String("__MessageGroupId__"),
				},
				HttpParameters: &types.HttpParameters{
					PathParameterValues: []string{
						"__Member__",
						"__Member__",
					},
					HeaderParameters: map[string]string{
						"key0": "__Value__",
					},
					QueryStringParameters: map[string]string{
						"key0": "__Value__",
					},
				},
				RedshiftDataParameters: &types.RedshiftDataParameters{
					SecretManagerArn: ptr.String("__SecretManagerArn__"),
					Database:         ptr.String("__Database__"),
					DbUser:           ptr.String("__DbUser__"),
					Sql:              ptr.String("__Sql__"),
					StatementName:    ptr.String("__StatementName__"),
					WithEvent:        true,
				},
				SageMakerPipelineParameters: &types.SageMakerPipelineParameters{
					PipelineParameterList: []types.SageMakerPipelineParameter{
						{
							Name:  ptr.String("__Name__"),
							Value: ptr.String("__Value__"),
						},
						{
							Name:  ptr.String("__Name__"),
							Value: ptr.String("__Value__"),
						},
					},
				},
				DeadLetterConfig: &types.DeadLetterConfig{
					Arn: ptr.String("__Arn__"),
				},
				RetryPolicy: &types.RetryPolicy{
					MaximumRetryAttempts:     ptr.Int32(1),
					MaximumEventAgeInSeconds: ptr.Int32(1),
				},
			},
			{
				Id:        ptr.String("__Id__"),
				Arn:       ptr.String("__Arn__"),
				RoleArn:   ptr.String("__RoleArn__"),
				Input:     ptr.String("__Input__"),
				InputPath: ptr.String("__InputPath__"),
				InputTransformer: &types.InputTransformer{
					InputPathsMap: map[string]string{
						"key0": "__Value__",
					},
					InputTemplate: ptr.String("__InputTemplate__"),
				},
				KinesisParameters: &types.KinesisParameters{
					PartitionKeyPath: ptr.String("__PartitionKeyPath__"),
				},
				RunCommandParameters: &types.RunCommandParameters{
					RunCommandTargets: []types.RunCommandTarget{
						{
							Key: ptr.String("__Key__"),
							Values: []string{
								"__Member__",
								"__Member__",
							},
						},
						{
							Key: ptr.String("__Key__"),
							Values: []string{
								"__Member__",
								"__Member__",
							},
						},
					},
				},
				EcsParameters: &types.EcsParameters{
					TaskDefinitionArn: ptr.String("__TaskDefinitionArn__"),
					TaskCount:         ptr.Int32(1),
					LaunchType:        types.LaunchType("EC2"),
					NetworkConfiguration: &types.NetworkConfiguration{
						AwsvpcConfiguration: &types.AwsVpcConfiguration{
							Subnets: []string{
								"__Member__",
								"__Member__",
							},
							SecurityGroups: []string{
								"__Member__",
								"__Member__",
							},
							AssignPublicIp: types.AssignPublicIp("ENABLED"),
						},
					},
					PlatformVersion: ptr.String("__PlatformVersion__"),
					Group:           ptr.String("__Group__"),
					CapacityProviderStrategy: []types.CapacityProviderStrategyItem{
						{
							CapacityProvider: ptr.String("__CapacityProvider__"),
							Weight:           1,
							Base:             1,
						},
						{
							CapacityProvider: ptr.String("__CapacityProvider__"),
							Weight:           1,
							Base:             1,
						},
					},
					EnableECSManagedTags: true,
					EnableExecuteCommand: true,
					PlacementConstraints: []types.PlacementConstraint{
						{
							Type:       types.PlacementConstraintType("distinctInstance"),
							Expression: ptr.String("__Expression__"),
						},
						{
							Type:       types.PlacementConstraintType("distinctInstance"),
							Expression: ptr.String("__Expression__"),
						},
					},
					PlacementStrategy: []types.PlacementStrategy{
						{
							Type:  types.PlacementStrategyType("random"),
							Field: ptr.String("__Field__"),
						},
						{
							Type:  types.PlacementStrategyType("random"),
							Field: ptr.String("__Field__"),
						},
					},
					PropagateTags: types.PropagateTags("TASK_DEFINITION"),
					ReferenceId:   ptr.String("__ReferenceId__"),
					Tags: []types.Tag{
						{
							Key:   ptr.String("__Key__"),
							Value: ptr.String("__Value__"),
						},
						{
							Key:   ptr.String("__Key__"),
							Value: ptr.String("__Value__"),
						},
					},
				},
				BatchParameters: &types.BatchParameters{
					JobDefinition: ptr.String("__JobDefinition__"),
					JobName:       ptr.String("__JobName__"),
					ArrayProperties: &types.BatchArrayProperties{
						Size: 1,
					},
					RetryStrategy: &types.BatchRetryStrategy{
						Attempts: 1,
					},
				},
				SqsParameters: &types.SqsParameters{
					MessageGroupId: ptr.String("__MessageGroupId__"),
				},
				HttpParameters: &types.HttpParameters{
					PathParameterValues: []string{
						"__Member__",
						"__Member__",
					},
					HeaderParameters: map[string]string{
						"key0": "__Value__",
					},
					QueryStringParameters: map[string]string{
						"key0": "__Value__",
					},
				},
				RedshiftDataParameters: &types.RedshiftDataParameters{
					SecretManagerArn: ptr.String("__SecretManagerArn__"),
					Database:         ptr.String("__Database__"),
					DbUser:           ptr.String("__DbUser__"),
					Sql:              ptr.String("__Sql__"),
					StatementName:    ptr.String("__StatementName__"),
					WithEvent:        true,
				},
				SageMakerPipelineParameters: &types.SageMakerPipelineParameters{
					PipelineParameterList: []types.SageMakerPipelineParameter{
						{
							Name:  ptr.String("__Name__"),
							Value: ptr.String("__Value__"),
						},
						{
							Name:  ptr.String("__Name__"),
							Value: ptr.String("__Value__"),
						},
					},
				},
				DeadLetterConfig: &types.DeadLetterConfig{
					Arn: ptr.String("__Arn__"),
				},
				RetryPolicy: &types.RetryPolicy{
					MaximumRetryAttempts:     ptr.Int32(1),
					MaximumEventAgeInSeconds: ptr.Int32(1),
				},
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.PutTargets(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "PutTargets"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_RemovePermission(t *testing.T) {
	input := &RemovePermissionInput{
		StatementId:          ptr.String("__StatementId__"),
		RemoveAllPermissions: true,
		EventBusName:         ptr.String("__EventBusName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.RemovePermission(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "RemovePermission"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_RemoveTargets(t *testing.T) {
	input := &RemoveTargetsInput{
		Rule:         ptr.String("__Rule__"),
		EventBusName: ptr.String("__EventBusName__"),
		Ids: []string{
			"__Member__",
			"__Member__",
		},
		Force: true,
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.RemoveTargets(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "RemoveTargets"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_StartReplay(t *testing.T) {
	input := &StartReplayInput{
		ReplayName:     ptr.String("__ReplayName__"),
		Description:    ptr.String("__Description__"),
		EventSourceArn: ptr.String("__EventSourceArn__"),
		EventStartTime: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
		EventEndTime:   ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
		Destination: &types.ReplayDestination{
			Arn: ptr.String("__Arn__"),
			FilterArns: []string{
				"__Member__",
				"__Member__",
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.StartReplay(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "StartReplay"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_TagResource(t *testing.T) {
	input := &TagResourceInput{
		ResourceARN: ptr.String("__ResourceARN__"),
		Tags: []types.Tag{
			{
				Key:   ptr.String("__Key__"),
				Value: ptr.String("__Value__"),
			},
			{
				Key:   ptr.String("__Key__"),
				Value: ptr.String("__Value__"),
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.TagResource(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "TagResource"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_TestEventPattern(t *testing.T) {
	input := &TestEventPatternInput{
		EventPattern: ptr.String("__EventPattern__"),
		Event:        ptr.String("__Event__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.TestEventPattern(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "TestEventPattern"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_UntagResource(t *testing.T) {
	input := &UntagResourceInput{
		ResourceARN: ptr.String("__ResourceARN__"),
		TagKeys: []string{
			"__Member__",
			"__Member__",
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UntagResource(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "UntagResource"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_UpdateApiDestination(t *testing.T) {
	input := &UpdateApiDestinationInput{
		Name:                         ptr.String("__Name__"),
		Description:                  ptr.String("__Description__"),
		ConnectionArn:                ptr.String("__ConnectionArn__"),
		InvocationEndpoint:           ptr.String("__InvocationEndpoint__"),
		HttpMethod:                   types.ApiDestinationHttpMethod("POST"),
		InvocationRateLimitPerSecond: ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateApiDestination(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "UpdateApiDestination"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_UpdateArchive(t *testing.T) {
	input := &UpdateArchiveInput{
		ArchiveName:   ptr.String("__ArchiveName__"),
		Description:   ptr.String("__Description__"),
		EventPattern:  ptr.String("__EventPattern__"),
		RetentionDays: ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateArchive(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "UpdateArchive"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_UpdateConnection(t *testing.T) {
	input := &UpdateConnectionInput{
		Name:              ptr.String("__Name__"),
		Description:       ptr.String("__Description__"),
		AuthorizationType: types.ConnectionAuthorizationType("BASIC"),
		AuthParameters: &types.UpdateConnectionAuthRequestParameters{
			BasicAuthParameters: &types.UpdateConnectionBasicAuthRequestParameters{
				Username: ptr.String("__Username__"),
				Password: ptr.String("__Password__"),
			},
			OAuthParameters: &types.UpdateConnectionOAuthRequestParameters{
				ClientParameters: &types.UpdateConnectionOAuthClientRequestParameters{
					ClientID:     ptr.String("__ClientID__"),
					ClientSecret: ptr.String("__ClientSecret__"),
				},
				AuthorizationEndpoint: ptr.String("__AuthorizationEndpoint__"),
				HttpMethod:            types.ConnectionOAuthHttpMethod("GET"),
				OAuthHttpParameters: &types.ConnectionHttpParameters{
					HeaderParameters: []types.ConnectionHeaderParameter{
						{
							Key:           ptr.String("__Key__"),
							Value:         ptr.String("__Value__"),
							IsValueSecret: true,
						},
						{
							Key:           ptr.String("__Key__"),
							Value:         ptr.String("__Value__"),
							IsValueSecret: true,
						},
					},
					QueryStringParameters: []types.ConnectionQueryStringParameter{
						{
							Key:           ptr.String("__Key__"),
							Value:         ptr.String("__Value__"),
							IsValueSecret: true,
						},
						{
							Key:           ptr.String("__Key__"),
							Value:         ptr.String("__Value__"),
							IsValueSecret: true,
						},
					},
					BodyParameters: []types.ConnectionBodyParameter{
						{
							Key:           ptr.String("__Key__"),
							Value:         ptr.String("__Value__"),
							IsValueSecret: true,
						},
						{
							Key:           ptr.String("__Key__"),
							Value:         ptr.String("__Value__"),
							IsValueSecret: true,
						},
					},
				},
			},
			ApiKeyAuthParameters: &types.UpdateConnectionApiKeyAuthRequestParameters{
				ApiKeyName:  ptr.String("__ApiKeyName__"),
				ApiKeyValue: ptr.String("__ApiKeyValue__"),
			},
			InvocationHttpParameters: &types.ConnectionHttpParameters{
				HeaderParameters: []types.ConnectionHeaderParameter{
					{
						Key:           ptr.String("__Key__"),
						Value:         ptr.String("__Value__"),
						IsValueSecret: true,
					},
					{
						Key:           ptr.String("__Key__"),
						Value:         ptr.String("__Value__"),
						IsValueSecret: true,
					},
				},
				QueryStringParameters: []types.ConnectionQueryStringParameter{
					{
						Key:           ptr.String("__Key__"),
						Value:         ptr.String("__Value__"),
						IsValueSecret: true,
					},
					{
						Key:           ptr.String("__Key__"),
						Value:         ptr.String("__Value__"),
						IsValueSecret: true,
					},
				},
				BodyParameters: []types.ConnectionBodyParameter{
					{
						Key:           ptr.String("__Key__"),
						Value:         ptr.String("__Value__"),
						IsValueSecret: true,
					},
					{
						Key:           ptr.String("__Key__"),
						Value:         ptr.String("__Value__"),
						IsValueSecret: true,
					},
				},
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateConnection(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "UpdateConnection"); err != nil {
		t.Fatal(err)
	}
}
func TestUpdateRequestSnapshot_ActivateEventSource(t *testing.T) {
	input := &ActivateEventSourceInput{
		Name: ptr.String("__Name__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ActivateEventSource(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "ActivateEventSource"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_CancelReplay(t *testing.T) {
	input := &CancelReplayInput{
		ReplayName: ptr.String("__ReplayName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CancelReplay(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "CancelReplay"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_CreateApiDestination(t *testing.T) {
	input := &CreateApiDestinationInput{
		Name:                         ptr.String("__Name__"),
		Description:                  ptr.String("__Description__"),
		ConnectionArn:                ptr.String("__ConnectionArn__"),
		InvocationEndpoint:           ptr.String("__InvocationEndpoint__"),
		HttpMethod:                   types.ApiDestinationHttpMethod("POST"),
		InvocationRateLimitPerSecond: ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateApiDestination(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "CreateApiDestination"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_CreateArchive(t *testing.T) {
	input := &CreateArchiveInput{
		ArchiveName:    ptr.String("__ArchiveName__"),
		EventSourceArn: ptr.String("__EventSourceArn__"),
		Description:    ptr.String("__Description__"),
		EventPattern:   ptr.String("__EventPattern__"),
		RetentionDays:  ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateArchive(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "CreateArchive"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_CreateConnection(t *testing.T) {
	input := &CreateConnectionInput{
		Name:              ptr.String("__Name__"),
		Description:       ptr.String("__Description__"),
		AuthorizationType: types.ConnectionAuthorizationType("BASIC"),
		AuthParameters: &types.CreateConnectionAuthRequestParameters{
			BasicAuthParameters: &types.CreateConnectionBasicAuthRequestParameters{
				Username: ptr.String("__Username__"),
				Password: ptr.String("__Password__"),
			},
			OAuthParameters: &types.CreateConnectionOAuthRequestParameters{
				ClientParameters: &types.CreateConnectionOAuthClientRequestParameters{
					ClientID:     ptr.String("__ClientID__"),
					ClientSecret: ptr.String("__ClientSecret__"),
				},
				AuthorizationEndpoint: ptr.String("__AuthorizationEndpoint__"),
				HttpMethod:            types.ConnectionOAuthHttpMethod("GET"),
				OAuthHttpParameters: &types.ConnectionHttpParameters{
					HeaderParameters: []types.ConnectionHeaderParameter{
						{
							Key:           ptr.String("__Key__"),
							Value:         ptr.String("__Value__"),
							IsValueSecret: true,
						},
						{
							Key:           ptr.String("__Key__"),
							Value:         ptr.String("__Value__"),
							IsValueSecret: true,
						},
					},
					QueryStringParameters: []types.ConnectionQueryStringParameter{
						{
							Key:           ptr.String("__Key__"),
							Value:         ptr.String("__Value__"),
							IsValueSecret: true,
						},
						{
							Key:           ptr.String("__Key__"),
							Value:         ptr.String("__Value__"),
							IsValueSecret: true,
						},
					},
					BodyParameters: []types.ConnectionBodyParameter{
						{
							Key:           ptr.String("__Key__"),
							Value:         ptr.String("__Value__"),
							IsValueSecret: true,
						},
						{
							Key:           ptr.String("__Key__"),
							Value:         ptr.String("__Value__"),
							IsValueSecret: true,
						},
					},
				},
			},
			ApiKeyAuthParameters: &types.CreateConnectionApiKeyAuthRequestParameters{
				ApiKeyName:  ptr.String("__ApiKeyName__"),
				ApiKeyValue: ptr.String("__ApiKeyValue__"),
			},
			InvocationHttpParameters: &types.ConnectionHttpParameters{
				HeaderParameters: []types.ConnectionHeaderParameter{
					{
						Key:           ptr.String("__Key__"),
						Value:         ptr.String("__Value__"),
						IsValueSecret: true,
					},
					{
						Key:           ptr.String("__Key__"),
						Value:         ptr.String("__Value__"),
						IsValueSecret: true,
					},
				},
				QueryStringParameters: []types.ConnectionQueryStringParameter{
					{
						Key:           ptr.String("__Key__"),
						Value:         ptr.String("__Value__"),
						IsValueSecret: true,
					},
					{
						Key:           ptr.String("__Key__"),
						Value:         ptr.String("__Value__"),
						IsValueSecret: true,
					},
				},
				BodyParameters: []types.ConnectionBodyParameter{
					{
						Key:           ptr.String("__Key__"),
						Value:         ptr.String("__Value__"),
						IsValueSecret: true,
					},
					{
						Key:           ptr.String("__Key__"),
						Value:         ptr.String("__Value__"),
						IsValueSecret: true,
					},
				},
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateConnection(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "CreateConnection"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_CreateEventBus(t *testing.T) {
	input := &CreateEventBusInput{
		Name:            ptr.String("__Name__"),
		EventSourceName: ptr.String("__EventSourceName__"),
		Tags: []types.Tag{
			{
				Key:   ptr.String("__Key__"),
				Value: ptr.String("__Value__"),
			},
			{
				Key:   ptr.String("__Key__"),
				Value: ptr.String("__Value__"),
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateEventBus(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "CreateEventBus"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_CreatePartnerEventSource(t *testing.T) {
	input := &CreatePartnerEventSourceInput{
		Name:    ptr.String("__Name__"),
		Account: ptr.String("__Account__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreatePartnerEventSource(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "CreatePartnerEventSource"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DeactivateEventSource(t *testing.T) {
	input := &DeactivateEventSourceInput{
		Name: ptr.String("__Name__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeactivateEventSource(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DeactivateEventSource"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DeauthorizeConnection(t *testing.T) {
	input := &DeauthorizeConnectionInput{
		Name: ptr.String("__Name__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeauthorizeConnection(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DeauthorizeConnection"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DeleteApiDestination(t *testing.T) {
	input := &DeleteApiDestinationInput{
		Name: ptr.String("__Name__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteApiDestination(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DeleteApiDestination"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DeleteArchive(t *testing.T) {
	input := &DeleteArchiveInput{
		ArchiveName: ptr.String("__ArchiveName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteArchive(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DeleteArchive"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DeleteConnection(t *testing.T) {
	input := &DeleteConnectionInput{
		Name: ptr.String("__Name__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteConnection(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DeleteConnection"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DeleteEventBus(t *testing.T) {
	input := &DeleteEventBusInput{
		Name: ptr.String("__Name__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteEventBus(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DeleteEventBus"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DeletePartnerEventSource(t *testing.T) {
	input := &DeletePartnerEventSourceInput{
		Name:    ptr.String("__Name__"),
		Account: ptr.String("__Account__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeletePartnerEventSource(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DeletePartnerEventSource"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DeleteRule(t *testing.T) {
	input := &DeleteRuleInput{
		Name:         ptr.String("__Name__"),
		EventBusName: ptr.String("__EventBusName__"),
		Force:        true,
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteRule(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DeleteRule"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DescribeApiDestination(t *testing.T) {
	input := &DescribeApiDestinationInput{
		Name: ptr.String("__Name__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeApiDestination(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeApiDestination"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DescribeArchive(t *testing.T) {
	input := &DescribeArchiveInput{
		ArchiveName: ptr.String("__ArchiveName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeArchive(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeArchive"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DescribeConnection(t *testing.T) {
	input := &DescribeConnectionInput{
		Name: ptr.String("__Name__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeConnection(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeConnection"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DescribeEventBus(t *testing.T) {
	input := &DescribeEventBusInput{
		Name: ptr.String("__Name__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeEventBus(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeEventBus"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DescribeEventSource(t *testing.T) {
	input := &DescribeEventSourceInput{
		Name: ptr.String("__Name__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeEventSource(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeEventSource"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DescribePartnerEventSource(t *testing.T) {
	input := &DescribePartnerEventSourceInput{
		Name: ptr.String("__Name__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribePartnerEventSource(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribePartnerEventSource"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DescribeReplay(t *testing.T) {
	input := &DescribeReplayInput{
		ReplayName: ptr.String("__ReplayName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeReplay(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeReplay"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DescribeRule(t *testing.T) {
	input := &DescribeRuleInput{
		Name:         ptr.String("__Name__"),
		EventBusName: ptr.String("__EventBusName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeRule(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeRule"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DisableRule(t *testing.T) {
	input := &DisableRuleInput{
		Name:         ptr.String("__Name__"),
		EventBusName: ptr.String("__EventBusName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DisableRule(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DisableRule"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_EnableRule(t *testing.T) {
	input := &EnableRuleInput{
		Name:         ptr.String("__Name__"),
		EventBusName: ptr.String("__EventBusName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.EnableRule(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "EnableRule"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListApiDestinations(t *testing.T) {
	input := &ListApiDestinationsInput{
		NamePrefix:    ptr.String("__NamePrefix__"),
		ConnectionArn: ptr.String("__ConnectionArn__"),
		NextToken:     ptr.String("__NextToken__"),
		Limit:         ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListApiDestinations(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "ListApiDestinations"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListArchives(t *testing.T) {
	input := &ListArchivesInput{
		NamePrefix:     ptr.String("__NamePrefix__"),
		EventSourceArn: ptr.String("__EventSourceArn__"),
		State:          types.ArchiveState("ENABLED"),
		NextToken:      ptr.String("__NextToken__"),
		Limit:          ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListArchives(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "ListArchives"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListConnections(t *testing.T) {
	input := &ListConnectionsInput{
		NamePrefix:      ptr.String("__NamePrefix__"),
		ConnectionState: types.ConnectionState("CREATING"),
		NextToken:       ptr.String("__NextToken__"),
		Limit:           ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListConnections(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "ListConnections"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListEventBuses(t *testing.T) {
	input := &ListEventBusesInput{
		NamePrefix: ptr.String("__NamePrefix__"),
		NextToken:  ptr.String("__NextToken__"),
		Limit:      ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListEventBuses(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "ListEventBuses"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListEventSources(t *testing.T) {
	input := &ListEventSourcesInput{
		NamePrefix: ptr.String("__NamePrefix__"),
		NextToken:  ptr.String("__NextToken__"),
		Limit:      ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListEventSources(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "ListEventSources"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListPartnerEventSourceAccounts(t *testing.T) {
	input := &ListPartnerEventSourceAccountsInput{
		EventSourceName: ptr.String("__EventSourceName__"),
		NextToken:       ptr.String("__NextToken__"),
		Limit:           ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListPartnerEventSourceAccounts(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "ListPartnerEventSourceAccounts"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListPartnerEventSources(t *testing.T) {
	input := &ListPartnerEventSourcesInput{
		NamePrefix: ptr.String("__NamePrefix__"),
		NextToken:  ptr.String("__NextToken__"),
		Limit:      ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListPartnerEventSources(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "ListPartnerEventSources"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListReplays(t *testing.T) {
	input := &ListReplaysInput{
		NamePrefix:     ptr.String("__NamePrefix__"),
		State:          types.ReplayState("STARTING"),
		EventSourceArn: ptr.String("__EventSourceArn__"),
		NextToken:      ptr.String("__NextToken__"),
		Limit:          ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListReplays(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "ListReplays"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListRuleNamesByTarget(t *testing.T) {
	input := &ListRuleNamesByTargetInput{
		TargetArn:    ptr.String("__TargetArn__"),
		EventBusName: ptr.String("__EventBusName__"),
		NextToken:    ptr.String("__NextToken__"),
		Limit:        ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListRuleNamesByTarget(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "ListRuleNamesByTarget"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListRules(t *testing.T) {
	input := &ListRulesInput{
		NamePrefix:   ptr.String("__NamePrefix__"),
		EventBusName: ptr.String("__EventBusName__"),
		NextToken:    ptr.String("__NextToken__"),
		Limit:        ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListRules(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "ListRules"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListTagsForResource(t *testing.T) {
	input := &ListTagsForResourceInput{
		ResourceARN: ptr.String("__ResourceARN__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListTagsForResource(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "ListTagsForResource"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListTargetsByRule(t *testing.T) {
	input := &ListTargetsByRuleInput{
		Rule:         ptr.String("__Rule__"),
		EventBusName: ptr.String("__EventBusName__"),
		NextToken:    ptr.String("__NextToken__"),
		Limit:        ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListTargetsByRule(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "ListTargetsByRule"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_PutEvents(t *testing.T) {
	input := &PutEventsInput{
		Entries: []types.PutEventsRequestEntry{
			{
				Time:   ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				Source: ptr.String("__Source__"),
				Resources: []string{
					"__Member__",
					"__Member__",
				},
				DetailType:   ptr.String("__DetailType__"),
				Detail:       ptr.String("__Detail__"),
				EventBusName: ptr.String("__EventBusName__"),
				TraceHeader:  ptr.String("__TraceHeader__"),
			},
			{
				Time:   ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				Source: ptr.String("__Source__"),
				Resources: []string{
					"__Member__",
					"__Member__",
				},
				DetailType:   ptr.String("__DetailType__"),
				Detail:       ptr.String("__Detail__"),
				EventBusName: ptr.String("__EventBusName__"),
				TraceHeader:  ptr.String("__TraceHeader__"),
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.PutEvents(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "PutEvents"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_PutPartnerEvents(t *testing.T) {
	input := &PutPartnerEventsInput{
		Entries: []types.PutPartnerEventsRequestEntry{
			{
				Time:   ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				Source: ptr.String("__Source__"),
				Resources: []string{
					"__Member__",
					"__Member__",
				},
				DetailType: ptr.String("__DetailType__"),
				Detail:     ptr.String("__Detail__"),
			},
			{
				Time:   ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				Source: ptr.String("__Source__"),
				Resources: []string{
					"__Member__",
					"__Member__",
				},
				DetailType: ptr.String("__DetailType__"),
				Detail:     ptr.String("__Detail__"),
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.PutPartnerEvents(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "PutPartnerEvents"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_PutPermission(t *testing.T) {
	input := &PutPermissionInput{
		EventBusName: ptr.String("__EventBusName__"),
		Action:       ptr.String("__Action__"),
		Principal:    ptr.String("__Principal__"),
		StatementId:  ptr.String("__StatementId__"),
		Condition: &types.Condition{
			Type:  ptr.String("__Type__"),
			Key:   ptr.String("__Key__"),
			Value: ptr.String("__Value__"),
		},
		Policy: ptr.String("__Policy__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.PutPermission(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "PutPermission"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_PutRule(t *testing.T) {
	input := &PutRuleInput{
		Name:               ptr.String("__Name__"),
		ScheduleExpression: ptr.String("__ScheduleExpression__"),
		EventPattern:       ptr.String("__EventPattern__"),
		State:              types.RuleState("ENABLED"),
		Description:        ptr.String("__Description__"),
		RoleArn:            ptr.String("__RoleArn__"),
		Tags: []types.Tag{
			{
				Key:   ptr.String("__Key__"),
				Value: ptr.String("__Value__"),
			},
			{
				Key:   ptr.String("__Key__"),
				Value: ptr.String("__Value__"),
			},
		},
		EventBusName: ptr.String("__EventBusName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.PutRule(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "PutRule"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_PutTargets(t *testing.T) {
	input := &PutTargetsInput{
		Rule:         ptr.String("__Rule__"),
		EventBusName: ptr.String("__EventBusName__"),
		Targets: []types.Target{
			{
				Id:        ptr.String("__Id__"),
				Arn:       ptr.String("__Arn__"),
				RoleArn:   ptr.String("__RoleArn__"),
				Input:     ptr.String("__Input__"),
				InputPath: ptr.String("__InputPath__"),
				InputTransformer: &types.InputTransformer{
					InputPathsMap: map[string]string{
						"key0": "__Value__",
					},
					InputTemplate: ptr.String("__InputTemplate__"),
				},
				KinesisParameters: &types.KinesisParameters{
					PartitionKeyPath: ptr.String("__PartitionKeyPath__"),
				},
				RunCommandParameters: &types.RunCommandParameters{
					RunCommandTargets: []types.RunCommandTarget{
						{
							Key: ptr.String("__Key__"),
							Values: []string{
								"__Member__",
								"__Member__",
							},
						},
						{
							Key: ptr.String("__Key__"),
							Values: []string{
								"__Member__",
								"__Member__",
							},
						},
					},
				},
				EcsParameters: &types.EcsParameters{
					TaskDefinitionArn: ptr.String("__TaskDefinitionArn__"),
					TaskCount:         ptr.Int32(1),
					LaunchType:        types.LaunchType("EC2"),
					NetworkConfiguration: &types.NetworkConfiguration{
						AwsvpcConfiguration: &types.AwsVpcConfiguration{
							Subnets: []string{
								"__Member__",
								"__Member__",
							},
							SecurityGroups: []string{
								"__Member__",
								"__Member__",
							},
							AssignPublicIp: types.AssignPublicIp("ENABLED"),
						},
					},
					PlatformVersion: ptr.String("__PlatformVersion__"),
					Group:           ptr.String("__Group__"),
					CapacityProviderStrategy: []types.CapacityProviderStrategyItem{
						{
							CapacityProvider: ptr.String("__CapacityProvider__"),
							Weight:           1,
							Base:             1,
						},
						{
							CapacityProvider: ptr.String("__CapacityProvider__"),
							Weight:           1,
							Base:             1,
						},
					},
					EnableECSManagedTags: true,
					EnableExecuteCommand: true,
					PlacementConstraints: []types.PlacementConstraint{
						{
							Type:       types.PlacementConstraintType("distinctInstance"),
							Expression: ptr.String("__Expression__"),
						},
						{
							Type:       types.PlacementConstraintType("distinctInstance"),
							Expression: ptr.String("__Expression__"),
						},
					},
					PlacementStrategy: []types.PlacementStrategy{
						{
							Type:  types.PlacementStrategyType("random"),
							Field: ptr.String("__Field__"),
						},
						{
							Type:  types.PlacementStrategyType("random"),
							Field: ptr.String("__Field__"),
						},
					},
					PropagateTags: types.PropagateTags("TASK_DEFINITION"),
					ReferenceId:   ptr.String("__ReferenceId__"),
					Tags: []types.Tag{
						{
							Key:   ptr.String("__Key__"),
							Value: ptr.String("__Value__"),
						},
						{
							Key:   ptr.String("__Key__"),
							Value: ptr.String("__Value__"),
						},
					},
				},
				BatchParameters: &types.BatchParameters{
					JobDefinition: ptr.String("__JobDefinition__"),
					JobName:       ptr.String("__JobName__"),
					ArrayProperties: &types.BatchArrayProperties{
						Size: 1,
					},
					RetryStrategy: &types.BatchRetryStrategy{
						Attempts: 1,
					},
				},
				SqsParameters: &types.SqsParameters{
					MessageGroupId: ptr.String("__MessageGroupId__"),
				},
				HttpParameters: &types.HttpParameters{
					PathParameterValues: []string{
						"__Member__",
						"__Member__",
					},
					HeaderParameters: map[string]string{
						"key0": "__Value__",
					},
					QueryStringParameters: map[string]string{
						"key0": "__Value__",
					},
				},
				RedshiftDataParameters: &types.RedshiftDataParameters{
					SecretManagerArn: ptr.String("__SecretManagerArn__"),
					Database:         ptr.String("__Database__"),
					DbUser:           ptr.String("__DbUser__"),
					Sql:              ptr.String("__Sql__"),
					StatementName:    ptr.String("__StatementName__"),
					WithEvent:        true,
				},
				SageMakerPipelineParameters: &types.SageMakerPipelineParameters{
					PipelineParameterList: []types.SageMakerPipelineParameter{
						{
							Name:  ptr.String("__Name__"),
							Value: ptr.String("__Value__"),
						},
						{
							Name:  ptr.String("__Name__"),
							Value: ptr.String("__Value__"),
						},
					},
				},
				DeadLetterConfig: &types.DeadLetterConfig{
					Arn: ptr.String("__Arn__"),
				},
				RetryPolicy: &types.RetryPolicy{
					MaximumRetryAttempts:     ptr.Int32(1),
					MaximumEventAgeInSeconds: ptr.Int32(1),
				},
			},
			{
				Id:        ptr.String("__Id__"),
				Arn:       ptr.String("__Arn__"),
				RoleArn:   ptr.String("__RoleArn__"),
				Input:     ptr.String("__Input__"),
				InputPath: ptr.String("__InputPath__"),
				InputTransformer: &types.InputTransformer{
					InputPathsMap: map[string]string{
						"key0": "__Value__",
					},
					InputTemplate: ptr.String("__InputTemplate__"),
				},
				KinesisParameters: &types.KinesisParameters{
					PartitionKeyPath: ptr.String("__PartitionKeyPath__"),
				},
				RunCommandParameters: &types.RunCommandParameters{
					RunCommandTargets: []types.RunCommandTarget{
						{
							Key: ptr.String("__Key__"),
							Values: []string{
								"__Member__",
								"__Member__",
							},
						},
						{
							Key: ptr.String("__Key__"),
							Values: []string{
								"__Member__",
								"__Member__",
							},
						},
					},
				},
				EcsParameters: &types.EcsParameters{
					TaskDefinitionArn: ptr.String("__TaskDefinitionArn__"),
					TaskCount:         ptr.Int32(1),
					LaunchType:        types.LaunchType("EC2"),
					NetworkConfiguration: &types.NetworkConfiguration{
						AwsvpcConfiguration: &types.AwsVpcConfiguration{
							Subnets: []string{
								"__Member__",
								"__Member__",
							},
							SecurityGroups: []string{
								"__Member__",
								"__Member__",
							},
							AssignPublicIp: types.AssignPublicIp("ENABLED"),
						},
					},
					PlatformVersion: ptr.String("__PlatformVersion__"),
					Group:           ptr.String("__Group__"),
					CapacityProviderStrategy: []types.CapacityProviderStrategyItem{
						{
							CapacityProvider: ptr.String("__CapacityProvider__"),
							Weight:           1,
							Base:             1,
						},
						{
							CapacityProvider: ptr.String("__CapacityProvider__"),
							Weight:           1,
							Base:             1,
						},
					},
					EnableECSManagedTags: true,
					EnableExecuteCommand: true,
					PlacementConstraints: []types.PlacementConstraint{
						{
							Type:       types.PlacementConstraintType("distinctInstance"),
							Expression: ptr.String("__Expression__"),
						},
						{
							Type:       types.PlacementConstraintType("distinctInstance"),
							Expression: ptr.String("__Expression__"),
						},
					},
					PlacementStrategy: []types.PlacementStrategy{
						{
							Type:  types.PlacementStrategyType("random"),
							Field: ptr.String("__Field__"),
						},
						{
							Type:  types.PlacementStrategyType("random"),
							Field: ptr.String("__Field__"),
						},
					},
					PropagateTags: types.PropagateTags("TASK_DEFINITION"),
					ReferenceId:   ptr.String("__ReferenceId__"),
					Tags: []types.Tag{
						{
							Key:   ptr.String("__Key__"),
							Value: ptr.String("__Value__"),
						},
						{
							Key:   ptr.String("__Key__"),
							Value: ptr.String("__Value__"),
						},
					},
				},
				BatchParameters: &types.BatchParameters{
					JobDefinition: ptr.String("__JobDefinition__"),
					JobName:       ptr.String("__JobName__"),
					ArrayProperties: &types.BatchArrayProperties{
						Size: 1,
					},
					RetryStrategy: &types.BatchRetryStrategy{
						Attempts: 1,
					},
				},
				SqsParameters: &types.SqsParameters{
					MessageGroupId: ptr.String("__MessageGroupId__"),
				},
				HttpParameters: &types.HttpParameters{
					PathParameterValues: []string{
						"__Member__",
						"__Member__",
					},
					HeaderParameters: map[string]string{
						"key0": "__Value__",
					},
					QueryStringParameters: map[string]string{
						"key0": "__Value__",
					},
				},
				RedshiftDataParameters: &types.RedshiftDataParameters{
					SecretManagerArn: ptr.String("__SecretManagerArn__"),
					Database:         ptr.String("__Database__"),
					DbUser:           ptr.String("__DbUser__"),
					Sql:              ptr.String("__Sql__"),
					StatementName:    ptr.String("__StatementName__"),
					WithEvent:        true,
				},
				SageMakerPipelineParameters: &types.SageMakerPipelineParameters{
					PipelineParameterList: []types.SageMakerPipelineParameter{
						{
							Name:  ptr.String("__Name__"),
							Value: ptr.String("__Value__"),
						},
						{
							Name:  ptr.String("__Name__"),
							Value: ptr.String("__Value__"),
						},
					},
				},
				DeadLetterConfig: &types.DeadLetterConfig{
					Arn: ptr.String("__Arn__"),
				},
				RetryPolicy: &types.RetryPolicy{
					MaximumRetryAttempts:     ptr.Int32(1),
					MaximumEventAgeInSeconds: ptr.Int32(1),
				},
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.PutTargets(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "PutTargets"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_RemovePermission(t *testing.T) {
	input := &RemovePermissionInput{
		StatementId:          ptr.String("__StatementId__"),
		RemoveAllPermissions: true,
		EventBusName:         ptr.String("__EventBusName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.RemovePermission(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "RemovePermission"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_RemoveTargets(t *testing.T) {
	input := &RemoveTargetsInput{
		Rule:         ptr.String("__Rule__"),
		EventBusName: ptr.String("__EventBusName__"),
		Ids: []string{
			"__Member__",
			"__Member__",
		},
		Force: true,
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.RemoveTargets(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "RemoveTargets"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_StartReplay(t *testing.T) {
	input := &StartReplayInput{
		ReplayName:     ptr.String("__ReplayName__"),
		Description:    ptr.String("__Description__"),
		EventSourceArn: ptr.String("__EventSourceArn__"),
		EventStartTime: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
		EventEndTime:   ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
		Destination: &types.ReplayDestination{
			Arn: ptr.String("__Arn__"),
			FilterArns: []string{
				"__Member__",
				"__Member__",
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.StartReplay(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "StartReplay"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_TagResource(t *testing.T) {
	input := &TagResourceInput{
		ResourceARN: ptr.String("__ResourceARN__"),
		Tags: []types.Tag{
			{
				Key:   ptr.String("__Key__"),
				Value: ptr.String("__Value__"),
			},
			{
				Key:   ptr.String("__Key__"),
				Value: ptr.String("__Value__"),
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.TagResource(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "TagResource"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_TestEventPattern(t *testing.T) {
	input := &TestEventPatternInput{
		EventPattern: ptr.String("__EventPattern__"),
		Event:        ptr.String("__Event__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.TestEventPattern(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "TestEventPattern"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_UntagResource(t *testing.T) {
	input := &UntagResourceInput{
		ResourceARN: ptr.String("__ResourceARN__"),
		TagKeys: []string{
			"__Member__",
			"__Member__",
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UntagResource(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "UntagResource"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_UpdateApiDestination(t *testing.T) {
	input := &UpdateApiDestinationInput{
		Name:                         ptr.String("__Name__"),
		Description:                  ptr.String("__Description__"),
		ConnectionArn:                ptr.String("__ConnectionArn__"),
		InvocationEndpoint:           ptr.String("__InvocationEndpoint__"),
		HttpMethod:                   types.ApiDestinationHttpMethod("POST"),
		InvocationRateLimitPerSecond: ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateApiDestination(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "UpdateApiDestination"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_UpdateArchive(t *testing.T) {
	input := &UpdateArchiveInput{
		ArchiveName:   ptr.String("__ArchiveName__"),
		Description:   ptr.String("__Description__"),
		EventPattern:  ptr.String("__EventPattern__"),
		RetentionDays: ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateArchive(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "UpdateArchive"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_UpdateConnection(t *testing.T) {
	input := &UpdateConnectionInput{
		Name:              ptr.String("__Name__"),
		Description:       ptr.String("__Description__"),
		AuthorizationType: types.ConnectionAuthorizationType("BASIC"),
		AuthParameters: &types.UpdateConnectionAuthRequestParameters{
			BasicAuthParameters: &types.UpdateConnectionBasicAuthRequestParameters{
				Username: ptr.String("__Username__"),
				Password: ptr.String("__Password__"),
			},
			OAuthParameters: &types.UpdateConnectionOAuthRequestParameters{
				ClientParameters: &types.UpdateConnectionOAuthClientRequestParameters{
					ClientID:     ptr.String("__ClientID__"),
					ClientSecret: ptr.String("__ClientSecret__"),
				},
				AuthorizationEndpoint: ptr.String("__AuthorizationEndpoint__"),
				HttpMethod:            types.ConnectionOAuthHttpMethod("GET"),
				OAuthHttpParameters: &types.ConnectionHttpParameters{
					HeaderParameters: []types.ConnectionHeaderParameter{
						{
							Key:           ptr.String("__Key__"),
							Value:         ptr.String("__Value__"),
							IsValueSecret: true,
						},
						{
							Key:           ptr.String("__Key__"),
							Value:         ptr.String("__Value__"),
							IsValueSecret: true,
						},
					},
					QueryStringParameters: []types.ConnectionQueryStringParameter{
						{
							Key:           ptr.String("__Key__"),
							Value:         ptr.String("__Value__"),
							IsValueSecret: true,
						},
						{
							Key:           ptr.String("__Key__"),
							Value:         ptr.String("__Value__"),
							IsValueSecret: true,
						},
					},
					BodyParameters: []types.ConnectionBodyParameter{
						{
							Key:           ptr.String("__Key__"),
							Value:         ptr.String("__Value__"),
							IsValueSecret: true,
						},
						{
							Key:           ptr.String("__Key__"),
							Value:         ptr.String("__Value__"),
							IsValueSecret: true,
						},
					},
				},
			},
			ApiKeyAuthParameters: &types.UpdateConnectionApiKeyAuthRequestParameters{
				ApiKeyName:  ptr.String("__ApiKeyName__"),
				ApiKeyValue: ptr.String("__ApiKeyValue__"),
			},
			InvocationHttpParameters: &types.ConnectionHttpParameters{
				HeaderParameters: []types.ConnectionHeaderParameter{
					{
						Key:           ptr.String("__Key__"),
						Value:         ptr.String("__Value__"),
						IsValueSecret: true,
					},
					{
						Key:           ptr.String("__Key__"),
						Value:         ptr.String("__Value__"),
						IsValueSecret: true,
					},
				},
				QueryStringParameters: []types.ConnectionQueryStringParameter{
					{
						Key:           ptr.String("__Key__"),
						Value:         ptr.String("__Value__"),
						IsValueSecret: true,
					},
					{
						Key:           ptr.String("__Key__"),
						Value:         ptr.String("__Value__"),
						IsValueSecret: true,
					},
				},
				BodyParameters: []types.ConnectionBodyParameter{
					{
						Key:           ptr.String("__Key__"),
						Value:         ptr.String("__Value__"),
						IsValueSecret: true,
					},
					{
						Key:           ptr.String("__Key__"),
						Value:         ptr.String("__Value__"),
						IsValueSecret: true,
					},
				},
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateConnection(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "UpdateConnection"); err != nil {
		t.Fatal(err)
	}
}
