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

//go:build response_snapshot

package cognitoidentity

import (
	"bufio"
	"bytes"
	"context"
	"errors"
	"fmt"
	"github.com/aws/aws-sdk-go-v2/service/cognitoidentity/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_CreateIdentityPool(t *testing.T) {
	want := &CreateIdentityPoolOutput{
		IdentityPoolId:                 ptr.String("__IdentityPoolId__"),
		IdentityPoolName:               ptr.String("__IdentityPoolName__"),
		AllowUnauthenticatedIdentities: true,
		AllowClassicFlow:               ptr.Bool(true),
		SupportedLoginProviders: map[string]string{
			"key0": "__Value__",
		},
		DeveloperProviderName: ptr.String("__DeveloperProviderName__"),
		OpenIdConnectProviderARNs: []string{
			"__Member__",
			"__Member__",
		},
		CognitoIdentityProviders: []types.CognitoIdentityProvider{
			{
				ProviderName:         ptr.String("__ProviderName__"),
				ClientId:             ptr.String("__ClientId__"),
				ServerSideTokenCheck: ptr.Bool(true),
			},
			{
				ProviderName:         ptr.String("__ProviderName__"),
				ClientId:             ptr.String("__ClientId__"),
				ServerSideTokenCheck: ptr.Bool(true),
			},
		},
		SamlProviderARNs: []string{
			"__Member__",
			"__Member__",
		},
		IdentityPoolTags: map[string]string{
			"key0": "__Value__",
		},
	}
	status, header, body, err := serdeRespReadSnapshot("CreateIdentityPool.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.CreateIdentityPool(context.Background(), &CreateIdentityPoolInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "CreateIdentityPool.response", err)
	}
}

func TestCheckResponseSnapshot_DeleteIdentities(t *testing.T) {
	want := &DeleteIdentitiesOutput{
		UnprocessedIdentityIds: []types.UnprocessedIdentityId{
			{
				IdentityId: ptr.String("__IdentityId__"),
				ErrorCode:  types.ErrorCode("AccessDenied"),
			},
			{
				IdentityId: ptr.String("__IdentityId__"),
				ErrorCode:  types.ErrorCode("AccessDenied"),
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("DeleteIdentities.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.DeleteIdentities(context.Background(), &DeleteIdentitiesInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "DeleteIdentities.response", err)
	}
}

func TestCheckResponseSnapshot_DeleteIdentityPool(t *testing.T) {
	want := &DeleteIdentityPoolOutput{}
	status, header, body, err := serdeRespReadSnapshot("DeleteIdentityPool.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.DeleteIdentityPool(context.Background(), &DeleteIdentityPoolInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "DeleteIdentityPool.response", err)
	}
}

func TestCheckResponseSnapshot_DescribeIdentity(t *testing.T) {
	want := &DescribeIdentityOutput{
		IdentityId: ptr.String("__IdentityId__"),
		Logins: []string{
			"__Member__",
			"__Member__",
		},
		CreationDate:     ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
		LastModifiedDate: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
	}
	status, header, body, err := serdeRespReadSnapshot("DescribeIdentity.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.DescribeIdentity(context.Background(), &DescribeIdentityInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "DescribeIdentity.response", err)
	}
}

func TestCheckResponseSnapshot_DescribeIdentityPool(t *testing.T) {
	want := &DescribeIdentityPoolOutput{
		IdentityPoolId:                 ptr.String("__IdentityPoolId__"),
		IdentityPoolName:               ptr.String("__IdentityPoolName__"),
		AllowUnauthenticatedIdentities: true,
		AllowClassicFlow:               ptr.Bool(true),
		SupportedLoginProviders: map[string]string{
			"key0": "__Value__",
		},
		DeveloperProviderName: ptr.String("__DeveloperProviderName__"),
		OpenIdConnectProviderARNs: []string{
			"__Member__",
			"__Member__",
		},
		CognitoIdentityProviders: []types.CognitoIdentityProvider{
			{
				ProviderName:         ptr.String("__ProviderName__"),
				ClientId:             ptr.String("__ClientId__"),
				ServerSideTokenCheck: ptr.Bool(true),
			},
			{
				ProviderName:         ptr.String("__ProviderName__"),
				ClientId:             ptr.String("__ClientId__"),
				ServerSideTokenCheck: ptr.Bool(true),
			},
		},
		SamlProviderARNs: []string{
			"__Member__",
			"__Member__",
		},
		IdentityPoolTags: map[string]string{
			"key0": "__Value__",
		},
	}
	status, header, body, err := serdeRespReadSnapshot("DescribeIdentityPool.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.DescribeIdentityPool(context.Background(), &DescribeIdentityPoolInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "DescribeIdentityPool.response", err)
	}
}

func TestCheckResponseSnapshot_GetCredentialsForIdentity(t *testing.T) {
	want := &GetCredentialsForIdentityOutput{
		IdentityId: ptr.String("__IdentityId__"),
		Credentials: &types.Credentials{
			AccessKeyId:  ptr.String("__AccessKeyId__"),
			SecretKey:    ptr.String("__SecretKey__"),
			SessionToken: ptr.String("__SessionToken__"),
			Expiration:   ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
		},
	}
	status, header, body, err := serdeRespReadSnapshot("GetCredentialsForIdentity.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.GetCredentialsForIdentity(context.Background(), &GetCredentialsForIdentityInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "GetCredentialsForIdentity.response", err)
	}
}

func TestCheckResponseSnapshot_GetId(t *testing.T) {
	want := &GetIdOutput{
		IdentityId: ptr.String("__IdentityId__"),
	}
	status, header, body, err := serdeRespReadSnapshot("GetId.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.GetId(context.Background(), &GetIdInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "GetId.response", err)
	}
}

func TestCheckResponseSnapshot_GetIdentityPoolRoles(t *testing.T) {
	want := &GetIdentityPoolRolesOutput{
		IdentityPoolId: ptr.String("__IdentityPoolId__"),
		Roles: map[string]string{
			"key0": "__Value__",
		},
		RoleMappings: map[string]types.RoleMapping{
			"key0": {
				Type:                    types.RoleMappingType("Token"),
				AmbiguousRoleResolution: types.AmbiguousRoleResolutionType("AuthenticatedRole"),
				RulesConfiguration: &types.RulesConfigurationType{
					Rules: []types.MappingRule{
						{
							Claim:     ptr.String("__Claim__"),
							MatchType: types.MappingRuleMatchType("Equals"),
							Value:     ptr.String("__Value__"),
							RoleARN:   ptr.String("__RoleARN__"),
						},
						{
							Claim:     ptr.String("__Claim__"),
							MatchType: types.MappingRuleMatchType("Equals"),
							Value:     ptr.String("__Value__"),
							RoleARN:   ptr.String("__RoleARN__"),
						},
					},
				},
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("GetIdentityPoolRoles.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.GetIdentityPoolRoles(context.Background(), &GetIdentityPoolRolesInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "GetIdentityPoolRoles.response", err)
	}
}

func TestCheckResponseSnapshot_GetOpenIdToken(t *testing.T) {
	want := &GetOpenIdTokenOutput{
		IdentityId: ptr.String("__IdentityId__"),
		Token:      ptr.String("__Token__"),
	}
	status, header, body, err := serdeRespReadSnapshot("GetOpenIdToken.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.GetOpenIdToken(context.Background(), &GetOpenIdTokenInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "GetOpenIdToken.response", err)
	}
}

func TestCheckResponseSnapshot_GetOpenIdTokenForDeveloperIdentity(t *testing.T) {
	want := &GetOpenIdTokenForDeveloperIdentityOutput{
		IdentityId: ptr.String("__IdentityId__"),
		Token:      ptr.String("__Token__"),
	}
	status, header, body, err := serdeRespReadSnapshot("GetOpenIdTokenForDeveloperIdentity.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.GetOpenIdTokenForDeveloperIdentity(context.Background(), &GetOpenIdTokenForDeveloperIdentityInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "GetOpenIdTokenForDeveloperIdentity.response", err)
	}
}

func TestCheckResponseSnapshot_GetPrincipalTagAttributeMap(t *testing.T) {
	want := &GetPrincipalTagAttributeMapOutput{
		IdentityPoolId:       ptr.String("__IdentityPoolId__"),
		IdentityProviderName: ptr.String("__IdentityProviderName__"),
		UseDefaults:          ptr.Bool(true),
		PrincipalTags: map[string]string{
			"key0": "__Value__",
		},
	}
	status, header, body, err := serdeRespReadSnapshot("GetPrincipalTagAttributeMap.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.GetPrincipalTagAttributeMap(context.Background(), &GetPrincipalTagAttributeMapInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "GetPrincipalTagAttributeMap.response", err)
	}
}

func TestCheckResponseSnapshot_ListIdentities(t *testing.T) {
	want := &ListIdentitiesOutput{
		IdentityPoolId: ptr.String("__IdentityPoolId__"),
		Identities: []types.IdentityDescription{
			{
				IdentityId: ptr.String("__IdentityId__"),
				Logins: []string{
					"__Member__",
					"__Member__",
				},
				CreationDate:     ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				LastModifiedDate: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			},
			{
				IdentityId: ptr.String("__IdentityId__"),
				Logins: []string{
					"__Member__",
					"__Member__",
				},
				CreationDate:     ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				LastModifiedDate: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			},
		},
		NextToken: ptr.String("__NextToken__"),
	}
	status, header, body, err := serdeRespReadSnapshot("ListIdentities.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.ListIdentities(context.Background(), &ListIdentitiesInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "ListIdentities.response", err)
	}
}

func TestCheckResponseSnapshot_ListIdentityPools(t *testing.T) {
	want := &ListIdentityPoolsOutput{
		IdentityPools: []types.IdentityPoolShortDescription{
			{
				IdentityPoolId:   ptr.String("__IdentityPoolId__"),
				IdentityPoolName: ptr.String("__IdentityPoolName__"),
			},
			{
				IdentityPoolId:   ptr.String("__IdentityPoolId__"),
				IdentityPoolName: ptr.String("__IdentityPoolName__"),
			},
		},
		NextToken: ptr.String("__NextToken__"),
	}
	status, header, body, err := serdeRespReadSnapshot("ListIdentityPools.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.ListIdentityPools(context.Background(), &ListIdentityPoolsInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "ListIdentityPools.response", err)
	}
}

func TestCheckResponseSnapshot_ListTagsForResource(t *testing.T) {
	want := &ListTagsForResourceOutput{
		Tags: map[string]string{
			"key0": "__Value__",
		},
	}
	status, header, body, err := serdeRespReadSnapshot("ListTagsForResource.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.ListTagsForResource(context.Background(), &ListTagsForResourceInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "ListTagsForResource.response", err)
	}
}

func TestCheckResponseSnapshot_LookupDeveloperIdentity(t *testing.T) {
	want := &LookupDeveloperIdentityOutput{
		IdentityId: ptr.String("__IdentityId__"),
		DeveloperUserIdentifierList: []string{
			"__Member__",
			"__Member__",
		},
		NextToken: ptr.String("__NextToken__"),
	}
	status, header, body, err := serdeRespReadSnapshot("LookupDeveloperIdentity.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.LookupDeveloperIdentity(context.Background(), &LookupDeveloperIdentityInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "LookupDeveloperIdentity.response", err)
	}
}

func TestCheckResponseSnapshot_MergeDeveloperIdentities(t *testing.T) {
	want := &MergeDeveloperIdentitiesOutput{
		IdentityId: ptr.String("__IdentityId__"),
	}
	status, header, body, err := serdeRespReadSnapshot("MergeDeveloperIdentities.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.MergeDeveloperIdentities(context.Background(), &MergeDeveloperIdentitiesInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "MergeDeveloperIdentities.response", err)
	}
}

func TestCheckResponseSnapshot_SetIdentityPoolRoles(t *testing.T) {
	want := &SetIdentityPoolRolesOutput{}
	status, header, body, err := serdeRespReadSnapshot("SetIdentityPoolRoles.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.SetIdentityPoolRoles(context.Background(), &SetIdentityPoolRolesInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "SetIdentityPoolRoles.response", err)
	}
}

func TestCheckResponseSnapshot_SetPrincipalTagAttributeMap(t *testing.T) {
	want := &SetPrincipalTagAttributeMapOutput{
		IdentityPoolId:       ptr.String("__IdentityPoolId__"),
		IdentityProviderName: ptr.String("__IdentityProviderName__"),
		UseDefaults:          ptr.Bool(true),
		PrincipalTags: map[string]string{
			"key0": "__Value__",
		},
	}
	status, header, body, err := serdeRespReadSnapshot("SetPrincipalTagAttributeMap.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.SetPrincipalTagAttributeMap(context.Background(), &SetPrincipalTagAttributeMapInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "SetPrincipalTagAttributeMap.response", err)
	}
}

func TestCheckResponseSnapshot_TagResource(t *testing.T) {
	want := &TagResourceOutput{}
	status, header, body, err := serdeRespReadSnapshot("TagResource.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.TagResource(context.Background(), &TagResourceInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "TagResource.response", err)
	}
}

func TestCheckResponseSnapshot_UnlinkDeveloperIdentity(t *testing.T) {
	want := &UnlinkDeveloperIdentityOutput{}
	status, header, body, err := serdeRespReadSnapshot("UnlinkDeveloperIdentity.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.UnlinkDeveloperIdentity(context.Background(), &UnlinkDeveloperIdentityInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "UnlinkDeveloperIdentity.response", err)
	}
}

func TestCheckResponseSnapshot_UnlinkIdentity(t *testing.T) {
	want := &UnlinkIdentityOutput{}
	status, header, body, err := serdeRespReadSnapshot("UnlinkIdentity.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.UnlinkIdentity(context.Background(), &UnlinkIdentityInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "UnlinkIdentity.response", err)
	}
}

func TestCheckResponseSnapshot_UntagResource(t *testing.T) {
	want := &UntagResourceOutput{}
	status, header, body, err := serdeRespReadSnapshot("UntagResource.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.UntagResource(context.Background(), &UntagResourceInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "UntagResource.response", err)
	}
}

func TestCheckResponseSnapshot_UpdateIdentityPool(t *testing.T) {
	want := &UpdateIdentityPoolOutput{
		IdentityPoolId:                 ptr.String("__IdentityPoolId__"),
		IdentityPoolName:               ptr.String("__IdentityPoolName__"),
		AllowUnauthenticatedIdentities: true,
		AllowClassicFlow:               ptr.Bool(true),
		SupportedLoginProviders: map[string]string{
			"key0": "__Value__",
		},
		DeveloperProviderName: ptr.String("__DeveloperProviderName__"),
		OpenIdConnectProviderARNs: []string{
			"__Member__",
			"__Member__",
		},
		CognitoIdentityProviders: []types.CognitoIdentityProvider{
			{
				ProviderName:         ptr.String("__ProviderName__"),
				ClientId:             ptr.String("__ClientId__"),
				ServerSideTokenCheck: ptr.Bool(true),
			},
			{
				ProviderName:         ptr.String("__ProviderName__"),
				ClientId:             ptr.String("__ClientId__"),
				ServerSideTokenCheck: ptr.Bool(true),
			},
		},
		SamlProviderARNs: []string{
			"__Member__",
			"__Member__",
		},
		IdentityPoolTags: map[string]string{
			"key0": "__Value__",
		},
	}
	status, header, body, err := serdeRespReadSnapshot("UpdateIdentityPool.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.UpdateIdentityPool(context.Background(), &UpdateIdentityPoolInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "UpdateIdentityPool.response", err)
	}
}

func TestCheckResponseSnapshot_Error_ConcurrentModificationException(t *testing.T) {
	want := &types.ConcurrentModificationException{
		Message: ptr.String("__Message__"),
	}
	status, header, body, err := serdeRespReadSnapshot("ConcurrentModificationException.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.SetIdentityPoolRoles(context.Background(), &SetIdentityPoolRolesInput{})
	if opErr == nil {
		t.Fatal("expected error, got nil")
	}
	var got *types.ConcurrentModificationException
	if !errors.As(opErr, &got) {
		t.Fatalf("expected types.ConcurrentModificationException, got %v", opErr)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("error response snapshot mismatch for %s: %v", "ConcurrentModificationException.error", err)
	}
}

func TestCheckResponseSnapshot_Error_DeveloperUserAlreadyRegisteredException(t *testing.T) {
	want := &types.DeveloperUserAlreadyRegisteredException{
		Message: ptr.String("__Message__"),
	}
	status, header, body, err := serdeRespReadSnapshot("DeveloperUserAlreadyRegisteredException.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.GetOpenIdTokenForDeveloperIdentity(context.Background(), &GetOpenIdTokenForDeveloperIdentityInput{})
	if opErr == nil {
		t.Fatal("expected error, got nil")
	}
	var got *types.DeveloperUserAlreadyRegisteredException
	if !errors.As(opErr, &got) {
		t.Fatalf("expected types.DeveloperUserAlreadyRegisteredException, got %v", opErr)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("error response snapshot mismatch for %s: %v", "DeveloperUserAlreadyRegisteredException.error", err)
	}
}

func TestCheckResponseSnapshot_Error_ExternalServiceException(t *testing.T) {
	want := &types.ExternalServiceException{
		Message: ptr.String("__Message__"),
	}
	status, header, body, err := serdeRespReadSnapshot("ExternalServiceException.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.GetCredentialsForIdentity(context.Background(), &GetCredentialsForIdentityInput{})
	if opErr == nil {
		t.Fatal("expected error, got nil")
	}
	var got *types.ExternalServiceException
	if !errors.As(opErr, &got) {
		t.Fatalf("expected types.ExternalServiceException, got %v", opErr)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("error response snapshot mismatch for %s: %v", "ExternalServiceException.error", err)
	}
}

func TestCheckResponseSnapshot_Error_InternalErrorException(t *testing.T) {
	want := &types.InternalErrorException{
		Message: ptr.String("__Message__"),
	}
	status, header, body, err := serdeRespReadSnapshot("InternalErrorException.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.CreateIdentityPool(context.Background(), &CreateIdentityPoolInput{})
	if opErr == nil {
		t.Fatal("expected error, got nil")
	}
	var got *types.InternalErrorException
	if !errors.As(opErr, &got) {
		t.Fatalf("expected types.InternalErrorException, got %v", opErr)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("error response snapshot mismatch for %s: %v", "InternalErrorException.error", err)
	}
}

func TestCheckResponseSnapshot_Error_InvalidIdentityPoolConfigurationException(t *testing.T) {
	want := &types.InvalidIdentityPoolConfigurationException{
		Message: ptr.String("__Message__"),
	}
	status, header, body, err := serdeRespReadSnapshot("InvalidIdentityPoolConfigurationException.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.GetCredentialsForIdentity(context.Background(), &GetCredentialsForIdentityInput{})
	if opErr == nil {
		t.Fatal("expected error, got nil")
	}
	var got *types.InvalidIdentityPoolConfigurationException
	if !errors.As(opErr, &got) {
		t.Fatalf("expected types.InvalidIdentityPoolConfigurationException, got %v", opErr)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("error response snapshot mismatch for %s: %v", "InvalidIdentityPoolConfigurationException.error", err)
	}
}

func TestCheckResponseSnapshot_Error_InvalidParameterException(t *testing.T) {
	want := &types.InvalidParameterException{
		Message: ptr.String("__Message__"),
	}
	status, header, body, err := serdeRespReadSnapshot("InvalidParameterException.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.CreateIdentityPool(context.Background(), &CreateIdentityPoolInput{})
	if opErr == nil {
		t.Fatal("expected error, got nil")
	}
	var got *types.InvalidParameterException
	if !errors.As(opErr, &got) {
		t.Fatalf("expected types.InvalidParameterException, got %v", opErr)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("error response snapshot mismatch for %s: %v", "InvalidParameterException.error", err)
	}
}

func TestCheckResponseSnapshot_Error_LimitExceededException(t *testing.T) {
	want := &types.LimitExceededException{
		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.CreateIdentityPool(context.Background(), &CreateIdentityPoolInput{})
	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_NotAuthorizedException(t *testing.T) {
	want := &types.NotAuthorizedException{
		Message: ptr.String("__Message__"),
	}
	status, header, body, err := serdeRespReadSnapshot("NotAuthorizedException.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.CreateIdentityPool(context.Background(), &CreateIdentityPoolInput{})
	if opErr == nil {
		t.Fatal("expected error, got nil")
	}
	var got *types.NotAuthorizedException
	if !errors.As(opErr, &got) {
		t.Fatalf("expected types.NotAuthorizedException, got %v", opErr)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("error response snapshot mismatch for %s: %v", "NotAuthorizedException.error", err)
	}
}

func TestCheckResponseSnapshot_Error_ResourceConflictException(t *testing.T) {
	want := &types.ResourceConflictException{
		Message: ptr.String("__Message__"),
	}
	status, header, body, err := serdeRespReadSnapshot("ResourceConflictException.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.CreateIdentityPool(context.Background(), &CreateIdentityPoolInput{})
	if opErr == nil {
		t.Fatal("expected error, got nil")
	}
	var got *types.ResourceConflictException
	if !errors.As(opErr, &got) {
		t.Fatalf("expected types.ResourceConflictException, got %v", opErr)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("error response snapshot mismatch for %s: %v", "ResourceConflictException.error", err)
	}
}

func TestCheckResponseSnapshot_Error_ResourceNotFoundException(t *testing.T) {
	want := &types.ResourceNotFoundException{
		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.DeleteIdentityPool(context.Background(), &DeleteIdentityPoolInput{})
	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_TooManyRequestsException(t *testing.T) {
	want := &types.TooManyRequestsException{
		Message: ptr.String("__Message__"),
	}
	status, header, body, err := serdeRespReadSnapshot("TooManyRequestsException.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.CreateIdentityPool(context.Background(), &CreateIdentityPoolInput{})
	if opErr == nil {
		t.Fatal("expected error, got nil")
	}
	var got *types.TooManyRequestsException
	if !errors.As(opErr, &got) {
		t.Fatalf("expected types.TooManyRequestsException, got %v", opErr)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("error response snapshot mismatch for %s: %v", "TooManyRequestsException.error", err)
	}
}
