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

//go:build request_snapshot

package accessanalyzer

import (
	"bytes"
	"context"
	"errors"
	"fmt"
	"github.com/aws/aws-sdk-go-v2/service/accessanalyzer/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_ApplyArchiveRule(t *testing.T) {
	input := &ApplyArchiveRuleInput{
		AnalyzerArn: ptr.String("__AnalyzerArn__"),
		RuleName:    ptr.String("__RuleName__"),
		ClientToken: ptr.String("__ClientToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ApplyArchiveRule(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(), "ApplyArchiveRule"); err != nil {
		t.Fatal(err)
	}
}

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

func TestCheckRequestSnapshot_CheckAccessNotGranted(t *testing.T) {
	input := &CheckAccessNotGrantedInput{
		PolicyDocument: ptr.String("__PolicyDocument__"),
		Access: []types.Access{
			{
				Actions: []string{
					"__Member__",
					"__Member__",
				},
				Resources: []string{
					"__Member__",
					"__Member__",
				},
			},
			{
				Actions: []string{
					"__Member__",
					"__Member__",
				},
				Resources: []string{
					"__Member__",
					"__Member__",
				},
			},
		},
		PolicyType: types.AccessCheckPolicyType("IDENTITY_POLICY"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CheckAccessNotGranted(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(), "CheckAccessNotGranted"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_CheckNoNewAccess(t *testing.T) {
	input := &CheckNoNewAccessInput{
		NewPolicyDocument:      ptr.String("__NewPolicyDocument__"),
		ExistingPolicyDocument: ptr.String("__ExistingPolicyDocument__"),
		PolicyType:             types.AccessCheckPolicyType("IDENTITY_POLICY"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CheckNoNewAccess(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(), "CheckNoNewAccess"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_CheckNoPublicAccess(t *testing.T) {
	input := &CheckNoPublicAccessInput{
		PolicyDocument: ptr.String("__PolicyDocument__"),
		ResourceType:   types.AccessCheckResourceType("AWS::DynamoDB::Table"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CheckNoPublicAccess(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(), "CheckNoPublicAccess"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_CreateAccessPreview(t *testing.T) {
	input := &CreateAccessPreviewInput{
		AnalyzerArn: ptr.String("__AnalyzerArn__"),
		Configurations: map[string]types.Configuration{
			"key0": &types.ConfigurationMemberEbsSnapshot{
				Value: types.EbsSnapshotConfiguration{
					UserIds: []string{
						"__Member__",
						"__Member__",
					},
					Groups: []string{
						"__Member__",
						"__Member__",
					},
					KmsKeyId: ptr.String("__KmsKeyId__"),
				},
			},
		},
		ClientToken: ptr.String("__ClientToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateAccessPreview(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(), "CreateAccessPreview"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_CreateAnalyzer(t *testing.T) {
	input := &CreateAnalyzerInput{
		AnalyzerName: ptr.String("__AnalyzerName__"),
		Type:         types.Type("ACCOUNT"),
		ArchiveRules: []types.InlineArchiveRule{
			{
				RuleName: ptr.String("__RuleName__"),
				Filter: map[string]types.Criterion{
					"key0": {
						Eq: []string{
							"__Member__",
							"__Member__",
						},
						Neq: []string{
							"__Member__",
							"__Member__",
						},
						Contains: []string{
							"__Member__",
							"__Member__",
						},
						Exists: ptr.Bool(true),
					},
				},
			},
			{
				RuleName: ptr.String("__RuleName__"),
				Filter: map[string]types.Criterion{
					"key0": {
						Eq: []string{
							"__Member__",
							"__Member__",
						},
						Neq: []string{
							"__Member__",
							"__Member__",
						},
						Contains: []string{
							"__Member__",
							"__Member__",
						},
						Exists: ptr.Bool(true),
					},
				},
			},
		},
		Tags: map[string]string{
			"key0": "__Value__",
		},
		ClientToken: ptr.String("__ClientToken__"),
		Configuration: &types.AnalyzerConfigurationMemberUnusedAccess{
			Value: types.UnusedAccessConfiguration{
				UnusedAccessAge: ptr.Int32(1),
				AnalysisRule: &types.AnalysisRule{
					Exclusions: []types.AnalysisRuleCriteria{
						{
							AccountIds: []string{
								"__Member__",
								"__Member__",
							},
							ResourceTags: []map[string]string{
								{
									"key0": "__Value__",
								},
								{
									"key0": "__Value__",
								},
							},
						},
						{
							AccountIds: []string{
								"__Member__",
								"__Member__",
							},
							ResourceTags: []map[string]string{
								{
									"key0": "__Value__",
								},
								{
									"key0": "__Value__",
								},
							},
						},
					},
				},
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateAnalyzer(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(), "CreateAnalyzer"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_CreateArchiveRule(t *testing.T) {
	input := &CreateArchiveRuleInput{
		AnalyzerName: ptr.String("__AnalyzerName__"),
		RuleName:     ptr.String("__RuleName__"),
		Filter: map[string]types.Criterion{
			"key0": {
				Eq: []string{
					"__Member__",
					"__Member__",
				},
				Neq: []string{
					"__Member__",
					"__Member__",
				},
				Contains: []string{
					"__Member__",
					"__Member__",
				},
				Exists: ptr.Bool(true),
			},
		},
		ClientToken: ptr.String("__ClientToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateArchiveRule(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(), "CreateArchiveRule"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_CreateServiceLinkedAnalyzer(t *testing.T) {
	input := &CreateServiceLinkedAnalyzerInput{
		Type: types.Type("ACCOUNT"),
		ArchiveRules: []types.InlineArchiveRule{
			{
				RuleName: ptr.String("__RuleName__"),
				Filter: map[string]types.Criterion{
					"key0": {
						Eq: []string{
							"__Member__",
							"__Member__",
						},
						Neq: []string{
							"__Member__",
							"__Member__",
						},
						Contains: []string{
							"__Member__",
							"__Member__",
						},
						Exists: ptr.Bool(true),
					},
				},
			},
			{
				RuleName: ptr.String("__RuleName__"),
				Filter: map[string]types.Criterion{
					"key0": {
						Eq: []string{
							"__Member__",
							"__Member__",
						},
						Neq: []string{
							"__Member__",
							"__Member__",
						},
						Contains: []string{
							"__Member__",
							"__Member__",
						},
						Exists: ptr.Bool(true),
					},
				},
			},
		},
		ClientToken: ptr.String("__ClientToken__"),
		Configuration: &types.AnalyzerConfigurationMemberUnusedAccess{
			Value: types.UnusedAccessConfiguration{
				UnusedAccessAge: ptr.Int32(1),
				AnalysisRule: &types.AnalysisRule{
					Exclusions: []types.AnalysisRuleCriteria{
						{
							AccountIds: []string{
								"__Member__",
								"__Member__",
							},
							ResourceTags: []map[string]string{
								{
									"key0": "__Value__",
								},
								{
									"key0": "__Value__",
								},
							},
						},
						{
							AccountIds: []string{
								"__Member__",
								"__Member__",
							},
							ResourceTags: []map[string]string{
								{
									"key0": "__Value__",
								},
								{
									"key0": "__Value__",
								},
							},
						},
					},
				},
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateServiceLinkedAnalyzer(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(), "CreateServiceLinkedAnalyzer"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DeleteAnalyzer(t *testing.T) {
	input := &DeleteAnalyzerInput{
		AnalyzerName: ptr.String("__AnalyzerName__"),
		ClientToken:  ptr.String("__ClientToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteAnalyzer(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(), "DeleteAnalyzer"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DeleteArchiveRule(t *testing.T) {
	input := &DeleteArchiveRuleInput{
		AnalyzerName: ptr.String("__AnalyzerName__"),
		RuleName:     ptr.String("__RuleName__"),
		ClientToken:  ptr.String("__ClientToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteArchiveRule(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(), "DeleteArchiveRule"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DeleteServiceLinkedAnalyzer(t *testing.T) {
	input := &DeleteServiceLinkedAnalyzerInput{
		AnalyzerName: ptr.String("__AnalyzerName__"),
		ClientToken:  ptr.String("__ClientToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteServiceLinkedAnalyzer(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(), "DeleteServiceLinkedAnalyzer"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_GenerateFindingRecommendation(t *testing.T) {
	input := &GenerateFindingRecommendationInput{
		AnalyzerArn: ptr.String("__AnalyzerArn__"),
		Id:          ptr.String("__Id__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.GenerateFindingRecommendation(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(), "GenerateFindingRecommendation"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_GetAccessPreview(t *testing.T) {
	input := &GetAccessPreviewInput{
		AccessPreviewId: ptr.String("__AccessPreviewId__"),
		AnalyzerArn:     ptr.String("__AnalyzerArn__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.GetAccessPreview(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(), "GetAccessPreview"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_GetAnalyzedResource(t *testing.T) {
	input := &GetAnalyzedResourceInput{
		AnalyzerArn: ptr.String("__AnalyzerArn__"),
		ResourceArn: ptr.String("__ResourceArn__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.GetAnalyzedResource(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(), "GetAnalyzedResource"); err != nil {
		t.Fatal(err)
	}
}

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

func TestCheckRequestSnapshot_GetArchiveRule(t *testing.T) {
	input := &GetArchiveRuleInput{
		AnalyzerName: ptr.String("__AnalyzerName__"),
		RuleName:     ptr.String("__RuleName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.GetArchiveRule(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(), "GetArchiveRule"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_GetFinding(t *testing.T) {
	input := &GetFindingInput{
		AnalyzerArn: ptr.String("__AnalyzerArn__"),
		Id:          ptr.String("__Id__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.GetFinding(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(), "GetFinding"); err != nil {
		t.Fatal(err)
	}
}

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

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

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

func TestCheckRequestSnapshot_GetGeneratedPolicy(t *testing.T) {
	input := &GetGeneratedPolicyInput{
		JobId:                       ptr.String("__JobId__"),
		IncludeResourcePlaceholders: ptr.Bool(true),
		IncludeServiceLevelTemplate: ptr.Bool(true),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.GetGeneratedPolicy(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(), "GetGeneratedPolicy"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListAccessPreviewFindings(t *testing.T) {
	input := &ListAccessPreviewFindingsInput{
		AccessPreviewId: ptr.String("__AccessPreviewId__"),
		AnalyzerArn:     ptr.String("__AnalyzerArn__"),
		Filter: map[string]types.Criterion{
			"key0": {
				Eq: []string{
					"__Member__",
					"__Member__",
				},
				Neq: []string{
					"__Member__",
					"__Member__",
				},
				Contains: []string{
					"__Member__",
					"__Member__",
				},
				Exists: ptr.Bool(true),
			},
		},
		NextToken:  ptr.String("__NextToken__"),
		MaxResults: ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListAccessPreviewFindings(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(), "ListAccessPreviewFindings"); err != nil {
		t.Fatal(err)
	}
}

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

func TestCheckRequestSnapshot_ListAnalyzedResources(t *testing.T) {
	input := &ListAnalyzedResourcesInput{
		AnalyzerArn:  ptr.String("__AnalyzerArn__"),
		ResourceType: types.ResourceType("AWS::S3::Bucket"),
		NextToken:    ptr.String("__NextToken__"),
		MaxResults:   ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListAnalyzedResources(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(), "ListAnalyzedResources"); err != nil {
		t.Fatal(err)
	}
}

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

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

func TestCheckRequestSnapshot_ListFindings(t *testing.T) {
	input := &ListFindingsInput{
		AnalyzerArn: ptr.String("__AnalyzerArn__"),
		Filter: map[string]types.Criterion{
			"key0": {
				Eq: []string{
					"__Member__",
					"__Member__",
				},
				Neq: []string{
					"__Member__",
					"__Member__",
				},
				Contains: []string{
					"__Member__",
					"__Member__",
				},
				Exists: ptr.Bool(true),
			},
		},
		Sort: &types.SortCriteria{
			AttributeName: ptr.String("__AttributeName__"),
			OrderBy:       types.OrderBy("ASC"),
		},
		NextToken:  ptr.String("__NextToken__"),
		MaxResults: ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListFindings(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(), "ListFindings"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListFindingsV2(t *testing.T) {
	input := &ListFindingsV2Input{
		AnalyzerArn: ptr.String("__AnalyzerArn__"),
		Filter: map[string]types.Criterion{
			"key0": {
				Eq: []string{
					"__Member__",
					"__Member__",
				},
				Neq: []string{
					"__Member__",
					"__Member__",
				},
				Contains: []string{
					"__Member__",
					"__Member__",
				},
				Exists: ptr.Bool(true),
			},
		},
		MaxResults: ptr.Int32(1),
		NextToken:  ptr.String("__NextToken__"),
		Sort: &types.SortCriteria{
			AttributeName: ptr.String("__AttributeName__"),
			OrderBy:       types.OrderBy("ASC"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListFindingsV2(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(), "ListFindingsV2"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListPolicyGenerations(t *testing.T) {
	input := &ListPolicyGenerationsInput{
		PrincipalArn: ptr.String("__PrincipalArn__"),
		MaxResults:   ptr.Int32(1),
		NextToken:    ptr.String("__NextToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListPolicyGenerations(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(), "ListPolicyGenerations"); 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_StartPolicyGeneration(t *testing.T) {
	input := &StartPolicyGenerationInput{
		PolicyGenerationDetails: &types.PolicyGenerationDetails{
			PrincipalArn: ptr.String("__PrincipalArn__"),
		},
		CloudTrailDetails: &types.CloudTrailDetails{
			Trails: []types.Trail{
				{
					CloudTrailArn: ptr.String("__CloudTrailArn__"),
					Regions: []string{
						"__Member__",
						"__Member__",
					},
					AllRegions: ptr.Bool(true),
				},
				{
					CloudTrailArn: ptr.String("__CloudTrailArn__"),
					Regions: []string{
						"__Member__",
						"__Member__",
					},
					AllRegions: ptr.Bool(true),
				},
			},
			AccessRole: ptr.String("__AccessRole__"),
			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)),
		},
		ClientToken: ptr.String("__ClientToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.StartPolicyGeneration(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(), "StartPolicyGeneration"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_StartResourceScan(t *testing.T) {
	input := &StartResourceScanInput{
		AnalyzerArn:          ptr.String("__AnalyzerArn__"),
		ResourceArn:          ptr.String("__ResourceArn__"),
		ResourceOwnerAccount: ptr.String("__ResourceOwnerAccount__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.StartResourceScan(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(), "StartResourceScan"); 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_UpdateAnalyzer(t *testing.T) {
	input := &UpdateAnalyzerInput{
		AnalyzerName: ptr.String("__AnalyzerName__"),
		Configuration: &types.AnalyzerConfigurationMemberUnusedAccess{
			Value: types.UnusedAccessConfiguration{
				UnusedAccessAge: ptr.Int32(1),
				AnalysisRule: &types.AnalysisRule{
					Exclusions: []types.AnalysisRuleCriteria{
						{
							AccountIds: []string{
								"__Member__",
								"__Member__",
							},
							ResourceTags: []map[string]string{
								{
									"key0": "__Value__",
								},
								{
									"key0": "__Value__",
								},
							},
						},
						{
							AccountIds: []string{
								"__Member__",
								"__Member__",
							},
							ResourceTags: []map[string]string{
								{
									"key0": "__Value__",
								},
								{
									"key0": "__Value__",
								},
							},
						},
					},
				},
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateAnalyzer(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(), "UpdateAnalyzer"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_UpdateArchiveRule(t *testing.T) {
	input := &UpdateArchiveRuleInput{
		AnalyzerName: ptr.String("__AnalyzerName__"),
		RuleName:     ptr.String("__RuleName__"),
		Filter: map[string]types.Criterion{
			"key0": {
				Eq: []string{
					"__Member__",
					"__Member__",
				},
				Neq: []string{
					"__Member__",
					"__Member__",
				},
				Contains: []string{
					"__Member__",
					"__Member__",
				},
				Exists: ptr.Bool(true),
			},
		},
		ClientToken: ptr.String("__ClientToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateArchiveRule(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(), "UpdateArchiveRule"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_UpdateFindings(t *testing.T) {
	input := &UpdateFindingsInput{
		AnalyzerArn: ptr.String("__AnalyzerArn__"),
		Status:      types.FindingStatusUpdate("ACTIVE"),
		Ids: []string{
			"__Member__",
			"__Member__",
		},
		ResourceArn: ptr.String("__ResourceArn__"),
		ClientToken: ptr.String("__ClientToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateFindings(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(), "UpdateFindings"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ValidatePolicy(t *testing.T) {
	input := &ValidatePolicyInput{
		Locale:                     types.Locale("DE"),
		MaxResults:                 ptr.Int32(1),
		NextToken:                  ptr.String("__NextToken__"),
		PolicyDocument:             ptr.String("__PolicyDocument__"),
		PolicyType:                 types.PolicyType("IDENTITY_POLICY"),
		ValidatePolicyResourceType: types.ValidatePolicyResourceType("AWS::S3::Bucket"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ValidatePolicy(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(), "ValidatePolicy"); err != nil {
		t.Fatal(err)
	}
}
func TestUpdateRequestSnapshot_ApplyArchiveRule(t *testing.T) {
	input := &ApplyArchiveRuleInput{
		AnalyzerArn: ptr.String("__AnalyzerArn__"),
		RuleName:    ptr.String("__RuleName__"),
		ClientToken: ptr.String("__ClientToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ApplyArchiveRule(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(), "ApplyArchiveRule"); err != nil {
		t.Fatal(err)
	}
}

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

func TestUpdateRequestSnapshot_CheckAccessNotGranted(t *testing.T) {
	input := &CheckAccessNotGrantedInput{
		PolicyDocument: ptr.String("__PolicyDocument__"),
		Access: []types.Access{
			{
				Actions: []string{
					"__Member__",
					"__Member__",
				},
				Resources: []string{
					"__Member__",
					"__Member__",
				},
			},
			{
				Actions: []string{
					"__Member__",
					"__Member__",
				},
				Resources: []string{
					"__Member__",
					"__Member__",
				},
			},
		},
		PolicyType: types.AccessCheckPolicyType("IDENTITY_POLICY"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CheckAccessNotGranted(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(), "CheckAccessNotGranted"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_CheckNoNewAccess(t *testing.T) {
	input := &CheckNoNewAccessInput{
		NewPolicyDocument:      ptr.String("__NewPolicyDocument__"),
		ExistingPolicyDocument: ptr.String("__ExistingPolicyDocument__"),
		PolicyType:             types.AccessCheckPolicyType("IDENTITY_POLICY"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CheckNoNewAccess(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(), "CheckNoNewAccess"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_CheckNoPublicAccess(t *testing.T) {
	input := &CheckNoPublicAccessInput{
		PolicyDocument: ptr.String("__PolicyDocument__"),
		ResourceType:   types.AccessCheckResourceType("AWS::DynamoDB::Table"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CheckNoPublicAccess(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(), "CheckNoPublicAccess"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_CreateAccessPreview(t *testing.T) {
	input := &CreateAccessPreviewInput{
		AnalyzerArn: ptr.String("__AnalyzerArn__"),
		Configurations: map[string]types.Configuration{
			"key0": &types.ConfigurationMemberEbsSnapshot{
				Value: types.EbsSnapshotConfiguration{
					UserIds: []string{
						"__Member__",
						"__Member__",
					},
					Groups: []string{
						"__Member__",
						"__Member__",
					},
					KmsKeyId: ptr.String("__KmsKeyId__"),
				},
			},
		},
		ClientToken: ptr.String("__ClientToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateAccessPreview(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(), "CreateAccessPreview"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_CreateAnalyzer(t *testing.T) {
	input := &CreateAnalyzerInput{
		AnalyzerName: ptr.String("__AnalyzerName__"),
		Type:         types.Type("ACCOUNT"),
		ArchiveRules: []types.InlineArchiveRule{
			{
				RuleName: ptr.String("__RuleName__"),
				Filter: map[string]types.Criterion{
					"key0": {
						Eq: []string{
							"__Member__",
							"__Member__",
						},
						Neq: []string{
							"__Member__",
							"__Member__",
						},
						Contains: []string{
							"__Member__",
							"__Member__",
						},
						Exists: ptr.Bool(true),
					},
				},
			},
			{
				RuleName: ptr.String("__RuleName__"),
				Filter: map[string]types.Criterion{
					"key0": {
						Eq: []string{
							"__Member__",
							"__Member__",
						},
						Neq: []string{
							"__Member__",
							"__Member__",
						},
						Contains: []string{
							"__Member__",
							"__Member__",
						},
						Exists: ptr.Bool(true),
					},
				},
			},
		},
		Tags: map[string]string{
			"key0": "__Value__",
		},
		ClientToken: ptr.String("__ClientToken__"),
		Configuration: &types.AnalyzerConfigurationMemberUnusedAccess{
			Value: types.UnusedAccessConfiguration{
				UnusedAccessAge: ptr.Int32(1),
				AnalysisRule: &types.AnalysisRule{
					Exclusions: []types.AnalysisRuleCriteria{
						{
							AccountIds: []string{
								"__Member__",
								"__Member__",
							},
							ResourceTags: []map[string]string{
								{
									"key0": "__Value__",
								},
								{
									"key0": "__Value__",
								},
							},
						},
						{
							AccountIds: []string{
								"__Member__",
								"__Member__",
							},
							ResourceTags: []map[string]string{
								{
									"key0": "__Value__",
								},
								{
									"key0": "__Value__",
								},
							},
						},
					},
				},
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateAnalyzer(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(), "CreateAnalyzer"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_CreateArchiveRule(t *testing.T) {
	input := &CreateArchiveRuleInput{
		AnalyzerName: ptr.String("__AnalyzerName__"),
		RuleName:     ptr.String("__RuleName__"),
		Filter: map[string]types.Criterion{
			"key0": {
				Eq: []string{
					"__Member__",
					"__Member__",
				},
				Neq: []string{
					"__Member__",
					"__Member__",
				},
				Contains: []string{
					"__Member__",
					"__Member__",
				},
				Exists: ptr.Bool(true),
			},
		},
		ClientToken: ptr.String("__ClientToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateArchiveRule(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(), "CreateArchiveRule"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_CreateServiceLinkedAnalyzer(t *testing.T) {
	input := &CreateServiceLinkedAnalyzerInput{
		Type: types.Type("ACCOUNT"),
		ArchiveRules: []types.InlineArchiveRule{
			{
				RuleName: ptr.String("__RuleName__"),
				Filter: map[string]types.Criterion{
					"key0": {
						Eq: []string{
							"__Member__",
							"__Member__",
						},
						Neq: []string{
							"__Member__",
							"__Member__",
						},
						Contains: []string{
							"__Member__",
							"__Member__",
						},
						Exists: ptr.Bool(true),
					},
				},
			},
			{
				RuleName: ptr.String("__RuleName__"),
				Filter: map[string]types.Criterion{
					"key0": {
						Eq: []string{
							"__Member__",
							"__Member__",
						},
						Neq: []string{
							"__Member__",
							"__Member__",
						},
						Contains: []string{
							"__Member__",
							"__Member__",
						},
						Exists: ptr.Bool(true),
					},
				},
			},
		},
		ClientToken: ptr.String("__ClientToken__"),
		Configuration: &types.AnalyzerConfigurationMemberUnusedAccess{
			Value: types.UnusedAccessConfiguration{
				UnusedAccessAge: ptr.Int32(1),
				AnalysisRule: &types.AnalysisRule{
					Exclusions: []types.AnalysisRuleCriteria{
						{
							AccountIds: []string{
								"__Member__",
								"__Member__",
							},
							ResourceTags: []map[string]string{
								{
									"key0": "__Value__",
								},
								{
									"key0": "__Value__",
								},
							},
						},
						{
							AccountIds: []string{
								"__Member__",
								"__Member__",
							},
							ResourceTags: []map[string]string{
								{
									"key0": "__Value__",
								},
								{
									"key0": "__Value__",
								},
							},
						},
					},
				},
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateServiceLinkedAnalyzer(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(), "CreateServiceLinkedAnalyzer"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DeleteAnalyzer(t *testing.T) {
	input := &DeleteAnalyzerInput{
		AnalyzerName: ptr.String("__AnalyzerName__"),
		ClientToken:  ptr.String("__ClientToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteAnalyzer(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(), "DeleteAnalyzer"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DeleteArchiveRule(t *testing.T) {
	input := &DeleteArchiveRuleInput{
		AnalyzerName: ptr.String("__AnalyzerName__"),
		RuleName:     ptr.String("__RuleName__"),
		ClientToken:  ptr.String("__ClientToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteArchiveRule(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(), "DeleteArchiveRule"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DeleteServiceLinkedAnalyzer(t *testing.T) {
	input := &DeleteServiceLinkedAnalyzerInput{
		AnalyzerName: ptr.String("__AnalyzerName__"),
		ClientToken:  ptr.String("__ClientToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteServiceLinkedAnalyzer(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(), "DeleteServiceLinkedAnalyzer"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_GenerateFindingRecommendation(t *testing.T) {
	input := &GenerateFindingRecommendationInput{
		AnalyzerArn: ptr.String("__AnalyzerArn__"),
		Id:          ptr.String("__Id__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.GenerateFindingRecommendation(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(), "GenerateFindingRecommendation"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_GetAccessPreview(t *testing.T) {
	input := &GetAccessPreviewInput{
		AccessPreviewId: ptr.String("__AccessPreviewId__"),
		AnalyzerArn:     ptr.String("__AnalyzerArn__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.GetAccessPreview(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(), "GetAccessPreview"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_GetAnalyzedResource(t *testing.T) {
	input := &GetAnalyzedResourceInput{
		AnalyzerArn: ptr.String("__AnalyzerArn__"),
		ResourceArn: ptr.String("__ResourceArn__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.GetAnalyzedResource(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(), "GetAnalyzedResource"); err != nil {
		t.Fatal(err)
	}
}

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

func TestUpdateRequestSnapshot_GetArchiveRule(t *testing.T) {
	input := &GetArchiveRuleInput{
		AnalyzerName: ptr.String("__AnalyzerName__"),
		RuleName:     ptr.String("__RuleName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.GetArchiveRule(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(), "GetArchiveRule"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_GetFinding(t *testing.T) {
	input := &GetFindingInput{
		AnalyzerArn: ptr.String("__AnalyzerArn__"),
		Id:          ptr.String("__Id__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.GetFinding(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(), "GetFinding"); err != nil {
		t.Fatal(err)
	}
}

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

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

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

func TestUpdateRequestSnapshot_GetGeneratedPolicy(t *testing.T) {
	input := &GetGeneratedPolicyInput{
		JobId:                       ptr.String("__JobId__"),
		IncludeResourcePlaceholders: ptr.Bool(true),
		IncludeServiceLevelTemplate: ptr.Bool(true),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.GetGeneratedPolicy(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(), "GetGeneratedPolicy"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListAccessPreviewFindings(t *testing.T) {
	input := &ListAccessPreviewFindingsInput{
		AccessPreviewId: ptr.String("__AccessPreviewId__"),
		AnalyzerArn:     ptr.String("__AnalyzerArn__"),
		Filter: map[string]types.Criterion{
			"key0": {
				Eq: []string{
					"__Member__",
					"__Member__",
				},
				Neq: []string{
					"__Member__",
					"__Member__",
				},
				Contains: []string{
					"__Member__",
					"__Member__",
				},
				Exists: ptr.Bool(true),
			},
		},
		NextToken:  ptr.String("__NextToken__"),
		MaxResults: ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListAccessPreviewFindings(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(), "ListAccessPreviewFindings"); err != nil {
		t.Fatal(err)
	}
}

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

func TestUpdateRequestSnapshot_ListAnalyzedResources(t *testing.T) {
	input := &ListAnalyzedResourcesInput{
		AnalyzerArn:  ptr.String("__AnalyzerArn__"),
		ResourceType: types.ResourceType("AWS::S3::Bucket"),
		NextToken:    ptr.String("__NextToken__"),
		MaxResults:   ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListAnalyzedResources(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(), "ListAnalyzedResources"); err != nil {
		t.Fatal(err)
	}
}

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

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

func TestUpdateRequestSnapshot_ListFindings(t *testing.T) {
	input := &ListFindingsInput{
		AnalyzerArn: ptr.String("__AnalyzerArn__"),
		Filter: map[string]types.Criterion{
			"key0": {
				Eq: []string{
					"__Member__",
					"__Member__",
				},
				Neq: []string{
					"__Member__",
					"__Member__",
				},
				Contains: []string{
					"__Member__",
					"__Member__",
				},
				Exists: ptr.Bool(true),
			},
		},
		Sort: &types.SortCriteria{
			AttributeName: ptr.String("__AttributeName__"),
			OrderBy:       types.OrderBy("ASC"),
		},
		NextToken:  ptr.String("__NextToken__"),
		MaxResults: ptr.Int32(1),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListFindings(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(), "ListFindings"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListFindingsV2(t *testing.T) {
	input := &ListFindingsV2Input{
		AnalyzerArn: ptr.String("__AnalyzerArn__"),
		Filter: map[string]types.Criterion{
			"key0": {
				Eq: []string{
					"__Member__",
					"__Member__",
				},
				Neq: []string{
					"__Member__",
					"__Member__",
				},
				Contains: []string{
					"__Member__",
					"__Member__",
				},
				Exists: ptr.Bool(true),
			},
		},
		MaxResults: ptr.Int32(1),
		NextToken:  ptr.String("__NextToken__"),
		Sort: &types.SortCriteria{
			AttributeName: ptr.String("__AttributeName__"),
			OrderBy:       types.OrderBy("ASC"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListFindingsV2(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(), "ListFindingsV2"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListPolicyGenerations(t *testing.T) {
	input := &ListPolicyGenerationsInput{
		PrincipalArn: ptr.String("__PrincipalArn__"),
		MaxResults:   ptr.Int32(1),
		NextToken:    ptr.String("__NextToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListPolicyGenerations(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(), "ListPolicyGenerations"); 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_StartPolicyGeneration(t *testing.T) {
	input := &StartPolicyGenerationInput{
		PolicyGenerationDetails: &types.PolicyGenerationDetails{
			PrincipalArn: ptr.String("__PrincipalArn__"),
		},
		CloudTrailDetails: &types.CloudTrailDetails{
			Trails: []types.Trail{
				{
					CloudTrailArn: ptr.String("__CloudTrailArn__"),
					Regions: []string{
						"__Member__",
						"__Member__",
					},
					AllRegions: ptr.Bool(true),
				},
				{
					CloudTrailArn: ptr.String("__CloudTrailArn__"),
					Regions: []string{
						"__Member__",
						"__Member__",
					},
					AllRegions: ptr.Bool(true),
				},
			},
			AccessRole: ptr.String("__AccessRole__"),
			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)),
		},
		ClientToken: ptr.String("__ClientToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.StartPolicyGeneration(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(), "StartPolicyGeneration"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_StartResourceScan(t *testing.T) {
	input := &StartResourceScanInput{
		AnalyzerArn:          ptr.String("__AnalyzerArn__"),
		ResourceArn:          ptr.String("__ResourceArn__"),
		ResourceOwnerAccount: ptr.String("__ResourceOwnerAccount__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.StartResourceScan(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(), "StartResourceScan"); 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_UpdateAnalyzer(t *testing.T) {
	input := &UpdateAnalyzerInput{
		AnalyzerName: ptr.String("__AnalyzerName__"),
		Configuration: &types.AnalyzerConfigurationMemberUnusedAccess{
			Value: types.UnusedAccessConfiguration{
				UnusedAccessAge: ptr.Int32(1),
				AnalysisRule: &types.AnalysisRule{
					Exclusions: []types.AnalysisRuleCriteria{
						{
							AccountIds: []string{
								"__Member__",
								"__Member__",
							},
							ResourceTags: []map[string]string{
								{
									"key0": "__Value__",
								},
								{
									"key0": "__Value__",
								},
							},
						},
						{
							AccountIds: []string{
								"__Member__",
								"__Member__",
							},
							ResourceTags: []map[string]string{
								{
									"key0": "__Value__",
								},
								{
									"key0": "__Value__",
								},
							},
						},
					},
				},
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateAnalyzer(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(), "UpdateAnalyzer"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_UpdateArchiveRule(t *testing.T) {
	input := &UpdateArchiveRuleInput{
		AnalyzerName: ptr.String("__AnalyzerName__"),
		RuleName:     ptr.String("__RuleName__"),
		Filter: map[string]types.Criterion{
			"key0": {
				Eq: []string{
					"__Member__",
					"__Member__",
				},
				Neq: []string{
					"__Member__",
					"__Member__",
				},
				Contains: []string{
					"__Member__",
					"__Member__",
				},
				Exists: ptr.Bool(true),
			},
		},
		ClientToken: ptr.String("__ClientToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateArchiveRule(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(), "UpdateArchiveRule"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_UpdateFindings(t *testing.T) {
	input := &UpdateFindingsInput{
		AnalyzerArn: ptr.String("__AnalyzerArn__"),
		Status:      types.FindingStatusUpdate("ACTIVE"),
		Ids: []string{
			"__Member__",
			"__Member__",
		},
		ResourceArn: ptr.String("__ResourceArn__"),
		ClientToken: ptr.String("__ClientToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateFindings(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(), "UpdateFindings"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ValidatePolicy(t *testing.T) {
	input := &ValidatePolicyInput{
		Locale:                     types.Locale("DE"),
		MaxResults:                 ptr.Int32(1),
		NextToken:                  ptr.String("__NextToken__"),
		PolicyDocument:             ptr.String("__PolicyDocument__"),
		PolicyType:                 types.PolicyType("IDENTITY_POLICY"),
		ValidatePolicyResourceType: types.ValidatePolicyResourceType("AWS::S3::Bucket"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ValidatePolicy(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(), "ValidatePolicy"); err != nil {
		t.Fatal(err)
	}
}
