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

//go:build request_snapshot

package budgets

import (
	"bytes"
	"context"
	"errors"
	"fmt"
	"github.com/aws/aws-sdk-go-v2/service/budgets/types"
	smithyendpoints "github.com/aws/smithy-go/endpoints"
	"github.com/aws/smithy-go/middleware"
	"github.com/aws/smithy-go/ptr"
	smithyhttp "github.com/aws/smithy-go/transport/http"
	"io"
	"io/fs"
	"net/url"
	"os"
	"slices"
	"strings"
	"testing"
	"time"
)

const serdeSSPrefix = "request_snapshot"

// errSerdeSnapshotOK is returned by the capture middleware to abort the request
// pipeline once the serialized request has been captured, so no network call is
// made. It is a control signal, not a failure.
var errSerdeSnapshotOK = errors.New("serde snapshot: request captured")

func serdeCreatePath(path string) (*os.File, error) {
	if err := os.MkdirAll(serdeSSPrefix, 0700); err != nil && !errors.Is(err, fs.ErrExist) {
		return nil, err
	}
	return os.Create(path)
}

func serdeSSPath(op string) string {
	return fmt.Sprintf("%s/%s.request.snap", serdeSSPrefix, op)
}

type captureSerdeRequestMiddleware struct {
	body     *bytes.Buffer
	method   *string
	rawPath  *string
	rawQuery *string
	header   *map[string][]string
}

func (*captureSerdeRequestMiddleware) ID() string { return "captureSerdeRequest" }

func (m *captureSerdeRequestMiddleware) HandleFinalize(
	ctx context.Context, input middleware.FinalizeInput, next middleware.FinalizeHandler,
) (
	middleware.FinalizeOutput, middleware.Metadata, error,
) {
	req, ok := input.Request.(*smithyhttp.Request)
	if !ok {
		return middleware.FinalizeOutput{}, middleware.Metadata{}, fmt.Errorf("unexpected transport type %T", input.Request)
	}

	built := req.Build(ctx)
	*m.method = built.Method
	*m.rawPath = built.URL.RawPath
	if *m.rawPath == "" {
		*m.rawPath = built.URL.Path
	}
	*m.rawQuery = built.URL.RawQuery
	*m.header = built.Header

	if built.Body != nil {
		if _, err := io.Copy(m.body, built.Body); err != nil {
			return middleware.FinalizeOutput{}, middleware.Metadata{}, err
		}
	}

	return middleware.FinalizeOutput{}, middleware.Metadata{}, errSerdeSnapshotOK
}

func serdeFormatRequest(method, rawPath, rawQuery string, header map[string][]string, body []byte) string {
	skipHeaders := map[string]bool{
		"Authorization":         true,
		"User-Agent":            true,
		"X-Amz-Date":            true,
		"X-Amz-Security-Token":  true,
		"Amz-Sdk-Invocation-Id": true,
		"Amz-Sdk-Request":       true,
	}

	var sb strings.Builder
	sb.WriteString(method)
	sb.WriteString(" ")
	sb.WriteString(rawPath)
	if rawQuery != "" {
		sb.WriteString("?")
		sb.WriteString(rawQuery)
	}
	sb.WriteString("\n\n")

	keys := make([]string, 0, len(header))
	for k := range header {
		if skipHeaders[k] {
			continue
		}
		keys = append(keys, k)
	}
	slices.Sort(keys)
	for _, k := range keys {
		for _, v := range header[k] {
			sb.WriteString(k)
			sb.WriteString(": ")
			sb.WriteString(v)
			sb.WriteString("\n")
		}
	}
	sb.WriteString("\n")
	if len(body) > 0 {
		sb.Write(body)
	}
	return sb.String()
}

func serdeUpdateSnapshot(method, rawPath, rawQuery string, header map[string][]string, body []byte, operation string) error {
	content := serdeFormatRequest(method, rawPath, rawQuery, header, body)
	// Leave the snapshot untouched if it's semantically equal to the new one.
	// Some protocols (rpcv2Cbor) serialize map/struct fields in a nondeterministic
	// byte order, so a blind rewrite would churn the file on every run.
	if existing, err := os.ReadFile(serdeSSPath(operation)); err == nil {
		prefix := serdeFormatRequest(method, rawPath, rawQuery, header, nil)
		if strings.HasPrefix(string(existing), prefix) &&
			serdeBodyEqual(body, []byte(string(existing)[len(prefix):])) {
			return nil
		}
	}
	f, err := serdeCreatePath(serdeSSPath(operation))
	if err != nil {
		return err
	}
	defer f.Close()
	if _, err := f.Write([]byte(content)); err != nil {
		return err
	}
	return nil
}

func serdeTestSnapshot(method, rawPath, rawQuery string, header map[string][]string, body []byte, operation string) error {
	f, err := os.Open(serdeSSPath(operation))
	if errors.Is(err, fs.ErrNotExist) {
		return nil
	}
	if err != nil {
		return err
	}
	defer f.Close()
	expected, err := io.ReadAll(f)
	if err != nil {
		return err
	}
	prefix := serdeFormatRequest(method, rawPath, rawQuery, header, nil)
	if !strings.HasPrefix(string(expected), prefix) ||
		!serdeBodyEqual(body, []byte(string(expected)[len(prefix):])) {
		content := serdeFormatRequest(method, rawPath, rawQuery, header, body)
		return fmt.Errorf("serde snapshot mismatch for %s:\nGOT:\n%s:\nEXPECTED:\n%s", operation, content, string(expected))
	}
	return nil
}

type serdeEndpointResolver struct{}

func (*serdeEndpointResolver) ResolveEndpoint(ctx context.Context, params EndpointParameters) (smithyendpoints.Endpoint, error) {
	return smithyendpoints.Endpoint{URI: url.URL{Scheme: "https", Host: "test.example.com"}}, nil
}

func serdeNewClient() *Client {
	return New(Options{
		Region:             "us-east-1",
		EndpointResolverV2: &serdeEndpointResolver{},
	})
}
func serdeBodyEqual(got, expected []byte) bool {
	return bytes.Equal(got, expected)
}
func TestCheckRequestSnapshot_CreateBudget(t *testing.T) {
	input := &CreateBudgetInput{
		AccountId: ptr.String("__AccountId__"),
		Budget: &types.Budget{
			BudgetName: ptr.String("__BudgetName__"),
			BudgetLimit: &types.Spend{
				Amount: ptr.String("__Amount__"),
				Unit:   ptr.String("__Unit__"),
			},
			PlannedBudgetLimits: map[string]types.Spend{
				"key0": {
					Amount: ptr.String("__Amount__"),
					Unit:   ptr.String("__Unit__"),
				},
			},
			CostFilters: map[string][]string{
				"key0": {
					"__Member__",
					"__Member__",
				},
			},
			CostTypes: &types.CostTypes{
				IncludeTax:               ptr.Bool(true),
				IncludeSubscription:      ptr.Bool(true),
				UseBlended:               ptr.Bool(true),
				IncludeRefund:            ptr.Bool(true),
				IncludeCredit:            ptr.Bool(true),
				IncludeUpfront:           ptr.Bool(true),
				IncludeRecurring:         ptr.Bool(true),
				IncludeOtherSubscription: ptr.Bool(true),
				IncludeSupport:           ptr.Bool(true),
				IncludeDiscount:          ptr.Bool(true),
				UseAmortized:             ptr.Bool(true),
			},
			TimeUnit: types.TimeUnit("DAILY"),
			TimePeriod: &types.TimePeriod{
				Start: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				End:   ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			},
			CalculatedSpend: &types.CalculatedSpend{
				ActualSpend: &types.Spend{
					Amount: ptr.String("__Amount__"),
					Unit:   ptr.String("__Unit__"),
				},
				ForecastedSpend: &types.Spend{
					Amount: ptr.String("__Amount__"),
					Unit:   ptr.String("__Unit__"),
				},
			},
			BudgetType:      types.BudgetType("USAGE"),
			LastUpdatedTime: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			AutoAdjustData: &types.AutoAdjustData{
				AutoAdjustType: types.AutoAdjustType("HISTORICAL"),
				HistoricalOptions: &types.HistoricalOptions{
					BudgetAdjustmentPeriod:   ptr.Int32(1),
					LookBackAvailablePeriods: ptr.Int32(1),
				},
				LastAutoAdjustTime: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			},
			FilterExpression: &types.Expression{
				Or: []types.Expression{
					{},
					{},
				},
				And: []types.Expression{
					{},
					{},
				},
				Not: nil,
				Dimensions: &types.ExpressionDimensionValues{
					Key: types.Dimension("AZ"),
					Values: []string{
						"__Member__",
						"__Member__",
					},
					MatchOptions: []types.MatchOption{
						types.MatchOption("EQUALS"),
						types.MatchOption("EQUALS"),
					},
				},
				Tags: &types.TagValues{
					Key: ptr.String("__Key__"),
					Values: []string{
						"__Member__",
						"__Member__",
					},
					MatchOptions: []types.MatchOption{
						types.MatchOption("EQUALS"),
						types.MatchOption("EQUALS"),
					},
				},
				CostCategories: &types.CostCategoryValues{
					Key: ptr.String("__Key__"),
					Values: []string{
						"__Member__",
						"__Member__",
					},
					MatchOptions: []types.MatchOption{
						types.MatchOption("EQUALS"),
						types.MatchOption("EQUALS"),
					},
				},
			},
			Metrics: []types.Metric{
				types.Metric("BlendedCost"),
				types.Metric("BlendedCost"),
			},
			BillingViewArn: ptr.String("__BillingViewArn__"),
			HealthStatus: &types.HealthStatus{
				Status:          types.HealthStatusValue("HEALTHY"),
				StatusReason:    types.HealthStatusReason("BILLING_VIEW_NO_ACCESS"),
				LastUpdatedTime: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			},
		},
		NotificationsWithSubscribers: []types.NotificationWithSubscribers{
			{
				Notification: &types.Notification{
					NotificationType:   types.NotificationType("ACTUAL"),
					ComparisonOperator: types.ComparisonOperator("GREATER_THAN"),
					Threshold:          1.0,
					ThresholdType:      types.ThresholdType("PERCENTAGE"),
					NotificationState:  types.NotificationState("OK"),
				},
				Subscribers: []types.Subscriber{
					{
						SubscriptionType: types.SubscriptionType("SNS"),
						Address:          ptr.String("__Address__"),
					},
					{
						SubscriptionType: types.SubscriptionType("SNS"),
						Address:          ptr.String("__Address__"),
					},
				},
			},
			{
				Notification: &types.Notification{
					NotificationType:   types.NotificationType("ACTUAL"),
					ComparisonOperator: types.ComparisonOperator("GREATER_THAN"),
					Threshold:          1.0,
					ThresholdType:      types.ThresholdType("PERCENTAGE"),
					NotificationState:  types.NotificationState("OK"),
				},
				Subscribers: []types.Subscriber{
					{
						SubscriptionType: types.SubscriptionType("SNS"),
						Address:          ptr.String("__Address__"),
					},
					{
						SubscriptionType: types.SubscriptionType("SNS"),
						Address:          ptr.String("__Address__"),
					},
				},
			},
		},
		ResourceTags: []types.ResourceTag{
			{
				Key:   ptr.String("__Key__"),
				Value: ptr.String("__Value__"),
			},
			{
				Key:   ptr.String("__Key__"),
				Value: ptr.String("__Value__"),
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateBudget(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "CreateBudget"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_CreateBudgetAction(t *testing.T) {
	input := &CreateBudgetActionInput{
		AccountId:        ptr.String("__AccountId__"),
		BudgetName:       ptr.String("__BudgetName__"),
		NotificationType: types.NotificationType("ACTUAL"),
		ActionType:       types.ActionType("APPLY_IAM_POLICY"),
		ActionThreshold: &types.ActionThreshold{
			ActionThresholdValue: 1.0,
			ActionThresholdType:  types.ThresholdType("PERCENTAGE"),
		},
		Definition: &types.Definition{
			IamActionDefinition: &types.IamActionDefinition{
				PolicyArn: ptr.String("__PolicyArn__"),
				Roles: []string{
					"__Member__",
					"__Member__",
				},
				Groups: []string{
					"__Member__",
					"__Member__",
				},
				Users: []string{
					"__Member__",
					"__Member__",
				},
			},
			ScpActionDefinition: &types.ScpActionDefinition{
				PolicyId: ptr.String("__PolicyId__"),
				TargetIds: []string{
					"__Member__",
					"__Member__",
				},
			},
			SsmActionDefinition: &types.SsmActionDefinition{
				ActionSubType: types.ActionSubType("STOP_EC2_INSTANCES"),
				Region:        ptr.String("__Region__"),
				InstanceIds: []string{
					"__Member__",
					"__Member__",
				},
			},
		},
		ExecutionRoleArn: ptr.String("__ExecutionRoleArn__"),
		ApprovalModel:    types.ApprovalModel("AUTOMATIC"),
		Subscribers: []types.Subscriber{
			{
				SubscriptionType: types.SubscriptionType("SNS"),
				Address:          ptr.String("__Address__"),
			},
			{
				SubscriptionType: types.SubscriptionType("SNS"),
				Address:          ptr.String("__Address__"),
			},
		},
		ResourceTags: []types.ResourceTag{
			{
				Key:   ptr.String("__Key__"),
				Value: ptr.String("__Value__"),
			},
			{
				Key:   ptr.String("__Key__"),
				Value: ptr.String("__Value__"),
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateBudgetAction(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "CreateBudgetAction"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_CreateNotification(t *testing.T) {
	input := &CreateNotificationInput{
		AccountId:  ptr.String("__AccountId__"),
		BudgetName: ptr.String("__BudgetName__"),
		Notification: &types.Notification{
			NotificationType:   types.NotificationType("ACTUAL"),
			ComparisonOperator: types.ComparisonOperator("GREATER_THAN"),
			Threshold:          1.0,
			ThresholdType:      types.ThresholdType("PERCENTAGE"),
			NotificationState:  types.NotificationState("OK"),
		},
		Subscribers: []types.Subscriber{
			{
				SubscriptionType: types.SubscriptionType("SNS"),
				Address:          ptr.String("__Address__"),
			},
			{
				SubscriptionType: types.SubscriptionType("SNS"),
				Address:          ptr.String("__Address__"),
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateNotification(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "CreateNotification"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_CreateSubscriber(t *testing.T) {
	input := &CreateSubscriberInput{
		AccountId:  ptr.String("__AccountId__"),
		BudgetName: ptr.String("__BudgetName__"),
		Notification: &types.Notification{
			NotificationType:   types.NotificationType("ACTUAL"),
			ComparisonOperator: types.ComparisonOperator("GREATER_THAN"),
			Threshold:          1.0,
			ThresholdType:      types.ThresholdType("PERCENTAGE"),
			NotificationState:  types.NotificationState("OK"),
		},
		Subscriber: &types.Subscriber{
			SubscriptionType: types.SubscriptionType("SNS"),
			Address:          ptr.String("__Address__"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateSubscriber(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "CreateSubscriber"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DeleteBudget(t *testing.T) {
	input := &DeleteBudgetInput{
		AccountId:  ptr.String("__AccountId__"),
		BudgetName: ptr.String("__BudgetName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteBudget(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DeleteBudget"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DeleteBudgetAction(t *testing.T) {
	input := &DeleteBudgetActionInput{
		AccountId:  ptr.String("__AccountId__"),
		BudgetName: ptr.String("__BudgetName__"),
		ActionId:   ptr.String("__ActionId__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteBudgetAction(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DeleteBudgetAction"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DeleteNotification(t *testing.T) {
	input := &DeleteNotificationInput{
		AccountId:  ptr.String("__AccountId__"),
		BudgetName: ptr.String("__BudgetName__"),
		Notification: &types.Notification{
			NotificationType:   types.NotificationType("ACTUAL"),
			ComparisonOperator: types.ComparisonOperator("GREATER_THAN"),
			Threshold:          1.0,
			ThresholdType:      types.ThresholdType("PERCENTAGE"),
			NotificationState:  types.NotificationState("OK"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteNotification(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DeleteNotification"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DeleteSubscriber(t *testing.T) {
	input := &DeleteSubscriberInput{
		AccountId:  ptr.String("__AccountId__"),
		BudgetName: ptr.String("__BudgetName__"),
		Notification: &types.Notification{
			NotificationType:   types.NotificationType("ACTUAL"),
			ComparisonOperator: types.ComparisonOperator("GREATER_THAN"),
			Threshold:          1.0,
			ThresholdType:      types.ThresholdType("PERCENTAGE"),
			NotificationState:  types.NotificationState("OK"),
		},
		Subscriber: &types.Subscriber{
			SubscriptionType: types.SubscriptionType("SNS"),
			Address:          ptr.String("__Address__"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteSubscriber(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DeleteSubscriber"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DescribeBudget(t *testing.T) {
	input := &DescribeBudgetInput{
		AccountId:            ptr.String("__AccountId__"),
		BudgetName:           ptr.String("__BudgetName__"),
		ShowFilterExpression: ptr.Bool(true),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeBudget(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeBudget"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DescribeBudgetAction(t *testing.T) {
	input := &DescribeBudgetActionInput{
		AccountId:  ptr.String("__AccountId__"),
		BudgetName: ptr.String("__BudgetName__"),
		ActionId:   ptr.String("__ActionId__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeBudgetAction(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeBudgetAction"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DescribeBudgetActionHistories(t *testing.T) {
	input := &DescribeBudgetActionHistoriesInput{
		AccountId:  ptr.String("__AccountId__"),
		BudgetName: ptr.String("__BudgetName__"),
		ActionId:   ptr.String("__ActionId__"),
		TimePeriod: &types.TimePeriod{
			Start: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			End:   ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
		},
		MaxResults: ptr.Int32(1),
		NextToken:  ptr.String("__NextToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeBudgetActionHistories(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeBudgetActionHistories"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DescribeBudgetActionsForAccount(t *testing.T) {
	input := &DescribeBudgetActionsForAccountInput{
		AccountId:  ptr.String("__AccountId__"),
		MaxResults: ptr.Int32(1),
		NextToken:  ptr.String("__NextToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeBudgetActionsForAccount(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeBudgetActionsForAccount"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DescribeBudgetActionsForBudget(t *testing.T) {
	input := &DescribeBudgetActionsForBudgetInput{
		AccountId:  ptr.String("__AccountId__"),
		BudgetName: ptr.String("__BudgetName__"),
		MaxResults: ptr.Int32(1),
		NextToken:  ptr.String("__NextToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeBudgetActionsForBudget(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeBudgetActionsForBudget"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DescribeBudgetNotificationsForAccount(t *testing.T) {
	input := &DescribeBudgetNotificationsForAccountInput{
		AccountId:  ptr.String("__AccountId__"),
		MaxResults: ptr.Int32(1),
		NextToken:  ptr.String("__NextToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeBudgetNotificationsForAccount(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeBudgetNotificationsForAccount"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DescribeBudgetPerformanceHistory(t *testing.T) {
	input := &DescribeBudgetPerformanceHistoryInput{
		AccountId:  ptr.String("__AccountId__"),
		BudgetName: ptr.String("__BudgetName__"),
		TimePeriod: &types.TimePeriod{
			Start: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			End:   ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
		},
		MaxResults: ptr.Int32(1),
		NextToken:  ptr.String("__NextToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeBudgetPerformanceHistory(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeBudgetPerformanceHistory"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DescribeBudgets(t *testing.T) {
	input := &DescribeBudgetsInput{
		AccountId:            ptr.String("__AccountId__"),
		MaxResults:           ptr.Int32(1),
		NextToken:            ptr.String("__NextToken__"),
		ShowFilterExpression: ptr.Bool(true),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeBudgets(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeBudgets"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DescribeNotificationsForBudget(t *testing.T) {
	input := &DescribeNotificationsForBudgetInput{
		AccountId:  ptr.String("__AccountId__"),
		BudgetName: ptr.String("__BudgetName__"),
		MaxResults: ptr.Int32(1),
		NextToken:  ptr.String("__NextToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeNotificationsForBudget(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeNotificationsForBudget"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DescribeSubscribersForNotification(t *testing.T) {
	input := &DescribeSubscribersForNotificationInput{
		AccountId:  ptr.String("__AccountId__"),
		BudgetName: ptr.String("__BudgetName__"),
		Notification: &types.Notification{
			NotificationType:   types.NotificationType("ACTUAL"),
			ComparisonOperator: types.ComparisonOperator("GREATER_THAN"),
			Threshold:          1.0,
			ThresholdType:      types.ThresholdType("PERCENTAGE"),
			NotificationState:  types.NotificationState("OK"),
		},
		MaxResults: ptr.Int32(1),
		NextToken:  ptr.String("__NextToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeSubscribersForNotification(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeSubscribersForNotification"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ExecuteBudgetAction(t *testing.T) {
	input := &ExecuteBudgetActionInput{
		AccountId:     ptr.String("__AccountId__"),
		BudgetName:    ptr.String("__BudgetName__"),
		ActionId:      ptr.String("__ActionId__"),
		ExecutionType: types.ExecutionType("APPROVE_BUDGET_ACTION"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ExecuteBudgetAction(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "ExecuteBudgetAction"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListTagsForResource(t *testing.T) {
	input := &ListTagsForResourceInput{
		ResourceARN: ptr.String("__ResourceARN__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListTagsForResource(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "ListTagsForResource"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_TagResource(t *testing.T) {
	input := &TagResourceInput{
		ResourceARN: ptr.String("__ResourceARN__"),
		ResourceTags: []types.ResourceTag{
			{
				Key:   ptr.String("__Key__"),
				Value: ptr.String("__Value__"),
			},
			{
				Key:   ptr.String("__Key__"),
				Value: ptr.String("__Value__"),
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.TagResource(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "TagResource"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_UntagResource(t *testing.T) {
	input := &UntagResourceInput{
		ResourceARN: ptr.String("__ResourceARN__"),
		ResourceTagKeys: []string{
			"__Member__",
			"__Member__",
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UntagResource(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "UntagResource"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_UpdateBudget(t *testing.T) {
	input := &UpdateBudgetInput{
		AccountId: ptr.String("__AccountId__"),
		NewBudget: &types.Budget{
			BudgetName: ptr.String("__BudgetName__"),
			BudgetLimit: &types.Spend{
				Amount: ptr.String("__Amount__"),
				Unit:   ptr.String("__Unit__"),
			},
			PlannedBudgetLimits: map[string]types.Spend{
				"key0": {
					Amount: ptr.String("__Amount__"),
					Unit:   ptr.String("__Unit__"),
				},
			},
			CostFilters: map[string][]string{
				"key0": {
					"__Member__",
					"__Member__",
				},
			},
			CostTypes: &types.CostTypes{
				IncludeTax:               ptr.Bool(true),
				IncludeSubscription:      ptr.Bool(true),
				UseBlended:               ptr.Bool(true),
				IncludeRefund:            ptr.Bool(true),
				IncludeCredit:            ptr.Bool(true),
				IncludeUpfront:           ptr.Bool(true),
				IncludeRecurring:         ptr.Bool(true),
				IncludeOtherSubscription: ptr.Bool(true),
				IncludeSupport:           ptr.Bool(true),
				IncludeDiscount:          ptr.Bool(true),
				UseAmortized:             ptr.Bool(true),
			},
			TimeUnit: types.TimeUnit("DAILY"),
			TimePeriod: &types.TimePeriod{
				Start: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				End:   ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			},
			CalculatedSpend: &types.CalculatedSpend{
				ActualSpend: &types.Spend{
					Amount: ptr.String("__Amount__"),
					Unit:   ptr.String("__Unit__"),
				},
				ForecastedSpend: &types.Spend{
					Amount: ptr.String("__Amount__"),
					Unit:   ptr.String("__Unit__"),
				},
			},
			BudgetType:      types.BudgetType("USAGE"),
			LastUpdatedTime: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			AutoAdjustData: &types.AutoAdjustData{
				AutoAdjustType: types.AutoAdjustType("HISTORICAL"),
				HistoricalOptions: &types.HistoricalOptions{
					BudgetAdjustmentPeriod:   ptr.Int32(1),
					LookBackAvailablePeriods: ptr.Int32(1),
				},
				LastAutoAdjustTime: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			},
			FilterExpression: &types.Expression{
				Or: []types.Expression{
					{},
					{},
				},
				And: []types.Expression{
					{},
					{},
				},
				Not: nil,
				Dimensions: &types.ExpressionDimensionValues{
					Key: types.Dimension("AZ"),
					Values: []string{
						"__Member__",
						"__Member__",
					},
					MatchOptions: []types.MatchOption{
						types.MatchOption("EQUALS"),
						types.MatchOption("EQUALS"),
					},
				},
				Tags: &types.TagValues{
					Key: ptr.String("__Key__"),
					Values: []string{
						"__Member__",
						"__Member__",
					},
					MatchOptions: []types.MatchOption{
						types.MatchOption("EQUALS"),
						types.MatchOption("EQUALS"),
					},
				},
				CostCategories: &types.CostCategoryValues{
					Key: ptr.String("__Key__"),
					Values: []string{
						"__Member__",
						"__Member__",
					},
					MatchOptions: []types.MatchOption{
						types.MatchOption("EQUALS"),
						types.MatchOption("EQUALS"),
					},
				},
			},
			Metrics: []types.Metric{
				types.Metric("BlendedCost"),
				types.Metric("BlendedCost"),
			},
			BillingViewArn: ptr.String("__BillingViewArn__"),
			HealthStatus: &types.HealthStatus{
				Status:          types.HealthStatusValue("HEALTHY"),
				StatusReason:    types.HealthStatusReason("BILLING_VIEW_NO_ACCESS"),
				LastUpdatedTime: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateBudget(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "UpdateBudget"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_UpdateBudgetAction(t *testing.T) {
	input := &UpdateBudgetActionInput{
		AccountId:        ptr.String("__AccountId__"),
		BudgetName:       ptr.String("__BudgetName__"),
		ActionId:         ptr.String("__ActionId__"),
		NotificationType: types.NotificationType("ACTUAL"),
		ActionThreshold: &types.ActionThreshold{
			ActionThresholdValue: 1.0,
			ActionThresholdType:  types.ThresholdType("PERCENTAGE"),
		},
		Definition: &types.Definition{
			IamActionDefinition: &types.IamActionDefinition{
				PolicyArn: ptr.String("__PolicyArn__"),
				Roles: []string{
					"__Member__",
					"__Member__",
				},
				Groups: []string{
					"__Member__",
					"__Member__",
				},
				Users: []string{
					"__Member__",
					"__Member__",
				},
			},
			ScpActionDefinition: &types.ScpActionDefinition{
				PolicyId: ptr.String("__PolicyId__"),
				TargetIds: []string{
					"__Member__",
					"__Member__",
				},
			},
			SsmActionDefinition: &types.SsmActionDefinition{
				ActionSubType: types.ActionSubType("STOP_EC2_INSTANCES"),
				Region:        ptr.String("__Region__"),
				InstanceIds: []string{
					"__Member__",
					"__Member__",
				},
			},
		},
		ExecutionRoleArn: ptr.String("__ExecutionRoleArn__"),
		ApprovalModel:    types.ApprovalModel("AUTOMATIC"),
		Subscribers: []types.Subscriber{
			{
				SubscriptionType: types.SubscriptionType("SNS"),
				Address:          ptr.String("__Address__"),
			},
			{
				SubscriptionType: types.SubscriptionType("SNS"),
				Address:          ptr.String("__Address__"),
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateBudgetAction(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "UpdateBudgetAction"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_UpdateNotification(t *testing.T) {
	input := &UpdateNotificationInput{
		AccountId:  ptr.String("__AccountId__"),
		BudgetName: ptr.String("__BudgetName__"),
		OldNotification: &types.Notification{
			NotificationType:   types.NotificationType("ACTUAL"),
			ComparisonOperator: types.ComparisonOperator("GREATER_THAN"),
			Threshold:          1.0,
			ThresholdType:      types.ThresholdType("PERCENTAGE"),
			NotificationState:  types.NotificationState("OK"),
		},
		NewNotification: &types.Notification{
			NotificationType:   types.NotificationType("ACTUAL"),
			ComparisonOperator: types.ComparisonOperator("GREATER_THAN"),
			Threshold:          1.0,
			ThresholdType:      types.ThresholdType("PERCENTAGE"),
			NotificationState:  types.NotificationState("OK"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateNotification(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "UpdateNotification"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_UpdateSubscriber(t *testing.T) {
	input := &UpdateSubscriberInput{
		AccountId:  ptr.String("__AccountId__"),
		BudgetName: ptr.String("__BudgetName__"),
		Notification: &types.Notification{
			NotificationType:   types.NotificationType("ACTUAL"),
			ComparisonOperator: types.ComparisonOperator("GREATER_THAN"),
			Threshold:          1.0,
			ThresholdType:      types.ThresholdType("PERCENTAGE"),
			NotificationState:  types.NotificationState("OK"),
		},
		OldSubscriber: &types.Subscriber{
			SubscriptionType: types.SubscriptionType("SNS"),
			Address:          ptr.String("__Address__"),
		},
		NewSubscriber: &types.Subscriber{
			SubscriptionType: types.SubscriptionType("SNS"),
			Address:          ptr.String("__Address__"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateSubscriber(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeTestSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "UpdateSubscriber"); err != nil {
		t.Fatal(err)
	}
}
func TestUpdateRequestSnapshot_CreateBudget(t *testing.T) {
	input := &CreateBudgetInput{
		AccountId: ptr.String("__AccountId__"),
		Budget: &types.Budget{
			BudgetName: ptr.String("__BudgetName__"),
			BudgetLimit: &types.Spend{
				Amount: ptr.String("__Amount__"),
				Unit:   ptr.String("__Unit__"),
			},
			PlannedBudgetLimits: map[string]types.Spend{
				"key0": {
					Amount: ptr.String("__Amount__"),
					Unit:   ptr.String("__Unit__"),
				},
			},
			CostFilters: map[string][]string{
				"key0": {
					"__Member__",
					"__Member__",
				},
			},
			CostTypes: &types.CostTypes{
				IncludeTax:               ptr.Bool(true),
				IncludeSubscription:      ptr.Bool(true),
				UseBlended:               ptr.Bool(true),
				IncludeRefund:            ptr.Bool(true),
				IncludeCredit:            ptr.Bool(true),
				IncludeUpfront:           ptr.Bool(true),
				IncludeRecurring:         ptr.Bool(true),
				IncludeOtherSubscription: ptr.Bool(true),
				IncludeSupport:           ptr.Bool(true),
				IncludeDiscount:          ptr.Bool(true),
				UseAmortized:             ptr.Bool(true),
			},
			TimeUnit: types.TimeUnit("DAILY"),
			TimePeriod: &types.TimePeriod{
				Start: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				End:   ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			},
			CalculatedSpend: &types.CalculatedSpend{
				ActualSpend: &types.Spend{
					Amount: ptr.String("__Amount__"),
					Unit:   ptr.String("__Unit__"),
				},
				ForecastedSpend: &types.Spend{
					Amount: ptr.String("__Amount__"),
					Unit:   ptr.String("__Unit__"),
				},
			},
			BudgetType:      types.BudgetType("USAGE"),
			LastUpdatedTime: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			AutoAdjustData: &types.AutoAdjustData{
				AutoAdjustType: types.AutoAdjustType("HISTORICAL"),
				HistoricalOptions: &types.HistoricalOptions{
					BudgetAdjustmentPeriod:   ptr.Int32(1),
					LookBackAvailablePeriods: ptr.Int32(1),
				},
				LastAutoAdjustTime: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			},
			FilterExpression: &types.Expression{
				Or: []types.Expression{
					{},
					{},
				},
				And: []types.Expression{
					{},
					{},
				},
				Not: nil,
				Dimensions: &types.ExpressionDimensionValues{
					Key: types.Dimension("AZ"),
					Values: []string{
						"__Member__",
						"__Member__",
					},
					MatchOptions: []types.MatchOption{
						types.MatchOption("EQUALS"),
						types.MatchOption("EQUALS"),
					},
				},
				Tags: &types.TagValues{
					Key: ptr.String("__Key__"),
					Values: []string{
						"__Member__",
						"__Member__",
					},
					MatchOptions: []types.MatchOption{
						types.MatchOption("EQUALS"),
						types.MatchOption("EQUALS"),
					},
				},
				CostCategories: &types.CostCategoryValues{
					Key: ptr.String("__Key__"),
					Values: []string{
						"__Member__",
						"__Member__",
					},
					MatchOptions: []types.MatchOption{
						types.MatchOption("EQUALS"),
						types.MatchOption("EQUALS"),
					},
				},
			},
			Metrics: []types.Metric{
				types.Metric("BlendedCost"),
				types.Metric("BlendedCost"),
			},
			BillingViewArn: ptr.String("__BillingViewArn__"),
			HealthStatus: &types.HealthStatus{
				Status:          types.HealthStatusValue("HEALTHY"),
				StatusReason:    types.HealthStatusReason("BILLING_VIEW_NO_ACCESS"),
				LastUpdatedTime: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			},
		},
		NotificationsWithSubscribers: []types.NotificationWithSubscribers{
			{
				Notification: &types.Notification{
					NotificationType:   types.NotificationType("ACTUAL"),
					ComparisonOperator: types.ComparisonOperator("GREATER_THAN"),
					Threshold:          1.0,
					ThresholdType:      types.ThresholdType("PERCENTAGE"),
					NotificationState:  types.NotificationState("OK"),
				},
				Subscribers: []types.Subscriber{
					{
						SubscriptionType: types.SubscriptionType("SNS"),
						Address:          ptr.String("__Address__"),
					},
					{
						SubscriptionType: types.SubscriptionType("SNS"),
						Address:          ptr.String("__Address__"),
					},
				},
			},
			{
				Notification: &types.Notification{
					NotificationType:   types.NotificationType("ACTUAL"),
					ComparisonOperator: types.ComparisonOperator("GREATER_THAN"),
					Threshold:          1.0,
					ThresholdType:      types.ThresholdType("PERCENTAGE"),
					NotificationState:  types.NotificationState("OK"),
				},
				Subscribers: []types.Subscriber{
					{
						SubscriptionType: types.SubscriptionType("SNS"),
						Address:          ptr.String("__Address__"),
					},
					{
						SubscriptionType: types.SubscriptionType("SNS"),
						Address:          ptr.String("__Address__"),
					},
				},
			},
		},
		ResourceTags: []types.ResourceTag{
			{
				Key:   ptr.String("__Key__"),
				Value: ptr.String("__Value__"),
			},
			{
				Key:   ptr.String("__Key__"),
				Value: ptr.String("__Value__"),
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateBudget(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "CreateBudget"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_CreateBudgetAction(t *testing.T) {
	input := &CreateBudgetActionInput{
		AccountId:        ptr.String("__AccountId__"),
		BudgetName:       ptr.String("__BudgetName__"),
		NotificationType: types.NotificationType("ACTUAL"),
		ActionType:       types.ActionType("APPLY_IAM_POLICY"),
		ActionThreshold: &types.ActionThreshold{
			ActionThresholdValue: 1.0,
			ActionThresholdType:  types.ThresholdType("PERCENTAGE"),
		},
		Definition: &types.Definition{
			IamActionDefinition: &types.IamActionDefinition{
				PolicyArn: ptr.String("__PolicyArn__"),
				Roles: []string{
					"__Member__",
					"__Member__",
				},
				Groups: []string{
					"__Member__",
					"__Member__",
				},
				Users: []string{
					"__Member__",
					"__Member__",
				},
			},
			ScpActionDefinition: &types.ScpActionDefinition{
				PolicyId: ptr.String("__PolicyId__"),
				TargetIds: []string{
					"__Member__",
					"__Member__",
				},
			},
			SsmActionDefinition: &types.SsmActionDefinition{
				ActionSubType: types.ActionSubType("STOP_EC2_INSTANCES"),
				Region:        ptr.String("__Region__"),
				InstanceIds: []string{
					"__Member__",
					"__Member__",
				},
			},
		},
		ExecutionRoleArn: ptr.String("__ExecutionRoleArn__"),
		ApprovalModel:    types.ApprovalModel("AUTOMATIC"),
		Subscribers: []types.Subscriber{
			{
				SubscriptionType: types.SubscriptionType("SNS"),
				Address:          ptr.String("__Address__"),
			},
			{
				SubscriptionType: types.SubscriptionType("SNS"),
				Address:          ptr.String("__Address__"),
			},
		},
		ResourceTags: []types.ResourceTag{
			{
				Key:   ptr.String("__Key__"),
				Value: ptr.String("__Value__"),
			},
			{
				Key:   ptr.String("__Key__"),
				Value: ptr.String("__Value__"),
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateBudgetAction(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "CreateBudgetAction"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_CreateNotification(t *testing.T) {
	input := &CreateNotificationInput{
		AccountId:  ptr.String("__AccountId__"),
		BudgetName: ptr.String("__BudgetName__"),
		Notification: &types.Notification{
			NotificationType:   types.NotificationType("ACTUAL"),
			ComparisonOperator: types.ComparisonOperator("GREATER_THAN"),
			Threshold:          1.0,
			ThresholdType:      types.ThresholdType("PERCENTAGE"),
			NotificationState:  types.NotificationState("OK"),
		},
		Subscribers: []types.Subscriber{
			{
				SubscriptionType: types.SubscriptionType("SNS"),
				Address:          ptr.String("__Address__"),
			},
			{
				SubscriptionType: types.SubscriptionType("SNS"),
				Address:          ptr.String("__Address__"),
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateNotification(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "CreateNotification"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_CreateSubscriber(t *testing.T) {
	input := &CreateSubscriberInput{
		AccountId:  ptr.String("__AccountId__"),
		BudgetName: ptr.String("__BudgetName__"),
		Notification: &types.Notification{
			NotificationType:   types.NotificationType("ACTUAL"),
			ComparisonOperator: types.ComparisonOperator("GREATER_THAN"),
			Threshold:          1.0,
			ThresholdType:      types.ThresholdType("PERCENTAGE"),
			NotificationState:  types.NotificationState("OK"),
		},
		Subscriber: &types.Subscriber{
			SubscriptionType: types.SubscriptionType("SNS"),
			Address:          ptr.String("__Address__"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateSubscriber(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "CreateSubscriber"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DeleteBudget(t *testing.T) {
	input := &DeleteBudgetInput{
		AccountId:  ptr.String("__AccountId__"),
		BudgetName: ptr.String("__BudgetName__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteBudget(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DeleteBudget"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DeleteBudgetAction(t *testing.T) {
	input := &DeleteBudgetActionInput{
		AccountId:  ptr.String("__AccountId__"),
		BudgetName: ptr.String("__BudgetName__"),
		ActionId:   ptr.String("__ActionId__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteBudgetAction(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DeleteBudgetAction"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DeleteNotification(t *testing.T) {
	input := &DeleteNotificationInput{
		AccountId:  ptr.String("__AccountId__"),
		BudgetName: ptr.String("__BudgetName__"),
		Notification: &types.Notification{
			NotificationType:   types.NotificationType("ACTUAL"),
			ComparisonOperator: types.ComparisonOperator("GREATER_THAN"),
			Threshold:          1.0,
			ThresholdType:      types.ThresholdType("PERCENTAGE"),
			NotificationState:  types.NotificationState("OK"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteNotification(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DeleteNotification"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DeleteSubscriber(t *testing.T) {
	input := &DeleteSubscriberInput{
		AccountId:  ptr.String("__AccountId__"),
		BudgetName: ptr.String("__BudgetName__"),
		Notification: &types.Notification{
			NotificationType:   types.NotificationType("ACTUAL"),
			ComparisonOperator: types.ComparisonOperator("GREATER_THAN"),
			Threshold:          1.0,
			ThresholdType:      types.ThresholdType("PERCENTAGE"),
			NotificationState:  types.NotificationState("OK"),
		},
		Subscriber: &types.Subscriber{
			SubscriptionType: types.SubscriptionType("SNS"),
			Address:          ptr.String("__Address__"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteSubscriber(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DeleteSubscriber"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DescribeBudget(t *testing.T) {
	input := &DescribeBudgetInput{
		AccountId:            ptr.String("__AccountId__"),
		BudgetName:           ptr.String("__BudgetName__"),
		ShowFilterExpression: ptr.Bool(true),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeBudget(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeBudget"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DescribeBudgetAction(t *testing.T) {
	input := &DescribeBudgetActionInput{
		AccountId:  ptr.String("__AccountId__"),
		BudgetName: ptr.String("__BudgetName__"),
		ActionId:   ptr.String("__ActionId__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeBudgetAction(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeBudgetAction"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DescribeBudgetActionHistories(t *testing.T) {
	input := &DescribeBudgetActionHistoriesInput{
		AccountId:  ptr.String("__AccountId__"),
		BudgetName: ptr.String("__BudgetName__"),
		ActionId:   ptr.String("__ActionId__"),
		TimePeriod: &types.TimePeriod{
			Start: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			End:   ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
		},
		MaxResults: ptr.Int32(1),
		NextToken:  ptr.String("__NextToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeBudgetActionHistories(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeBudgetActionHistories"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DescribeBudgetActionsForAccount(t *testing.T) {
	input := &DescribeBudgetActionsForAccountInput{
		AccountId:  ptr.String("__AccountId__"),
		MaxResults: ptr.Int32(1),
		NextToken:  ptr.String("__NextToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeBudgetActionsForAccount(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeBudgetActionsForAccount"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DescribeBudgetActionsForBudget(t *testing.T) {
	input := &DescribeBudgetActionsForBudgetInput{
		AccountId:  ptr.String("__AccountId__"),
		BudgetName: ptr.String("__BudgetName__"),
		MaxResults: ptr.Int32(1),
		NextToken:  ptr.String("__NextToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeBudgetActionsForBudget(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeBudgetActionsForBudget"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DescribeBudgetNotificationsForAccount(t *testing.T) {
	input := &DescribeBudgetNotificationsForAccountInput{
		AccountId:  ptr.String("__AccountId__"),
		MaxResults: ptr.Int32(1),
		NextToken:  ptr.String("__NextToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeBudgetNotificationsForAccount(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeBudgetNotificationsForAccount"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DescribeBudgetPerformanceHistory(t *testing.T) {
	input := &DescribeBudgetPerformanceHistoryInput{
		AccountId:  ptr.String("__AccountId__"),
		BudgetName: ptr.String("__BudgetName__"),
		TimePeriod: &types.TimePeriod{
			Start: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			End:   ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
		},
		MaxResults: ptr.Int32(1),
		NextToken:  ptr.String("__NextToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeBudgetPerformanceHistory(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeBudgetPerformanceHistory"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DescribeBudgets(t *testing.T) {
	input := &DescribeBudgetsInput{
		AccountId:            ptr.String("__AccountId__"),
		MaxResults:           ptr.Int32(1),
		NextToken:            ptr.String("__NextToken__"),
		ShowFilterExpression: ptr.Bool(true),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeBudgets(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeBudgets"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DescribeNotificationsForBudget(t *testing.T) {
	input := &DescribeNotificationsForBudgetInput{
		AccountId:  ptr.String("__AccountId__"),
		BudgetName: ptr.String("__BudgetName__"),
		MaxResults: ptr.Int32(1),
		NextToken:  ptr.String("__NextToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeNotificationsForBudget(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeNotificationsForBudget"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DescribeSubscribersForNotification(t *testing.T) {
	input := &DescribeSubscribersForNotificationInput{
		AccountId:  ptr.String("__AccountId__"),
		BudgetName: ptr.String("__BudgetName__"),
		Notification: &types.Notification{
			NotificationType:   types.NotificationType("ACTUAL"),
			ComparisonOperator: types.ComparisonOperator("GREATER_THAN"),
			Threshold:          1.0,
			ThresholdType:      types.ThresholdType("PERCENTAGE"),
			NotificationState:  types.NotificationState("OK"),
		},
		MaxResults: ptr.Int32(1),
		NextToken:  ptr.String("__NextToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DescribeSubscribersForNotification(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "DescribeSubscribersForNotification"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ExecuteBudgetAction(t *testing.T) {
	input := &ExecuteBudgetActionInput{
		AccountId:     ptr.String("__AccountId__"),
		BudgetName:    ptr.String("__BudgetName__"),
		ActionId:      ptr.String("__ActionId__"),
		ExecutionType: types.ExecutionType("APPROVE_BUDGET_ACTION"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ExecuteBudgetAction(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "ExecuteBudgetAction"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListTagsForResource(t *testing.T) {
	input := &ListTagsForResourceInput{
		ResourceARN: ptr.String("__ResourceARN__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListTagsForResource(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "ListTagsForResource"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_TagResource(t *testing.T) {
	input := &TagResourceInput{
		ResourceARN: ptr.String("__ResourceARN__"),
		ResourceTags: []types.ResourceTag{
			{
				Key:   ptr.String("__Key__"),
				Value: ptr.String("__Value__"),
			},
			{
				Key:   ptr.String("__Key__"),
				Value: ptr.String("__Value__"),
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.TagResource(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "TagResource"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_UntagResource(t *testing.T) {
	input := &UntagResourceInput{
		ResourceARN: ptr.String("__ResourceARN__"),
		ResourceTagKeys: []string{
			"__Member__",
			"__Member__",
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UntagResource(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "UntagResource"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_UpdateBudget(t *testing.T) {
	input := &UpdateBudgetInput{
		AccountId: ptr.String("__AccountId__"),
		NewBudget: &types.Budget{
			BudgetName: ptr.String("__BudgetName__"),
			BudgetLimit: &types.Spend{
				Amount: ptr.String("__Amount__"),
				Unit:   ptr.String("__Unit__"),
			},
			PlannedBudgetLimits: map[string]types.Spend{
				"key0": {
					Amount: ptr.String("__Amount__"),
					Unit:   ptr.String("__Unit__"),
				},
			},
			CostFilters: map[string][]string{
				"key0": {
					"__Member__",
					"__Member__",
				},
			},
			CostTypes: &types.CostTypes{
				IncludeTax:               ptr.Bool(true),
				IncludeSubscription:      ptr.Bool(true),
				UseBlended:               ptr.Bool(true),
				IncludeRefund:            ptr.Bool(true),
				IncludeCredit:            ptr.Bool(true),
				IncludeUpfront:           ptr.Bool(true),
				IncludeRecurring:         ptr.Bool(true),
				IncludeOtherSubscription: ptr.Bool(true),
				IncludeSupport:           ptr.Bool(true),
				IncludeDiscount:          ptr.Bool(true),
				UseAmortized:             ptr.Bool(true),
			},
			TimeUnit: types.TimeUnit("DAILY"),
			TimePeriod: &types.TimePeriod{
				Start: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
				End:   ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			},
			CalculatedSpend: &types.CalculatedSpend{
				ActualSpend: &types.Spend{
					Amount: ptr.String("__Amount__"),
					Unit:   ptr.String("__Unit__"),
				},
				ForecastedSpend: &types.Spend{
					Amount: ptr.String("__Amount__"),
					Unit:   ptr.String("__Unit__"),
				},
			},
			BudgetType:      types.BudgetType("USAGE"),
			LastUpdatedTime: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			AutoAdjustData: &types.AutoAdjustData{
				AutoAdjustType: types.AutoAdjustType("HISTORICAL"),
				HistoricalOptions: &types.HistoricalOptions{
					BudgetAdjustmentPeriod:   ptr.Int32(1),
					LookBackAvailablePeriods: ptr.Int32(1),
				},
				LastAutoAdjustTime: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			},
			FilterExpression: &types.Expression{
				Or: []types.Expression{
					{},
					{},
				},
				And: []types.Expression{
					{},
					{},
				},
				Not: nil,
				Dimensions: &types.ExpressionDimensionValues{
					Key: types.Dimension("AZ"),
					Values: []string{
						"__Member__",
						"__Member__",
					},
					MatchOptions: []types.MatchOption{
						types.MatchOption("EQUALS"),
						types.MatchOption("EQUALS"),
					},
				},
				Tags: &types.TagValues{
					Key: ptr.String("__Key__"),
					Values: []string{
						"__Member__",
						"__Member__",
					},
					MatchOptions: []types.MatchOption{
						types.MatchOption("EQUALS"),
						types.MatchOption("EQUALS"),
					},
				},
				CostCategories: &types.CostCategoryValues{
					Key: ptr.String("__Key__"),
					Values: []string{
						"__Member__",
						"__Member__",
					},
					MatchOptions: []types.MatchOption{
						types.MatchOption("EQUALS"),
						types.MatchOption("EQUALS"),
					},
				},
			},
			Metrics: []types.Metric{
				types.Metric("BlendedCost"),
				types.Metric("BlendedCost"),
			},
			BillingViewArn: ptr.String("__BillingViewArn__"),
			HealthStatus: &types.HealthStatus{
				Status:          types.HealthStatusValue("HEALTHY"),
				StatusReason:    types.HealthStatusReason("BILLING_VIEW_NO_ACCESS"),
				LastUpdatedTime: ptr.Time(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)),
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateBudget(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "UpdateBudget"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_UpdateBudgetAction(t *testing.T) {
	input := &UpdateBudgetActionInput{
		AccountId:        ptr.String("__AccountId__"),
		BudgetName:       ptr.String("__BudgetName__"),
		ActionId:         ptr.String("__ActionId__"),
		NotificationType: types.NotificationType("ACTUAL"),
		ActionThreshold: &types.ActionThreshold{
			ActionThresholdValue: 1.0,
			ActionThresholdType:  types.ThresholdType("PERCENTAGE"),
		},
		Definition: &types.Definition{
			IamActionDefinition: &types.IamActionDefinition{
				PolicyArn: ptr.String("__PolicyArn__"),
				Roles: []string{
					"__Member__",
					"__Member__",
				},
				Groups: []string{
					"__Member__",
					"__Member__",
				},
				Users: []string{
					"__Member__",
					"__Member__",
				},
			},
			ScpActionDefinition: &types.ScpActionDefinition{
				PolicyId: ptr.String("__PolicyId__"),
				TargetIds: []string{
					"__Member__",
					"__Member__",
				},
			},
			SsmActionDefinition: &types.SsmActionDefinition{
				ActionSubType: types.ActionSubType("STOP_EC2_INSTANCES"),
				Region:        ptr.String("__Region__"),
				InstanceIds: []string{
					"__Member__",
					"__Member__",
				},
			},
		},
		ExecutionRoleArn: ptr.String("__ExecutionRoleArn__"),
		ApprovalModel:    types.ApprovalModel("AUTOMATIC"),
		Subscribers: []types.Subscriber{
			{
				SubscriptionType: types.SubscriptionType("SNS"),
				Address:          ptr.String("__Address__"),
			},
			{
				SubscriptionType: types.SubscriptionType("SNS"),
				Address:          ptr.String("__Address__"),
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateBudgetAction(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "UpdateBudgetAction"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_UpdateNotification(t *testing.T) {
	input := &UpdateNotificationInput{
		AccountId:  ptr.String("__AccountId__"),
		BudgetName: ptr.String("__BudgetName__"),
		OldNotification: &types.Notification{
			NotificationType:   types.NotificationType("ACTUAL"),
			ComparisonOperator: types.ComparisonOperator("GREATER_THAN"),
			Threshold:          1.0,
			ThresholdType:      types.ThresholdType("PERCENTAGE"),
			NotificationState:  types.NotificationState("OK"),
		},
		NewNotification: &types.Notification{
			NotificationType:   types.NotificationType("ACTUAL"),
			ComparisonOperator: types.ComparisonOperator("GREATER_THAN"),
			Threshold:          1.0,
			ThresholdType:      types.ThresholdType("PERCENTAGE"),
			NotificationState:  types.NotificationState("OK"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateNotification(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "UpdateNotification"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_UpdateSubscriber(t *testing.T) {
	input := &UpdateSubscriberInput{
		AccountId:  ptr.String("__AccountId__"),
		BudgetName: ptr.String("__BudgetName__"),
		Notification: &types.Notification{
			NotificationType:   types.NotificationType("ACTUAL"),
			ComparisonOperator: types.ComparisonOperator("GREATER_THAN"),
			Threshold:          1.0,
			ThresholdType:      types.ThresholdType("PERCENTAGE"),
			NotificationState:  types.NotificationState("OK"),
		},
		OldSubscriber: &types.Subscriber{
			SubscriptionType: types.SubscriptionType("SNS"),
			Address:          ptr.String("__Address__"),
		},
		NewSubscriber: &types.Subscriber{
			SubscriptionType: types.SubscriptionType("SNS"),
			Address:          ptr.String("__Address__"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateSubscriber(context.Background(), input, func(o *Options) {
		o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
			stack.Initialize.Remove("OperationInputValidation")
			stack.Serialize.Remove("RequestCompression")
			return stack.Finalize.Add(&captureSerdeRequestMiddleware{
				body: body, method: &method, rawPath: &rawPath, rawQuery: &rawQuery, header: &header,
			}, middleware.Before)
		})
	})
	if err != nil && !errors.Is(err, errSerdeSnapshotOK) {
		t.Fatal(err)
	}
	if err := serdeUpdateSnapshot(method, rawPath, rawQuery, header, body.Bytes(), "UpdateSubscriber"); err != nil {
		t.Fatal(err)
	}
}
