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

//go:build response_snapshot

package cloud9

import (
	"bufio"
	"bytes"
	"context"
	"errors"
	"fmt"
	"github.com/aws/aws-sdk-go-v2/service/cloud9/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_CreateEnvironmentEC2(t *testing.T) {
	want := &CreateEnvironmentEC2Output{
		EnvironmentId: ptr.String("__EnvironmentId__"),
	}
	status, header, body, err := serdeRespReadSnapshot("CreateEnvironmentEC2.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.CreateEnvironmentEC2(context.Background(), &CreateEnvironmentEC2Input{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "CreateEnvironmentEC2.response", err)
	}
}

func TestCheckResponseSnapshot_CreateEnvironmentMembership(t *testing.T) {
	want := &CreateEnvironmentMembershipOutput{
		Membership: &types.EnvironmentMember{
			Permissions:   types.Permissions("owner"),
			UserId:        ptr.String("__UserId__"),
			UserArn:       ptr.String("__UserArn__"),
			EnvironmentId: ptr.String("__EnvironmentId__"),
			LastAccess:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
		},
	}
	status, header, body, err := serdeRespReadSnapshot("CreateEnvironmentMembership.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.CreateEnvironmentMembership(context.Background(), &CreateEnvironmentMembershipInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "CreateEnvironmentMembership.response", err)
	}
}

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

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

func TestCheckResponseSnapshot_DescribeEnvironmentMemberships(t *testing.T) {
	want := &DescribeEnvironmentMembershipsOutput{
		Memberships: []types.EnvironmentMember{
			{
				Permissions:   types.Permissions("owner"),
				UserId:        ptr.String("__UserId__"),
				UserArn:       ptr.String("__UserArn__"),
				EnvironmentId: ptr.String("__EnvironmentId__"),
				LastAccess:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			},
			{
				Permissions:   types.Permissions("owner"),
				UserId:        ptr.String("__UserId__"),
				UserArn:       ptr.String("__UserArn__"),
				EnvironmentId: ptr.String("__EnvironmentId__"),
				LastAccess:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			},
		},
		NextToken: ptr.String("__NextToken__"),
	}
	status, header, body, err := serdeRespReadSnapshot("DescribeEnvironmentMemberships.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.DescribeEnvironmentMemberships(context.Background(), &DescribeEnvironmentMembershipsInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "DescribeEnvironmentMemberships.response", err)
	}
}

func TestCheckResponseSnapshot_DescribeEnvironmentStatus(t *testing.T) {
	want := &DescribeEnvironmentStatusOutput{
		Status:  types.EnvironmentStatus("error"),
		Message: ptr.String("__Message__"),
	}
	status, header, body, err := serdeRespReadSnapshot("DescribeEnvironmentStatus.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.DescribeEnvironmentStatus(context.Background(), &DescribeEnvironmentStatusInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "DescribeEnvironmentStatus.response", err)
	}
}

func TestCheckResponseSnapshot_DescribeEnvironments(t *testing.T) {
	want := &DescribeEnvironmentsOutput{
		Environments: []types.Environment{
			{
				Id:             ptr.String("__Id__"),
				Name:           ptr.String("__Name__"),
				Description:    ptr.String("__Description__"),
				Type:           types.EnvironmentType("ssh"),
				ConnectionType: types.ConnectionType("CONNECT_SSH"),
				Arn:            ptr.String("__Arn__"),
				OwnerArn:       ptr.String("__OwnerArn__"),
				Lifecycle: &types.EnvironmentLifecycle{
					Status:          types.EnvironmentLifecycleStatus("CREATING"),
					Reason:          ptr.String("__Reason__"),
					FailureResource: ptr.String("__FailureResource__"),
				},
				ManagedCredentialsStatus: types.ManagedCredentialsStatus("ENABLED_ON_CREATE"),
			},
			{
				Id:             ptr.String("__Id__"),
				Name:           ptr.String("__Name__"),
				Description:    ptr.String("__Description__"),
				Type:           types.EnvironmentType("ssh"),
				ConnectionType: types.ConnectionType("CONNECT_SSH"),
				Arn:            ptr.String("__Arn__"),
				OwnerArn:       ptr.String("__OwnerArn__"),
				Lifecycle: &types.EnvironmentLifecycle{
					Status:          types.EnvironmentLifecycleStatus("CREATING"),
					Reason:          ptr.String("__Reason__"),
					FailureResource: ptr.String("__FailureResource__"),
				},
				ManagedCredentialsStatus: types.ManagedCredentialsStatus("ENABLED_ON_CREATE"),
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("DescribeEnvironments.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.DescribeEnvironments(context.Background(), &DescribeEnvironmentsInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "DescribeEnvironments.response", err)
	}
}

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

func TestCheckResponseSnapshot_ListTagsForResource(t *testing.T) {
	want := &ListTagsForResourceOutput{
		Tags: []types.Tag{
			{
				Key:   ptr.String("__Key__"),
				Value: ptr.String("__Value__"),
			},
			{
				Key:   ptr.String("__Key__"),
				Value: ptr.String("__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_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_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_UpdateEnvironment(t *testing.T) {
	want := &UpdateEnvironmentOutput{}
	status, header, body, err := serdeRespReadSnapshot("UpdateEnvironment.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.UpdateEnvironment(context.Background(), &UpdateEnvironmentInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "UpdateEnvironment.response", err)
	}
}

func TestCheckResponseSnapshot_UpdateEnvironmentMembership(t *testing.T) {
	want := &UpdateEnvironmentMembershipOutput{
		Membership: &types.EnvironmentMember{
			Permissions:   types.Permissions("owner"),
			UserId:        ptr.String("__UserId__"),
			UserArn:       ptr.String("__UserArn__"),
			EnvironmentId: ptr.String("__EnvironmentId__"),
			LastAccess:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
		},
	}
	status, header, body, err := serdeRespReadSnapshot("UpdateEnvironmentMembership.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.UpdateEnvironmentMembership(context.Background(), &UpdateEnvironmentMembershipInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "UpdateEnvironmentMembership.response", err)
	}
}

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

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

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

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

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

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

func TestCheckResponseSnapshot_Error_TooManyRequestsException(t *testing.T) {
	want := &types.TooManyRequestsException{
		Message:   ptr.String("__Message__"),
		ClassName: ptr.String("__ClassName__"),
		Code:      1,
	}
	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.CreateEnvironmentEC2(context.Background(), &CreateEnvironmentEC2Input{})
	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)
	}
}
