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

//go:build response_snapshot

package artifact

import (
	"bufio"
	"bytes"
	"context"
	"errors"
	"fmt"
	"github.com/aws/aws-sdk-go-v2/service/artifact/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_CreateComplianceInquiry(t *testing.T) {
	want := &CreateComplianceInquiryOutput{
		ComplianceInquirySummary: &types.InquirySummary{
			Arn:           ptr.String("__Arn__"),
			Name:          ptr.String("__Name__"),
			Id:            ptr.String("__Id__"),
			Status:        types.InquiryStatus("PROCESSING"),
			StatusMessage: types.InquiryStatusMessage("Compliance inquiry processing is complete."),
			InputSource:   types.InputSource("TEXT"),
			CreatedAt:     ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
		},
		Tags: map[string]string{
			"key0": "__Value__",
		},
	}
	status, header, body, err := serdeRespReadSnapshot("CreateComplianceInquiry.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.CreateComplianceInquiry(context.Background(), &CreateComplianceInquiryInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "CreateComplianceInquiry.response", err)
	}
}

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

func TestCheckResponseSnapshot_GetAccountSettings(t *testing.T) {
	want := &GetAccountSettingsOutput{
		AccountSettings: &types.AccountSettings{
			NotificationSubscriptionStatus: types.NotificationSubscriptionStatus("SUBSCRIBED"),
		},
	}
	status, header, body, err := serdeRespReadSnapshot("GetAccountSettings.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.GetAccountSettings(context.Background(), &GetAccountSettingsInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "GetAccountSettings.response", err)
	}
}

func TestCheckResponseSnapshot_GetComplianceInquiryMetadata(t *testing.T) {
	want := &GetComplianceInquiryMetadataOutput{
		ComplianceInquiryDetail: &types.InquiryDetail{
			Arn:           ptr.String("__Arn__"),
			Name:          ptr.String("__Name__"),
			Id:            ptr.String("__Id__"),
			Status:        types.InquiryStatus("PROCESSING"),
			StatusMessage: types.InquiryStatusMessage("Compliance inquiry processing is complete."),
			InputSource:   types.InputSource("TEXT"),
			CreatedAt:     ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			UpdatedAt:     ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			SupportMode:   types.InquirySupportMode("AI_ONLY"),
		},
		Tags: map[string]string{
			"key0": "__Value__",
		},
	}
	status, header, body, err := serdeRespReadSnapshot("GetComplianceInquiryMetadata.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.GetComplianceInquiryMetadata(context.Background(), &GetComplianceInquiryMetadataInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "GetComplianceInquiryMetadata.response", err)
	}
}

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

func TestCheckResponseSnapshot_GetReportMetadata(t *testing.T) {
	want := &GetReportMetadataOutput{
		ReportDetails: &types.ReportDetail{
			Id:             ptr.String("__Id__"),
			Name:           ptr.String("__Name__"),
			Description:    ptr.String("__Description__"),
			PeriodStart:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			PeriodEnd:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			CreatedAt:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			LastModifiedAt: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			DeletedAt:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			State:          types.PublishedState("PUBLISHED"),
			Arn:            ptr.String("__Arn__"),
			Series:         ptr.String("__Series__"),
			Category:       ptr.String("__Category__"),
			CompanyName:    ptr.String("__CompanyName__"),
			ProductName:    ptr.String("__ProductName__"),
			TermArn:        ptr.String("__TermArn__"),
			Version:        ptr.Int64(1),
			AcceptanceType: types.AcceptanceType("PASSTHROUGH"),
			SequenceNumber: ptr.Int64(1),
			UploadState:    types.UploadState("PROCESSING"),
			StatusMessage:  ptr.String("__StatusMessage__"),
		},
	}
	status, header, body, err := serdeRespReadSnapshot("GetReportMetadata.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.GetReportMetadata(context.Background(), &GetReportMetadataInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "GetReportMetadata.response", err)
	}
}

func TestCheckResponseSnapshot_GetTermForReport(t *testing.T) {
	want := &GetTermForReportOutput{
		DocumentPresignedUrl: ptr.String("__DocumentPresignedUrl__"),
		TermToken:            ptr.String("__TermToken__"),
	}
	status, header, body, err := serdeRespReadSnapshot("GetTermForReport.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.GetTermForReport(context.Background(), &GetTermForReportInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "GetTermForReport.response", err)
	}
}

func TestCheckResponseSnapshot_ListComplianceInquiries(t *testing.T) {
	want := &ListComplianceInquiriesOutput{
		ComplianceInquiries: []types.InquirySummary{
			{
				Arn:           ptr.String("__Arn__"),
				Name:          ptr.String("__Name__"),
				Id:            ptr.String("__Id__"),
				Status:        types.InquiryStatus("PROCESSING"),
				StatusMessage: types.InquiryStatusMessage("Compliance inquiry processing is complete."),
				InputSource:   types.InputSource("TEXT"),
				CreatedAt:     ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			},
			{
				Arn:           ptr.String("__Arn__"),
				Name:          ptr.String("__Name__"),
				Id:            ptr.String("__Id__"),
				Status:        types.InquiryStatus("PROCESSING"),
				StatusMessage: types.InquiryStatusMessage("Compliance inquiry processing is complete."),
				InputSource:   types.InputSource("TEXT"),
				CreatedAt:     ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			},
		},
		NextToken: ptr.String("__NextToken__"),
	}
	status, header, body, err := serdeRespReadSnapshot("ListComplianceInquiries.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.ListComplianceInquiries(context.Background(), &ListComplianceInquiriesInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "ListComplianceInquiries.response", err)
	}
}

func TestCheckResponseSnapshot_ListComplianceInquiryQueries(t *testing.T) {
	want := &ListComplianceInquiryQueriesOutput{
		Queries: []types.QuerySummary{
			{
				QueryIdentifier: ptr.Int32(1),
				Query:           ptr.String("__Query__"),
				Response:        ptr.String("__Response__"),
				ReviewType:      types.ReviewType("HUMAN"),
				Citations: []types.Citation{
					{
						SourceLabel:   ptr.String("__SourceLabel__"),
						SourceContent: ptr.String("__SourceContent__"),
						SourceLink:    ptr.String("__SourceLink__"),
					},
					{
						SourceLabel:   ptr.String("__SourceLabel__"),
						SourceContent: ptr.String("__SourceContent__"),
						SourceLink:    ptr.String("__SourceLink__"),
					},
				},
				Status:        types.QueryStatus("PROCESSING"),
				StatusMessage: types.QueryStatusMessage("Query processing is complete."),
				CreatedAt:     ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdatedResponseVersions: []types.ResponseVersion{
					{
						ResponseText: ptr.String("__ResponseText__"),
						Timestamp:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
					},
					{
						ResponseText: ptr.String("__ResponseText__"),
						Timestamp:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
					},
				},
			},
			{
				QueryIdentifier: ptr.Int32(1),
				Query:           ptr.String("__Query__"),
				Response:        ptr.String("__Response__"),
				ReviewType:      types.ReviewType("HUMAN"),
				Citations: []types.Citation{
					{
						SourceLabel:   ptr.String("__SourceLabel__"),
						SourceContent: ptr.String("__SourceContent__"),
						SourceLink:    ptr.String("__SourceLink__"),
					},
					{
						SourceLabel:   ptr.String("__SourceLabel__"),
						SourceContent: ptr.String("__SourceContent__"),
						SourceLink:    ptr.String("__SourceLink__"),
					},
				},
				Status:        types.QueryStatus("PROCESSING"),
				StatusMessage: types.QueryStatusMessage("Query processing is complete."),
				CreatedAt:     ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				UpdatedResponseVersions: []types.ResponseVersion{
					{
						ResponseText: ptr.String("__ResponseText__"),
						Timestamp:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
					},
					{
						ResponseText: ptr.String("__ResponseText__"),
						Timestamp:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
					},
				},
			},
		},
		NextToken: ptr.String("__NextToken__"),
	}
	status, header, body, err := serdeRespReadSnapshot("ListComplianceInquiryQueries.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.ListComplianceInquiryQueries(context.Background(), &ListComplianceInquiryQueriesInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "ListComplianceInquiryQueries.response", err)
	}
}

func TestCheckResponseSnapshot_ListCustomerAgreements(t *testing.T) {
	want := &ListCustomerAgreementsOutput{
		CustomerAgreements: []types.CustomerAgreementSummary{
			{
				Name:            ptr.String("__Name__"),
				Arn:             ptr.String("__Arn__"),
				Id:              ptr.String("__Id__"),
				AgreementArn:    ptr.String("__AgreementArn__"),
				AwsAccountId:    ptr.String("__AwsAccountId__"),
				OrganizationArn: ptr.String("__OrganizationArn__"),
				EffectiveStart:  ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				EffectiveEnd:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				State:           types.CustomerAgreementState("ACTIVE"),
				Description:     ptr.String("__Description__"),
				AcceptanceTerms: []string{
					"__Member__",
					"__Member__",
				},
				TerminateTerms: []string{
					"__Member__",
					"__Member__",
				},
				Type: types.AgreementType("CUSTOM"),
			},
			{
				Name:            ptr.String("__Name__"),
				Arn:             ptr.String("__Arn__"),
				Id:              ptr.String("__Id__"),
				AgreementArn:    ptr.String("__AgreementArn__"),
				AwsAccountId:    ptr.String("__AwsAccountId__"),
				OrganizationArn: ptr.String("__OrganizationArn__"),
				EffectiveStart:  ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				EffectiveEnd:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				State:           types.CustomerAgreementState("ACTIVE"),
				Description:     ptr.String("__Description__"),
				AcceptanceTerms: []string{
					"__Member__",
					"__Member__",
				},
				TerminateTerms: []string{
					"__Member__",
					"__Member__",
				},
				Type: types.AgreementType("CUSTOM"),
			},
		},
		NextToken: ptr.String("__NextToken__"),
	}
	status, header, body, err := serdeRespReadSnapshot("ListCustomerAgreements.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.ListCustomerAgreements(context.Background(), &ListCustomerAgreementsInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "ListCustomerAgreements.response", err)
	}
}

func TestCheckResponseSnapshot_ListReportVersions(t *testing.T) {
	want := &ListReportVersionsOutput{
		Reports: []types.ReportSummary{
			{
				Id:             ptr.String("__Id__"),
				Name:           ptr.String("__Name__"),
				State:          types.PublishedState("PUBLISHED"),
				Arn:            ptr.String("__Arn__"),
				Version:        ptr.Int64(1),
				UploadState:    types.UploadState("PROCESSING"),
				Description:    ptr.String("__Description__"),
				PeriodStart:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				PeriodEnd:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				Series:         ptr.String("__Series__"),
				Category:       ptr.String("__Category__"),
				CompanyName:    ptr.String("__CompanyName__"),
				ProductName:    ptr.String("__ProductName__"),
				StatusMessage:  ptr.String("__StatusMessage__"),
				AcceptanceType: types.AcceptanceType("PASSTHROUGH"),
			},
			{
				Id:             ptr.String("__Id__"),
				Name:           ptr.String("__Name__"),
				State:          types.PublishedState("PUBLISHED"),
				Arn:            ptr.String("__Arn__"),
				Version:        ptr.Int64(1),
				UploadState:    types.UploadState("PROCESSING"),
				Description:    ptr.String("__Description__"),
				PeriodStart:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				PeriodEnd:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				Series:         ptr.String("__Series__"),
				Category:       ptr.String("__Category__"),
				CompanyName:    ptr.String("__CompanyName__"),
				ProductName:    ptr.String("__ProductName__"),
				StatusMessage:  ptr.String("__StatusMessage__"),
				AcceptanceType: types.AcceptanceType("PASSTHROUGH"),
			},
		},
		NextToken: ptr.String("__NextToken__"),
	}
	status, header, body, err := serdeRespReadSnapshot("ListReportVersions.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.ListReportVersions(context.Background(), &ListReportVersionsInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "ListReportVersions.response", err)
	}
}

func TestCheckResponseSnapshot_ListReports(t *testing.T) {
	want := &ListReportsOutput{
		Reports: []types.ReportSummary{
			{
				Id:             ptr.String("__Id__"),
				Name:           ptr.String("__Name__"),
				State:          types.PublishedState("PUBLISHED"),
				Arn:            ptr.String("__Arn__"),
				Version:        ptr.Int64(1),
				UploadState:    types.UploadState("PROCESSING"),
				Description:    ptr.String("__Description__"),
				PeriodStart:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				PeriodEnd:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				Series:         ptr.String("__Series__"),
				Category:       ptr.String("__Category__"),
				CompanyName:    ptr.String("__CompanyName__"),
				ProductName:    ptr.String("__ProductName__"),
				StatusMessage:  ptr.String("__StatusMessage__"),
				AcceptanceType: types.AcceptanceType("PASSTHROUGH"),
			},
			{
				Id:             ptr.String("__Id__"),
				Name:           ptr.String("__Name__"),
				State:          types.PublishedState("PUBLISHED"),
				Arn:            ptr.String("__Arn__"),
				Version:        ptr.Int64(1),
				UploadState:    types.UploadState("PROCESSING"),
				Description:    ptr.String("__Description__"),
				PeriodStart:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				PeriodEnd:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				Series:         ptr.String("__Series__"),
				Category:       ptr.String("__Category__"),
				CompanyName:    ptr.String("__CompanyName__"),
				ProductName:    ptr.String("__ProductName__"),
				StatusMessage:  ptr.String("__StatusMessage__"),
				AcceptanceType: types.AcceptanceType("PASSTHROUGH"),
			},
		},
		NextToken: ptr.String("__NextToken__"),
	}
	status, header, body, err := serdeRespReadSnapshot("ListReports.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.ListReports(context.Background(), &ListReportsInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "ListReports.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_PutAccountSettings(t *testing.T) {
	want := &PutAccountSettingsOutput{
		AccountSettings: &types.AccountSettings{
			NotificationSubscriptionStatus: types.NotificationSubscriptionStatus("SUBSCRIBED"),
		},
	}
	status, header, body, err := serdeRespReadSnapshot("PutAccountSettings.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.PutAccountSettings(context.Background(), &PutAccountSettingsInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "PutAccountSettings.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_Error_AccessDeniedException(t *testing.T) {
	want := &types.AccessDeniedException{
		Message: ptr.String("__Message__"),
	}
	status, header, body, err := serdeRespReadSnapshot("AccessDeniedException.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.CreateComplianceInquiry(context.Background(), &CreateComplianceInquiryInput{})
	if opErr == nil {
		t.Fatal("expected error, got nil")
	}
	var got *types.AccessDeniedException
	if !errors.As(opErr, &got) {
		t.Fatalf("expected types.AccessDeniedException, got %v", opErr)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("error response snapshot mismatch for %s: %v", "AccessDeniedException.error", err)
	}
}

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

func TestCheckResponseSnapshot_Error_ResourceNotFoundException(t *testing.T) {
	want := &types.ResourceNotFoundException{
		Message:      ptr.String("__Message__"),
		ResourceId:   ptr.String("__ResourceId__"),
		ResourceType: ptr.String("__ResourceType__"),
	}
	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.ExportComplianceInquiry(context.Background(), &ExportComplianceInquiryInput{})
	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_ServiceQuotaExceededException(t *testing.T) {
	want := &types.ServiceQuotaExceededException{
		Message:      ptr.String("__Message__"),
		ResourceId:   ptr.String("__ResourceId__"),
		ResourceType: ptr.String("__ResourceType__"),
		ServiceCode:  ptr.String("__ServiceCode__"),
		QuotaCode:    ptr.String("__QuotaCode__"),
	}
	status, header, body, err := serdeRespReadSnapshot("ServiceQuotaExceededException.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.GetAccountSettings(context.Background(), &GetAccountSettingsInput{})
	if opErr == nil {
		t.Fatal("expected error, got nil")
	}
	var got *types.ServiceQuotaExceededException
	if !errors.As(opErr, &got) {
		t.Fatalf("expected types.ServiceQuotaExceededException, got %v", opErr)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("error response snapshot mismatch for %s: %v", "ServiceQuotaExceededException.error", err)
	}
}

func TestCheckResponseSnapshot_Error_ThrottlingException(t *testing.T) {
	want := &types.ThrottlingException{
		Message:           ptr.String("__Message__"),
		ServiceCode:       ptr.String("__ServiceCode__"),
		QuotaCode:         ptr.String("__QuotaCode__"),
		RetryAfterSeconds: ptr.Int32(1),
	}
	status, header, body, err := serdeRespReadSnapshot("ThrottlingException.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.CreateComplianceInquiry(context.Background(), &CreateComplianceInquiryInput{})
	if opErr == nil {
		t.Fatal("expected error, got nil")
	}
	var got *types.ThrottlingException
	if !errors.As(opErr, &got) {
		t.Fatalf("expected types.ThrottlingException, got %v", opErr)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("error response snapshot mismatch for %s: %v", "ThrottlingException.error", err)
	}
}

func TestCheckResponseSnapshot_Error_ValidationException(t *testing.T) {
	want := &types.ValidationException{
		Message: ptr.String("__Message__"),
		Reason:  types.ValidationExceptionReason("unknownOperation"),
		FieldList: []types.ValidationExceptionField{
			{
				Name:    ptr.String("__Name__"),
				Message: ptr.String("__Message__"),
			},
			{
				Name:    ptr.String("__Name__"),
				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.CreateComplianceInquiry(context.Background(), &CreateComplianceInquiryInput{})
	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)
	}
}
