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

//go:build response_snapshot

package bedrockagentruntime

import (
	"bufio"
	"bytes"
	"context"
	"errors"
	"fmt"
	"github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/document"
	"github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/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_CreateInvocation(t *testing.T) {
	want := &CreateInvocationOutput{
		SessionId:    ptr.String("__SessionId__"),
		InvocationId: ptr.String("__InvocationId__"),
		CreatedAt:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
	}
	status, header, body, err := serdeRespReadSnapshot("CreateInvocation.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.CreateInvocation(context.Background(), &CreateInvocationInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "CreateInvocation.response", err)
	}
}

func TestCheckResponseSnapshot_CreateSession(t *testing.T) {
	want := &CreateSessionOutput{
		SessionId:     ptr.String("__SessionId__"),
		SessionArn:    ptr.String("__SessionArn__"),
		SessionStatus: types.SessionStatus("ACTIVE"),
		CreatedAt:     ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
	}
	status, header, body, err := serdeRespReadSnapshot("CreateSession.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.CreateSession(context.Background(), &CreateSessionInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "CreateSession.response", err)
	}
}

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

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

func TestCheckResponseSnapshot_EndSession(t *testing.T) {
	want := &EndSessionOutput{
		SessionId:     ptr.String("__SessionId__"),
		SessionArn:    ptr.String("__SessionArn__"),
		SessionStatus: types.SessionStatus("ACTIVE"),
	}
	status, header, body, err := serdeRespReadSnapshot("EndSession.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.EndSession(context.Background(), &EndSessionInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "EndSession.response", err)
	}
}

func TestCheckResponseSnapshot_GenerateQuery(t *testing.T) {
	want := &GenerateQueryOutput{
		Queries: []types.GeneratedQuery{
			{
				Type: types.GeneratedQueryType("REDSHIFT_SQL"),
				Sql:  ptr.String("__Sql__"),
			},
			{
				Type: types.GeneratedQueryType("REDSHIFT_SQL"),
				Sql:  ptr.String("__Sql__"),
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("GenerateQuery.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.GenerateQuery(context.Background(), &GenerateQueryInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "GenerateQuery.response", err)
	}
}

func TestCheckResponseSnapshot_GetAgentMemory(t *testing.T) {
	want := &GetAgentMemoryOutput{
		NextToken: ptr.String("__NextToken__"),
		MemoryContents: []types.Memory{
			&types.MemoryMemberSessionSummary{
				Value: types.MemorySessionSummary{
					MemoryId:          ptr.String("__MemoryId__"),
					SessionId:         ptr.String("__SessionId__"),
					SessionStartTime:  ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
					SessionExpiryTime: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
					SummaryText:       ptr.String("__SummaryText__"),
				},
			},
			&types.MemoryMemberSessionSummary{
				Value: types.MemorySessionSummary{
					MemoryId:          ptr.String("__MemoryId__"),
					SessionId:         ptr.String("__SessionId__"),
					SessionStartTime:  ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
					SessionExpiryTime: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
					SummaryText:       ptr.String("__SummaryText__"),
				},
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("GetAgentMemory.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.GetAgentMemory(context.Background(), &GetAgentMemoryInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "GetAgentMemory.response", err)
	}
}

func TestCheckResponseSnapshot_GetDocumentContent(t *testing.T) {
	want := &GetDocumentContentOutput{
		MimeType:              ptr.String("__MimeType__"),
		PresignedUrl:          ptr.String("__PresignedUrl__"),
		DocumentContentLength: ptr.Int64(1),
	}
	status, header, body, err := serdeRespReadSnapshot("GetDocumentContent.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.GetDocumentContent(context.Background(), &GetDocumentContentInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "GetDocumentContent.response", err)
	}
}

func TestCheckResponseSnapshot_GetExecutionFlowSnapshot(t *testing.T) {
	want := &GetExecutionFlowSnapshotOutput{
		FlowIdentifier:           ptr.String("__FlowIdentifier__"),
		FlowAliasIdentifier:      ptr.String("__FlowAliasIdentifier__"),
		FlowVersion:              ptr.String("__FlowVersion__"),
		ExecutionRoleArn:         ptr.String("__ExecutionRoleArn__"),
		Definition:               ptr.String("__Definition__"),
		CustomerEncryptionKeyArn: ptr.String("__CustomerEncryptionKeyArn__"),
	}
	status, header, body, err := serdeRespReadSnapshot("GetExecutionFlowSnapshot.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.GetExecutionFlowSnapshot(context.Background(), &GetExecutionFlowSnapshotInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "GetExecutionFlowSnapshot.response", err)
	}
}

func TestCheckResponseSnapshot_GetFlowExecution(t *testing.T) {
	want := &GetFlowExecutionOutput{
		ExecutionArn: ptr.String("__ExecutionArn__"),
		Status:       types.FlowExecutionStatus("Running"),
		StartedAt:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
		EndedAt:      ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
		Errors: []types.FlowExecutionError{
			{
				NodeName: ptr.String("__NodeName__"),
				Error:    types.FlowExecutionErrorType("ExecutionTimedOut"),
				Message:  ptr.String("__Message__"),
			},
			{
				NodeName: ptr.String("__NodeName__"),
				Error:    types.FlowExecutionErrorType("ExecutionTimedOut"),
				Message:  ptr.String("__Message__"),
			},
		},
		FlowAliasIdentifier: ptr.String("__FlowAliasIdentifier__"),
		FlowIdentifier:      ptr.String("__FlowIdentifier__"),
		FlowVersion:         ptr.String("__FlowVersion__"),
	}
	status, header, body, err := serdeRespReadSnapshot("GetFlowExecution.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.GetFlowExecution(context.Background(), &GetFlowExecutionInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "GetFlowExecution.response", err)
	}
}

func TestCheckResponseSnapshot_GetInvocationStep(t *testing.T) {
	want := &GetInvocationStepOutput{
		InvocationStep: &types.InvocationStep{
			SessionId:          ptr.String("__SessionId__"),
			InvocationId:       ptr.String("__InvocationId__"),
			InvocationStepId:   ptr.String("__InvocationStepId__"),
			InvocationStepTime: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			Payload: &types.InvocationStepPayloadMemberContentBlocks{
				Value: []types.BedrockSessionContentBlock{
					&types.BedrockSessionContentBlockMemberText{
						Value: "__BedrockSessionContentBlockMemberText__",
					},
					&types.BedrockSessionContentBlockMemberText{
						Value: "__BedrockSessionContentBlockMemberText__",
					},
				},
			},
		},
	}
	status, header, body, err := serdeRespReadSnapshot("GetInvocationStep.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.GetInvocationStep(context.Background(), &GetInvocationStepInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "GetInvocationStep.response", err)
	}
}

func TestCheckResponseSnapshot_GetSession(t *testing.T) {
	want := &GetSessionOutput{
		SessionId:     ptr.String("__SessionId__"),
		SessionArn:    ptr.String("__SessionArn__"),
		SessionStatus: types.SessionStatus("ACTIVE"),
		CreatedAt:     ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
		LastUpdatedAt: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
		SessionMetadata: map[string]string{
			"key0": "__Value__",
		},
		EncryptionKeyArn: ptr.String("__EncryptionKeyArn__"),
	}
	status, header, body, err := serdeRespReadSnapshot("GetSession.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.GetSession(context.Background(), &GetSessionInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "GetSession.response", err)
	}
}

func TestCheckResponseSnapshot_ListFlowExecutionEvents(t *testing.T) {
	want := &ListFlowExecutionEventsOutput{
		FlowExecutionEvents: []types.FlowExecutionEvent{
			&types.FlowExecutionEventMemberFlowInputEvent{
				Value: types.FlowExecutionInputEvent{
					NodeName:  ptr.String("__NodeName__"),
					Timestamp: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
					Fields: []types.FlowInputField{
						{
							Name: ptr.String("__Name__"),
							Content: &types.FlowExecutionContentMemberDocument{
								Value: nil,
							},
						},
						{
							Name: ptr.String("__Name__"),
							Content: &types.FlowExecutionContentMemberDocument{
								Value: nil,
							},
						},
					},
				},
			},
			&types.FlowExecutionEventMemberFlowInputEvent{
				Value: types.FlowExecutionInputEvent{
					NodeName:  ptr.String("__NodeName__"),
					Timestamp: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
					Fields: []types.FlowInputField{
						{
							Name: ptr.String("__Name__"),
							Content: &types.FlowExecutionContentMemberDocument{
								Value: nil,
							},
						},
						{
							Name: ptr.String("__Name__"),
							Content: &types.FlowExecutionContentMemberDocument{
								Value: nil,
							},
						},
					},
				},
			},
		},
		NextToken: ptr.String("__NextToken__"),
	}
	status, header, body, err := serdeRespReadSnapshot("ListFlowExecutionEvents.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.ListFlowExecutionEvents(context.Background(), &ListFlowExecutionEventsInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "ListFlowExecutionEvents.response", err)
	}
}

func TestCheckResponseSnapshot_ListFlowExecutions(t *testing.T) {
	want := &ListFlowExecutionsOutput{
		FlowExecutionSummaries: []types.FlowExecutionSummary{
			{
				ExecutionArn:        ptr.String("__ExecutionArn__"),
				FlowAliasIdentifier: ptr.String("__FlowAliasIdentifier__"),
				FlowIdentifier:      ptr.String("__FlowIdentifier__"),
				FlowVersion:         ptr.String("__FlowVersion__"),
				Status:              types.FlowExecutionStatus("Running"),
				CreatedAt:           ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				EndedAt:             ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			},
			{
				ExecutionArn:        ptr.String("__ExecutionArn__"),
				FlowAliasIdentifier: ptr.String("__FlowAliasIdentifier__"),
				FlowIdentifier:      ptr.String("__FlowIdentifier__"),
				FlowVersion:         ptr.String("__FlowVersion__"),
				Status:              types.FlowExecutionStatus("Running"),
				CreatedAt:           ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				EndedAt:             ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			},
		},
		NextToken: ptr.String("__NextToken__"),
	}
	status, header, body, err := serdeRespReadSnapshot("ListFlowExecutions.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.ListFlowExecutions(context.Background(), &ListFlowExecutionsInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "ListFlowExecutions.response", err)
	}
}

func TestCheckResponseSnapshot_ListInvocationSteps(t *testing.T) {
	want := &ListInvocationStepsOutput{
		InvocationStepSummaries: []types.InvocationStepSummary{
			{
				SessionId:          ptr.String("__SessionId__"),
				InvocationId:       ptr.String("__InvocationId__"),
				InvocationStepId:   ptr.String("__InvocationStepId__"),
				InvocationStepTime: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			},
			{
				SessionId:          ptr.String("__SessionId__"),
				InvocationId:       ptr.String("__InvocationId__"),
				InvocationStepId:   ptr.String("__InvocationStepId__"),
				InvocationStepTime: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			},
		},
		NextToken: ptr.String("__NextToken__"),
	}
	status, header, body, err := serdeRespReadSnapshot("ListInvocationSteps.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.ListInvocationSteps(context.Background(), &ListInvocationStepsInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "ListInvocationSteps.response", err)
	}
}

func TestCheckResponseSnapshot_ListInvocations(t *testing.T) {
	want := &ListInvocationsOutput{
		InvocationSummaries: []types.InvocationSummary{
			{
				SessionId:    ptr.String("__SessionId__"),
				InvocationId: ptr.String("__InvocationId__"),
				CreatedAt:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			},
			{
				SessionId:    ptr.String("__SessionId__"),
				InvocationId: ptr.String("__InvocationId__"),
				CreatedAt:    ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			},
		},
		NextToken: ptr.String("__NextToken__"),
	}
	status, header, body, err := serdeRespReadSnapshot("ListInvocations.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.ListInvocations(context.Background(), &ListInvocationsInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "ListInvocations.response", err)
	}
}

func TestCheckResponseSnapshot_ListSessions(t *testing.T) {
	want := &ListSessionsOutput{
		SessionSummaries: []types.SessionSummary{
			{
				SessionId:     ptr.String("__SessionId__"),
				SessionArn:    ptr.String("__SessionArn__"),
				SessionStatus: types.SessionStatus("ACTIVE"),
				CreatedAt:     ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				LastUpdatedAt: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			},
			{
				SessionId:     ptr.String("__SessionId__"),
				SessionArn:    ptr.String("__SessionArn__"),
				SessionStatus: types.SessionStatus("ACTIVE"),
				CreatedAt:     ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				LastUpdatedAt: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			},
		},
		NextToken: ptr.String("__NextToken__"),
	}
	status, header, body, err := serdeRespReadSnapshot("ListSessions.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.ListSessions(context.Background(), &ListSessionsInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "ListSessions.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_PutInvocationStep(t *testing.T) {
	want := &PutInvocationStepOutput{
		InvocationStepId: ptr.String("__InvocationStepId__"),
	}
	status, header, body, err := serdeRespReadSnapshot("PutInvocationStep.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.PutInvocationStep(context.Background(), &PutInvocationStepInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "PutInvocationStep.response", err)
	}
}

func TestCheckResponseSnapshot_Rerank(t *testing.T) {
	want := &RerankOutput{
		Results: []types.RerankResult{
			{
				Index:          ptr.Int32(1),
				RelevanceScore: ptr.Float32(1.0),
				Document: &types.RerankDocument{
					Type: types.RerankDocumentType("TEXT"),
					TextDocument: &types.RerankTextDocument{
						Text: ptr.String("__Text__"),
					},
					JsonDocument: nil,
				},
			},
			{
				Index:          ptr.Int32(1),
				RelevanceScore: ptr.Float32(1.0),
				Document: &types.RerankDocument{
					Type: types.RerankDocumentType("TEXT"),
					TextDocument: &types.RerankTextDocument{
						Text: ptr.String("__Text__"),
					},
					JsonDocument: nil,
				},
			},
		},
		NextToken: ptr.String("__NextToken__"),
	}
	status, header, body, err := serdeRespReadSnapshot("Rerank.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.Rerank(context.Background(), &RerankInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "Rerank.response", err)
	}
}

func TestCheckResponseSnapshot_Retrieve(t *testing.T) {
	want := &RetrieveOutput{
		RetrievalResults: []types.KnowledgeBaseRetrievalResult{
			{
				Content: &types.RetrievalResultContent{
					Type:        types.RetrievalResultContentType("TEXT"),
					Text:        ptr.String("__Text__"),
					ByteContent: ptr.String("__ByteContent__"),
					Video: &types.VideoSegment{
						S3Uri:   ptr.String("__S3Uri__"),
						Summary: ptr.String("__Summary__"),
					},
					Audio: &types.AudioSegment{
						S3Uri:         ptr.String("__S3Uri__"),
						Transcription: ptr.String("__Transcription__"),
					},
					Row: []types.RetrievalResultContentColumn{
						{
							ColumnName:  ptr.String("__ColumnName__"),
							ColumnValue: ptr.String("__ColumnValue__"),
							Type:        types.RetrievalResultContentColumnType("BLOB"),
						},
						{
							ColumnName:  ptr.String("__ColumnName__"),
							ColumnValue: ptr.String("__ColumnValue__"),
							Type:        types.RetrievalResultContentColumnType("BLOB"),
						},
					},
				},
				Location: &types.RetrievalResultLocation{
					Type: types.RetrievalResultLocationType("S3"),
					S3Location: &types.RetrievalResultS3Location{
						Uri: ptr.String("__Uri__"),
					},
					WebLocation: &types.RetrievalResultWebLocation{
						Url: ptr.String("__Url__"),
					},
					ConfluenceLocation: &types.RetrievalResultConfluenceLocation{
						Url: ptr.String("__Url__"),
					},
					SalesforceLocation: &types.RetrievalResultSalesforceLocation{
						Url: ptr.String("__Url__"),
					},
					SharePointLocation: &types.RetrievalResultSharePointLocation{
						Url: ptr.String("__Url__"),
					},
					CustomDocumentLocation: &types.RetrievalResultCustomDocumentLocation{
						Id: ptr.String("__Id__"),
					},
					KendraDocumentLocation: &types.RetrievalResultKendraDocumentLocation{
						Uri: ptr.String("__Uri__"),
					},
					SqlLocation: &types.RetrievalResultSqlLocation{
						Query: ptr.String("__Query__"),
					},
					OneDriveLocation: &types.RetrievalResultOneDriveLocation{
						Url: ptr.String("__Url__"),
					},
					GoogleDriveLocation: &types.RetrievalResultGoogleDriveLocation{
						Url: ptr.String("__Url__"),
					},
				},
				Score: ptr.Float64(1.0),
				Metadata: map[string]document.Interface{
					"key0": nil,
				},
				DocumentId: ptr.String("__DocumentId__"),
			},
			{
				Content: &types.RetrievalResultContent{
					Type:        types.RetrievalResultContentType("TEXT"),
					Text:        ptr.String("__Text__"),
					ByteContent: ptr.String("__ByteContent__"),
					Video: &types.VideoSegment{
						S3Uri:   ptr.String("__S3Uri__"),
						Summary: ptr.String("__Summary__"),
					},
					Audio: &types.AudioSegment{
						S3Uri:         ptr.String("__S3Uri__"),
						Transcription: ptr.String("__Transcription__"),
					},
					Row: []types.RetrievalResultContentColumn{
						{
							ColumnName:  ptr.String("__ColumnName__"),
							ColumnValue: ptr.String("__ColumnValue__"),
							Type:        types.RetrievalResultContentColumnType("BLOB"),
						},
						{
							ColumnName:  ptr.String("__ColumnName__"),
							ColumnValue: ptr.String("__ColumnValue__"),
							Type:        types.RetrievalResultContentColumnType("BLOB"),
						},
					},
				},
				Location: &types.RetrievalResultLocation{
					Type: types.RetrievalResultLocationType("S3"),
					S3Location: &types.RetrievalResultS3Location{
						Uri: ptr.String("__Uri__"),
					},
					WebLocation: &types.RetrievalResultWebLocation{
						Url: ptr.String("__Url__"),
					},
					ConfluenceLocation: &types.RetrievalResultConfluenceLocation{
						Url: ptr.String("__Url__"),
					},
					SalesforceLocation: &types.RetrievalResultSalesforceLocation{
						Url: ptr.String("__Url__"),
					},
					SharePointLocation: &types.RetrievalResultSharePointLocation{
						Url: ptr.String("__Url__"),
					},
					CustomDocumentLocation: &types.RetrievalResultCustomDocumentLocation{
						Id: ptr.String("__Id__"),
					},
					KendraDocumentLocation: &types.RetrievalResultKendraDocumentLocation{
						Uri: ptr.String("__Uri__"),
					},
					SqlLocation: &types.RetrievalResultSqlLocation{
						Query: ptr.String("__Query__"),
					},
					OneDriveLocation: &types.RetrievalResultOneDriveLocation{
						Url: ptr.String("__Url__"),
					},
					GoogleDriveLocation: &types.RetrievalResultGoogleDriveLocation{
						Url: ptr.String("__Url__"),
					},
				},
				Score: ptr.Float64(1.0),
				Metadata: map[string]document.Interface{
					"key0": nil,
				},
				DocumentId: ptr.String("__DocumentId__"),
			},
		},
		GuardrailAction: types.GuadrailAction("INTERVENED"),
		NextToken:       ptr.String("__NextToken__"),
	}
	status, header, body, err := serdeRespReadSnapshot("Retrieve.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.Retrieve(context.Background(), &RetrieveInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "Retrieve.response", err)
	}
}

func TestCheckResponseSnapshot_RetrieveAndGenerate(t *testing.T) {
	want := &RetrieveAndGenerateOutput{
		SessionId: ptr.String("__SessionId__"),
		Output: &types.RetrieveAndGenerateOutput{
			Text: ptr.String("__Text__"),
		},
		Citations: []types.Citation{
			{
				GeneratedResponsePart: &types.GeneratedResponsePart{
					TextResponsePart: &types.TextResponsePart{
						Text: ptr.String("__Text__"),
						Span: &types.Span{
							Start: ptr.Int32(1),
							End:   ptr.Int32(1),
						},
					},
				},
				RetrievedReferences: []types.RetrievedReference{
					{
						Content: &types.RetrievalResultContent{
							Type:        types.RetrievalResultContentType("TEXT"),
							Text:        ptr.String("__Text__"),
							ByteContent: ptr.String("__ByteContent__"),
							Video: &types.VideoSegment{
								S3Uri:   ptr.String("__S3Uri__"),
								Summary: ptr.String("__Summary__"),
							},
							Audio: &types.AudioSegment{
								S3Uri:         ptr.String("__S3Uri__"),
								Transcription: ptr.String("__Transcription__"),
							},
							Row: []types.RetrievalResultContentColumn{
								{
									ColumnName:  ptr.String("__ColumnName__"),
									ColumnValue: ptr.String("__ColumnValue__"),
									Type:        types.RetrievalResultContentColumnType("BLOB"),
								},
								{
									ColumnName:  ptr.String("__ColumnName__"),
									ColumnValue: ptr.String("__ColumnValue__"),
									Type:        types.RetrievalResultContentColumnType("BLOB"),
								},
							},
						},
						Location: &types.RetrievalResultLocation{
							Type: types.RetrievalResultLocationType("S3"),
							S3Location: &types.RetrievalResultS3Location{
								Uri: ptr.String("__Uri__"),
							},
							WebLocation: &types.RetrievalResultWebLocation{
								Url: ptr.String("__Url__"),
							},
							ConfluenceLocation: &types.RetrievalResultConfluenceLocation{
								Url: ptr.String("__Url__"),
							},
							SalesforceLocation: &types.RetrievalResultSalesforceLocation{
								Url: ptr.String("__Url__"),
							},
							SharePointLocation: &types.RetrievalResultSharePointLocation{
								Url: ptr.String("__Url__"),
							},
							CustomDocumentLocation: &types.RetrievalResultCustomDocumentLocation{
								Id: ptr.String("__Id__"),
							},
							KendraDocumentLocation: &types.RetrievalResultKendraDocumentLocation{
								Uri: ptr.String("__Uri__"),
							},
							SqlLocation: &types.RetrievalResultSqlLocation{
								Query: ptr.String("__Query__"),
							},
							OneDriveLocation: &types.RetrievalResultOneDriveLocation{
								Url: ptr.String("__Url__"),
							},
							GoogleDriveLocation: &types.RetrievalResultGoogleDriveLocation{
								Url: ptr.String("__Url__"),
							},
						},
						Metadata: map[string]document.Interface{
							"key0": nil,
						},
					},
					{
						Content: &types.RetrievalResultContent{
							Type:        types.RetrievalResultContentType("TEXT"),
							Text:        ptr.String("__Text__"),
							ByteContent: ptr.String("__ByteContent__"),
							Video: &types.VideoSegment{
								S3Uri:   ptr.String("__S3Uri__"),
								Summary: ptr.String("__Summary__"),
							},
							Audio: &types.AudioSegment{
								S3Uri:         ptr.String("__S3Uri__"),
								Transcription: ptr.String("__Transcription__"),
							},
							Row: []types.RetrievalResultContentColumn{
								{
									ColumnName:  ptr.String("__ColumnName__"),
									ColumnValue: ptr.String("__ColumnValue__"),
									Type:        types.RetrievalResultContentColumnType("BLOB"),
								},
								{
									ColumnName:  ptr.String("__ColumnName__"),
									ColumnValue: ptr.String("__ColumnValue__"),
									Type:        types.RetrievalResultContentColumnType("BLOB"),
								},
							},
						},
						Location: &types.RetrievalResultLocation{
							Type: types.RetrievalResultLocationType("S3"),
							S3Location: &types.RetrievalResultS3Location{
								Uri: ptr.String("__Uri__"),
							},
							WebLocation: &types.RetrievalResultWebLocation{
								Url: ptr.String("__Url__"),
							},
							ConfluenceLocation: &types.RetrievalResultConfluenceLocation{
								Url: ptr.String("__Url__"),
							},
							SalesforceLocation: &types.RetrievalResultSalesforceLocation{
								Url: ptr.String("__Url__"),
							},
							SharePointLocation: &types.RetrievalResultSharePointLocation{
								Url: ptr.String("__Url__"),
							},
							CustomDocumentLocation: &types.RetrievalResultCustomDocumentLocation{
								Id: ptr.String("__Id__"),
							},
							KendraDocumentLocation: &types.RetrievalResultKendraDocumentLocation{
								Uri: ptr.String("__Uri__"),
							},
							SqlLocation: &types.RetrievalResultSqlLocation{
								Query: ptr.String("__Query__"),
							},
							OneDriveLocation: &types.RetrievalResultOneDriveLocation{
								Url: ptr.String("__Url__"),
							},
							GoogleDriveLocation: &types.RetrievalResultGoogleDriveLocation{
								Url: ptr.String("__Url__"),
							},
						},
						Metadata: map[string]document.Interface{
							"key0": nil,
						},
					},
				},
			},
			{
				GeneratedResponsePart: &types.GeneratedResponsePart{
					TextResponsePart: &types.TextResponsePart{
						Text: ptr.String("__Text__"),
						Span: &types.Span{
							Start: ptr.Int32(1),
							End:   ptr.Int32(1),
						},
					},
				},
				RetrievedReferences: []types.RetrievedReference{
					{
						Content: &types.RetrievalResultContent{
							Type:        types.RetrievalResultContentType("TEXT"),
							Text:        ptr.String("__Text__"),
							ByteContent: ptr.String("__ByteContent__"),
							Video: &types.VideoSegment{
								S3Uri:   ptr.String("__S3Uri__"),
								Summary: ptr.String("__Summary__"),
							},
							Audio: &types.AudioSegment{
								S3Uri:         ptr.String("__S3Uri__"),
								Transcription: ptr.String("__Transcription__"),
							},
							Row: []types.RetrievalResultContentColumn{
								{
									ColumnName:  ptr.String("__ColumnName__"),
									ColumnValue: ptr.String("__ColumnValue__"),
									Type:        types.RetrievalResultContentColumnType("BLOB"),
								},
								{
									ColumnName:  ptr.String("__ColumnName__"),
									ColumnValue: ptr.String("__ColumnValue__"),
									Type:        types.RetrievalResultContentColumnType("BLOB"),
								},
							},
						},
						Location: &types.RetrievalResultLocation{
							Type: types.RetrievalResultLocationType("S3"),
							S3Location: &types.RetrievalResultS3Location{
								Uri: ptr.String("__Uri__"),
							},
							WebLocation: &types.RetrievalResultWebLocation{
								Url: ptr.String("__Url__"),
							},
							ConfluenceLocation: &types.RetrievalResultConfluenceLocation{
								Url: ptr.String("__Url__"),
							},
							SalesforceLocation: &types.RetrievalResultSalesforceLocation{
								Url: ptr.String("__Url__"),
							},
							SharePointLocation: &types.RetrievalResultSharePointLocation{
								Url: ptr.String("__Url__"),
							},
							CustomDocumentLocation: &types.RetrievalResultCustomDocumentLocation{
								Id: ptr.String("__Id__"),
							},
							KendraDocumentLocation: &types.RetrievalResultKendraDocumentLocation{
								Uri: ptr.String("__Uri__"),
							},
							SqlLocation: &types.RetrievalResultSqlLocation{
								Query: ptr.String("__Query__"),
							},
							OneDriveLocation: &types.RetrievalResultOneDriveLocation{
								Url: ptr.String("__Url__"),
							},
							GoogleDriveLocation: &types.RetrievalResultGoogleDriveLocation{
								Url: ptr.String("__Url__"),
							},
						},
						Metadata: map[string]document.Interface{
							"key0": nil,
						},
					},
					{
						Content: &types.RetrievalResultContent{
							Type:        types.RetrievalResultContentType("TEXT"),
							Text:        ptr.String("__Text__"),
							ByteContent: ptr.String("__ByteContent__"),
							Video: &types.VideoSegment{
								S3Uri:   ptr.String("__S3Uri__"),
								Summary: ptr.String("__Summary__"),
							},
							Audio: &types.AudioSegment{
								S3Uri:         ptr.String("__S3Uri__"),
								Transcription: ptr.String("__Transcription__"),
							},
							Row: []types.RetrievalResultContentColumn{
								{
									ColumnName:  ptr.String("__ColumnName__"),
									ColumnValue: ptr.String("__ColumnValue__"),
									Type:        types.RetrievalResultContentColumnType("BLOB"),
								},
								{
									ColumnName:  ptr.String("__ColumnName__"),
									ColumnValue: ptr.String("__ColumnValue__"),
									Type:        types.RetrievalResultContentColumnType("BLOB"),
								},
							},
						},
						Location: &types.RetrievalResultLocation{
							Type: types.RetrievalResultLocationType("S3"),
							S3Location: &types.RetrievalResultS3Location{
								Uri: ptr.String("__Uri__"),
							},
							WebLocation: &types.RetrievalResultWebLocation{
								Url: ptr.String("__Url__"),
							},
							ConfluenceLocation: &types.RetrievalResultConfluenceLocation{
								Url: ptr.String("__Url__"),
							},
							SalesforceLocation: &types.RetrievalResultSalesforceLocation{
								Url: ptr.String("__Url__"),
							},
							SharePointLocation: &types.RetrievalResultSharePointLocation{
								Url: ptr.String("__Url__"),
							},
							CustomDocumentLocation: &types.RetrievalResultCustomDocumentLocation{
								Id: ptr.String("__Id__"),
							},
							KendraDocumentLocation: &types.RetrievalResultKendraDocumentLocation{
								Uri: ptr.String("__Uri__"),
							},
							SqlLocation: &types.RetrievalResultSqlLocation{
								Query: ptr.String("__Query__"),
							},
							OneDriveLocation: &types.RetrievalResultOneDriveLocation{
								Url: ptr.String("__Url__"),
							},
							GoogleDriveLocation: &types.RetrievalResultGoogleDriveLocation{
								Url: ptr.String("__Url__"),
							},
						},
						Metadata: map[string]document.Interface{
							"key0": nil,
						},
					},
				},
			},
		},
		GuardrailAction: types.GuadrailAction("INTERVENED"),
	}
	status, header, body, err := serdeRespReadSnapshot("RetrieveAndGenerate.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.RetrieveAndGenerate(context.Background(), &RetrieveAndGenerateInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "RetrieveAndGenerate.response", err)
	}
}

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

func TestCheckResponseSnapshot_StopFlowExecution(t *testing.T) {
	want := &StopFlowExecutionOutput{
		ExecutionArn: ptr.String("__ExecutionArn__"),
		Status:       types.FlowExecutionStatus("Running"),
	}
	status, header, body, err := serdeRespReadSnapshot("StopFlowExecution.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.StopFlowExecution(context.Background(), &StopFlowExecutionInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "StopFlowExecution.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_UpdateSession(t *testing.T) {
	want := &UpdateSessionOutput{
		SessionId:     ptr.String("__SessionId__"),
		SessionArn:    ptr.String("__SessionArn__"),
		SessionStatus: types.SessionStatus("ACTIVE"),
		CreatedAt:     ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
		LastUpdatedAt: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
	}
	status, header, body, err := serdeRespReadSnapshot("UpdateSession.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.UpdateSession(context.Background(), &UpdateSessionInput{})
	if err != nil {
		t.Fatal(err)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("response snapshot mismatch for %s: %v", "UpdateSession.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.CreateInvocation(context.Background(), &CreateInvocationInput{})
	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_BadGatewayException(t *testing.T) {
	want := &types.BadGatewayException{
		Message:      ptr.String("__Message__"),
		ResourceName: ptr.String("__ResourceName__"),
	}
	status, header, body, err := serdeRespReadSnapshot("BadGatewayException.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.DeleteAgentMemory(context.Background(), &DeleteAgentMemoryInput{})
	if opErr == nil {
		t.Fatal("expected error, got nil")
	}
	var got *types.BadGatewayException
	if !errors.As(opErr, &got) {
		t.Fatalf("expected types.BadGatewayException, got %v", opErr)
	}
	if err := smithytesting.CompareValues(want, got); err != nil {
		t.Errorf("error response snapshot mismatch for %s: %v", "BadGatewayException.error", err)
	}
}

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

func TestCheckResponseSnapshot_Error_InternalServerException(t *testing.T) {
	want := &types.InternalServerException{
		Message: ptr.String("__Message__"),
		Reason:  ptr.String("__Reason__"),
	}
	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.CreateInvocation(context.Background(), &CreateInvocationInput{})
	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__"),
	}
	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.CreateInvocation(context.Background(), &CreateInvocationInput{})
	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__"),
	}
	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.CreateInvocation(context.Background(), &CreateInvocationInput{})
	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__"),
	}
	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.CreateInvocation(context.Background(), &CreateInvocationInput{})
	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__"),
	}
	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.CreateInvocation(context.Background(), &CreateInvocationInput{})
	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)
	}
}
