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

//go:build request_snapshot

package amplify

import (
	"bytes"
	"context"
	"errors"
	"fmt"
	"github.com/aws/aws-sdk-go-v2/service/amplify/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_CreateApp(t *testing.T) {
	input := &CreateAppInput{
		Name:              ptr.String("__Name__"),
		Description:       ptr.String("__Description__"),
		Repository:        ptr.String("__Repository__"),
		Platform:          types.Platform("WEB"),
		ComputeRoleArn:    ptr.String("__ComputeRoleArn__"),
		IamServiceRoleArn: ptr.String("__IamServiceRoleArn__"),
		OauthToken:        ptr.String("__OauthToken__"),
		AccessToken:       ptr.String("__AccessToken__"),
		EnvironmentVariables: map[string]string{
			"key0": "__Value__",
		},
		EnableBranchAutoBuild:    ptr.Bool(true),
		EnableBranchAutoDeletion: ptr.Bool(true),
		EnableBasicAuth:          ptr.Bool(true),
		BasicAuthCredentials:     ptr.String("__BasicAuthCredentials__"),
		CustomRules: []types.CustomRule{
			{
				Source:    ptr.String("__Source__"),
				Target:    ptr.String("__Target__"),
				Status:    ptr.String("__Status__"),
				Condition: ptr.String("__Condition__"),
			},
			{
				Source:    ptr.String("__Source__"),
				Target:    ptr.String("__Target__"),
				Status:    ptr.String("__Status__"),
				Condition: ptr.String("__Condition__"),
			},
		},
		Tags: map[string]string{
			"key0": "__Value__",
		},
		BuildSpec:                ptr.String("__BuildSpec__"),
		CustomHeaders:            ptr.String("__CustomHeaders__"),
		EnableAutoBranchCreation: ptr.Bool(true),
		AutoBranchCreationPatterns: []string{
			"__Member__",
			"__Member__",
		},
		AutoBranchCreationConfig: &types.AutoBranchCreationConfig{
			Stage:           types.Stage("PRODUCTION"),
			Framework:       ptr.String("__Framework__"),
			EnableAutoBuild: ptr.Bool(true),
			EnvironmentVariables: map[string]string{
				"key0": "__Value__",
			},
			BasicAuthCredentials:       ptr.String("__BasicAuthCredentials__"),
			EnableBasicAuth:            ptr.Bool(true),
			EnablePerformanceMode:      ptr.Bool(true),
			BuildSpec:                  ptr.String("__BuildSpec__"),
			EnablePullRequestPreview:   ptr.Bool(true),
			PullRequestEnvironmentName: ptr.String("__PullRequestEnvironmentName__"),
		},
		JobConfig: &types.JobConfig{
			BuildComputeType: types.BuildComputeType("STANDARD_8GB"),
		},
		CacheConfig: &types.CacheConfig{
			Type: types.CacheConfigType("AMPLIFY_MANAGED"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateApp(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(), "CreateApp"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_CreateBackendEnvironment(t *testing.T) {
	input := &CreateBackendEnvironmentInput{
		AppId:               ptr.String("__AppId__"),
		EnvironmentName:     ptr.String("__EnvironmentName__"),
		StackName:           ptr.String("__StackName__"),
		DeploymentArtifacts: ptr.String("__DeploymentArtifacts__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateBackendEnvironment(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(), "CreateBackendEnvironment"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_CreateBranch(t *testing.T) {
	input := &CreateBranchInput{
		AppId:                ptr.String("__AppId__"),
		BranchName:           ptr.String("__BranchName__"),
		Description:          ptr.String("__Description__"),
		Stage:                types.Stage("PRODUCTION"),
		Framework:            ptr.String("__Framework__"),
		EnableNotification:   ptr.Bool(true),
		EnableAutoBuild:      ptr.Bool(true),
		EnableSkewProtection: ptr.Bool(true),
		EnvironmentVariables: map[string]string{
			"key0": "__Value__",
		},
		BasicAuthCredentials:  ptr.String("__BasicAuthCredentials__"),
		EnableBasicAuth:       ptr.Bool(true),
		EnablePerformanceMode: ptr.Bool(true),
		Tags: map[string]string{
			"key0": "__Value__",
		},
		BuildSpec:                  ptr.String("__BuildSpec__"),
		Ttl:                        ptr.String("__Ttl__"),
		DisplayName:                ptr.String("__DisplayName__"),
		EnablePullRequestPreview:   ptr.Bool(true),
		PullRequestEnvironmentName: ptr.String("__PullRequestEnvironmentName__"),
		BackendEnvironmentArn:      ptr.String("__BackendEnvironmentArn__"),
		Backend: &types.Backend{
			StackArn: ptr.String("__StackArn__"),
		},
		ComputeRoleArn: ptr.String("__ComputeRoleArn__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateBranch(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(), "CreateBranch"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_CreateDeployment(t *testing.T) {
	input := &CreateDeploymentInput{
		AppId:      ptr.String("__AppId__"),
		BranchName: ptr.String("__BranchName__"),
		FileMap: map[string]string{
			"key0": "__Value__",
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateDeployment(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(), "CreateDeployment"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_CreateDomainAssociation(t *testing.T) {
	input := &CreateDomainAssociationInput{
		AppId:               ptr.String("__AppId__"),
		DomainName:          ptr.String("__DomainName__"),
		EnableAutoSubDomain: ptr.Bool(true),
		SubDomainSettings: []types.SubDomainSetting{
			{
				Prefix:     ptr.String("__Prefix__"),
				BranchName: ptr.String("__BranchName__"),
			},
			{
				Prefix:     ptr.String("__Prefix__"),
				BranchName: ptr.String("__BranchName__"),
			},
		},
		AutoSubDomainCreationPatterns: []string{
			"__Member__",
			"__Member__",
		},
		AutoSubDomainIAMRole: ptr.String("__AutoSubDomainIAMRole__"),
		CertificateSettings: &types.CertificateSettings{
			Type:                 types.CertificateType("AMPLIFY_MANAGED"),
			CustomCertificateArn: ptr.String("__CustomCertificateArn__"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateDomainAssociation(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(), "CreateDomainAssociation"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_CreateWebhook(t *testing.T) {
	input := &CreateWebhookInput{
		AppId:       ptr.String("__AppId__"),
		BranchName:  ptr.String("__BranchName__"),
		Description: ptr.String("__Description__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateWebhook(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(), "CreateWebhook"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DeleteApp(t *testing.T) {
	input := &DeleteAppInput{
		AppId: ptr.String("__AppId__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteApp(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(), "DeleteApp"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DeleteBackendEnvironment(t *testing.T) {
	input := &DeleteBackendEnvironmentInput{
		AppId:           ptr.String("__AppId__"),
		EnvironmentName: ptr.String("__EnvironmentName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteBackendEnvironment(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(), "DeleteBackendEnvironment"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DeleteBranch(t *testing.T) {
	input := &DeleteBranchInput{
		AppId:      ptr.String("__AppId__"),
		BranchName: ptr.String("__BranchName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteBranch(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(), "DeleteBranch"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DeleteDomainAssociation(t *testing.T) {
	input := &DeleteDomainAssociationInput{
		AppId:      ptr.String("__AppId__"),
		DomainName: ptr.String("__DomainName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteDomainAssociation(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(), "DeleteDomainAssociation"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DeleteJob(t *testing.T) {
	input := &DeleteJobInput{
		AppId:      ptr.String("__AppId__"),
		BranchName: ptr.String("__BranchName__"),
		JobId:      ptr.String("__JobId__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteJob(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(), "DeleteJob"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DeleteWebhook(t *testing.T) {
	input := &DeleteWebhookInput{
		WebhookId: ptr.String("__WebhookId__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteWebhook(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(), "DeleteWebhook"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_GenerateAccessLogs(t *testing.T) {
	input := &GenerateAccessLogsInput{
		StartTime:  ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
		EndTime:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
		DomainName: ptr.String("__DomainName__"),
		AppId:      ptr.String("__AppId__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.GenerateAccessLogs(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(), "GenerateAccessLogs"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_GetApp(t *testing.T) {
	input := &GetAppInput{
		AppId: ptr.String("__AppId__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.GetApp(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(), "GetApp"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_GetArtifactUrl(t *testing.T) {
	input := &GetArtifactUrlInput{
		ArtifactId: ptr.String("__ArtifactId__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.GetArtifactUrl(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(), "GetArtifactUrl"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_GetBackendEnvironment(t *testing.T) {
	input := &GetBackendEnvironmentInput{
		AppId:           ptr.String("__AppId__"),
		EnvironmentName: ptr.String("__EnvironmentName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.GetBackendEnvironment(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(), "GetBackendEnvironment"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_GetBranch(t *testing.T) {
	input := &GetBranchInput{
		AppId:      ptr.String("__AppId__"),
		BranchName: ptr.String("__BranchName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.GetBranch(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(), "GetBranch"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_GetDomainAssociation(t *testing.T) {
	input := &GetDomainAssociationInput{
		AppId:      ptr.String("__AppId__"),
		DomainName: ptr.String("__DomainName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.GetDomainAssociation(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(), "GetDomainAssociation"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_GetJob(t *testing.T) {
	input := &GetJobInput{
		AppId:      ptr.String("__AppId__"),
		BranchName: ptr.String("__BranchName__"),
		JobId:      ptr.String("__JobId__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.GetJob(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(), "GetJob"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_GetWebhook(t *testing.T) {
	input := &GetWebhookInput{
		WebhookId: ptr.String("__WebhookId__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.GetWebhook(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(), "GetWebhook"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListApps(t *testing.T) {
	input := &ListAppsInput{
		NextToken:  ptr.String("__NextToken__"),
		MaxResults: 1,
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListApps(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(), "ListApps"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListArtifacts(t *testing.T) {
	input := &ListArtifactsInput{
		AppId:      ptr.String("__AppId__"),
		BranchName: ptr.String("__BranchName__"),
		JobId:      ptr.String("__JobId__"),
		NextToken:  ptr.String("__NextToken__"),
		MaxResults: 1,
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListArtifacts(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(), "ListArtifacts"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListBackendEnvironments(t *testing.T) {
	input := &ListBackendEnvironmentsInput{
		AppId:           ptr.String("__AppId__"),
		EnvironmentName: ptr.String("__EnvironmentName__"),
		NextToken:       ptr.String("__NextToken__"),
		MaxResults:      1,
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListBackendEnvironments(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(), "ListBackendEnvironments"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListBranches(t *testing.T) {
	input := &ListBranchesInput{
		AppId:      ptr.String("__AppId__"),
		NextToken:  ptr.String("__NextToken__"),
		MaxResults: 1,
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListBranches(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(), "ListBranches"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListDomainAssociations(t *testing.T) {
	input := &ListDomainAssociationsInput{
		AppId:      ptr.String("__AppId__"),
		NextToken:  ptr.String("__NextToken__"),
		MaxResults: 1,
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListDomainAssociations(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(), "ListDomainAssociations"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListJobs(t *testing.T) {
	input := &ListJobsInput{
		AppId:      ptr.String("__AppId__"),
		BranchName: ptr.String("__BranchName__"),
		NextToken:  ptr.String("__NextToken__"),
		MaxResults: 1,
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListJobs(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(), "ListJobs"); 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_ListWebhooks(t *testing.T) {
	input := &ListWebhooksInput{
		AppId:      ptr.String("__AppId__"),
		NextToken:  ptr.String("__NextToken__"),
		MaxResults: 1,
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListWebhooks(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(), "ListWebhooks"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_StartDeployment(t *testing.T) {
	input := &StartDeploymentInput{
		AppId:         ptr.String("__AppId__"),
		BranchName:    ptr.String("__BranchName__"),
		JobId:         ptr.String("__JobId__"),
		SourceUrl:     ptr.String("__SourceUrl__"),
		SourceUrlType: types.SourceUrlType("ZIP"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.StartDeployment(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(), "StartDeployment"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_StartJob(t *testing.T) {
	input := &StartJobInput{
		AppId:         ptr.String("__AppId__"),
		BranchName:    ptr.String("__BranchName__"),
		JobId:         ptr.String("__JobId__"),
		JobType:       types.JobType("RELEASE"),
		JobReason:     ptr.String("__JobReason__"),
		CommitId:      ptr.String("__CommitId__"),
		CommitMessage: ptr.String("__CommitMessage__"),
		CommitTime:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.StartJob(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(), "StartJob"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_StopJob(t *testing.T) {
	input := &StopJobInput{
		AppId:      ptr.String("__AppId__"),
		BranchName: ptr.String("__BranchName__"),
		JobId:      ptr.String("__JobId__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.StopJob(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(), "StopJob"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_TagResource(t *testing.T) {
	input := &TagResourceInput{
		ResourceArn: ptr.String("__ResourceArn__"),
		Tags: map[string]string{
			"key0": "__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_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_UpdateApp(t *testing.T) {
	input := &UpdateAppInput{
		AppId:             ptr.String("__AppId__"),
		Name:              ptr.String("__Name__"),
		Description:       ptr.String("__Description__"),
		Platform:          types.Platform("WEB"),
		ComputeRoleArn:    ptr.String("__ComputeRoleArn__"),
		IamServiceRoleArn: ptr.String("__IamServiceRoleArn__"),
		EnvironmentVariables: map[string]string{
			"key0": "__Value__",
		},
		EnableBranchAutoBuild:    ptr.Bool(true),
		EnableBranchAutoDeletion: ptr.Bool(true),
		EnableBasicAuth:          ptr.Bool(true),
		BasicAuthCredentials:     ptr.String("__BasicAuthCredentials__"),
		CustomRules: []types.CustomRule{
			{
				Source:    ptr.String("__Source__"),
				Target:    ptr.String("__Target__"),
				Status:    ptr.String("__Status__"),
				Condition: ptr.String("__Condition__"),
			},
			{
				Source:    ptr.String("__Source__"),
				Target:    ptr.String("__Target__"),
				Status:    ptr.String("__Status__"),
				Condition: ptr.String("__Condition__"),
			},
		},
		BuildSpec:                ptr.String("__BuildSpec__"),
		CustomHeaders:            ptr.String("__CustomHeaders__"),
		EnableAutoBranchCreation: ptr.Bool(true),
		AutoBranchCreationPatterns: []string{
			"__Member__",
			"__Member__",
		},
		AutoBranchCreationConfig: &types.AutoBranchCreationConfig{
			Stage:           types.Stage("PRODUCTION"),
			Framework:       ptr.String("__Framework__"),
			EnableAutoBuild: ptr.Bool(true),
			EnvironmentVariables: map[string]string{
				"key0": "__Value__",
			},
			BasicAuthCredentials:       ptr.String("__BasicAuthCredentials__"),
			EnableBasicAuth:            ptr.Bool(true),
			EnablePerformanceMode:      ptr.Bool(true),
			BuildSpec:                  ptr.String("__BuildSpec__"),
			EnablePullRequestPreview:   ptr.Bool(true),
			PullRequestEnvironmentName: ptr.String("__PullRequestEnvironmentName__"),
		},
		Repository:  ptr.String("__Repository__"),
		OauthToken:  ptr.String("__OauthToken__"),
		AccessToken: ptr.String("__AccessToken__"),
		JobConfig: &types.JobConfig{
			BuildComputeType: types.BuildComputeType("STANDARD_8GB"),
		},
		CacheConfig: &types.CacheConfig{
			Type: types.CacheConfigType("AMPLIFY_MANAGED"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateApp(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(), "UpdateApp"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_UpdateBranch(t *testing.T) {
	input := &UpdateBranchInput{
		AppId:                ptr.String("__AppId__"),
		BranchName:           ptr.String("__BranchName__"),
		Description:          ptr.String("__Description__"),
		Framework:            ptr.String("__Framework__"),
		Stage:                types.Stage("PRODUCTION"),
		EnableNotification:   ptr.Bool(true),
		EnableAutoBuild:      ptr.Bool(true),
		EnableSkewProtection: ptr.Bool(true),
		EnvironmentVariables: map[string]string{
			"key0": "__Value__",
		},
		BasicAuthCredentials:       ptr.String("__BasicAuthCredentials__"),
		EnableBasicAuth:            ptr.Bool(true),
		EnablePerformanceMode:      ptr.Bool(true),
		BuildSpec:                  ptr.String("__BuildSpec__"),
		Ttl:                        ptr.String("__Ttl__"),
		DisplayName:                ptr.String("__DisplayName__"),
		EnablePullRequestPreview:   ptr.Bool(true),
		PullRequestEnvironmentName: ptr.String("__PullRequestEnvironmentName__"),
		BackendEnvironmentArn:      ptr.String("__BackendEnvironmentArn__"),
		Backend: &types.Backend{
			StackArn: ptr.String("__StackArn__"),
		},
		ComputeRoleArn: ptr.String("__ComputeRoleArn__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateBranch(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(), "UpdateBranch"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_UpdateDomainAssociation(t *testing.T) {
	input := &UpdateDomainAssociationInput{
		AppId:               ptr.String("__AppId__"),
		DomainName:          ptr.String("__DomainName__"),
		EnableAutoSubDomain: ptr.Bool(true),
		SubDomainSettings: []types.SubDomainSetting{
			{
				Prefix:     ptr.String("__Prefix__"),
				BranchName: ptr.String("__BranchName__"),
			},
			{
				Prefix:     ptr.String("__Prefix__"),
				BranchName: ptr.String("__BranchName__"),
			},
		},
		AutoSubDomainCreationPatterns: []string{
			"__Member__",
			"__Member__",
		},
		AutoSubDomainIAMRole: ptr.String("__AutoSubDomainIAMRole__"),
		CertificateSettings: &types.CertificateSettings{
			Type:                 types.CertificateType("AMPLIFY_MANAGED"),
			CustomCertificateArn: ptr.String("__CustomCertificateArn__"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateDomainAssociation(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(), "UpdateDomainAssociation"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_UpdateWebhook(t *testing.T) {
	input := &UpdateWebhookInput{
		WebhookId:   ptr.String("__WebhookId__"),
		BranchName:  ptr.String("__BranchName__"),
		Description: ptr.String("__Description__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateWebhook(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(), "UpdateWebhook"); err != nil {
		t.Fatal(err)
	}
}
func TestUpdateRequestSnapshot_CreateApp(t *testing.T) {
	input := &CreateAppInput{
		Name:              ptr.String("__Name__"),
		Description:       ptr.String("__Description__"),
		Repository:        ptr.String("__Repository__"),
		Platform:          types.Platform("WEB"),
		ComputeRoleArn:    ptr.String("__ComputeRoleArn__"),
		IamServiceRoleArn: ptr.String("__IamServiceRoleArn__"),
		OauthToken:        ptr.String("__OauthToken__"),
		AccessToken:       ptr.String("__AccessToken__"),
		EnvironmentVariables: map[string]string{
			"key0": "__Value__",
		},
		EnableBranchAutoBuild:    ptr.Bool(true),
		EnableBranchAutoDeletion: ptr.Bool(true),
		EnableBasicAuth:          ptr.Bool(true),
		BasicAuthCredentials:     ptr.String("__BasicAuthCredentials__"),
		CustomRules: []types.CustomRule{
			{
				Source:    ptr.String("__Source__"),
				Target:    ptr.String("__Target__"),
				Status:    ptr.String("__Status__"),
				Condition: ptr.String("__Condition__"),
			},
			{
				Source:    ptr.String("__Source__"),
				Target:    ptr.String("__Target__"),
				Status:    ptr.String("__Status__"),
				Condition: ptr.String("__Condition__"),
			},
		},
		Tags: map[string]string{
			"key0": "__Value__",
		},
		BuildSpec:                ptr.String("__BuildSpec__"),
		CustomHeaders:            ptr.String("__CustomHeaders__"),
		EnableAutoBranchCreation: ptr.Bool(true),
		AutoBranchCreationPatterns: []string{
			"__Member__",
			"__Member__",
		},
		AutoBranchCreationConfig: &types.AutoBranchCreationConfig{
			Stage:           types.Stage("PRODUCTION"),
			Framework:       ptr.String("__Framework__"),
			EnableAutoBuild: ptr.Bool(true),
			EnvironmentVariables: map[string]string{
				"key0": "__Value__",
			},
			BasicAuthCredentials:       ptr.String("__BasicAuthCredentials__"),
			EnableBasicAuth:            ptr.Bool(true),
			EnablePerformanceMode:      ptr.Bool(true),
			BuildSpec:                  ptr.String("__BuildSpec__"),
			EnablePullRequestPreview:   ptr.Bool(true),
			PullRequestEnvironmentName: ptr.String("__PullRequestEnvironmentName__"),
		},
		JobConfig: &types.JobConfig{
			BuildComputeType: types.BuildComputeType("STANDARD_8GB"),
		},
		CacheConfig: &types.CacheConfig{
			Type: types.CacheConfigType("AMPLIFY_MANAGED"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateApp(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(), "CreateApp"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_CreateBackendEnvironment(t *testing.T) {
	input := &CreateBackendEnvironmentInput{
		AppId:               ptr.String("__AppId__"),
		EnvironmentName:     ptr.String("__EnvironmentName__"),
		StackName:           ptr.String("__StackName__"),
		DeploymentArtifacts: ptr.String("__DeploymentArtifacts__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateBackendEnvironment(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(), "CreateBackendEnvironment"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_CreateBranch(t *testing.T) {
	input := &CreateBranchInput{
		AppId:                ptr.String("__AppId__"),
		BranchName:           ptr.String("__BranchName__"),
		Description:          ptr.String("__Description__"),
		Stage:                types.Stage("PRODUCTION"),
		Framework:            ptr.String("__Framework__"),
		EnableNotification:   ptr.Bool(true),
		EnableAutoBuild:      ptr.Bool(true),
		EnableSkewProtection: ptr.Bool(true),
		EnvironmentVariables: map[string]string{
			"key0": "__Value__",
		},
		BasicAuthCredentials:  ptr.String("__BasicAuthCredentials__"),
		EnableBasicAuth:       ptr.Bool(true),
		EnablePerformanceMode: ptr.Bool(true),
		Tags: map[string]string{
			"key0": "__Value__",
		},
		BuildSpec:                  ptr.String("__BuildSpec__"),
		Ttl:                        ptr.String("__Ttl__"),
		DisplayName:                ptr.String("__DisplayName__"),
		EnablePullRequestPreview:   ptr.Bool(true),
		PullRequestEnvironmentName: ptr.String("__PullRequestEnvironmentName__"),
		BackendEnvironmentArn:      ptr.String("__BackendEnvironmentArn__"),
		Backend: &types.Backend{
			StackArn: ptr.String("__StackArn__"),
		},
		ComputeRoleArn: ptr.String("__ComputeRoleArn__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateBranch(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(), "CreateBranch"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_CreateDeployment(t *testing.T) {
	input := &CreateDeploymentInput{
		AppId:      ptr.String("__AppId__"),
		BranchName: ptr.String("__BranchName__"),
		FileMap: map[string]string{
			"key0": "__Value__",
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateDeployment(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(), "CreateDeployment"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_CreateDomainAssociation(t *testing.T) {
	input := &CreateDomainAssociationInput{
		AppId:               ptr.String("__AppId__"),
		DomainName:          ptr.String("__DomainName__"),
		EnableAutoSubDomain: ptr.Bool(true),
		SubDomainSettings: []types.SubDomainSetting{
			{
				Prefix:     ptr.String("__Prefix__"),
				BranchName: ptr.String("__BranchName__"),
			},
			{
				Prefix:     ptr.String("__Prefix__"),
				BranchName: ptr.String("__BranchName__"),
			},
		},
		AutoSubDomainCreationPatterns: []string{
			"__Member__",
			"__Member__",
		},
		AutoSubDomainIAMRole: ptr.String("__AutoSubDomainIAMRole__"),
		CertificateSettings: &types.CertificateSettings{
			Type:                 types.CertificateType("AMPLIFY_MANAGED"),
			CustomCertificateArn: ptr.String("__CustomCertificateArn__"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateDomainAssociation(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(), "CreateDomainAssociation"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_CreateWebhook(t *testing.T) {
	input := &CreateWebhookInput{
		AppId:       ptr.String("__AppId__"),
		BranchName:  ptr.String("__BranchName__"),
		Description: ptr.String("__Description__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateWebhook(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(), "CreateWebhook"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DeleteApp(t *testing.T) {
	input := &DeleteAppInput{
		AppId: ptr.String("__AppId__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteApp(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(), "DeleteApp"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DeleteBackendEnvironment(t *testing.T) {
	input := &DeleteBackendEnvironmentInput{
		AppId:           ptr.String("__AppId__"),
		EnvironmentName: ptr.String("__EnvironmentName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteBackendEnvironment(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(), "DeleteBackendEnvironment"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DeleteBranch(t *testing.T) {
	input := &DeleteBranchInput{
		AppId:      ptr.String("__AppId__"),
		BranchName: ptr.String("__BranchName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteBranch(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(), "DeleteBranch"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DeleteDomainAssociation(t *testing.T) {
	input := &DeleteDomainAssociationInput{
		AppId:      ptr.String("__AppId__"),
		DomainName: ptr.String("__DomainName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteDomainAssociation(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(), "DeleteDomainAssociation"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DeleteJob(t *testing.T) {
	input := &DeleteJobInput{
		AppId:      ptr.String("__AppId__"),
		BranchName: ptr.String("__BranchName__"),
		JobId:      ptr.String("__JobId__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteJob(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(), "DeleteJob"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DeleteWebhook(t *testing.T) {
	input := &DeleteWebhookInput{
		WebhookId: ptr.String("__WebhookId__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteWebhook(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(), "DeleteWebhook"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_GenerateAccessLogs(t *testing.T) {
	input := &GenerateAccessLogsInput{
		StartTime:  ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
		EndTime:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
		DomainName: ptr.String("__DomainName__"),
		AppId:      ptr.String("__AppId__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.GenerateAccessLogs(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(), "GenerateAccessLogs"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_GetApp(t *testing.T) {
	input := &GetAppInput{
		AppId: ptr.String("__AppId__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.GetApp(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(), "GetApp"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_GetArtifactUrl(t *testing.T) {
	input := &GetArtifactUrlInput{
		ArtifactId: ptr.String("__ArtifactId__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.GetArtifactUrl(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(), "GetArtifactUrl"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_GetBackendEnvironment(t *testing.T) {
	input := &GetBackendEnvironmentInput{
		AppId:           ptr.String("__AppId__"),
		EnvironmentName: ptr.String("__EnvironmentName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.GetBackendEnvironment(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(), "GetBackendEnvironment"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_GetBranch(t *testing.T) {
	input := &GetBranchInput{
		AppId:      ptr.String("__AppId__"),
		BranchName: ptr.String("__BranchName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.GetBranch(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(), "GetBranch"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_GetDomainAssociation(t *testing.T) {
	input := &GetDomainAssociationInput{
		AppId:      ptr.String("__AppId__"),
		DomainName: ptr.String("__DomainName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.GetDomainAssociation(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(), "GetDomainAssociation"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_GetJob(t *testing.T) {
	input := &GetJobInput{
		AppId:      ptr.String("__AppId__"),
		BranchName: ptr.String("__BranchName__"),
		JobId:      ptr.String("__JobId__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.GetJob(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(), "GetJob"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_GetWebhook(t *testing.T) {
	input := &GetWebhookInput{
		WebhookId: ptr.String("__WebhookId__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.GetWebhook(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(), "GetWebhook"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListApps(t *testing.T) {
	input := &ListAppsInput{
		NextToken:  ptr.String("__NextToken__"),
		MaxResults: 1,
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListApps(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(), "ListApps"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListArtifacts(t *testing.T) {
	input := &ListArtifactsInput{
		AppId:      ptr.String("__AppId__"),
		BranchName: ptr.String("__BranchName__"),
		JobId:      ptr.String("__JobId__"),
		NextToken:  ptr.String("__NextToken__"),
		MaxResults: 1,
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListArtifacts(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(), "ListArtifacts"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListBackendEnvironments(t *testing.T) {
	input := &ListBackendEnvironmentsInput{
		AppId:           ptr.String("__AppId__"),
		EnvironmentName: ptr.String("__EnvironmentName__"),
		NextToken:       ptr.String("__NextToken__"),
		MaxResults:      1,
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListBackendEnvironments(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(), "ListBackendEnvironments"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListBranches(t *testing.T) {
	input := &ListBranchesInput{
		AppId:      ptr.String("__AppId__"),
		NextToken:  ptr.String("__NextToken__"),
		MaxResults: 1,
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListBranches(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(), "ListBranches"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListDomainAssociations(t *testing.T) {
	input := &ListDomainAssociationsInput{
		AppId:      ptr.String("__AppId__"),
		NextToken:  ptr.String("__NextToken__"),
		MaxResults: 1,
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListDomainAssociations(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(), "ListDomainAssociations"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListJobs(t *testing.T) {
	input := &ListJobsInput{
		AppId:      ptr.String("__AppId__"),
		BranchName: ptr.String("__BranchName__"),
		NextToken:  ptr.String("__NextToken__"),
		MaxResults: 1,
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListJobs(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(), "ListJobs"); 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_ListWebhooks(t *testing.T) {
	input := &ListWebhooksInput{
		AppId:      ptr.String("__AppId__"),
		NextToken:  ptr.String("__NextToken__"),
		MaxResults: 1,
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListWebhooks(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(), "ListWebhooks"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_StartDeployment(t *testing.T) {
	input := &StartDeploymentInput{
		AppId:         ptr.String("__AppId__"),
		BranchName:    ptr.String("__BranchName__"),
		JobId:         ptr.String("__JobId__"),
		SourceUrl:     ptr.String("__SourceUrl__"),
		SourceUrlType: types.SourceUrlType("ZIP"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.StartDeployment(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(), "StartDeployment"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_StartJob(t *testing.T) {
	input := &StartJobInput{
		AppId:         ptr.String("__AppId__"),
		BranchName:    ptr.String("__BranchName__"),
		JobId:         ptr.String("__JobId__"),
		JobType:       types.JobType("RELEASE"),
		JobReason:     ptr.String("__JobReason__"),
		CommitId:      ptr.String("__CommitId__"),
		CommitMessage: ptr.String("__CommitMessage__"),
		CommitTime:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.StartJob(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(), "StartJob"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_StopJob(t *testing.T) {
	input := &StopJobInput{
		AppId:      ptr.String("__AppId__"),
		BranchName: ptr.String("__BranchName__"),
		JobId:      ptr.String("__JobId__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.StopJob(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(), "StopJob"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_TagResource(t *testing.T) {
	input := &TagResourceInput{
		ResourceArn: ptr.String("__ResourceArn__"),
		Tags: map[string]string{
			"key0": "__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_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_UpdateApp(t *testing.T) {
	input := &UpdateAppInput{
		AppId:             ptr.String("__AppId__"),
		Name:              ptr.String("__Name__"),
		Description:       ptr.String("__Description__"),
		Platform:          types.Platform("WEB"),
		ComputeRoleArn:    ptr.String("__ComputeRoleArn__"),
		IamServiceRoleArn: ptr.String("__IamServiceRoleArn__"),
		EnvironmentVariables: map[string]string{
			"key0": "__Value__",
		},
		EnableBranchAutoBuild:    ptr.Bool(true),
		EnableBranchAutoDeletion: ptr.Bool(true),
		EnableBasicAuth:          ptr.Bool(true),
		BasicAuthCredentials:     ptr.String("__BasicAuthCredentials__"),
		CustomRules: []types.CustomRule{
			{
				Source:    ptr.String("__Source__"),
				Target:    ptr.String("__Target__"),
				Status:    ptr.String("__Status__"),
				Condition: ptr.String("__Condition__"),
			},
			{
				Source:    ptr.String("__Source__"),
				Target:    ptr.String("__Target__"),
				Status:    ptr.String("__Status__"),
				Condition: ptr.String("__Condition__"),
			},
		},
		BuildSpec:                ptr.String("__BuildSpec__"),
		CustomHeaders:            ptr.String("__CustomHeaders__"),
		EnableAutoBranchCreation: ptr.Bool(true),
		AutoBranchCreationPatterns: []string{
			"__Member__",
			"__Member__",
		},
		AutoBranchCreationConfig: &types.AutoBranchCreationConfig{
			Stage:           types.Stage("PRODUCTION"),
			Framework:       ptr.String("__Framework__"),
			EnableAutoBuild: ptr.Bool(true),
			EnvironmentVariables: map[string]string{
				"key0": "__Value__",
			},
			BasicAuthCredentials:       ptr.String("__BasicAuthCredentials__"),
			EnableBasicAuth:            ptr.Bool(true),
			EnablePerformanceMode:      ptr.Bool(true),
			BuildSpec:                  ptr.String("__BuildSpec__"),
			EnablePullRequestPreview:   ptr.Bool(true),
			PullRequestEnvironmentName: ptr.String("__PullRequestEnvironmentName__"),
		},
		Repository:  ptr.String("__Repository__"),
		OauthToken:  ptr.String("__OauthToken__"),
		AccessToken: ptr.String("__AccessToken__"),
		JobConfig: &types.JobConfig{
			BuildComputeType: types.BuildComputeType("STANDARD_8GB"),
		},
		CacheConfig: &types.CacheConfig{
			Type: types.CacheConfigType("AMPLIFY_MANAGED"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateApp(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(), "UpdateApp"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_UpdateBranch(t *testing.T) {
	input := &UpdateBranchInput{
		AppId:                ptr.String("__AppId__"),
		BranchName:           ptr.String("__BranchName__"),
		Description:          ptr.String("__Description__"),
		Framework:            ptr.String("__Framework__"),
		Stage:                types.Stage("PRODUCTION"),
		EnableNotification:   ptr.Bool(true),
		EnableAutoBuild:      ptr.Bool(true),
		EnableSkewProtection: ptr.Bool(true),
		EnvironmentVariables: map[string]string{
			"key0": "__Value__",
		},
		BasicAuthCredentials:       ptr.String("__BasicAuthCredentials__"),
		EnableBasicAuth:            ptr.Bool(true),
		EnablePerformanceMode:      ptr.Bool(true),
		BuildSpec:                  ptr.String("__BuildSpec__"),
		Ttl:                        ptr.String("__Ttl__"),
		DisplayName:                ptr.String("__DisplayName__"),
		EnablePullRequestPreview:   ptr.Bool(true),
		PullRequestEnvironmentName: ptr.String("__PullRequestEnvironmentName__"),
		BackendEnvironmentArn:      ptr.String("__BackendEnvironmentArn__"),
		Backend: &types.Backend{
			StackArn: ptr.String("__StackArn__"),
		},
		ComputeRoleArn: ptr.String("__ComputeRoleArn__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateBranch(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(), "UpdateBranch"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_UpdateDomainAssociation(t *testing.T) {
	input := &UpdateDomainAssociationInput{
		AppId:               ptr.String("__AppId__"),
		DomainName:          ptr.String("__DomainName__"),
		EnableAutoSubDomain: ptr.Bool(true),
		SubDomainSettings: []types.SubDomainSetting{
			{
				Prefix:     ptr.String("__Prefix__"),
				BranchName: ptr.String("__BranchName__"),
			},
			{
				Prefix:     ptr.String("__Prefix__"),
				BranchName: ptr.String("__BranchName__"),
			},
		},
		AutoSubDomainCreationPatterns: []string{
			"__Member__",
			"__Member__",
		},
		AutoSubDomainIAMRole: ptr.String("__AutoSubDomainIAMRole__"),
		CertificateSettings: &types.CertificateSettings{
			Type:                 types.CertificateType("AMPLIFY_MANAGED"),
			CustomCertificateArn: ptr.String("__CustomCertificateArn__"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateDomainAssociation(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(), "UpdateDomainAssociation"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_UpdateWebhook(t *testing.T) {
	input := &UpdateWebhookInput{
		WebhookId:   ptr.String("__WebhookId__"),
		BranchName:  ptr.String("__BranchName__"),
		Description: ptr.String("__Description__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateWebhook(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(), "UpdateWebhook"); err != nil {
		t.Fatal(err)
	}
}
