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

//go:build response_snapshot

package acmpca

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

func TestCheckResponseSnapshot_CreateCertificateAuthorityAuditReport(t *testing.T) {
	want := &CreateCertificateAuthorityAuditReportOutput{
		AuditReportId: ptr.String("__AuditReportId__"),
		S3Key:         ptr.String("__S3Key__"),
	}
	status, header, body, err := serdeRespReadSnapshot("CreateCertificateAuthorityAuditReport.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.CreateCertificateAuthorityAuditReport(context.Background(), &CreateCertificateAuthorityAuditReportInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "CreateCertificateAuthorityAuditReport.response", err)
	}
}

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

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

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

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

func TestCheckResponseSnapshot_DescribeCertificateAuthority(t *testing.T) {
	want := &DescribeCertificateAuthorityOutput{
		CertificateAuthority: &types.CertificateAuthority{
			Arn:               ptr.String("__Arn__"),
			OwnerAccount:      ptr.String("__OwnerAccount__"),
			CreatedAt:         ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			LastStateChangeAt: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			Type:              types.CertificateAuthorityType("ROOT"),
			Serial:            ptr.String("__Serial__"),
			Status:            types.CertificateAuthorityStatus("CREATING"),
			NotBefore:         ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			NotAfter:          ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			FailureReason:     types.FailureReason("REQUEST_TIMED_OUT"),
			CertificateAuthorityConfiguration: &types.CertificateAuthorityConfiguration{
				KeyAlgorithm:     types.KeyAlgorithm("RSA_2048"),
				SigningAlgorithm: types.SigningAlgorithm("SHA256WITHECDSA"),
				Subject: &types.ASN1Subject{
					Country:                    ptr.String("__Country__"),
					Organization:               ptr.String("__Organization__"),
					OrganizationalUnit:         ptr.String("__OrganizationalUnit__"),
					DistinguishedNameQualifier: ptr.String("__DistinguishedNameQualifier__"),
					State:                      ptr.String("__State__"),
					CommonName:                 ptr.String("__CommonName__"),
					SerialNumber:               ptr.String("__SerialNumber__"),
					Locality:                   ptr.String("__Locality__"),
					Title:                      ptr.String("__Title__"),
					Surname:                    ptr.String("__Surname__"),
					GivenName:                  ptr.String("__GivenName__"),
					Initials:                   ptr.String("__Initials__"),
					Pseudonym:                  ptr.String("__Pseudonym__"),
					GenerationQualifier:        ptr.String("__GenerationQualifier__"),
					CustomAttributes: []types.CustomAttribute{
						{
							ObjectIdentifier: ptr.String("__ObjectIdentifier__"),
							Value:            ptr.String("__Value__"),
						},
						{
							ObjectIdentifier: ptr.String("__ObjectIdentifier__"),
							Value:            ptr.String("__Value__"),
						},
					},
				},
				CsrExtensions: &types.CsrExtensions{
					KeyUsage: &types.KeyUsage{
						DigitalSignature: true,
						NonRepudiation:   true,
						KeyEncipherment:  true,
						DataEncipherment: true,
						KeyAgreement:     true,
						KeyCertSign:      true,
						CRLSign:          true,
						EncipherOnly:     true,
						DecipherOnly:     true,
					},
					SubjectInformationAccess: []types.AccessDescription{
						{
							AccessMethod: &types.AccessMethod{
								CustomObjectIdentifier: ptr.String("__CustomObjectIdentifier__"),
								AccessMethodType:       types.AccessMethodType("CA_REPOSITORY"),
							},
							AccessLocation: &types.GeneralName{
								OtherName: &types.OtherName{
									TypeId: ptr.String("__TypeId__"),
									Value:  ptr.String("__Value__"),
								},
								Rfc822Name: ptr.String("__Rfc822Name__"),
								DnsName:    ptr.String("__DnsName__"),
								DirectoryName: &types.ASN1Subject{
									Country:                    ptr.String("__Country__"),
									Organization:               ptr.String("__Organization__"),
									OrganizationalUnit:         ptr.String("__OrganizationalUnit__"),
									DistinguishedNameQualifier: ptr.String("__DistinguishedNameQualifier__"),
									State:                      ptr.String("__State__"),
									CommonName:                 ptr.String("__CommonName__"),
									SerialNumber:               ptr.String("__SerialNumber__"),
									Locality:                   ptr.String("__Locality__"),
									Title:                      ptr.String("__Title__"),
									Surname:                    ptr.String("__Surname__"),
									GivenName:                  ptr.String("__GivenName__"),
									Initials:                   ptr.String("__Initials__"),
									Pseudonym:                  ptr.String("__Pseudonym__"),
									GenerationQualifier:        ptr.String("__GenerationQualifier__"),
									CustomAttributes: []types.CustomAttribute{
										{
											ObjectIdentifier: ptr.String("__ObjectIdentifier__"),
											Value:            ptr.String("__Value__"),
										},
										{
											ObjectIdentifier: ptr.String("__ObjectIdentifier__"),
											Value:            ptr.String("__Value__"),
										},
									},
								},
								EdiPartyName: &types.EdiPartyName{
									PartyName:    ptr.String("__PartyName__"),
									NameAssigner: ptr.String("__NameAssigner__"),
								},
								UniformResourceIdentifier: ptr.String("__UniformResourceIdentifier__"),
								IpAddress:                 ptr.String("__IpAddress__"),
								RegisteredId:              ptr.String("__RegisteredId__"),
							},
						},
						{
							AccessMethod: &types.AccessMethod{
								CustomObjectIdentifier: ptr.String("__CustomObjectIdentifier__"),
								AccessMethodType:       types.AccessMethodType("CA_REPOSITORY"),
							},
							AccessLocation: &types.GeneralName{
								OtherName: &types.OtherName{
									TypeId: ptr.String("__TypeId__"),
									Value:  ptr.String("__Value__"),
								},
								Rfc822Name: ptr.String("__Rfc822Name__"),
								DnsName:    ptr.String("__DnsName__"),
								DirectoryName: &types.ASN1Subject{
									Country:                    ptr.String("__Country__"),
									Organization:               ptr.String("__Organization__"),
									OrganizationalUnit:         ptr.String("__OrganizationalUnit__"),
									DistinguishedNameQualifier: ptr.String("__DistinguishedNameQualifier__"),
									State:                      ptr.String("__State__"),
									CommonName:                 ptr.String("__CommonName__"),
									SerialNumber:               ptr.String("__SerialNumber__"),
									Locality:                   ptr.String("__Locality__"),
									Title:                      ptr.String("__Title__"),
									Surname:                    ptr.String("__Surname__"),
									GivenName:                  ptr.String("__GivenName__"),
									Initials:                   ptr.String("__Initials__"),
									Pseudonym:                  ptr.String("__Pseudonym__"),
									GenerationQualifier:        ptr.String("__GenerationQualifier__"),
									CustomAttributes: []types.CustomAttribute{
										{
											ObjectIdentifier: ptr.String("__ObjectIdentifier__"),
											Value:            ptr.String("__Value__"),
										},
										{
											ObjectIdentifier: ptr.String("__ObjectIdentifier__"),
											Value:            ptr.String("__Value__"),
										},
									},
								},
								EdiPartyName: &types.EdiPartyName{
									PartyName:    ptr.String("__PartyName__"),
									NameAssigner: ptr.String("__NameAssigner__"),
								},
								UniformResourceIdentifier: ptr.String("__UniformResourceIdentifier__"),
								IpAddress:                 ptr.String("__IpAddress__"),
								RegisteredId:              ptr.String("__RegisteredId__"),
							},
						},
					},
				},
			},
			RevocationConfiguration: &types.RevocationConfiguration{
				CrlConfiguration: &types.CrlConfiguration{
					Enabled:          ptr.Bool(true),
					ExpirationInDays: ptr.Int32(1),
					CustomCname:      ptr.String("__CustomCname__"),
					S3BucketName:     ptr.String("__S3BucketName__"),
					S3ObjectAcl:      types.S3ObjectAcl("PUBLIC_READ"),
					CrlDistributionPointExtensionConfiguration: &types.CrlDistributionPointExtensionConfiguration{
						OmitExtension: ptr.Bool(true),
					},
					CrlType:    types.CrlType("COMPLETE"),
					CustomPath: ptr.String("__CustomPath__"),
				},
				OcspConfiguration: &types.OcspConfiguration{
					Enabled:         ptr.Bool(true),
					OcspCustomCname: ptr.String("__OcspCustomCname__"),
				},
			},
			RestorableUntil:            ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			KeyStorageSecurityStandard: types.KeyStorageSecurityStandard("FIPS_140_2_LEVEL_2_OR_HIGHER"),
			UsageMode:                  types.CertificateAuthorityUsageMode("GENERAL_PURPOSE"),
		},
	}
	status, header, body, err := serdeRespReadSnapshot("DescribeCertificateAuthority.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.DescribeCertificateAuthority(context.Background(), &DescribeCertificateAuthorityInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "DescribeCertificateAuthority.response", err)
	}
}

func TestCheckResponseSnapshot_DescribeCertificateAuthorityAuditReport(t *testing.T) {
	want := &DescribeCertificateAuthorityAuditReportOutput{
		AuditReportStatus: types.AuditReportStatus("CREATING"),
		S3BucketName:      ptr.String("__S3BucketName__"),
		S3Key:             ptr.String("__S3Key__"),
		CreatedAt:         ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
	}
	status, header, body, err := serdeRespReadSnapshot("DescribeCertificateAuthorityAuditReport.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.DescribeCertificateAuthorityAuditReport(context.Background(), &DescribeCertificateAuthorityAuditReportInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "DescribeCertificateAuthorityAuditReport.response", err)
	}
}

func TestCheckResponseSnapshot_GetCertificate(t *testing.T) {
	want := &GetCertificateOutput{
		Certificate:      ptr.String("__Certificate__"),
		CertificateChain: ptr.String("__CertificateChain__"),
	}
	status, header, body, err := serdeRespReadSnapshot("GetCertificate.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.GetCertificate(context.Background(), &GetCertificateInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "GetCertificate.response", err)
	}
}

func TestCheckResponseSnapshot_GetCertificateAuthorityCertificate(t *testing.T) {
	want := &GetCertificateAuthorityCertificateOutput{
		Certificate:      ptr.String("__Certificate__"),
		CertificateChain: ptr.String("__CertificateChain__"),
	}
	status, header, body, err := serdeRespReadSnapshot("GetCertificateAuthorityCertificate.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.GetCertificateAuthorityCertificate(context.Background(), &GetCertificateAuthorityCertificateInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "GetCertificateAuthorityCertificate.response", err)
	}
}

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

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

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

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

func TestCheckResponseSnapshot_ListCertificateAuthorities(t *testing.T) {
	want := &ListCertificateAuthoritiesOutput{
		NextToken: ptr.String("__NextToken__"),
		CertificateAuthorities: []types.CertificateAuthority{
			{
				Arn:               ptr.String("__Arn__"),
				OwnerAccount:      ptr.String("__OwnerAccount__"),
				CreatedAt:         ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				LastStateChangeAt: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				Type:              types.CertificateAuthorityType("ROOT"),
				Serial:            ptr.String("__Serial__"),
				Status:            types.CertificateAuthorityStatus("CREATING"),
				NotBefore:         ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				NotAfter:          ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				FailureReason:     types.FailureReason("REQUEST_TIMED_OUT"),
				CertificateAuthorityConfiguration: &types.CertificateAuthorityConfiguration{
					KeyAlgorithm:     types.KeyAlgorithm("RSA_2048"),
					SigningAlgorithm: types.SigningAlgorithm("SHA256WITHECDSA"),
					Subject: &types.ASN1Subject{
						Country:                    ptr.String("__Country__"),
						Organization:               ptr.String("__Organization__"),
						OrganizationalUnit:         ptr.String("__OrganizationalUnit__"),
						DistinguishedNameQualifier: ptr.String("__DistinguishedNameQualifier__"),
						State:                      ptr.String("__State__"),
						CommonName:                 ptr.String("__CommonName__"),
						SerialNumber:               ptr.String("__SerialNumber__"),
						Locality:                   ptr.String("__Locality__"),
						Title:                      ptr.String("__Title__"),
						Surname:                    ptr.String("__Surname__"),
						GivenName:                  ptr.String("__GivenName__"),
						Initials:                   ptr.String("__Initials__"),
						Pseudonym:                  ptr.String("__Pseudonym__"),
						GenerationQualifier:        ptr.String("__GenerationQualifier__"),
						CustomAttributes: []types.CustomAttribute{
							{
								ObjectIdentifier: ptr.String("__ObjectIdentifier__"),
								Value:            ptr.String("__Value__"),
							},
							{
								ObjectIdentifier: ptr.String("__ObjectIdentifier__"),
								Value:            ptr.String("__Value__"),
							},
						},
					},
					CsrExtensions: &types.CsrExtensions{
						KeyUsage: &types.KeyUsage{
							DigitalSignature: true,
							NonRepudiation:   true,
							KeyEncipherment:  true,
							DataEncipherment: true,
							KeyAgreement:     true,
							KeyCertSign:      true,
							CRLSign:          true,
							EncipherOnly:     true,
							DecipherOnly:     true,
						},
						SubjectInformationAccess: []types.AccessDescription{
							{
								AccessMethod: &types.AccessMethod{
									CustomObjectIdentifier: ptr.String("__CustomObjectIdentifier__"),
									AccessMethodType:       types.AccessMethodType("CA_REPOSITORY"),
								},
								AccessLocation: &types.GeneralName{
									OtherName: &types.OtherName{
										TypeId: ptr.String("__TypeId__"),
										Value:  ptr.String("__Value__"),
									},
									Rfc822Name: ptr.String("__Rfc822Name__"),
									DnsName:    ptr.String("__DnsName__"),
									DirectoryName: &types.ASN1Subject{
										Country:                    ptr.String("__Country__"),
										Organization:               ptr.String("__Organization__"),
										OrganizationalUnit:         ptr.String("__OrganizationalUnit__"),
										DistinguishedNameQualifier: ptr.String("__DistinguishedNameQualifier__"),
										State:                      ptr.String("__State__"),
										CommonName:                 ptr.String("__CommonName__"),
										SerialNumber:               ptr.String("__SerialNumber__"),
										Locality:                   ptr.String("__Locality__"),
										Title:                      ptr.String("__Title__"),
										Surname:                    ptr.String("__Surname__"),
										GivenName:                  ptr.String("__GivenName__"),
										Initials:                   ptr.String("__Initials__"),
										Pseudonym:                  ptr.String("__Pseudonym__"),
										GenerationQualifier:        ptr.String("__GenerationQualifier__"),
										CustomAttributes: []types.CustomAttribute{
											{
												ObjectIdentifier: ptr.String("__ObjectIdentifier__"),
												Value:            ptr.String("__Value__"),
											},
											{
												ObjectIdentifier: ptr.String("__ObjectIdentifier__"),
												Value:            ptr.String("__Value__"),
											},
										},
									},
									EdiPartyName: &types.EdiPartyName{
										PartyName:    ptr.String("__PartyName__"),
										NameAssigner: ptr.String("__NameAssigner__"),
									},
									UniformResourceIdentifier: ptr.String("__UniformResourceIdentifier__"),
									IpAddress:                 ptr.String("__IpAddress__"),
									RegisteredId:              ptr.String("__RegisteredId__"),
								},
							},
							{
								AccessMethod: &types.AccessMethod{
									CustomObjectIdentifier: ptr.String("__CustomObjectIdentifier__"),
									AccessMethodType:       types.AccessMethodType("CA_REPOSITORY"),
								},
								AccessLocation: &types.GeneralName{
									OtherName: &types.OtherName{
										TypeId: ptr.String("__TypeId__"),
										Value:  ptr.String("__Value__"),
									},
									Rfc822Name: ptr.String("__Rfc822Name__"),
									DnsName:    ptr.String("__DnsName__"),
									DirectoryName: &types.ASN1Subject{
										Country:                    ptr.String("__Country__"),
										Organization:               ptr.String("__Organization__"),
										OrganizationalUnit:         ptr.String("__OrganizationalUnit__"),
										DistinguishedNameQualifier: ptr.String("__DistinguishedNameQualifier__"),
										State:                      ptr.String("__State__"),
										CommonName:                 ptr.String("__CommonName__"),
										SerialNumber:               ptr.String("__SerialNumber__"),
										Locality:                   ptr.String("__Locality__"),
										Title:                      ptr.String("__Title__"),
										Surname:                    ptr.String("__Surname__"),
										GivenName:                  ptr.String("__GivenName__"),
										Initials:                   ptr.String("__Initials__"),
										Pseudonym:                  ptr.String("__Pseudonym__"),
										GenerationQualifier:        ptr.String("__GenerationQualifier__"),
										CustomAttributes: []types.CustomAttribute{
											{
												ObjectIdentifier: ptr.String("__ObjectIdentifier__"),
												Value:            ptr.String("__Value__"),
											},
											{
												ObjectIdentifier: ptr.String("__ObjectIdentifier__"),
												Value:            ptr.String("__Value__"),
											},
										},
									},
									EdiPartyName: &types.EdiPartyName{
										PartyName:    ptr.String("__PartyName__"),
										NameAssigner: ptr.String("__NameAssigner__"),
									},
									UniformResourceIdentifier: ptr.String("__UniformResourceIdentifier__"),
									IpAddress:                 ptr.String("__IpAddress__"),
									RegisteredId:              ptr.String("__RegisteredId__"),
								},
							},
						},
					},
				},
				RevocationConfiguration: &types.RevocationConfiguration{
					CrlConfiguration: &types.CrlConfiguration{
						Enabled:          ptr.Bool(true),
						ExpirationInDays: ptr.Int32(1),
						CustomCname:      ptr.String("__CustomCname__"),
						S3BucketName:     ptr.String("__S3BucketName__"),
						S3ObjectAcl:      types.S3ObjectAcl("PUBLIC_READ"),
						CrlDistributionPointExtensionConfiguration: &types.CrlDistributionPointExtensionConfiguration{
							OmitExtension: ptr.Bool(true),
						},
						CrlType:    types.CrlType("COMPLETE"),
						CustomPath: ptr.String("__CustomPath__"),
					},
					OcspConfiguration: &types.OcspConfiguration{
						Enabled:         ptr.Bool(true),
						OcspCustomCname: ptr.String("__OcspCustomCname__"),
					},
				},
				RestorableUntil:            ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				KeyStorageSecurityStandard: types.KeyStorageSecurityStandard("FIPS_140_2_LEVEL_2_OR_HIGHER"),
				UsageMode:                  types.CertificateAuthorityUsageMode("GENERAL_PURPOSE"),
			},
			{
				Arn:               ptr.String("__Arn__"),
				OwnerAccount:      ptr.String("__OwnerAccount__"),
				CreatedAt:         ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				LastStateChangeAt: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				Type:              types.CertificateAuthorityType("ROOT"),
				Serial:            ptr.String("__Serial__"),
				Status:            types.CertificateAuthorityStatus("CREATING"),
				NotBefore:         ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				NotAfter:          ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				FailureReason:     types.FailureReason("REQUEST_TIMED_OUT"),
				CertificateAuthorityConfiguration: &types.CertificateAuthorityConfiguration{
					KeyAlgorithm:     types.KeyAlgorithm("RSA_2048"),
					SigningAlgorithm: types.SigningAlgorithm("SHA256WITHECDSA"),
					Subject: &types.ASN1Subject{
						Country:                    ptr.String("__Country__"),
						Organization:               ptr.String("__Organization__"),
						OrganizationalUnit:         ptr.String("__OrganizationalUnit__"),
						DistinguishedNameQualifier: ptr.String("__DistinguishedNameQualifier__"),
						State:                      ptr.String("__State__"),
						CommonName:                 ptr.String("__CommonName__"),
						SerialNumber:               ptr.String("__SerialNumber__"),
						Locality:                   ptr.String("__Locality__"),
						Title:                      ptr.String("__Title__"),
						Surname:                    ptr.String("__Surname__"),
						GivenName:                  ptr.String("__GivenName__"),
						Initials:                   ptr.String("__Initials__"),
						Pseudonym:                  ptr.String("__Pseudonym__"),
						GenerationQualifier:        ptr.String("__GenerationQualifier__"),
						CustomAttributes: []types.CustomAttribute{
							{
								ObjectIdentifier: ptr.String("__ObjectIdentifier__"),
								Value:            ptr.String("__Value__"),
							},
							{
								ObjectIdentifier: ptr.String("__ObjectIdentifier__"),
								Value:            ptr.String("__Value__"),
							},
						},
					},
					CsrExtensions: &types.CsrExtensions{
						KeyUsage: &types.KeyUsage{
							DigitalSignature: true,
							NonRepudiation:   true,
							KeyEncipherment:  true,
							DataEncipherment: true,
							KeyAgreement:     true,
							KeyCertSign:      true,
							CRLSign:          true,
							EncipherOnly:     true,
							DecipherOnly:     true,
						},
						SubjectInformationAccess: []types.AccessDescription{
							{
								AccessMethod: &types.AccessMethod{
									CustomObjectIdentifier: ptr.String("__CustomObjectIdentifier__"),
									AccessMethodType:       types.AccessMethodType("CA_REPOSITORY"),
								},
								AccessLocation: &types.GeneralName{
									OtherName: &types.OtherName{
										TypeId: ptr.String("__TypeId__"),
										Value:  ptr.String("__Value__"),
									},
									Rfc822Name: ptr.String("__Rfc822Name__"),
									DnsName:    ptr.String("__DnsName__"),
									DirectoryName: &types.ASN1Subject{
										Country:                    ptr.String("__Country__"),
										Organization:               ptr.String("__Organization__"),
										OrganizationalUnit:         ptr.String("__OrganizationalUnit__"),
										DistinguishedNameQualifier: ptr.String("__DistinguishedNameQualifier__"),
										State:                      ptr.String("__State__"),
										CommonName:                 ptr.String("__CommonName__"),
										SerialNumber:               ptr.String("__SerialNumber__"),
										Locality:                   ptr.String("__Locality__"),
										Title:                      ptr.String("__Title__"),
										Surname:                    ptr.String("__Surname__"),
										GivenName:                  ptr.String("__GivenName__"),
										Initials:                   ptr.String("__Initials__"),
										Pseudonym:                  ptr.String("__Pseudonym__"),
										GenerationQualifier:        ptr.String("__GenerationQualifier__"),
										CustomAttributes: []types.CustomAttribute{
											{
												ObjectIdentifier: ptr.String("__ObjectIdentifier__"),
												Value:            ptr.String("__Value__"),
											},
											{
												ObjectIdentifier: ptr.String("__ObjectIdentifier__"),
												Value:            ptr.String("__Value__"),
											},
										},
									},
									EdiPartyName: &types.EdiPartyName{
										PartyName:    ptr.String("__PartyName__"),
										NameAssigner: ptr.String("__NameAssigner__"),
									},
									UniformResourceIdentifier: ptr.String("__UniformResourceIdentifier__"),
									IpAddress:                 ptr.String("__IpAddress__"),
									RegisteredId:              ptr.String("__RegisteredId__"),
								},
							},
							{
								AccessMethod: &types.AccessMethod{
									CustomObjectIdentifier: ptr.String("__CustomObjectIdentifier__"),
									AccessMethodType:       types.AccessMethodType("CA_REPOSITORY"),
								},
								AccessLocation: &types.GeneralName{
									OtherName: &types.OtherName{
										TypeId: ptr.String("__TypeId__"),
										Value:  ptr.String("__Value__"),
									},
									Rfc822Name: ptr.String("__Rfc822Name__"),
									DnsName:    ptr.String("__DnsName__"),
									DirectoryName: &types.ASN1Subject{
										Country:                    ptr.String("__Country__"),
										Organization:               ptr.String("__Organization__"),
										OrganizationalUnit:         ptr.String("__OrganizationalUnit__"),
										DistinguishedNameQualifier: ptr.String("__DistinguishedNameQualifier__"),
										State:                      ptr.String("__State__"),
										CommonName:                 ptr.String("__CommonName__"),
										SerialNumber:               ptr.String("__SerialNumber__"),
										Locality:                   ptr.String("__Locality__"),
										Title:                      ptr.String("__Title__"),
										Surname:                    ptr.String("__Surname__"),
										GivenName:                  ptr.String("__GivenName__"),
										Initials:                   ptr.String("__Initials__"),
										Pseudonym:                  ptr.String("__Pseudonym__"),
										GenerationQualifier:        ptr.String("__GenerationQualifier__"),
										CustomAttributes: []types.CustomAttribute{
											{
												ObjectIdentifier: ptr.String("__ObjectIdentifier__"),
												Value:            ptr.String("__Value__"),
											},
											{
												ObjectIdentifier: ptr.String("__ObjectIdentifier__"),
												Value:            ptr.String("__Value__"),
											},
										},
									},
									EdiPartyName: &types.EdiPartyName{
										PartyName:    ptr.String("__PartyName__"),
										NameAssigner: ptr.String("__NameAssigner__"),
									},
									UniformResourceIdentifier: ptr.String("__UniformResourceIdentifier__"),
									IpAddress:                 ptr.String("__IpAddress__"),
									RegisteredId:              ptr.String("__RegisteredId__"),
								},
							},
						},
					},
				},
				RevocationConfiguration: &types.RevocationConfiguration{
					CrlConfiguration: &types.CrlConfiguration{
						Enabled:          ptr.Bool(true),
						ExpirationInDays: ptr.Int32(1),
						CustomCname:      ptr.String("__CustomCname__"),
						S3BucketName:     ptr.String("__S3BucketName__"),
						S3ObjectAcl:      types.S3ObjectAcl("PUBLIC_READ"),
						CrlDistributionPointExtensionConfiguration: &types.CrlDistributionPointExtensionConfiguration{
							OmitExtension: ptr.Bool(true),
						},
						CrlType:    types.CrlType("COMPLETE"),
						CustomPath: ptr.String("__CustomPath__"),
					},
					OcspConfiguration: &types.OcspConfiguration{
						Enabled:         ptr.Bool(true),
						OcspCustomCname: ptr.String("__OcspCustomCname__"),
					},
				},
				RestorableUntil:            ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				KeyStorageSecurityStandard: types.KeyStorageSecurityStandard("FIPS_140_2_LEVEL_2_OR_HIGHER"),
				UsageMode:                  types.CertificateAuthorityUsageMode("GENERAL_PURPOSE"),
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("ListCertificateAuthorities.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.ListCertificateAuthorities(context.Background(), &ListCertificateAuthoritiesInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "ListCertificateAuthorities.response", err)
	}
}

func TestCheckResponseSnapshot_ListPermissions(t *testing.T) {
	want := &ListPermissionsOutput{
		NextToken: ptr.String("__NextToken__"),
		Permissions: []types.Permission{
			{
				CertificateAuthorityArn: ptr.String("__CertificateAuthorityArn__"),
				CreatedAt:               ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				Principal:               ptr.String("__Principal__"),
				SourceAccount:           ptr.String("__SourceAccount__"),
				Actions: []types.ActionType{
					types.ActionType("IssueCertificate"),
					types.ActionType("IssueCertificate"),
				},
				Policy: ptr.String("__Policy__"),
			},
			{
				CertificateAuthorityArn: ptr.String("__CertificateAuthorityArn__"),
				CreatedAt:               ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				Principal:               ptr.String("__Principal__"),
				SourceAccount:           ptr.String("__SourceAccount__"),
				Actions: []types.ActionType{
					types.ActionType("IssueCertificate"),
					types.ActionType("IssueCertificate"),
				},
				Policy: ptr.String("__Policy__"),
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("ListPermissions.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.ListPermissions(context.Background(), &ListPermissionsInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "ListPermissions.response", err)
	}
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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