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

//go:build request_snapshot

package billingconductor

import (
	"bytes"
	"context"
	"errors"
	"fmt"
	"github.com/aws/aws-sdk-go-v2/service/billingconductor/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"
)

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_AssociateAccounts(t *testing.T) {
	input := &AssociateAccountsInput{
		Arn: ptr.String("__Arn__"),
		AccountIds: []string{
			"__Member__",
			"__Member__",
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.AssociateAccounts(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(), "AssociateAccounts"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_AssociatePricingRules(t *testing.T) {
	input := &AssociatePricingRulesInput{
		Arn: ptr.String("__Arn__"),
		PricingRuleArns: []string{
			"__Member__",
			"__Member__",
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.AssociatePricingRules(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(), "AssociatePricingRules"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_BatchAssociateResourcesToCustomLineItem(t *testing.T) {
	input := &BatchAssociateResourcesToCustomLineItemInput{
		TargetArn: ptr.String("__TargetArn__"),
		ResourceArns: []string{
			"__Member__",
			"__Member__",
		},
		BillingPeriodRange: &types.CustomLineItemBillingPeriodRange{
			InclusiveStartBillingPeriod: ptr.String("__InclusiveStartBillingPeriod__"),
			ExclusiveEndBillingPeriod:   ptr.String("__ExclusiveEndBillingPeriod__"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.BatchAssociateResourcesToCustomLineItem(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(), "BatchAssociateResourcesToCustomLineItem"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_BatchDisassociateResourcesFromCustomLineItem(t *testing.T) {
	input := &BatchDisassociateResourcesFromCustomLineItemInput{
		TargetArn: ptr.String("__TargetArn__"),
		ResourceArns: []string{
			"__Member__",
			"__Member__",
		},
		BillingPeriodRange: &types.CustomLineItemBillingPeriodRange{
			InclusiveStartBillingPeriod: ptr.String("__InclusiveStartBillingPeriod__"),
			ExclusiveEndBillingPeriod:   ptr.String("__ExclusiveEndBillingPeriod__"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.BatchDisassociateResourcesFromCustomLineItem(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(), "BatchDisassociateResourcesFromCustomLineItem"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_CreateBillingGroup(t *testing.T) {
	input := &CreateBillingGroupInput{
		ClientToken: ptr.String("__ClientToken__"),
		Name:        ptr.String("__Name__"),
		AccountGrouping: &types.AccountGrouping{
			LinkedAccountIds: []string{
				"__Member__",
				"__Member__",
			},
			AutoAssociate:             ptr.Bool(true),
			ResponsibilityTransferArn: ptr.String("__ResponsibilityTransferArn__"),
		},
		ComputationPreference: &types.ComputationPreference{
			PricingPlanArn: ptr.String("__PricingPlanArn__"),
		},
		PrimaryAccountId: ptr.String("__PrimaryAccountId__"),
		Description:      ptr.String("__Description__"),
		Tags: map[string]string{
			"key0": "__Value__",
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateBillingGroup(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(), "CreateBillingGroup"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_CreateCustomLineItem(t *testing.T) {
	input := &CreateCustomLineItemInput{
		ClientToken:     ptr.String("__ClientToken__"),
		Name:            ptr.String("__Name__"),
		Description:     ptr.String("__Description__"),
		BillingGroupArn: ptr.String("__BillingGroupArn__"),
		BillingPeriodRange: &types.CustomLineItemBillingPeriodRange{
			InclusiveStartBillingPeriod: ptr.String("__InclusiveStartBillingPeriod__"),
			ExclusiveEndBillingPeriod:   ptr.String("__ExclusiveEndBillingPeriod__"),
		},
		Tags: map[string]string{
			"key0": "__Value__",
		},
		ChargeDetails: &types.CustomLineItemChargeDetails{
			Flat: &types.CustomLineItemFlatChargeDetails{
				ChargeValue: ptr.Float64(1.0),
			},
			Percentage: &types.CustomLineItemPercentageChargeDetails{
				PercentageValue: ptr.Float64(1.0),
				AssociatedValues: []string{
					"__Member__",
					"__Member__",
				},
			},
			Type: types.CustomLineItemType("CREDIT"),
			LineItemFilters: []types.LineItemFilter{
				{
					Attribute:   types.LineItemFilterAttributeName("LINE_ITEM_TYPE"),
					MatchOption: types.MatchOption("NOT_EQUAL"),
					Values: []types.LineItemFilterValue{
						types.LineItemFilterValue("SAVINGS_PLAN_NEGATION"),
						types.LineItemFilterValue("SAVINGS_PLAN_NEGATION"),
					},
					AttributeValues: []string{
						"__Member__",
						"__Member__",
					},
				},
				{
					Attribute:   types.LineItemFilterAttributeName("LINE_ITEM_TYPE"),
					MatchOption: types.MatchOption("NOT_EQUAL"),
					Values: []types.LineItemFilterValue{
						types.LineItemFilterValue("SAVINGS_PLAN_NEGATION"),
						types.LineItemFilterValue("SAVINGS_PLAN_NEGATION"),
					},
					AttributeValues: []string{
						"__Member__",
						"__Member__",
					},
				},
			},
		},
		AccountId:       ptr.String("__AccountId__"),
		ComputationRule: types.ComputationRuleEnum("ITEMIZED"),
		PresentationDetails: &types.PresentationObject{
			Service: ptr.String("__Service__"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateCustomLineItem(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(), "CreateCustomLineItem"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_CreatePricingPlan(t *testing.T) {
	input := &CreatePricingPlanInput{
		ClientToken: ptr.String("__ClientToken__"),
		Name:        ptr.String("__Name__"),
		Description: ptr.String("__Description__"),
		PricingRuleArns: []string{
			"__Member__",
			"__Member__",
		},
		Tags: map[string]string{
			"key0": "__Value__",
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreatePricingPlan(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(), "CreatePricingPlan"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_CreatePricingRule(t *testing.T) {
	input := &CreatePricingRuleInput{
		ClientToken:        ptr.String("__ClientToken__"),
		Name:               ptr.String("__Name__"),
		Description:        ptr.String("__Description__"),
		Scope:              types.PricingRuleScope("GLOBAL"),
		Type:               types.PricingRuleType("MARKUP"),
		ModifierPercentage: ptr.Float64(1.0),
		Service:            ptr.String("__Service__"),
		Tags: map[string]string{
			"key0": "__Value__",
		},
		BillingEntity: ptr.String("__BillingEntity__"),
		Tiering: &types.CreateTieringInput{
			FreeTier: &types.CreateFreeTierConfig{
				Activated: ptr.Bool(true),
			},
		},
		UsageType: ptr.String("__UsageType__"),
		Operation: ptr.String("__Operation__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreatePricingRule(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(), "CreatePricingRule"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DeleteBillingGroup(t *testing.T) {
	input := &DeleteBillingGroupInput{
		Arn: ptr.String("__Arn__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteBillingGroup(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(), "DeleteBillingGroup"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DeleteCustomLineItem(t *testing.T) {
	input := &DeleteCustomLineItemInput{
		Arn: ptr.String("__Arn__"),
		BillingPeriodRange: &types.CustomLineItemBillingPeriodRange{
			InclusiveStartBillingPeriod: ptr.String("__InclusiveStartBillingPeriod__"),
			ExclusiveEndBillingPeriod:   ptr.String("__ExclusiveEndBillingPeriod__"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteCustomLineItem(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(), "DeleteCustomLineItem"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DeletePricingPlan(t *testing.T) {
	input := &DeletePricingPlanInput{
		Arn: ptr.String("__Arn__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeletePricingPlan(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(), "DeletePricingPlan"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DeletePricingRule(t *testing.T) {
	input := &DeletePricingRuleInput{
		Arn: ptr.String("__Arn__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeletePricingRule(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(), "DeletePricingRule"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DisassociateAccounts(t *testing.T) {
	input := &DisassociateAccountsInput{
		Arn: ptr.String("__Arn__"),
		AccountIds: []string{
			"__Member__",
			"__Member__",
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DisassociateAccounts(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(), "DisassociateAccounts"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_DisassociatePricingRules(t *testing.T) {
	input := &DisassociatePricingRulesInput{
		Arn: ptr.String("__Arn__"),
		PricingRuleArns: []string{
			"__Member__",
			"__Member__",
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DisassociatePricingRules(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(), "DisassociatePricingRules"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_GetBillingGroupCostReport(t *testing.T) {
	input := &GetBillingGroupCostReportInput{
		Arn: ptr.String("__Arn__"),
		BillingPeriodRange: &types.BillingPeriodRange{
			InclusiveStartBillingPeriod: ptr.String("__InclusiveStartBillingPeriod__"),
			ExclusiveEndBillingPeriod:   ptr.String("__ExclusiveEndBillingPeriod__"),
		},
		GroupBy: []types.GroupByAttributeName{
			types.GroupByAttributeName("PRODUCT_NAME"),
			types.GroupByAttributeName("PRODUCT_NAME"),
		},
		MaxResults: ptr.Int32(1),
		NextToken:  ptr.String("__NextToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.GetBillingGroupCostReport(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(), "GetBillingGroupCostReport"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListAccountAssociations(t *testing.T) {
	input := &ListAccountAssociationsInput{
		BillingPeriod: ptr.String("__BillingPeriod__"),
		Filters: &types.ListAccountAssociationsFilter{
			Association: ptr.String("__Association__"),
			AccountId:   ptr.String("__AccountId__"),
			AccountIds: []string{
				"__Member__",
				"__Member__",
			},
		},
		NextToken: ptr.String("__NextToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListAccountAssociations(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(), "ListAccountAssociations"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListBillingGroupCostReports(t *testing.T) {
	input := &ListBillingGroupCostReportsInput{
		BillingPeriod: ptr.String("__BillingPeriod__"),
		MaxResults:    ptr.Int32(1),
		NextToken:     ptr.String("__NextToken__"),
		Filters: &types.ListBillingGroupCostReportsFilter{
			BillingGroupArns: []string{
				"__Member__",
				"__Member__",
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListBillingGroupCostReports(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(), "ListBillingGroupCostReports"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListBillingGroups(t *testing.T) {
	input := &ListBillingGroupsInput{
		BillingPeriod: ptr.String("__BillingPeriod__"),
		MaxResults:    ptr.Int32(1),
		NextToken:     ptr.String("__NextToken__"),
		Filters: &types.ListBillingGroupsFilter{
			Arns: []string{
				"__Member__",
				"__Member__",
			},
			PricingPlan: ptr.String("__PricingPlan__"),
			Statuses: []types.BillingGroupStatus{
				types.BillingGroupStatus("ACTIVE"),
				types.BillingGroupStatus("ACTIVE"),
			},
			AutoAssociate: ptr.Bool(true),
			PrimaryAccountIds: []string{
				"__Member__",
				"__Member__",
			},
			BillingGroupTypes: []types.BillingGroupType{
				types.BillingGroupType("STANDARD"),
				types.BillingGroupType("STANDARD"),
			},
			Names: []types.StringSearch{
				{
					SearchOption: types.SearchOption("STARTS_WITH"),
					SearchValue:  ptr.String("__SearchValue__"),
				},
				{
					SearchOption: types.SearchOption("STARTS_WITH"),
					SearchValue:  ptr.String("__SearchValue__"),
				},
			},
			ResponsibilityTransferArns: []string{
				"__Member__",
				"__Member__",
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListBillingGroups(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(), "ListBillingGroups"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListCustomLineItems(t *testing.T) {
	input := &ListCustomLineItemsInput{
		BillingPeriod: ptr.String("__BillingPeriod__"),
		MaxResults:    ptr.Int32(1),
		NextToken:     ptr.String("__NextToken__"),
		Filters: &types.ListCustomLineItemsFilter{
			Names: []string{
				"__Member__",
				"__Member__",
			},
			BillingGroups: []string{
				"__Member__",
				"__Member__",
			},
			Arns: []string{
				"__Member__",
				"__Member__",
			},
			AccountIds: []string{
				"__Member__",
				"__Member__",
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListCustomLineItems(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(), "ListCustomLineItems"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListCustomLineItemVersions(t *testing.T) {
	input := &ListCustomLineItemVersionsInput{
		Arn:        ptr.String("__Arn__"),
		MaxResults: ptr.Int32(1),
		NextToken:  ptr.String("__NextToken__"),
		Filters: &types.ListCustomLineItemVersionsFilter{
			BillingPeriodRange: &types.ListCustomLineItemVersionsBillingPeriodRangeFilter{
				StartBillingPeriod: ptr.String("__StartBillingPeriod__"),
				EndBillingPeriod:   ptr.String("__EndBillingPeriod__"),
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListCustomLineItemVersions(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(), "ListCustomLineItemVersions"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListPricingPlans(t *testing.T) {
	input := &ListPricingPlansInput{
		BillingPeriod: ptr.String("__BillingPeriod__"),
		Filters: &types.ListPricingPlansFilter{
			Arns: []string{
				"__Member__",
				"__Member__",
			},
		},
		MaxResults: ptr.Int32(1),
		NextToken:  ptr.String("__NextToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListPricingPlans(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(), "ListPricingPlans"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListPricingPlansAssociatedWithPricingRule(t *testing.T) {
	input := &ListPricingPlansAssociatedWithPricingRuleInput{
		BillingPeriod:  ptr.String("__BillingPeriod__"),
		PricingRuleArn: ptr.String("__PricingRuleArn__"),
		MaxResults:     ptr.Int32(1),
		NextToken:      ptr.String("__NextToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListPricingPlansAssociatedWithPricingRule(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(), "ListPricingPlansAssociatedWithPricingRule"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListPricingRules(t *testing.T) {
	input := &ListPricingRulesInput{
		BillingPeriod: ptr.String("__BillingPeriod__"),
		Filters: &types.ListPricingRulesFilter{
			Arns: []string{
				"__Member__",
				"__Member__",
			},
		},
		MaxResults: ptr.Int32(1),
		NextToken:  ptr.String("__NextToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListPricingRules(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(), "ListPricingRules"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListPricingRulesAssociatedToPricingPlan(t *testing.T) {
	input := &ListPricingRulesAssociatedToPricingPlanInput{
		BillingPeriod:  ptr.String("__BillingPeriod__"),
		PricingPlanArn: ptr.String("__PricingPlanArn__"),
		MaxResults:     ptr.Int32(1),
		NextToken:      ptr.String("__NextToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListPricingRulesAssociatedToPricingPlan(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(), "ListPricingRulesAssociatedToPricingPlan"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_ListResourcesAssociatedToCustomLineItem(t *testing.T) {
	input := &ListResourcesAssociatedToCustomLineItemInput{
		BillingPeriod: ptr.String("__BillingPeriod__"),
		Arn:           ptr.String("__Arn__"),
		MaxResults:    ptr.Int32(1),
		NextToken:     ptr.String("__NextToken__"),
		Filters: &types.ListResourcesAssociatedToCustomLineItemFilter{
			Relationship: types.CustomLineItemRelationship("PARENT"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListResourcesAssociatedToCustomLineItem(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(), "ListResourcesAssociatedToCustomLineItem"); 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__"),
		Tags: map[string]string{
			"key0": "__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__"),
		TagKeys: []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_UpdateBillingGroup(t *testing.T) {
	input := &UpdateBillingGroupInput{
		Arn:    ptr.String("__Arn__"),
		Name:   ptr.String("__Name__"),
		Status: types.BillingGroupStatus("ACTIVE"),
		ComputationPreference: &types.ComputationPreference{
			PricingPlanArn: ptr.String("__PricingPlanArn__"),
		},
		Description: ptr.String("__Description__"),
		AccountGrouping: &types.UpdateBillingGroupAccountGrouping{
			AutoAssociate:             ptr.Bool(true),
			ResponsibilityTransferArn: ptr.String("__ResponsibilityTransferArn__"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateBillingGroup(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(), "UpdateBillingGroup"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_UpdateCustomLineItem(t *testing.T) {
	input := &UpdateCustomLineItemInput{
		Arn:         ptr.String("__Arn__"),
		Name:        ptr.String("__Name__"),
		Description: ptr.String("__Description__"),
		ChargeDetails: &types.UpdateCustomLineItemChargeDetails{
			Flat: &types.UpdateCustomLineItemFlatChargeDetails{
				ChargeValue: ptr.Float64(1.0),
			},
			Percentage: &types.UpdateCustomLineItemPercentageChargeDetails{
				PercentageValue: ptr.Float64(1.0),
			},
			LineItemFilters: []types.LineItemFilter{
				{
					Attribute:   types.LineItemFilterAttributeName("LINE_ITEM_TYPE"),
					MatchOption: types.MatchOption("NOT_EQUAL"),
					Values: []types.LineItemFilterValue{
						types.LineItemFilterValue("SAVINGS_PLAN_NEGATION"),
						types.LineItemFilterValue("SAVINGS_PLAN_NEGATION"),
					},
					AttributeValues: []string{
						"__Member__",
						"__Member__",
					},
				},
				{
					Attribute:   types.LineItemFilterAttributeName("LINE_ITEM_TYPE"),
					MatchOption: types.MatchOption("NOT_EQUAL"),
					Values: []types.LineItemFilterValue{
						types.LineItemFilterValue("SAVINGS_PLAN_NEGATION"),
						types.LineItemFilterValue("SAVINGS_PLAN_NEGATION"),
					},
					AttributeValues: []string{
						"__Member__",
						"__Member__",
					},
				},
			},
		},
		BillingPeriodRange: &types.CustomLineItemBillingPeriodRange{
			InclusiveStartBillingPeriod: ptr.String("__InclusiveStartBillingPeriod__"),
			ExclusiveEndBillingPeriod:   ptr.String("__ExclusiveEndBillingPeriod__"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateCustomLineItem(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(), "UpdateCustomLineItem"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_UpdatePricingPlan(t *testing.T) {
	input := &UpdatePricingPlanInput{
		Arn:         ptr.String("__Arn__"),
		Name:        ptr.String("__Name__"),
		Description: ptr.String("__Description__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdatePricingPlan(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(), "UpdatePricingPlan"); err != nil {
		t.Fatal(err)
	}
}

func TestCheckRequestSnapshot_UpdatePricingRule(t *testing.T) {
	input := &UpdatePricingRuleInput{
		Arn:                ptr.String("__Arn__"),
		Name:               ptr.String("__Name__"),
		Description:        ptr.String("__Description__"),
		Type:               types.PricingRuleType("MARKUP"),
		ModifierPercentage: ptr.Float64(1.0),
		Tiering: &types.UpdateTieringInput{
			FreeTier: &types.UpdateFreeTierConfig{
				Activated: ptr.Bool(true),
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdatePricingRule(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(), "UpdatePricingRule"); err != nil {
		t.Fatal(err)
	}
}
func TestUpdateRequestSnapshot_AssociateAccounts(t *testing.T) {
	input := &AssociateAccountsInput{
		Arn: ptr.String("__Arn__"),
		AccountIds: []string{
			"__Member__",
			"__Member__",
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.AssociateAccounts(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(), "AssociateAccounts"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_AssociatePricingRules(t *testing.T) {
	input := &AssociatePricingRulesInput{
		Arn: ptr.String("__Arn__"),
		PricingRuleArns: []string{
			"__Member__",
			"__Member__",
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.AssociatePricingRules(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(), "AssociatePricingRules"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_BatchAssociateResourcesToCustomLineItem(t *testing.T) {
	input := &BatchAssociateResourcesToCustomLineItemInput{
		TargetArn: ptr.String("__TargetArn__"),
		ResourceArns: []string{
			"__Member__",
			"__Member__",
		},
		BillingPeriodRange: &types.CustomLineItemBillingPeriodRange{
			InclusiveStartBillingPeriod: ptr.String("__InclusiveStartBillingPeriod__"),
			ExclusiveEndBillingPeriod:   ptr.String("__ExclusiveEndBillingPeriod__"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.BatchAssociateResourcesToCustomLineItem(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(), "BatchAssociateResourcesToCustomLineItem"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_BatchDisassociateResourcesFromCustomLineItem(t *testing.T) {
	input := &BatchDisassociateResourcesFromCustomLineItemInput{
		TargetArn: ptr.String("__TargetArn__"),
		ResourceArns: []string{
			"__Member__",
			"__Member__",
		},
		BillingPeriodRange: &types.CustomLineItemBillingPeriodRange{
			InclusiveStartBillingPeriod: ptr.String("__InclusiveStartBillingPeriod__"),
			ExclusiveEndBillingPeriod:   ptr.String("__ExclusiveEndBillingPeriod__"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.BatchDisassociateResourcesFromCustomLineItem(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(), "BatchDisassociateResourcesFromCustomLineItem"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_CreateBillingGroup(t *testing.T) {
	input := &CreateBillingGroupInput{
		ClientToken: ptr.String("__ClientToken__"),
		Name:        ptr.String("__Name__"),
		AccountGrouping: &types.AccountGrouping{
			LinkedAccountIds: []string{
				"__Member__",
				"__Member__",
			},
			AutoAssociate:             ptr.Bool(true),
			ResponsibilityTransferArn: ptr.String("__ResponsibilityTransferArn__"),
		},
		ComputationPreference: &types.ComputationPreference{
			PricingPlanArn: ptr.String("__PricingPlanArn__"),
		},
		PrimaryAccountId: ptr.String("__PrimaryAccountId__"),
		Description:      ptr.String("__Description__"),
		Tags: map[string]string{
			"key0": "__Value__",
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateBillingGroup(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(), "CreateBillingGroup"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_CreateCustomLineItem(t *testing.T) {
	input := &CreateCustomLineItemInput{
		ClientToken:     ptr.String("__ClientToken__"),
		Name:            ptr.String("__Name__"),
		Description:     ptr.String("__Description__"),
		BillingGroupArn: ptr.String("__BillingGroupArn__"),
		BillingPeriodRange: &types.CustomLineItemBillingPeriodRange{
			InclusiveStartBillingPeriod: ptr.String("__InclusiveStartBillingPeriod__"),
			ExclusiveEndBillingPeriod:   ptr.String("__ExclusiveEndBillingPeriod__"),
		},
		Tags: map[string]string{
			"key0": "__Value__",
		},
		ChargeDetails: &types.CustomLineItemChargeDetails{
			Flat: &types.CustomLineItemFlatChargeDetails{
				ChargeValue: ptr.Float64(1.0),
			},
			Percentage: &types.CustomLineItemPercentageChargeDetails{
				PercentageValue: ptr.Float64(1.0),
				AssociatedValues: []string{
					"__Member__",
					"__Member__",
				},
			},
			Type: types.CustomLineItemType("CREDIT"),
			LineItemFilters: []types.LineItemFilter{
				{
					Attribute:   types.LineItemFilterAttributeName("LINE_ITEM_TYPE"),
					MatchOption: types.MatchOption("NOT_EQUAL"),
					Values: []types.LineItemFilterValue{
						types.LineItemFilterValue("SAVINGS_PLAN_NEGATION"),
						types.LineItemFilterValue("SAVINGS_PLAN_NEGATION"),
					},
					AttributeValues: []string{
						"__Member__",
						"__Member__",
					},
				},
				{
					Attribute:   types.LineItemFilterAttributeName("LINE_ITEM_TYPE"),
					MatchOption: types.MatchOption("NOT_EQUAL"),
					Values: []types.LineItemFilterValue{
						types.LineItemFilterValue("SAVINGS_PLAN_NEGATION"),
						types.LineItemFilterValue("SAVINGS_PLAN_NEGATION"),
					},
					AttributeValues: []string{
						"__Member__",
						"__Member__",
					},
				},
			},
		},
		AccountId:       ptr.String("__AccountId__"),
		ComputationRule: types.ComputationRuleEnum("ITEMIZED"),
		PresentationDetails: &types.PresentationObject{
			Service: ptr.String("__Service__"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreateCustomLineItem(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(), "CreateCustomLineItem"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_CreatePricingPlan(t *testing.T) {
	input := &CreatePricingPlanInput{
		ClientToken: ptr.String("__ClientToken__"),
		Name:        ptr.String("__Name__"),
		Description: ptr.String("__Description__"),
		PricingRuleArns: []string{
			"__Member__",
			"__Member__",
		},
		Tags: map[string]string{
			"key0": "__Value__",
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreatePricingPlan(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(), "CreatePricingPlan"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_CreatePricingRule(t *testing.T) {
	input := &CreatePricingRuleInput{
		ClientToken:        ptr.String("__ClientToken__"),
		Name:               ptr.String("__Name__"),
		Description:        ptr.String("__Description__"),
		Scope:              types.PricingRuleScope("GLOBAL"),
		Type:               types.PricingRuleType("MARKUP"),
		ModifierPercentage: ptr.Float64(1.0),
		Service:            ptr.String("__Service__"),
		Tags: map[string]string{
			"key0": "__Value__",
		},
		BillingEntity: ptr.String("__BillingEntity__"),
		Tiering: &types.CreateTieringInput{
			FreeTier: &types.CreateFreeTierConfig{
				Activated: ptr.Bool(true),
			},
		},
		UsageType: ptr.String("__UsageType__"),
		Operation: ptr.String("__Operation__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.CreatePricingRule(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(), "CreatePricingRule"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DeleteBillingGroup(t *testing.T) {
	input := &DeleteBillingGroupInput{
		Arn: ptr.String("__Arn__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteBillingGroup(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(), "DeleteBillingGroup"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DeleteCustomLineItem(t *testing.T) {
	input := &DeleteCustomLineItemInput{
		Arn: ptr.String("__Arn__"),
		BillingPeriodRange: &types.CustomLineItemBillingPeriodRange{
			InclusiveStartBillingPeriod: ptr.String("__InclusiveStartBillingPeriod__"),
			ExclusiveEndBillingPeriod:   ptr.String("__ExclusiveEndBillingPeriod__"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeleteCustomLineItem(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(), "DeleteCustomLineItem"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DeletePricingPlan(t *testing.T) {
	input := &DeletePricingPlanInput{
		Arn: ptr.String("__Arn__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeletePricingPlan(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(), "DeletePricingPlan"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DeletePricingRule(t *testing.T) {
	input := &DeletePricingRuleInput{
		Arn: ptr.String("__Arn__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DeletePricingRule(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(), "DeletePricingRule"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DisassociateAccounts(t *testing.T) {
	input := &DisassociateAccountsInput{
		Arn: ptr.String("__Arn__"),
		AccountIds: []string{
			"__Member__",
			"__Member__",
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DisassociateAccounts(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(), "DisassociateAccounts"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_DisassociatePricingRules(t *testing.T) {
	input := &DisassociatePricingRulesInput{
		Arn: ptr.String("__Arn__"),
		PricingRuleArns: []string{
			"__Member__",
			"__Member__",
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.DisassociatePricingRules(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(), "DisassociatePricingRules"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_GetBillingGroupCostReport(t *testing.T) {
	input := &GetBillingGroupCostReportInput{
		Arn: ptr.String("__Arn__"),
		BillingPeriodRange: &types.BillingPeriodRange{
			InclusiveStartBillingPeriod: ptr.String("__InclusiveStartBillingPeriod__"),
			ExclusiveEndBillingPeriod:   ptr.String("__ExclusiveEndBillingPeriod__"),
		},
		GroupBy: []types.GroupByAttributeName{
			types.GroupByAttributeName("PRODUCT_NAME"),
			types.GroupByAttributeName("PRODUCT_NAME"),
		},
		MaxResults: ptr.Int32(1),
		NextToken:  ptr.String("__NextToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.GetBillingGroupCostReport(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(), "GetBillingGroupCostReport"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListAccountAssociations(t *testing.T) {
	input := &ListAccountAssociationsInput{
		BillingPeriod: ptr.String("__BillingPeriod__"),
		Filters: &types.ListAccountAssociationsFilter{
			Association: ptr.String("__Association__"),
			AccountId:   ptr.String("__AccountId__"),
			AccountIds: []string{
				"__Member__",
				"__Member__",
			},
		},
		NextToken: ptr.String("__NextToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListAccountAssociations(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(), "ListAccountAssociations"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListBillingGroupCostReports(t *testing.T) {
	input := &ListBillingGroupCostReportsInput{
		BillingPeriod: ptr.String("__BillingPeriod__"),
		MaxResults:    ptr.Int32(1),
		NextToken:     ptr.String("__NextToken__"),
		Filters: &types.ListBillingGroupCostReportsFilter{
			BillingGroupArns: []string{
				"__Member__",
				"__Member__",
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListBillingGroupCostReports(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(), "ListBillingGroupCostReports"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListBillingGroups(t *testing.T) {
	input := &ListBillingGroupsInput{
		BillingPeriod: ptr.String("__BillingPeriod__"),
		MaxResults:    ptr.Int32(1),
		NextToken:     ptr.String("__NextToken__"),
		Filters: &types.ListBillingGroupsFilter{
			Arns: []string{
				"__Member__",
				"__Member__",
			},
			PricingPlan: ptr.String("__PricingPlan__"),
			Statuses: []types.BillingGroupStatus{
				types.BillingGroupStatus("ACTIVE"),
				types.BillingGroupStatus("ACTIVE"),
			},
			AutoAssociate: ptr.Bool(true),
			PrimaryAccountIds: []string{
				"__Member__",
				"__Member__",
			},
			BillingGroupTypes: []types.BillingGroupType{
				types.BillingGroupType("STANDARD"),
				types.BillingGroupType("STANDARD"),
			},
			Names: []types.StringSearch{
				{
					SearchOption: types.SearchOption("STARTS_WITH"),
					SearchValue:  ptr.String("__SearchValue__"),
				},
				{
					SearchOption: types.SearchOption("STARTS_WITH"),
					SearchValue:  ptr.String("__SearchValue__"),
				},
			},
			ResponsibilityTransferArns: []string{
				"__Member__",
				"__Member__",
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListBillingGroups(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(), "ListBillingGroups"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListCustomLineItems(t *testing.T) {
	input := &ListCustomLineItemsInput{
		BillingPeriod: ptr.String("__BillingPeriod__"),
		MaxResults:    ptr.Int32(1),
		NextToken:     ptr.String("__NextToken__"),
		Filters: &types.ListCustomLineItemsFilter{
			Names: []string{
				"__Member__",
				"__Member__",
			},
			BillingGroups: []string{
				"__Member__",
				"__Member__",
			},
			Arns: []string{
				"__Member__",
				"__Member__",
			},
			AccountIds: []string{
				"__Member__",
				"__Member__",
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListCustomLineItems(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(), "ListCustomLineItems"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListCustomLineItemVersions(t *testing.T) {
	input := &ListCustomLineItemVersionsInput{
		Arn:        ptr.String("__Arn__"),
		MaxResults: ptr.Int32(1),
		NextToken:  ptr.String("__NextToken__"),
		Filters: &types.ListCustomLineItemVersionsFilter{
			BillingPeriodRange: &types.ListCustomLineItemVersionsBillingPeriodRangeFilter{
				StartBillingPeriod: ptr.String("__StartBillingPeriod__"),
				EndBillingPeriod:   ptr.String("__EndBillingPeriod__"),
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListCustomLineItemVersions(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(), "ListCustomLineItemVersions"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListPricingPlans(t *testing.T) {
	input := &ListPricingPlansInput{
		BillingPeriod: ptr.String("__BillingPeriod__"),
		Filters: &types.ListPricingPlansFilter{
			Arns: []string{
				"__Member__",
				"__Member__",
			},
		},
		MaxResults: ptr.Int32(1),
		NextToken:  ptr.String("__NextToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListPricingPlans(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(), "ListPricingPlans"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListPricingPlansAssociatedWithPricingRule(t *testing.T) {
	input := &ListPricingPlansAssociatedWithPricingRuleInput{
		BillingPeriod:  ptr.String("__BillingPeriod__"),
		PricingRuleArn: ptr.String("__PricingRuleArn__"),
		MaxResults:     ptr.Int32(1),
		NextToken:      ptr.String("__NextToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListPricingPlansAssociatedWithPricingRule(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(), "ListPricingPlansAssociatedWithPricingRule"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListPricingRules(t *testing.T) {
	input := &ListPricingRulesInput{
		BillingPeriod: ptr.String("__BillingPeriod__"),
		Filters: &types.ListPricingRulesFilter{
			Arns: []string{
				"__Member__",
				"__Member__",
			},
		},
		MaxResults: ptr.Int32(1),
		NextToken:  ptr.String("__NextToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListPricingRules(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(), "ListPricingRules"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListPricingRulesAssociatedToPricingPlan(t *testing.T) {
	input := &ListPricingRulesAssociatedToPricingPlanInput{
		BillingPeriod:  ptr.String("__BillingPeriod__"),
		PricingPlanArn: ptr.String("__PricingPlanArn__"),
		MaxResults:     ptr.Int32(1),
		NextToken:      ptr.String("__NextToken__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListPricingRulesAssociatedToPricingPlan(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(), "ListPricingRulesAssociatedToPricingPlan"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_ListResourcesAssociatedToCustomLineItem(t *testing.T) {
	input := &ListResourcesAssociatedToCustomLineItemInput{
		BillingPeriod: ptr.String("__BillingPeriod__"),
		Arn:           ptr.String("__Arn__"),
		MaxResults:    ptr.Int32(1),
		NextToken:     ptr.String("__NextToken__"),
		Filters: &types.ListResourcesAssociatedToCustomLineItemFilter{
			Relationship: types.CustomLineItemRelationship("PARENT"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.ListResourcesAssociatedToCustomLineItem(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(), "ListResourcesAssociatedToCustomLineItem"); 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__"),
		Tags: map[string]string{
			"key0": "__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__"),
		TagKeys: []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_UpdateBillingGroup(t *testing.T) {
	input := &UpdateBillingGroupInput{
		Arn:    ptr.String("__Arn__"),
		Name:   ptr.String("__Name__"),
		Status: types.BillingGroupStatus("ACTIVE"),
		ComputationPreference: &types.ComputationPreference{
			PricingPlanArn: ptr.String("__PricingPlanArn__"),
		},
		Description: ptr.String("__Description__"),
		AccountGrouping: &types.UpdateBillingGroupAccountGrouping{
			AutoAssociate:             ptr.Bool(true),
			ResponsibilityTransferArn: ptr.String("__ResponsibilityTransferArn__"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateBillingGroup(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(), "UpdateBillingGroup"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_UpdateCustomLineItem(t *testing.T) {
	input := &UpdateCustomLineItemInput{
		Arn:         ptr.String("__Arn__"),
		Name:        ptr.String("__Name__"),
		Description: ptr.String("__Description__"),
		ChargeDetails: &types.UpdateCustomLineItemChargeDetails{
			Flat: &types.UpdateCustomLineItemFlatChargeDetails{
				ChargeValue: ptr.Float64(1.0),
			},
			Percentage: &types.UpdateCustomLineItemPercentageChargeDetails{
				PercentageValue: ptr.Float64(1.0),
			},
			LineItemFilters: []types.LineItemFilter{
				{
					Attribute:   types.LineItemFilterAttributeName("LINE_ITEM_TYPE"),
					MatchOption: types.MatchOption("NOT_EQUAL"),
					Values: []types.LineItemFilterValue{
						types.LineItemFilterValue("SAVINGS_PLAN_NEGATION"),
						types.LineItemFilterValue("SAVINGS_PLAN_NEGATION"),
					},
					AttributeValues: []string{
						"__Member__",
						"__Member__",
					},
				},
				{
					Attribute:   types.LineItemFilterAttributeName("LINE_ITEM_TYPE"),
					MatchOption: types.MatchOption("NOT_EQUAL"),
					Values: []types.LineItemFilterValue{
						types.LineItemFilterValue("SAVINGS_PLAN_NEGATION"),
						types.LineItemFilterValue("SAVINGS_PLAN_NEGATION"),
					},
					AttributeValues: []string{
						"__Member__",
						"__Member__",
					},
				},
			},
		},
		BillingPeriodRange: &types.CustomLineItemBillingPeriodRange{
			InclusiveStartBillingPeriod: ptr.String("__InclusiveStartBillingPeriod__"),
			ExclusiveEndBillingPeriod:   ptr.String("__ExclusiveEndBillingPeriod__"),
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdateCustomLineItem(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(), "UpdateCustomLineItem"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_UpdatePricingPlan(t *testing.T) {
	input := &UpdatePricingPlanInput{
		Arn:         ptr.String("__Arn__"),
		Name:        ptr.String("__Name__"),
		Description: ptr.String("__Description__"),
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdatePricingPlan(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(), "UpdatePricingPlan"); err != nil {
		t.Fatal(err)
	}
}

func TestUpdateRequestSnapshot_UpdatePricingRule(t *testing.T) {
	input := &UpdatePricingRuleInput{
		Arn:                ptr.String("__Arn__"),
		Name:               ptr.String("__Name__"),
		Description:        ptr.String("__Description__"),
		Type:               types.PricingRuleType("MARKUP"),
		ModifierPercentage: ptr.Float64(1.0),
		Tiering: &types.UpdateTieringInput{
			FreeTier: &types.UpdateFreeTierConfig{
				Activated: ptr.Bool(true),
			},
		},
	}
	body := &bytes.Buffer{}
	method := ""
	rawPath := ""
	rawQuery := ""
	header := map[string][]string{}
	svc := serdeNewClient()
	_, err := svc.UpdatePricingRule(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(), "UpdatePricingRule"); err != nil {
		t.Fatal(err)
	}
}
