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

//go:build response_snapshot

package cloudsearch

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

const serdeRespSSPrefix = "response_snapshot"

func serdeRespSSPath(op string) string {
	return fmt.Sprintf("%s/%s.snap", serdeRespSSPrefix, op)
}

// serdeRespReadSnapshot parses a frozen wire response fixture: a status-code
// line, HTTP headers, a blank line, then the raw body.
func serdeRespReadSnapshot(op string) (int, http.Header, []byte, error) {
	raw, err := os.ReadFile(serdeRespSSPath(op))
	if err != nil {
		return 0, nil, nil, err
	}

	r := bufio.NewReader(bytes.NewReader(raw))
	statusLine, err := r.ReadString('\n')
	if err != nil {
		return 0, nil, nil, fmt.Errorf("read status line: %w", err)
	}
	status, err := strconv.Atoi(strings.TrimSpace(statusLine))
	if err != nil {
		return 0, nil, nil, fmt.Errorf("parse status: %w", err)
	}

	header := http.Header{}
	for {
		line, err := r.ReadString('\n')
		if err != nil && err != io.EOF {
			return 0, nil, nil, err
		}
		trimmed := strings.TrimRight(line, "\r\n")
		if trimmed == "" {
			break
		}
		k, v, ok := strings.Cut(trimmed, ": ")
		if !ok {
			return 0, nil, nil, fmt.Errorf("malformed header %q", trimmed)
		}
		header.Add(k, v)
		if err == io.EOF {
			break
		}
	}

	body, err := io.ReadAll(r)
	if err != nil {
		return 0, nil, nil, err
	}
	return status, header, body, nil
}

type serdeRespEndpointResolver struct{}

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

func serdeRespClient(status int, header http.Header, body []byte) *Client {
	return New(Options{
		Region: "us-east-1",
		HTTPClient: smithyhttp.ClientDoFunc(func(req *http.Request) (*http.Response, error) {
			resp := &http.Response{StatusCode: status, Header: header, Request: req}
			if len(body) > 0 {
				resp.ContentLength = int64(len(body))
				resp.Body = io.NopCloser(bytes.NewReader(body))
			} else {
				resp.Body = http.NoBody
			}
			return resp, nil
		}),
		EndpointResolverV2: &serdeRespEndpointResolver{},
		APIOptions: []func(*middleware.Stack) error{
			func(s *middleware.Stack) error {
				s.Finalize.Clear()
				s.Initialize.Remove("OperationInputValidation")
				return nil
			},
		},
	})
}
func TestCheckResponseSnapshot_BuildSuggesters(t *testing.T) {
	want := &BuildSuggestersOutput{
		FieldNames: []string{
			"__Member__",
			"__Member__",
		},
	}
	status, header, body, err := serdeRespReadSnapshot("BuildSuggesters.response")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	got, err := svc.BuildSuggesters(context.Background(), &BuildSuggestersInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "BuildSuggesters.response", err)
	}
}

func TestCheckResponseSnapshot_CreateDomain(t *testing.T) {
	want := &CreateDomainOutput{
		DomainStatus: &types.DomainStatus{
			DomainId:   ptr.String("__DomainId__"),
			DomainName: ptr.String("__DomainName__"),
			ARN:        ptr.String("__ARN__"),
			Created:    ptr.Bool(true),
			Deleted:    ptr.Bool(true),
			DocService: &types.ServiceEndpoint{
				Endpoint: ptr.String("__Endpoint__"),
			},
			SearchService: &types.ServiceEndpoint{
				Endpoint: ptr.String("__Endpoint__"),
			},
			RequiresIndexDocuments: ptr.Bool(true),
			Processing:             ptr.Bool(true),
			SearchInstanceType:     ptr.String("__SearchInstanceType__"),
			SearchPartitionCount:   ptr.Int32(1),
			SearchInstanceCount:    ptr.Int32(1),
			Limits: &types.Limits{
				MaximumReplicationCount: ptr.Int32(1),
				MaximumPartitionCount:   ptr.Int32(1),
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("CreateDomain.response")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	got, err := svc.CreateDomain(context.Background(), &CreateDomainInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "CreateDomain.response", err)
	}
}

func TestCheckResponseSnapshot_DefineAnalysisScheme(t *testing.T) {
	want := &DefineAnalysisSchemeOutput{
		AnalysisScheme: &types.AnalysisSchemeStatus{
			Options: &types.AnalysisScheme{
				AnalysisSchemeName:     ptr.String("__AnalysisSchemeName__"),
				AnalysisSchemeLanguage: types.AnalysisSchemeLanguage("ar"),
				AnalysisOptions: &types.AnalysisOptions{
					Synonyms:                       ptr.String("__Synonyms__"),
					Stopwords:                      ptr.String("__Stopwords__"),
					StemmingDictionary:             ptr.String("__StemmingDictionary__"),
					JapaneseTokenizationDictionary: ptr.String("__JapaneseTokenizationDictionary__"),
					AlgorithmicStemming:            types.AlgorithmicStemming("none"),
				},
			},
			Status: &types.OptionStatus{
				CreationDate:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateDate:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateVersion:   1,
				State:           types.OptionState("RequiresIndexDocuments"),
				PendingDeletion: ptr.Bool(true),
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("DefineAnalysisScheme.response")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	got, err := svc.DefineAnalysisScheme(context.Background(), &DefineAnalysisSchemeInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "DefineAnalysisScheme.response", err)
	}
}

func TestCheckResponseSnapshot_DefineExpression(t *testing.T) {
	want := &DefineExpressionOutput{
		Expression: &types.ExpressionStatus{
			Options: &types.Expression{
				ExpressionName:  ptr.String("__ExpressionName__"),
				ExpressionValue: ptr.String("__ExpressionValue__"),
			},
			Status: &types.OptionStatus{
				CreationDate:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateDate:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateVersion:   1,
				State:           types.OptionState("RequiresIndexDocuments"),
				PendingDeletion: ptr.Bool(true),
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("DefineExpression.response")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	got, err := svc.DefineExpression(context.Background(), &DefineExpressionInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "DefineExpression.response", err)
	}
}

func TestCheckResponseSnapshot_DefineIndexField(t *testing.T) {
	want := &DefineIndexFieldOutput{
		IndexField: &types.IndexFieldStatus{
			Options: &types.IndexField{
				IndexFieldName: ptr.String("__IndexFieldName__"),
				IndexFieldType: types.IndexFieldType("int"),
				IntOptions: &types.IntOptions{
					DefaultValue:  ptr.Int64(1),
					SourceField:   ptr.String("__SourceField__"),
					FacetEnabled:  ptr.Bool(true),
					SearchEnabled: ptr.Bool(true),
					ReturnEnabled: ptr.Bool(true),
					SortEnabled:   ptr.Bool(true),
				},
				DoubleOptions: &types.DoubleOptions{
					DefaultValue:  ptr.Float64(1.0),
					SourceField:   ptr.String("__SourceField__"),
					FacetEnabled:  ptr.Bool(true),
					SearchEnabled: ptr.Bool(true),
					ReturnEnabled: ptr.Bool(true),
					SortEnabled:   ptr.Bool(true),
				},
				LiteralOptions: &types.LiteralOptions{
					DefaultValue:  ptr.String("__DefaultValue__"),
					SourceField:   ptr.String("__SourceField__"),
					FacetEnabled:  ptr.Bool(true),
					SearchEnabled: ptr.Bool(true),
					ReturnEnabled: ptr.Bool(true),
					SortEnabled:   ptr.Bool(true),
				},
				TextOptions: &types.TextOptions{
					DefaultValue:     ptr.String("__DefaultValue__"),
					SourceField:      ptr.String("__SourceField__"),
					ReturnEnabled:    ptr.Bool(true),
					SortEnabled:      ptr.Bool(true),
					HighlightEnabled: ptr.Bool(true),
					AnalysisScheme:   ptr.String("__AnalysisScheme__"),
				},
				DateOptions: &types.DateOptions{
					DefaultValue:  ptr.String("__DefaultValue__"),
					SourceField:   ptr.String("__SourceField__"),
					FacetEnabled:  ptr.Bool(true),
					SearchEnabled: ptr.Bool(true),
					ReturnEnabled: ptr.Bool(true),
					SortEnabled:   ptr.Bool(true),
				},
				LatLonOptions: &types.LatLonOptions{
					DefaultValue:  ptr.String("__DefaultValue__"),
					SourceField:   ptr.String("__SourceField__"),
					FacetEnabled:  ptr.Bool(true),
					SearchEnabled: ptr.Bool(true),
					ReturnEnabled: ptr.Bool(true),
					SortEnabled:   ptr.Bool(true),
				},
				IntArrayOptions: &types.IntArrayOptions{
					DefaultValue:  ptr.Int64(1),
					SourceFields:  ptr.String("__SourceFields__"),
					FacetEnabled:  ptr.Bool(true),
					SearchEnabled: ptr.Bool(true),
					ReturnEnabled: ptr.Bool(true),
				},
				DoubleArrayOptions: &types.DoubleArrayOptions{
					DefaultValue:  ptr.Float64(1.0),
					SourceFields:  ptr.String("__SourceFields__"),
					FacetEnabled:  ptr.Bool(true),
					SearchEnabled: ptr.Bool(true),
					ReturnEnabled: ptr.Bool(true),
				},
				LiteralArrayOptions: &types.LiteralArrayOptions{
					DefaultValue:  ptr.String("__DefaultValue__"),
					SourceFields:  ptr.String("__SourceFields__"),
					FacetEnabled:  ptr.Bool(true),
					SearchEnabled: ptr.Bool(true),
					ReturnEnabled: ptr.Bool(true),
				},
				TextArrayOptions: &types.TextArrayOptions{
					DefaultValue:     ptr.String("__DefaultValue__"),
					SourceFields:     ptr.String("__SourceFields__"),
					ReturnEnabled:    ptr.Bool(true),
					HighlightEnabled: ptr.Bool(true),
					AnalysisScheme:   ptr.String("__AnalysisScheme__"),
				},
				DateArrayOptions: &types.DateArrayOptions{
					DefaultValue:  ptr.String("__DefaultValue__"),
					SourceFields:  ptr.String("__SourceFields__"),
					FacetEnabled:  ptr.Bool(true),
					SearchEnabled: ptr.Bool(true),
					ReturnEnabled: ptr.Bool(true),
				},
			},
			Status: &types.OptionStatus{
				CreationDate:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateDate:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateVersion:   1,
				State:           types.OptionState("RequiresIndexDocuments"),
				PendingDeletion: ptr.Bool(true),
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("DefineIndexField.response")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	got, err := svc.DefineIndexField(context.Background(), &DefineIndexFieldInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "DefineIndexField.response", err)
	}
}

func TestCheckResponseSnapshot_DefineSuggester(t *testing.T) {
	want := &DefineSuggesterOutput{
		Suggester: &types.SuggesterStatus{
			Options: &types.Suggester{
				SuggesterName: ptr.String("__SuggesterName__"),
				DocumentSuggesterOptions: &types.DocumentSuggesterOptions{
					SourceField:    ptr.String("__SourceField__"),
					FuzzyMatching:  types.SuggesterFuzzyMatching("none"),
					SortExpression: ptr.String("__SortExpression__"),
				},
			},
			Status: &types.OptionStatus{
				CreationDate:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateDate:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateVersion:   1,
				State:           types.OptionState("RequiresIndexDocuments"),
				PendingDeletion: ptr.Bool(true),
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("DefineSuggester.response")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	got, err := svc.DefineSuggester(context.Background(), &DefineSuggesterInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "DefineSuggester.response", err)
	}
}

func TestCheckResponseSnapshot_DeleteAnalysisScheme(t *testing.T) {
	want := &DeleteAnalysisSchemeOutput{
		AnalysisScheme: &types.AnalysisSchemeStatus{
			Options: &types.AnalysisScheme{
				AnalysisSchemeName:     ptr.String("__AnalysisSchemeName__"),
				AnalysisSchemeLanguage: types.AnalysisSchemeLanguage("ar"),
				AnalysisOptions: &types.AnalysisOptions{
					Synonyms:                       ptr.String("__Synonyms__"),
					Stopwords:                      ptr.String("__Stopwords__"),
					StemmingDictionary:             ptr.String("__StemmingDictionary__"),
					JapaneseTokenizationDictionary: ptr.String("__JapaneseTokenizationDictionary__"),
					AlgorithmicStemming:            types.AlgorithmicStemming("none"),
				},
			},
			Status: &types.OptionStatus{
				CreationDate:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateDate:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateVersion:   1,
				State:           types.OptionState("RequiresIndexDocuments"),
				PendingDeletion: ptr.Bool(true),
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("DeleteAnalysisScheme.response")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	got, err := svc.DeleteAnalysisScheme(context.Background(), &DeleteAnalysisSchemeInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "DeleteAnalysisScheme.response", err)
	}
}

func TestCheckResponseSnapshot_DeleteDomain(t *testing.T) {
	want := &DeleteDomainOutput{
		DomainStatus: &types.DomainStatus{
			DomainId:   ptr.String("__DomainId__"),
			DomainName: ptr.String("__DomainName__"),
			ARN:        ptr.String("__ARN__"),
			Created:    ptr.Bool(true),
			Deleted:    ptr.Bool(true),
			DocService: &types.ServiceEndpoint{
				Endpoint: ptr.String("__Endpoint__"),
			},
			SearchService: &types.ServiceEndpoint{
				Endpoint: ptr.String("__Endpoint__"),
			},
			RequiresIndexDocuments: ptr.Bool(true),
			Processing:             ptr.Bool(true),
			SearchInstanceType:     ptr.String("__SearchInstanceType__"),
			SearchPartitionCount:   ptr.Int32(1),
			SearchInstanceCount:    ptr.Int32(1),
			Limits: &types.Limits{
				MaximumReplicationCount: ptr.Int32(1),
				MaximumPartitionCount:   ptr.Int32(1),
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("DeleteDomain.response")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	got, err := svc.DeleteDomain(context.Background(), &DeleteDomainInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "DeleteDomain.response", err)
	}
}

func TestCheckResponseSnapshot_DeleteExpression(t *testing.T) {
	want := &DeleteExpressionOutput{
		Expression: &types.ExpressionStatus{
			Options: &types.Expression{
				ExpressionName:  ptr.String("__ExpressionName__"),
				ExpressionValue: ptr.String("__ExpressionValue__"),
			},
			Status: &types.OptionStatus{
				CreationDate:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateDate:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateVersion:   1,
				State:           types.OptionState("RequiresIndexDocuments"),
				PendingDeletion: ptr.Bool(true),
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("DeleteExpression.response")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	got, err := svc.DeleteExpression(context.Background(), &DeleteExpressionInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "DeleteExpression.response", err)
	}
}

func TestCheckResponseSnapshot_DeleteIndexField(t *testing.T) {
	want := &DeleteIndexFieldOutput{
		IndexField: &types.IndexFieldStatus{
			Options: &types.IndexField{
				IndexFieldName: ptr.String("__IndexFieldName__"),
				IndexFieldType: types.IndexFieldType("int"),
				IntOptions: &types.IntOptions{
					DefaultValue:  ptr.Int64(1),
					SourceField:   ptr.String("__SourceField__"),
					FacetEnabled:  ptr.Bool(true),
					SearchEnabled: ptr.Bool(true),
					ReturnEnabled: ptr.Bool(true),
					SortEnabled:   ptr.Bool(true),
				},
				DoubleOptions: &types.DoubleOptions{
					DefaultValue:  ptr.Float64(1.0),
					SourceField:   ptr.String("__SourceField__"),
					FacetEnabled:  ptr.Bool(true),
					SearchEnabled: ptr.Bool(true),
					ReturnEnabled: ptr.Bool(true),
					SortEnabled:   ptr.Bool(true),
				},
				LiteralOptions: &types.LiteralOptions{
					DefaultValue:  ptr.String("__DefaultValue__"),
					SourceField:   ptr.String("__SourceField__"),
					FacetEnabled:  ptr.Bool(true),
					SearchEnabled: ptr.Bool(true),
					ReturnEnabled: ptr.Bool(true),
					SortEnabled:   ptr.Bool(true),
				},
				TextOptions: &types.TextOptions{
					DefaultValue:     ptr.String("__DefaultValue__"),
					SourceField:      ptr.String("__SourceField__"),
					ReturnEnabled:    ptr.Bool(true),
					SortEnabled:      ptr.Bool(true),
					HighlightEnabled: ptr.Bool(true),
					AnalysisScheme:   ptr.String("__AnalysisScheme__"),
				},
				DateOptions: &types.DateOptions{
					DefaultValue:  ptr.String("__DefaultValue__"),
					SourceField:   ptr.String("__SourceField__"),
					FacetEnabled:  ptr.Bool(true),
					SearchEnabled: ptr.Bool(true),
					ReturnEnabled: ptr.Bool(true),
					SortEnabled:   ptr.Bool(true),
				},
				LatLonOptions: &types.LatLonOptions{
					DefaultValue:  ptr.String("__DefaultValue__"),
					SourceField:   ptr.String("__SourceField__"),
					FacetEnabled:  ptr.Bool(true),
					SearchEnabled: ptr.Bool(true),
					ReturnEnabled: ptr.Bool(true),
					SortEnabled:   ptr.Bool(true),
				},
				IntArrayOptions: &types.IntArrayOptions{
					DefaultValue:  ptr.Int64(1),
					SourceFields:  ptr.String("__SourceFields__"),
					FacetEnabled:  ptr.Bool(true),
					SearchEnabled: ptr.Bool(true),
					ReturnEnabled: ptr.Bool(true),
				},
				DoubleArrayOptions: &types.DoubleArrayOptions{
					DefaultValue:  ptr.Float64(1.0),
					SourceFields:  ptr.String("__SourceFields__"),
					FacetEnabled:  ptr.Bool(true),
					SearchEnabled: ptr.Bool(true),
					ReturnEnabled: ptr.Bool(true),
				},
				LiteralArrayOptions: &types.LiteralArrayOptions{
					DefaultValue:  ptr.String("__DefaultValue__"),
					SourceFields:  ptr.String("__SourceFields__"),
					FacetEnabled:  ptr.Bool(true),
					SearchEnabled: ptr.Bool(true),
					ReturnEnabled: ptr.Bool(true),
				},
				TextArrayOptions: &types.TextArrayOptions{
					DefaultValue:     ptr.String("__DefaultValue__"),
					SourceFields:     ptr.String("__SourceFields__"),
					ReturnEnabled:    ptr.Bool(true),
					HighlightEnabled: ptr.Bool(true),
					AnalysisScheme:   ptr.String("__AnalysisScheme__"),
				},
				DateArrayOptions: &types.DateArrayOptions{
					DefaultValue:  ptr.String("__DefaultValue__"),
					SourceFields:  ptr.String("__SourceFields__"),
					FacetEnabled:  ptr.Bool(true),
					SearchEnabled: ptr.Bool(true),
					ReturnEnabled: ptr.Bool(true),
				},
			},
			Status: &types.OptionStatus{
				CreationDate:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateDate:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateVersion:   1,
				State:           types.OptionState("RequiresIndexDocuments"),
				PendingDeletion: ptr.Bool(true),
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("DeleteIndexField.response")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	got, err := svc.DeleteIndexField(context.Background(), &DeleteIndexFieldInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "DeleteIndexField.response", err)
	}
}

func TestCheckResponseSnapshot_DeleteSuggester(t *testing.T) {
	want := &DeleteSuggesterOutput{
		Suggester: &types.SuggesterStatus{
			Options: &types.Suggester{
				SuggesterName: ptr.String("__SuggesterName__"),
				DocumentSuggesterOptions: &types.DocumentSuggesterOptions{
					SourceField:    ptr.String("__SourceField__"),
					FuzzyMatching:  types.SuggesterFuzzyMatching("none"),
					SortExpression: ptr.String("__SortExpression__"),
				},
			},
			Status: &types.OptionStatus{
				CreationDate:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateDate:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateVersion:   1,
				State:           types.OptionState("RequiresIndexDocuments"),
				PendingDeletion: ptr.Bool(true),
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("DeleteSuggester.response")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	got, err := svc.DeleteSuggester(context.Background(), &DeleteSuggesterInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "DeleteSuggester.response", err)
	}
}

func TestCheckResponseSnapshot_DescribeAnalysisSchemes(t *testing.T) {
	want := &DescribeAnalysisSchemesOutput{
		AnalysisSchemes: []types.AnalysisSchemeStatus{
			{
				Options: &types.AnalysisScheme{
					AnalysisSchemeName:     ptr.String("__AnalysisSchemeName__"),
					AnalysisSchemeLanguage: types.AnalysisSchemeLanguage("ar"),
					AnalysisOptions: &types.AnalysisOptions{
						Synonyms:                       ptr.String("__Synonyms__"),
						Stopwords:                      ptr.String("__Stopwords__"),
						StemmingDictionary:             ptr.String("__StemmingDictionary__"),
						JapaneseTokenizationDictionary: ptr.String("__JapaneseTokenizationDictionary__"),
						AlgorithmicStemming:            types.AlgorithmicStemming("none"),
					},
				},
				Status: &types.OptionStatus{
					CreationDate:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
					UpdateDate:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
					UpdateVersion:   1,
					State:           types.OptionState("RequiresIndexDocuments"),
					PendingDeletion: ptr.Bool(true),
				},
			},
			{
				Options: &types.AnalysisScheme{
					AnalysisSchemeName:     ptr.String("__AnalysisSchemeName__"),
					AnalysisSchemeLanguage: types.AnalysisSchemeLanguage("ar"),
					AnalysisOptions: &types.AnalysisOptions{
						Synonyms:                       ptr.String("__Synonyms__"),
						Stopwords:                      ptr.String("__Stopwords__"),
						StemmingDictionary:             ptr.String("__StemmingDictionary__"),
						JapaneseTokenizationDictionary: ptr.String("__JapaneseTokenizationDictionary__"),
						AlgorithmicStemming:            types.AlgorithmicStemming("none"),
					},
				},
				Status: &types.OptionStatus{
					CreationDate:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
					UpdateDate:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
					UpdateVersion:   1,
					State:           types.OptionState("RequiresIndexDocuments"),
					PendingDeletion: ptr.Bool(true),
				},
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("DescribeAnalysisSchemes.response")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	got, err := svc.DescribeAnalysisSchemes(context.Background(), &DescribeAnalysisSchemesInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "DescribeAnalysisSchemes.response", err)
	}
}

func TestCheckResponseSnapshot_DescribeAvailabilityOptions(t *testing.T) {
	want := &DescribeAvailabilityOptionsOutput{
		AvailabilityOptions: &types.AvailabilityOptionsStatus{
			Options: true,
			Status: &types.OptionStatus{
				CreationDate:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateDate:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateVersion:   1,
				State:           types.OptionState("RequiresIndexDocuments"),
				PendingDeletion: ptr.Bool(true),
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("DescribeAvailabilityOptions.response")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	got, err := svc.DescribeAvailabilityOptions(context.Background(), &DescribeAvailabilityOptionsInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "DescribeAvailabilityOptions.response", err)
	}
}

func TestCheckResponseSnapshot_DescribeDomainEndpointOptions(t *testing.T) {
	want := &DescribeDomainEndpointOptionsOutput{
		DomainEndpointOptions: &types.DomainEndpointOptionsStatus{
			Options: &types.DomainEndpointOptions{
				EnforceHTTPS:      ptr.Bool(true),
				TLSSecurityPolicy: types.TLSSecurityPolicy("Policy-Min-TLS-1-0-2019-07"),
			},
			Status: &types.OptionStatus{
				CreationDate:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateDate:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateVersion:   1,
				State:           types.OptionState("RequiresIndexDocuments"),
				PendingDeletion: ptr.Bool(true),
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("DescribeDomainEndpointOptions.response")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	got, err := svc.DescribeDomainEndpointOptions(context.Background(), &DescribeDomainEndpointOptionsInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "DescribeDomainEndpointOptions.response", err)
	}
}

func TestCheckResponseSnapshot_DescribeDomains(t *testing.T) {
	want := &DescribeDomainsOutput{
		DomainStatusList: []types.DomainStatus{
			{
				DomainId:   ptr.String("__DomainId__"),
				DomainName: ptr.String("__DomainName__"),
				ARN:        ptr.String("__ARN__"),
				Created:    ptr.Bool(true),
				Deleted:    ptr.Bool(true),
				DocService: &types.ServiceEndpoint{
					Endpoint: ptr.String("__Endpoint__"),
				},
				SearchService: &types.ServiceEndpoint{
					Endpoint: ptr.String("__Endpoint__"),
				},
				RequiresIndexDocuments: ptr.Bool(true),
				Processing:             ptr.Bool(true),
				SearchInstanceType:     ptr.String("__SearchInstanceType__"),
				SearchPartitionCount:   ptr.Int32(1),
				SearchInstanceCount:    ptr.Int32(1),
				Limits: &types.Limits{
					MaximumReplicationCount: ptr.Int32(1),
					MaximumPartitionCount:   ptr.Int32(1),
				},
			},
			{
				DomainId:   ptr.String("__DomainId__"),
				DomainName: ptr.String("__DomainName__"),
				ARN:        ptr.String("__ARN__"),
				Created:    ptr.Bool(true),
				Deleted:    ptr.Bool(true),
				DocService: &types.ServiceEndpoint{
					Endpoint: ptr.String("__Endpoint__"),
				},
				SearchService: &types.ServiceEndpoint{
					Endpoint: ptr.String("__Endpoint__"),
				},
				RequiresIndexDocuments: ptr.Bool(true),
				Processing:             ptr.Bool(true),
				SearchInstanceType:     ptr.String("__SearchInstanceType__"),
				SearchPartitionCount:   ptr.Int32(1),
				SearchInstanceCount:    ptr.Int32(1),
				Limits: &types.Limits{
					MaximumReplicationCount: ptr.Int32(1),
					MaximumPartitionCount:   ptr.Int32(1),
				},
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("DescribeDomains.response")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	got, err := svc.DescribeDomains(context.Background(), &DescribeDomainsInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "DescribeDomains.response", err)
	}
}

func TestCheckResponseSnapshot_DescribeExpressions(t *testing.T) {
	want := &DescribeExpressionsOutput{
		Expressions: []types.ExpressionStatus{
			{
				Options: &types.Expression{
					ExpressionName:  ptr.String("__ExpressionName__"),
					ExpressionValue: ptr.String("__ExpressionValue__"),
				},
				Status: &types.OptionStatus{
					CreationDate:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
					UpdateDate:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
					UpdateVersion:   1,
					State:           types.OptionState("RequiresIndexDocuments"),
					PendingDeletion: ptr.Bool(true),
				},
			},
			{
				Options: &types.Expression{
					ExpressionName:  ptr.String("__ExpressionName__"),
					ExpressionValue: ptr.String("__ExpressionValue__"),
				},
				Status: &types.OptionStatus{
					CreationDate:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
					UpdateDate:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
					UpdateVersion:   1,
					State:           types.OptionState("RequiresIndexDocuments"),
					PendingDeletion: ptr.Bool(true),
				},
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("DescribeExpressions.response")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	got, err := svc.DescribeExpressions(context.Background(), &DescribeExpressionsInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "DescribeExpressions.response", err)
	}
}

func TestCheckResponseSnapshot_DescribeIndexFields(t *testing.T) {
	want := &DescribeIndexFieldsOutput{
		IndexFields: []types.IndexFieldStatus{
			{
				Options: &types.IndexField{
					IndexFieldName: ptr.String("__IndexFieldName__"),
					IndexFieldType: types.IndexFieldType("int"),
					IntOptions: &types.IntOptions{
						DefaultValue:  ptr.Int64(1),
						SourceField:   ptr.String("__SourceField__"),
						FacetEnabled:  ptr.Bool(true),
						SearchEnabled: ptr.Bool(true),
						ReturnEnabled: ptr.Bool(true),
						SortEnabled:   ptr.Bool(true),
					},
					DoubleOptions: &types.DoubleOptions{
						DefaultValue:  ptr.Float64(1.0),
						SourceField:   ptr.String("__SourceField__"),
						FacetEnabled:  ptr.Bool(true),
						SearchEnabled: ptr.Bool(true),
						ReturnEnabled: ptr.Bool(true),
						SortEnabled:   ptr.Bool(true),
					},
					LiteralOptions: &types.LiteralOptions{
						DefaultValue:  ptr.String("__DefaultValue__"),
						SourceField:   ptr.String("__SourceField__"),
						FacetEnabled:  ptr.Bool(true),
						SearchEnabled: ptr.Bool(true),
						ReturnEnabled: ptr.Bool(true),
						SortEnabled:   ptr.Bool(true),
					},
					TextOptions: &types.TextOptions{
						DefaultValue:     ptr.String("__DefaultValue__"),
						SourceField:      ptr.String("__SourceField__"),
						ReturnEnabled:    ptr.Bool(true),
						SortEnabled:      ptr.Bool(true),
						HighlightEnabled: ptr.Bool(true),
						AnalysisScheme:   ptr.String("__AnalysisScheme__"),
					},
					DateOptions: &types.DateOptions{
						DefaultValue:  ptr.String("__DefaultValue__"),
						SourceField:   ptr.String("__SourceField__"),
						FacetEnabled:  ptr.Bool(true),
						SearchEnabled: ptr.Bool(true),
						ReturnEnabled: ptr.Bool(true),
						SortEnabled:   ptr.Bool(true),
					},
					LatLonOptions: &types.LatLonOptions{
						DefaultValue:  ptr.String("__DefaultValue__"),
						SourceField:   ptr.String("__SourceField__"),
						FacetEnabled:  ptr.Bool(true),
						SearchEnabled: ptr.Bool(true),
						ReturnEnabled: ptr.Bool(true),
						SortEnabled:   ptr.Bool(true),
					},
					IntArrayOptions: &types.IntArrayOptions{
						DefaultValue:  ptr.Int64(1),
						SourceFields:  ptr.String("__SourceFields__"),
						FacetEnabled:  ptr.Bool(true),
						SearchEnabled: ptr.Bool(true),
						ReturnEnabled: ptr.Bool(true),
					},
					DoubleArrayOptions: &types.DoubleArrayOptions{
						DefaultValue:  ptr.Float64(1.0),
						SourceFields:  ptr.String("__SourceFields__"),
						FacetEnabled:  ptr.Bool(true),
						SearchEnabled: ptr.Bool(true),
						ReturnEnabled: ptr.Bool(true),
					},
					LiteralArrayOptions: &types.LiteralArrayOptions{
						DefaultValue:  ptr.String("__DefaultValue__"),
						SourceFields:  ptr.String("__SourceFields__"),
						FacetEnabled:  ptr.Bool(true),
						SearchEnabled: ptr.Bool(true),
						ReturnEnabled: ptr.Bool(true),
					},
					TextArrayOptions: &types.TextArrayOptions{
						DefaultValue:     ptr.String("__DefaultValue__"),
						SourceFields:     ptr.String("__SourceFields__"),
						ReturnEnabled:    ptr.Bool(true),
						HighlightEnabled: ptr.Bool(true),
						AnalysisScheme:   ptr.String("__AnalysisScheme__"),
					},
					DateArrayOptions: &types.DateArrayOptions{
						DefaultValue:  ptr.String("__DefaultValue__"),
						SourceFields:  ptr.String("__SourceFields__"),
						FacetEnabled:  ptr.Bool(true),
						SearchEnabled: ptr.Bool(true),
						ReturnEnabled: ptr.Bool(true),
					},
				},
				Status: &types.OptionStatus{
					CreationDate:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
					UpdateDate:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
					UpdateVersion:   1,
					State:           types.OptionState("RequiresIndexDocuments"),
					PendingDeletion: ptr.Bool(true),
				},
			},
			{
				Options: &types.IndexField{
					IndexFieldName: ptr.String("__IndexFieldName__"),
					IndexFieldType: types.IndexFieldType("int"),
					IntOptions: &types.IntOptions{
						DefaultValue:  ptr.Int64(1),
						SourceField:   ptr.String("__SourceField__"),
						FacetEnabled:  ptr.Bool(true),
						SearchEnabled: ptr.Bool(true),
						ReturnEnabled: ptr.Bool(true),
						SortEnabled:   ptr.Bool(true),
					},
					DoubleOptions: &types.DoubleOptions{
						DefaultValue:  ptr.Float64(1.0),
						SourceField:   ptr.String("__SourceField__"),
						FacetEnabled:  ptr.Bool(true),
						SearchEnabled: ptr.Bool(true),
						ReturnEnabled: ptr.Bool(true),
						SortEnabled:   ptr.Bool(true),
					},
					LiteralOptions: &types.LiteralOptions{
						DefaultValue:  ptr.String("__DefaultValue__"),
						SourceField:   ptr.String("__SourceField__"),
						FacetEnabled:  ptr.Bool(true),
						SearchEnabled: ptr.Bool(true),
						ReturnEnabled: ptr.Bool(true),
						SortEnabled:   ptr.Bool(true),
					},
					TextOptions: &types.TextOptions{
						DefaultValue:     ptr.String("__DefaultValue__"),
						SourceField:      ptr.String("__SourceField__"),
						ReturnEnabled:    ptr.Bool(true),
						SortEnabled:      ptr.Bool(true),
						HighlightEnabled: ptr.Bool(true),
						AnalysisScheme:   ptr.String("__AnalysisScheme__"),
					},
					DateOptions: &types.DateOptions{
						DefaultValue:  ptr.String("__DefaultValue__"),
						SourceField:   ptr.String("__SourceField__"),
						FacetEnabled:  ptr.Bool(true),
						SearchEnabled: ptr.Bool(true),
						ReturnEnabled: ptr.Bool(true),
						SortEnabled:   ptr.Bool(true),
					},
					LatLonOptions: &types.LatLonOptions{
						DefaultValue:  ptr.String("__DefaultValue__"),
						SourceField:   ptr.String("__SourceField__"),
						FacetEnabled:  ptr.Bool(true),
						SearchEnabled: ptr.Bool(true),
						ReturnEnabled: ptr.Bool(true),
						SortEnabled:   ptr.Bool(true),
					},
					IntArrayOptions: &types.IntArrayOptions{
						DefaultValue:  ptr.Int64(1),
						SourceFields:  ptr.String("__SourceFields__"),
						FacetEnabled:  ptr.Bool(true),
						SearchEnabled: ptr.Bool(true),
						ReturnEnabled: ptr.Bool(true),
					},
					DoubleArrayOptions: &types.DoubleArrayOptions{
						DefaultValue:  ptr.Float64(1.0),
						SourceFields:  ptr.String("__SourceFields__"),
						FacetEnabled:  ptr.Bool(true),
						SearchEnabled: ptr.Bool(true),
						ReturnEnabled: ptr.Bool(true),
					},
					LiteralArrayOptions: &types.LiteralArrayOptions{
						DefaultValue:  ptr.String("__DefaultValue__"),
						SourceFields:  ptr.String("__SourceFields__"),
						FacetEnabled:  ptr.Bool(true),
						SearchEnabled: ptr.Bool(true),
						ReturnEnabled: ptr.Bool(true),
					},
					TextArrayOptions: &types.TextArrayOptions{
						DefaultValue:     ptr.String("__DefaultValue__"),
						SourceFields:     ptr.String("__SourceFields__"),
						ReturnEnabled:    ptr.Bool(true),
						HighlightEnabled: ptr.Bool(true),
						AnalysisScheme:   ptr.String("__AnalysisScheme__"),
					},
					DateArrayOptions: &types.DateArrayOptions{
						DefaultValue:  ptr.String("__DefaultValue__"),
						SourceFields:  ptr.String("__SourceFields__"),
						FacetEnabled:  ptr.Bool(true),
						SearchEnabled: ptr.Bool(true),
						ReturnEnabled: ptr.Bool(true),
					},
				},
				Status: &types.OptionStatus{
					CreationDate:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
					UpdateDate:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
					UpdateVersion:   1,
					State:           types.OptionState("RequiresIndexDocuments"),
					PendingDeletion: ptr.Bool(true),
				},
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("DescribeIndexFields.response")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	got, err := svc.DescribeIndexFields(context.Background(), &DescribeIndexFieldsInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "DescribeIndexFields.response", err)
	}
}

func TestCheckResponseSnapshot_DescribeScalingParameters(t *testing.T) {
	want := &DescribeScalingParametersOutput{
		ScalingParameters: &types.ScalingParametersStatus{
			Options: &types.ScalingParameters{
				DesiredInstanceType:     types.PartitionInstanceType("search.m1.small"),
				DesiredReplicationCount: 1,
				DesiredPartitionCount:   1,
			},
			Status: &types.OptionStatus{
				CreationDate:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateDate:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateVersion:   1,
				State:           types.OptionState("RequiresIndexDocuments"),
				PendingDeletion: ptr.Bool(true),
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("DescribeScalingParameters.response")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	got, err := svc.DescribeScalingParameters(context.Background(), &DescribeScalingParametersInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "DescribeScalingParameters.response", err)
	}
}

func TestCheckResponseSnapshot_DescribeServiceAccessPolicies(t *testing.T) {
	want := &DescribeServiceAccessPoliciesOutput{
		AccessPolicies: &types.AccessPoliciesStatus{
			Options: ptr.String("__Options__"),
			Status: &types.OptionStatus{
				CreationDate:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateDate:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateVersion:   1,
				State:           types.OptionState("RequiresIndexDocuments"),
				PendingDeletion: ptr.Bool(true),
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("DescribeServiceAccessPolicies.response")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	got, err := svc.DescribeServiceAccessPolicies(context.Background(), &DescribeServiceAccessPoliciesInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "DescribeServiceAccessPolicies.response", err)
	}
}

func TestCheckResponseSnapshot_DescribeSuggesters(t *testing.T) {
	want := &DescribeSuggestersOutput{
		Suggesters: []types.SuggesterStatus{
			{
				Options: &types.Suggester{
					SuggesterName: ptr.String("__SuggesterName__"),
					DocumentSuggesterOptions: &types.DocumentSuggesterOptions{
						SourceField:    ptr.String("__SourceField__"),
						FuzzyMatching:  types.SuggesterFuzzyMatching("none"),
						SortExpression: ptr.String("__SortExpression__"),
					},
				},
				Status: &types.OptionStatus{
					CreationDate:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
					UpdateDate:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
					UpdateVersion:   1,
					State:           types.OptionState("RequiresIndexDocuments"),
					PendingDeletion: ptr.Bool(true),
				},
			},
			{
				Options: &types.Suggester{
					SuggesterName: ptr.String("__SuggesterName__"),
					DocumentSuggesterOptions: &types.DocumentSuggesterOptions{
						SourceField:    ptr.String("__SourceField__"),
						FuzzyMatching:  types.SuggesterFuzzyMatching("none"),
						SortExpression: ptr.String("__SortExpression__"),
					},
				},
				Status: &types.OptionStatus{
					CreationDate:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
					UpdateDate:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
					UpdateVersion:   1,
					State:           types.OptionState("RequiresIndexDocuments"),
					PendingDeletion: ptr.Bool(true),
				},
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("DescribeSuggesters.response")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	got, err := svc.DescribeSuggesters(context.Background(), &DescribeSuggestersInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "DescribeSuggesters.response", err)
	}
}

func TestCheckResponseSnapshot_IndexDocuments(t *testing.T) {
	want := &IndexDocumentsOutput{
		FieldNames: []string{
			"__Member__",
			"__Member__",
		},
	}
	status, header, body, err := serdeRespReadSnapshot("IndexDocuments.response")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	got, err := svc.IndexDocuments(context.Background(), &IndexDocumentsInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "IndexDocuments.response", err)
	}
}

func TestCheckResponseSnapshot_ListDomainNames(t *testing.T) {
	want := &ListDomainNamesOutput{
		DomainNames: map[string]string{
			"key0": "__Value__",
		},
	}
	status, header, body, err := serdeRespReadSnapshot("ListDomainNames.response")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	got, err := svc.ListDomainNames(context.Background(), &ListDomainNamesInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "ListDomainNames.response", err)
	}
}

func TestCheckResponseSnapshot_UpdateAvailabilityOptions(t *testing.T) {
	want := &UpdateAvailabilityOptionsOutput{
		AvailabilityOptions: &types.AvailabilityOptionsStatus{
			Options: true,
			Status: &types.OptionStatus{
				CreationDate:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateDate:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateVersion:   1,
				State:           types.OptionState("RequiresIndexDocuments"),
				PendingDeletion: ptr.Bool(true),
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("UpdateAvailabilityOptions.response")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	got, err := svc.UpdateAvailabilityOptions(context.Background(), &UpdateAvailabilityOptionsInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "UpdateAvailabilityOptions.response", err)
	}
}

func TestCheckResponseSnapshot_UpdateDomainEndpointOptions(t *testing.T) {
	want := &UpdateDomainEndpointOptionsOutput{
		DomainEndpointOptions: &types.DomainEndpointOptionsStatus{
			Options: &types.DomainEndpointOptions{
				EnforceHTTPS:      ptr.Bool(true),
				TLSSecurityPolicy: types.TLSSecurityPolicy("Policy-Min-TLS-1-0-2019-07"),
			},
			Status: &types.OptionStatus{
				CreationDate:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateDate:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateVersion:   1,
				State:           types.OptionState("RequiresIndexDocuments"),
				PendingDeletion: ptr.Bool(true),
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("UpdateDomainEndpointOptions.response")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	got, err := svc.UpdateDomainEndpointOptions(context.Background(), &UpdateDomainEndpointOptionsInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "UpdateDomainEndpointOptions.response", err)
	}
}

func TestCheckResponseSnapshot_UpdateScalingParameters(t *testing.T) {
	want := &UpdateScalingParametersOutput{
		ScalingParameters: &types.ScalingParametersStatus{
			Options: &types.ScalingParameters{
				DesiredInstanceType:     types.PartitionInstanceType("search.m1.small"),
				DesiredReplicationCount: 1,
				DesiredPartitionCount:   1,
			},
			Status: &types.OptionStatus{
				CreationDate:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateDate:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateVersion:   1,
				State:           types.OptionState("RequiresIndexDocuments"),
				PendingDeletion: ptr.Bool(true),
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("UpdateScalingParameters.response")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	got, err := svc.UpdateScalingParameters(context.Background(), &UpdateScalingParametersInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "UpdateScalingParameters.response", err)
	}
}

func TestCheckResponseSnapshot_UpdateServiceAccessPolicies(t *testing.T) {
	want := &UpdateServiceAccessPoliciesOutput{
		AccessPolicies: &types.AccessPoliciesStatus{
			Options: ptr.String("__Options__"),
			Status: &types.OptionStatus{
				CreationDate:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateDate:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdateVersion:   1,
				State:           types.OptionState("RequiresIndexDocuments"),
				PendingDeletion: ptr.Bool(true),
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("UpdateServiceAccessPolicies.response")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	got, err := svc.UpdateServiceAccessPolicies(context.Background(), &UpdateServiceAccessPoliciesInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "UpdateServiceAccessPolicies.response", err)
	}
}

func TestCheckResponseSnapshot_Error_BaseException(t *testing.T) {
	want := &types.BaseException{
		Code:    ptr.String("__Code__"),
		Message: ptr.String("__Message__"),
	}
	status, header, body, err := serdeRespReadSnapshot("BaseException.error")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	_, opErr := svc.BuildSuggesters(context.Background(), &BuildSuggestersInput{})
	if opErr == nil {
		t.Fatal("expected error, got nil")
	}
	var got *types.BaseException
	if !errors.As(opErr, &got) {
		t.Fatalf("expected types.BaseException, got %v", opErr)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("error response snapshot mismatch for %s: %v", "BaseException.error", err)
	}
}

func TestCheckResponseSnapshot_Error_DisabledOperationException(t *testing.T) {
	want := &types.DisabledOperationException{
		Code:    ptr.String("__Code__"),
		Message: ptr.String("__Message__"),
	}
	status, header, body, err := serdeRespReadSnapshot("DisabledOperationException.error")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	_, opErr := svc.DescribeAvailabilityOptions(context.Background(), &DescribeAvailabilityOptionsInput{})
	if opErr == nil {
		t.Fatal("expected error, got nil")
	}
	var got *types.DisabledOperationException
	if !errors.As(opErr, &got) {
		t.Fatalf("expected types.DisabledOperationException, got %v", opErr)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("error response snapshot mismatch for %s: %v", "DisabledOperationException.error", err)
	}
}

func TestCheckResponseSnapshot_Error_InternalException(t *testing.T) {
	want := &types.InternalException{
		Code:    ptr.String("__Code__"),
		Message: ptr.String("__Message__"),
	}
	status, header, body, err := serdeRespReadSnapshot("InternalException.error")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	_, opErr := svc.BuildSuggesters(context.Background(), &BuildSuggestersInput{})
	if opErr == nil {
		t.Fatal("expected error, got nil")
	}
	var got *types.InternalException
	if !errors.As(opErr, &got) {
		t.Fatalf("expected types.InternalException, got %v", opErr)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("error response snapshot mismatch for %s: %v", "InternalException.error", err)
	}
}

func TestCheckResponseSnapshot_Error_InvalidTypeException(t *testing.T) {
	want := &types.InvalidTypeException{
		Code:    ptr.String("__Code__"),
		Message: ptr.String("__Message__"),
	}
	status, header, body, err := serdeRespReadSnapshot("InvalidTypeException.error")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	_, opErr := svc.DefineAnalysisScheme(context.Background(), &DefineAnalysisSchemeInput{})
	if opErr == nil {
		t.Fatal("expected error, got nil")
	}
	var got *types.InvalidTypeException
	if !errors.As(opErr, &got) {
		t.Fatalf("expected types.InvalidTypeException, got %v", opErr)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("error response snapshot mismatch for %s: %v", "InvalidTypeException.error", err)
	}
}

func TestCheckResponseSnapshot_Error_LimitExceededException(t *testing.T) {
	want := &types.LimitExceededException{
		Code:    ptr.String("__Code__"),
		Message: ptr.String("__Message__"),
	}
	status, header, body, err := serdeRespReadSnapshot("LimitExceededException.error")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	_, opErr := svc.CreateDomain(context.Background(), &CreateDomainInput{})
	if opErr == nil {
		t.Fatal("expected error, got nil")
	}
	var got *types.LimitExceededException
	if !errors.As(opErr, &got) {
		t.Fatalf("expected types.LimitExceededException, got %v", opErr)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("error response snapshot mismatch for %s: %v", "LimitExceededException.error", err)
	}
}

func TestCheckResponseSnapshot_Error_ResourceAlreadyExistsException(t *testing.T) {
	want := &types.ResourceAlreadyExistsException{
		Code:    ptr.String("__Code__"),
		Message: ptr.String("__Message__"),
	}
	status, header, body, err := serdeRespReadSnapshot("ResourceAlreadyExistsException.error")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	_, opErr := svc.CreateDomain(context.Background(), &CreateDomainInput{})
	if opErr == nil {
		t.Fatal("expected error, got nil")
	}
	var got *types.ResourceAlreadyExistsException
	if !errors.As(opErr, &got) {
		t.Fatalf("expected types.ResourceAlreadyExistsException, got %v", opErr)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("error response snapshot mismatch for %s: %v", "ResourceAlreadyExistsException.error", err)
	}
}

func TestCheckResponseSnapshot_Error_ResourceNotFoundException(t *testing.T) {
	want := &types.ResourceNotFoundException{
		Code:    ptr.String("__Code__"),
		Message: ptr.String("__Message__"),
	}
	status, header, body, err := serdeRespReadSnapshot("ResourceNotFoundException.error")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	_, opErr := svc.BuildSuggesters(context.Background(), &BuildSuggestersInput{})
	if opErr == nil {
		t.Fatal("expected error, got nil")
	}
	var got *types.ResourceNotFoundException
	if !errors.As(opErr, &got) {
		t.Fatalf("expected types.ResourceNotFoundException, got %v", opErr)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("error response snapshot mismatch for %s: %v", "ResourceNotFoundException.error", err)
	}
}

func TestCheckResponseSnapshot_Error_ValidationException(t *testing.T) {
	want := &types.ValidationException{
		Code:    ptr.String("__Code__"),
		Message: ptr.String("__Message__"),
	}
	status, header, body, err := serdeRespReadSnapshot("ValidationException.error")
	if errors.Is(err, fs.ErrNotExist) {
		t.Skip("no response snapshot fixture")
	}
	if err != nil {
		t.Fatal(err)
	}
	svc := serdeRespClient(status, header, body)
	_, opErr := svc.BuildSuggesters(context.Background(), &BuildSuggestersInput{})
	if opErr == nil {
		t.Fatal("expected error, got nil")
	}
	var got *types.ValidationException
	if !errors.As(opErr, &got) {
		t.Fatalf("expected types.ValidationException, got %v", opErr)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("error response snapshot mismatch for %s: %v", "ValidationException.error", err)
	}
}
