repo_name
stringlengths
1
52
repo_creator
stringclasses
6 values
programming_language
stringclasses
4 values
code
stringlengths
0
9.68M
num_lines
int64
1
234k
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package medialive import ( "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/medialive/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" ) type validateOpAcceptInputDeviceTransfer struct { } func (*validateOpAcceptInputDeviceTransfer) ID() string { return "OperationInputValidation" } func (m *validateOpAcceptInputDeviceTransfer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*AcceptInputDeviceTransferInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpAcceptInputDeviceTransferInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpBatchUpdateSchedule struct { } func (*validateOpBatchUpdateSchedule) ID() string { return "OperationInputValidation" } func (m *validateOpBatchUpdateSchedule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*BatchUpdateScheduleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpBatchUpdateScheduleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCancelInputDeviceTransfer struct { } func (*validateOpCancelInputDeviceTransfer) ID() string { return "OperationInputValidation" } func (m *validateOpCancelInputDeviceTransfer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CancelInputDeviceTransferInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCancelInputDeviceTransferInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateChannel struct { } func (*validateOpCreateChannel) ID() string { return "OperationInputValidation" } func (m *validateOpCreateChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateChannelInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateChannelInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateInput struct { } func (*validateOpCreateInput) ID() string { return "OperationInputValidation" } func (m *validateOpCreateInput) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateInputInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateInputInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateMultiplex struct { } func (*validateOpCreateMultiplex) ID() string { return "OperationInputValidation" } func (m *validateOpCreateMultiplex) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateMultiplexInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateMultiplexInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateMultiplexProgram struct { } func (*validateOpCreateMultiplexProgram) ID() string { return "OperationInputValidation" } func (m *validateOpCreateMultiplexProgram) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateMultiplexProgramInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateMultiplexProgramInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreatePartnerInput struct { } func (*validateOpCreatePartnerInput) ID() string { return "OperationInputValidation" } func (m *validateOpCreatePartnerInput) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreatePartnerInputInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreatePartnerInputInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateTags struct { } func (*validateOpCreateTags) ID() string { return "OperationInputValidation" } func (m *validateOpCreateTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateTagsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateTagsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteChannel struct { } func (*validateOpDeleteChannel) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteChannelInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteChannelInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteInput struct { } func (*validateOpDeleteInput) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteInput) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteInputInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteInputInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteInputSecurityGroup struct { } func (*validateOpDeleteInputSecurityGroup) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteInputSecurityGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteInputSecurityGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteInputSecurityGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteMultiplex struct { } func (*validateOpDeleteMultiplex) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteMultiplex) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteMultiplexInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteMultiplexInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteMultiplexProgram struct { } func (*validateOpDeleteMultiplexProgram) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteMultiplexProgram) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteMultiplexProgramInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteMultiplexProgramInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteReservation struct { } func (*validateOpDeleteReservation) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteReservation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteReservationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteReservationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteSchedule struct { } func (*validateOpDeleteSchedule) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteSchedule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteScheduleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteScheduleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteTags struct { } func (*validateOpDeleteTags) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteTagsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteTagsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeChannel struct { } func (*validateOpDescribeChannel) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeChannelInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeChannelInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeInputDevice struct { } func (*validateOpDescribeInputDevice) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeInputDevice) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeInputDeviceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeInputDeviceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeInputDeviceThumbnail struct { } func (*validateOpDescribeInputDeviceThumbnail) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeInputDeviceThumbnail) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeInputDeviceThumbnailInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeInputDeviceThumbnailInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeInput struct { } func (*validateOpDescribeInput) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeInput) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeInputInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeInputInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeInputSecurityGroup struct { } func (*validateOpDescribeInputSecurityGroup) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeInputSecurityGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeInputSecurityGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeInputSecurityGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeMultiplex struct { } func (*validateOpDescribeMultiplex) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeMultiplex) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeMultiplexInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeMultiplexInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeMultiplexProgram struct { } func (*validateOpDescribeMultiplexProgram) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeMultiplexProgram) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeMultiplexProgramInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeMultiplexProgramInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeOffering struct { } func (*validateOpDescribeOffering) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeOffering) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeOfferingInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeOfferingInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeReservation struct { } func (*validateOpDescribeReservation) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeReservation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeReservationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeReservationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeSchedule struct { } func (*validateOpDescribeSchedule) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeSchedule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeScheduleInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeScheduleInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListInputDeviceTransfers struct { } func (*validateOpListInputDeviceTransfers) ID() string { return "OperationInputValidation" } func (m *validateOpListInputDeviceTransfers) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListInputDeviceTransfersInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListInputDeviceTransfersInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListMultiplexPrograms struct { } func (*validateOpListMultiplexPrograms) ID() string { return "OperationInputValidation" } func (m *validateOpListMultiplexPrograms) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListMultiplexProgramsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListMultiplexProgramsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListTagsForResource struct { } func (*validateOpListTagsForResource) ID() string { return "OperationInputValidation" } func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListTagsForResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListTagsForResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpPurchaseOffering struct { } func (*validateOpPurchaseOffering) ID() string { return "OperationInputValidation" } func (m *validateOpPurchaseOffering) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*PurchaseOfferingInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpPurchaseOfferingInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpRebootInputDevice struct { } func (*validateOpRebootInputDevice) ID() string { return "OperationInputValidation" } func (m *validateOpRebootInputDevice) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*RebootInputDeviceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpRebootInputDeviceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpRejectInputDeviceTransfer struct { } func (*validateOpRejectInputDeviceTransfer) ID() string { return "OperationInputValidation" } func (m *validateOpRejectInputDeviceTransfer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*RejectInputDeviceTransferInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpRejectInputDeviceTransferInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpStartChannel struct { } func (*validateOpStartChannel) ID() string { return "OperationInputValidation" } func (m *validateOpStartChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*StartChannelInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpStartChannelInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpStartInputDeviceMaintenanceWindow struct { } func (*validateOpStartInputDeviceMaintenanceWindow) ID() string { return "OperationInputValidation" } func (m *validateOpStartInputDeviceMaintenanceWindow) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*StartInputDeviceMaintenanceWindowInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpStartInputDeviceMaintenanceWindowInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpStartMultiplex struct { } func (*validateOpStartMultiplex) ID() string { return "OperationInputValidation" } func (m *validateOpStartMultiplex) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*StartMultiplexInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpStartMultiplexInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpStopChannel struct { } func (*validateOpStopChannel) ID() string { return "OperationInputValidation" } func (m *validateOpStopChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*StopChannelInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpStopChannelInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpStopMultiplex struct { } func (*validateOpStopMultiplex) ID() string { return "OperationInputValidation" } func (m *validateOpStopMultiplex) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*StopMultiplexInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpStopMultiplexInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpTransferInputDevice struct { } func (*validateOpTransferInputDevice) ID() string { return "OperationInputValidation" } func (m *validateOpTransferInputDevice) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*TransferInputDeviceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpTransferInputDeviceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateChannelClass struct { } func (*validateOpUpdateChannelClass) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateChannelClass) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateChannelClassInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateChannelClassInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateChannel struct { } func (*validateOpUpdateChannel) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateChannelInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateChannelInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateInputDevice struct { } func (*validateOpUpdateInputDevice) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateInputDevice) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateInputDeviceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateInputDeviceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateInput struct { } func (*validateOpUpdateInput) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateInput) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateInputInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateInputInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateInputSecurityGroup struct { } func (*validateOpUpdateInputSecurityGroup) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateInputSecurityGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateInputSecurityGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateInputSecurityGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateMultiplex struct { } func (*validateOpUpdateMultiplex) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateMultiplex) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateMultiplexInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateMultiplexInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateMultiplexProgram struct { } func (*validateOpUpdateMultiplexProgram) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateMultiplexProgram) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateMultiplexProgramInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateMultiplexProgramInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateReservation struct { } func (*validateOpUpdateReservation) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateReservation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateReservationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateReservationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } func addOpAcceptInputDeviceTransferValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAcceptInputDeviceTransfer{}, middleware.After) } func addOpBatchUpdateScheduleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpBatchUpdateSchedule{}, middleware.After) } func addOpCancelInputDeviceTransferValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCancelInputDeviceTransfer{}, middleware.After) } func addOpCreateChannelValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateChannel{}, middleware.After) } func addOpCreateInputValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateInput{}, middleware.After) } func addOpCreateMultiplexValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateMultiplex{}, middleware.After) } func addOpCreateMultiplexProgramValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateMultiplexProgram{}, middleware.After) } func addOpCreatePartnerInputValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreatePartnerInput{}, middleware.After) } func addOpCreateTagsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateTags{}, middleware.After) } func addOpDeleteChannelValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteChannel{}, middleware.After) } func addOpDeleteInputValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteInput{}, middleware.After) } func addOpDeleteInputSecurityGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteInputSecurityGroup{}, middleware.After) } func addOpDeleteMultiplexValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteMultiplex{}, middleware.After) } func addOpDeleteMultiplexProgramValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteMultiplexProgram{}, middleware.After) } func addOpDeleteReservationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteReservation{}, middleware.After) } func addOpDeleteScheduleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteSchedule{}, middleware.After) } func addOpDeleteTagsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteTags{}, middleware.After) } func addOpDescribeChannelValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeChannel{}, middleware.After) } func addOpDescribeInputDeviceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeInputDevice{}, middleware.After) } func addOpDescribeInputDeviceThumbnailValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeInputDeviceThumbnail{}, middleware.After) } func addOpDescribeInputValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeInput{}, middleware.After) } func addOpDescribeInputSecurityGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeInputSecurityGroup{}, middleware.After) } func addOpDescribeMultiplexValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeMultiplex{}, middleware.After) } func addOpDescribeMultiplexProgramValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeMultiplexProgram{}, middleware.After) } func addOpDescribeOfferingValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeOffering{}, middleware.After) } func addOpDescribeReservationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeReservation{}, middleware.After) } func addOpDescribeScheduleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeSchedule{}, middleware.After) } func addOpListInputDeviceTransfersValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListInputDeviceTransfers{}, middleware.After) } func addOpListMultiplexProgramsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListMultiplexPrograms{}, middleware.After) } func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } func addOpPurchaseOfferingValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPurchaseOffering{}, middleware.After) } func addOpRebootInputDeviceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRebootInputDevice{}, middleware.After) } func addOpRejectInputDeviceTransferValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRejectInputDeviceTransfer{}, middleware.After) } func addOpStartChannelValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartChannel{}, middleware.After) } func addOpStartInputDeviceMaintenanceWindowValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartInputDeviceMaintenanceWindow{}, middleware.After) } func addOpStartMultiplexValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartMultiplex{}, middleware.After) } func addOpStopChannelValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStopChannel{}, middleware.After) } func addOpStopMultiplexValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStopMultiplex{}, middleware.After) } func addOpTransferInputDeviceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTransferInputDevice{}, middleware.After) } func addOpUpdateChannelClassValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateChannelClass{}, middleware.After) } func addOpUpdateChannelValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateChannel{}, middleware.After) } func addOpUpdateInputDeviceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateInputDevice{}, middleware.After) } func addOpUpdateInputValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateInput{}, middleware.After) } func addOpUpdateInputSecurityGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateInputSecurityGroup{}, middleware.After) } func addOpUpdateMultiplexValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateMultiplex{}, middleware.After) } func addOpUpdateMultiplexProgramValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateMultiplexProgram{}, middleware.After) } func addOpUpdateReservationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateReservation{}, middleware.After) } func validate__listOfAudioChannelMapping(v []types.AudioChannelMapping) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListOfAudioChannelMapping"} for i := range v { if err := validateAudioChannelMapping(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validate__listOfAudioDescription(v []types.AudioDescription) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListOfAudioDescription"} for i := range v { if err := validateAudioDescription(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validate__listOfAudioSelector(v []types.AudioSelector) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListOfAudioSelector"} for i := range v { if err := validateAudioSelector(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validate__listOfAudioTrack(v []types.AudioTrack) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListOfAudioTrack"} for i := range v { if err := validateAudioTrack(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validate__listOfCaptionDescription(v []types.CaptionDescription) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListOfCaptionDescription"} for i := range v { if err := validateCaptionDescription(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validate__listOfCaptionLanguageMapping(v []types.CaptionLanguageMapping) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListOfCaptionLanguageMapping"} for i := range v { if err := validateCaptionLanguageMapping(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validate__listOfCaptionSelector(v []types.CaptionSelector) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListOfCaptionSelector"} for i := range v { if err := validateCaptionSelector(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validate__listOfFailoverCondition(v []types.FailoverCondition) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListOfFailoverCondition"} for i := range v { if err := validateFailoverCondition(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validate__listOfInputAttachment(v []types.InputAttachment) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListOfInputAttachment"} for i := range v { if err := validateInputAttachment(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validate__listOfInputChannelLevel(v []types.InputChannelLevel) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListOfInputChannelLevel"} for i := range v { if err := validateInputChannelLevel(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validate__listOfOutput(v []types.Output) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListOfOutput"} for i := range v { if err := validateOutput(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validate__listOfOutputGroup(v []types.OutputGroup) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListOfOutputGroup"} for i := range v { if err := validateOutputGroup(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validate__listOfPipelinePauseStateSettings(v []types.PipelinePauseStateSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListOfPipelinePauseStateSettings"} for i := range v { if err := validatePipelinePauseStateSettings(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validate__listOfScheduleAction(v []types.ScheduleAction) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListOfScheduleAction"} for i := range v { if err := validateScheduleAction(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validate__listOfScte35Descriptor(v []types.Scte35Descriptor) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListOfScte35Descriptor"} for i := range v { if err := validateScte35Descriptor(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validate__listOfVideoDescription(v []types.VideoDescription) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListOfVideoDescription"} for i := range v { if err := validateVideoDescription(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateArchiveContainerSettings(v *types.ArchiveContainerSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ArchiveContainerSettings"} if v.M2tsSettings != nil { if err := validateM2tsSettings(v.M2tsSettings); err != nil { invalidParams.AddNested("M2tsSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateArchiveGroupSettings(v *types.ArchiveGroupSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ArchiveGroupSettings"} if v.Destination == nil { invalidParams.Add(smithy.NewErrParamRequired("Destination")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateArchiveOutputSettings(v *types.ArchiveOutputSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ArchiveOutputSettings"} if v.ContainerSettings == nil { invalidParams.Add(smithy.NewErrParamRequired("ContainerSettings")) } else if v.ContainerSettings != nil { if err := validateArchiveContainerSettings(v.ContainerSettings); err != nil { invalidParams.AddNested("ContainerSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateAudioChannelMapping(v *types.AudioChannelMapping) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AudioChannelMapping"} if v.InputChannelLevels == nil { invalidParams.Add(smithy.NewErrParamRequired("InputChannelLevels")) } else if v.InputChannelLevels != nil { if err := validate__listOfInputChannelLevel(v.InputChannelLevels); err != nil { invalidParams.AddNested("InputChannelLevels", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateAudioDescription(v *types.AudioDescription) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AudioDescription"} if v.AudioSelectorName == nil { invalidParams.Add(smithy.NewErrParamRequired("AudioSelectorName")) } if v.AudioWatermarkingSettings != nil { if err := validateAudioWatermarkSettings(v.AudioWatermarkingSettings); err != nil { invalidParams.AddNested("AudioWatermarkingSettings", err.(smithy.InvalidParamsError)) } } if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.RemixSettings != nil { if err := validateRemixSettings(v.RemixSettings); err != nil { invalidParams.AddNested("RemixSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateAudioDolbyEDecode(v *types.AudioDolbyEDecode) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AudioDolbyEDecode"} if len(v.ProgramSelection) == 0 { invalidParams.Add(smithy.NewErrParamRequired("ProgramSelection")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateAudioHlsRenditionSelection(v *types.AudioHlsRenditionSelection) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AudioHlsRenditionSelection"} if v.GroupId == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupId")) } if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateAudioLanguageSelection(v *types.AudioLanguageSelection) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AudioLanguageSelection"} if v.LanguageCode == nil { invalidParams.Add(smithy.NewErrParamRequired("LanguageCode")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateAudioOnlyHlsSettings(v *types.AudioOnlyHlsSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AudioOnlyHlsSettings"} if v.AudioOnlyImage != nil { if err := validateInputLocation(v.AudioOnlyImage); err != nil { invalidParams.AddNested("AudioOnlyImage", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateAudioPidSelection(v *types.AudioPidSelection) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AudioPidSelection"} if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateAudioSelector(v *types.AudioSelector) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AudioSelector"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.SelectorSettings != nil { if err := validateAudioSelectorSettings(v.SelectorSettings); err != nil { invalidParams.AddNested("SelectorSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateAudioSelectorSettings(v *types.AudioSelectorSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AudioSelectorSettings"} if v.AudioHlsRenditionSelection != nil { if err := validateAudioHlsRenditionSelection(v.AudioHlsRenditionSelection); err != nil { invalidParams.AddNested("AudioHlsRenditionSelection", err.(smithy.InvalidParamsError)) } } if v.AudioLanguageSelection != nil { if err := validateAudioLanguageSelection(v.AudioLanguageSelection); err != nil { invalidParams.AddNested("AudioLanguageSelection", err.(smithy.InvalidParamsError)) } } if v.AudioPidSelection != nil { if err := validateAudioPidSelection(v.AudioPidSelection); err != nil { invalidParams.AddNested("AudioPidSelection", err.(smithy.InvalidParamsError)) } } if v.AudioTrackSelection != nil { if err := validateAudioTrackSelection(v.AudioTrackSelection); err != nil { invalidParams.AddNested("AudioTrackSelection", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateAudioSilenceFailoverSettings(v *types.AudioSilenceFailoverSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AudioSilenceFailoverSettings"} if v.AudioSelectorName == nil { invalidParams.Add(smithy.NewErrParamRequired("AudioSelectorName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateAudioTrack(v *types.AudioTrack) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AudioTrack"} if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateAudioTrackSelection(v *types.AudioTrackSelection) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AudioTrackSelection"} if v.Tracks == nil { invalidParams.Add(smithy.NewErrParamRequired("Tracks")) } else if v.Tracks != nil { if err := validate__listOfAudioTrack(v.Tracks); err != nil { invalidParams.AddNested("Tracks", err.(smithy.InvalidParamsError)) } } if v.DolbyEDecode != nil { if err := validateAudioDolbyEDecode(v.DolbyEDecode); err != nil { invalidParams.AddNested("DolbyEDecode", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateAudioWatermarkSettings(v *types.AudioWatermarkSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AudioWatermarkSettings"} if v.NielsenWatermarksSettings != nil { if err := validateNielsenWatermarksSettings(v.NielsenWatermarksSettings); err != nil { invalidParams.AddNested("NielsenWatermarksSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateAutomaticInputFailoverSettings(v *types.AutomaticInputFailoverSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AutomaticInputFailoverSettings"} if v.FailoverConditions != nil { if err := validate__listOfFailoverCondition(v.FailoverConditions); err != nil { invalidParams.AddNested("FailoverConditions", err.(smithy.InvalidParamsError)) } } if v.SecondaryInputId == nil { invalidParams.Add(smithy.NewErrParamRequired("SecondaryInputId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateAvailBlanking(v *types.AvailBlanking) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AvailBlanking"} if v.AvailBlankingImage != nil { if err := validateInputLocation(v.AvailBlankingImage); err != nil { invalidParams.AddNested("AvailBlankingImage", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateAvailConfiguration(v *types.AvailConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AvailConfiguration"} if v.AvailSettings != nil { if err := validateAvailSettings(v.AvailSettings); err != nil { invalidParams.AddNested("AvailSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateAvailSettings(v *types.AvailSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AvailSettings"} if v.Esam != nil { if err := validateEsam(v.Esam); err != nil { invalidParams.AddNested("Esam", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateBatchScheduleActionCreateRequest(v *types.BatchScheduleActionCreateRequest) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "BatchScheduleActionCreateRequest"} if v.ScheduleActions == nil { invalidParams.Add(smithy.NewErrParamRequired("ScheduleActions")) } else if v.ScheduleActions != nil { if err := validate__listOfScheduleAction(v.ScheduleActions); err != nil { invalidParams.AddNested("ScheduleActions", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateBatchScheduleActionDeleteRequest(v *types.BatchScheduleActionDeleteRequest) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "BatchScheduleActionDeleteRequest"} if v.ActionNames == nil { invalidParams.Add(smithy.NewErrParamRequired("ActionNames")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateBlackoutSlate(v *types.BlackoutSlate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "BlackoutSlate"} if v.BlackoutSlateImage != nil { if err := validateInputLocation(v.BlackoutSlateImage); err != nil { invalidParams.AddNested("BlackoutSlateImage", err.(smithy.InvalidParamsError)) } } if v.NetworkEndBlackoutImage != nil { if err := validateInputLocation(v.NetworkEndBlackoutImage); err != nil { invalidParams.AddNested("NetworkEndBlackoutImage", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateBurnInDestinationSettings(v *types.BurnInDestinationSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "BurnInDestinationSettings"} if v.Font != nil { if err := validateInputLocation(v.Font); err != nil { invalidParams.AddNested("Font", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateCaptionDescription(v *types.CaptionDescription) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CaptionDescription"} if v.CaptionSelectorName == nil { invalidParams.Add(smithy.NewErrParamRequired("CaptionSelectorName")) } if v.DestinationSettings != nil { if err := validateCaptionDestinationSettings(v.DestinationSettings); err != nil { invalidParams.AddNested("DestinationSettings", err.(smithy.InvalidParamsError)) } } if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateCaptionDestinationSettings(v *types.CaptionDestinationSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CaptionDestinationSettings"} if v.BurnInDestinationSettings != nil { if err := validateBurnInDestinationSettings(v.BurnInDestinationSettings); err != nil { invalidParams.AddNested("BurnInDestinationSettings", err.(smithy.InvalidParamsError)) } } if v.DvbSubDestinationSettings != nil { if err := validateDvbSubDestinationSettings(v.DvbSubDestinationSettings); err != nil { invalidParams.AddNested("DvbSubDestinationSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateCaptionLanguageMapping(v *types.CaptionLanguageMapping) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CaptionLanguageMapping"} if v.LanguageCode == nil { invalidParams.Add(smithy.NewErrParamRequired("LanguageCode")) } if v.LanguageDescription == nil { invalidParams.Add(smithy.NewErrParamRequired("LanguageDescription")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateCaptionRectangle(v *types.CaptionRectangle) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CaptionRectangle"} if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateCaptionSelector(v *types.CaptionSelector) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CaptionSelector"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.SelectorSettings != nil { if err := validateCaptionSelectorSettings(v.SelectorSettings); err != nil { invalidParams.AddNested("SelectorSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateCaptionSelectorSettings(v *types.CaptionSelectorSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CaptionSelectorSettings"} if v.TeletextSourceSettings != nil { if err := validateTeletextSourceSettings(v.TeletextSourceSettings); err != nil { invalidParams.AddNested("TeletextSourceSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateDvbNitSettings(v *types.DvbNitSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DvbNitSettings"} if v.NetworkName == nil { invalidParams.Add(smithy.NewErrParamRequired("NetworkName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateDvbSubDestinationSettings(v *types.DvbSubDestinationSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DvbSubDestinationSettings"} if v.Font != nil { if err := validateInputLocation(v.Font); err != nil { invalidParams.AddNested("Font", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateEncoderSettings(v *types.EncoderSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "EncoderSettings"} if v.AudioDescriptions == nil { invalidParams.Add(smithy.NewErrParamRequired("AudioDescriptions")) } else if v.AudioDescriptions != nil { if err := validate__listOfAudioDescription(v.AudioDescriptions); err != nil { invalidParams.AddNested("AudioDescriptions", err.(smithy.InvalidParamsError)) } } if v.AvailBlanking != nil { if err := validateAvailBlanking(v.AvailBlanking); err != nil { invalidParams.AddNested("AvailBlanking", err.(smithy.InvalidParamsError)) } } if v.AvailConfiguration != nil { if err := validateAvailConfiguration(v.AvailConfiguration); err != nil { invalidParams.AddNested("AvailConfiguration", err.(smithy.InvalidParamsError)) } } if v.BlackoutSlate != nil { if err := validateBlackoutSlate(v.BlackoutSlate); err != nil { invalidParams.AddNested("BlackoutSlate", err.(smithy.InvalidParamsError)) } } if v.CaptionDescriptions != nil { if err := validate__listOfCaptionDescription(v.CaptionDescriptions); err != nil { invalidParams.AddNested("CaptionDescriptions", err.(smithy.InvalidParamsError)) } } if v.GlobalConfiguration != nil { if err := validateGlobalConfiguration(v.GlobalConfiguration); err != nil { invalidParams.AddNested("GlobalConfiguration", err.(smithy.InvalidParamsError)) } } if v.MotionGraphicsConfiguration != nil { if err := validateMotionGraphicsConfiguration(v.MotionGraphicsConfiguration); err != nil { invalidParams.AddNested("MotionGraphicsConfiguration", err.(smithy.InvalidParamsError)) } } if v.OutputGroups == nil { invalidParams.Add(smithy.NewErrParamRequired("OutputGroups")) } else if v.OutputGroups != nil { if err := validate__listOfOutputGroup(v.OutputGroups); err != nil { invalidParams.AddNested("OutputGroups", err.(smithy.InvalidParamsError)) } } if v.TimecodeConfig == nil { invalidParams.Add(smithy.NewErrParamRequired("TimecodeConfig")) } else if v.TimecodeConfig != nil { if err := validateTimecodeConfig(v.TimecodeConfig); err != nil { invalidParams.AddNested("TimecodeConfig", err.(smithy.InvalidParamsError)) } } if v.VideoDescriptions == nil { invalidParams.Add(smithy.NewErrParamRequired("VideoDescriptions")) } else if v.VideoDescriptions != nil { if err := validate__listOfVideoDescription(v.VideoDescriptions); err != nil { invalidParams.AddNested("VideoDescriptions", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateEsam(v *types.Esam) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Esam"} if v.AcquisitionPointId == nil { invalidParams.Add(smithy.NewErrParamRequired("AcquisitionPointId")) } if v.PoisEndpoint == nil { invalidParams.Add(smithy.NewErrParamRequired("PoisEndpoint")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateFailoverCondition(v *types.FailoverCondition) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "FailoverCondition"} if v.FailoverConditionSettings != nil { if err := validateFailoverConditionSettings(v.FailoverConditionSettings); err != nil { invalidParams.AddNested("FailoverConditionSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateFailoverConditionSettings(v *types.FailoverConditionSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "FailoverConditionSettings"} if v.AudioSilenceSettings != nil { if err := validateAudioSilenceFailoverSettings(v.AudioSilenceSettings); err != nil { invalidParams.AddNested("AudioSilenceSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateFixedModeScheduleActionStartSettings(v *types.FixedModeScheduleActionStartSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "FixedModeScheduleActionStartSettings"} if v.Time == nil { invalidParams.Add(smithy.NewErrParamRequired("Time")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateFollowModeScheduleActionStartSettings(v *types.FollowModeScheduleActionStartSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "FollowModeScheduleActionStartSettings"} if len(v.FollowPoint) == 0 { invalidParams.Add(smithy.NewErrParamRequired("FollowPoint")) } if v.ReferenceActionName == nil { invalidParams.Add(smithy.NewErrParamRequired("ReferenceActionName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateFrameCaptureGroupSettings(v *types.FrameCaptureGroupSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "FrameCaptureGroupSettings"} if v.Destination == nil { invalidParams.Add(smithy.NewErrParamRequired("Destination")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateFrameCaptureSettings(v *types.FrameCaptureSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "FrameCaptureSettings"} if v.TimecodeBurninSettings != nil { if err := validateTimecodeBurninSettings(v.TimecodeBurninSettings); err != nil { invalidParams.AddNested("TimecodeBurninSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateGlobalConfiguration(v *types.GlobalConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GlobalConfiguration"} if v.InputLossBehavior != nil { if err := validateInputLossBehavior(v.InputLossBehavior); err != nil { invalidParams.AddNested("InputLossBehavior", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateH264Settings(v *types.H264Settings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "H264Settings"} if v.TimecodeBurninSettings != nil { if err := validateTimecodeBurninSettings(v.TimecodeBurninSettings); err != nil { invalidParams.AddNested("TimecodeBurninSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateH265Settings(v *types.H265Settings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "H265Settings"} if v.TimecodeBurninSettings != nil { if err := validateTimecodeBurninSettings(v.TimecodeBurninSettings); err != nil { invalidParams.AddNested("TimecodeBurninSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateHlsGroupSettings(v *types.HlsGroupSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "HlsGroupSettings"} if v.CaptionLanguageMappings != nil { if err := validate__listOfCaptionLanguageMapping(v.CaptionLanguageMappings); err != nil { invalidParams.AddNested("CaptionLanguageMappings", err.(smithy.InvalidParamsError)) } } if v.Destination == nil { invalidParams.Add(smithy.NewErrParamRequired("Destination")) } if v.KeyProviderSettings != nil { if err := validateKeyProviderSettings(v.KeyProviderSettings); err != nil { invalidParams.AddNested("KeyProviderSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateHlsOutputSettings(v *types.HlsOutputSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "HlsOutputSettings"} if v.HlsSettings == nil { invalidParams.Add(smithy.NewErrParamRequired("HlsSettings")) } else if v.HlsSettings != nil { if err := validateHlsSettings(v.HlsSettings); err != nil { invalidParams.AddNested("HlsSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateHlsSettings(v *types.HlsSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "HlsSettings"} if v.AudioOnlyHlsSettings != nil { if err := validateAudioOnlyHlsSettings(v.AudioOnlyHlsSettings); err != nil { invalidParams.AddNested("AudioOnlyHlsSettings", err.(smithy.InvalidParamsError)) } } if v.StandardHlsSettings != nil { if err := validateStandardHlsSettings(v.StandardHlsSettings); err != nil { invalidParams.AddNested("StandardHlsSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateHlsTimedMetadataScheduleActionSettings(v *types.HlsTimedMetadataScheduleActionSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "HlsTimedMetadataScheduleActionSettings"} if v.Id3 == nil { invalidParams.Add(smithy.NewErrParamRequired("Id3")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateInputAttachment(v *types.InputAttachment) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "InputAttachment"} if v.AutomaticInputFailoverSettings != nil { if err := validateAutomaticInputFailoverSettings(v.AutomaticInputFailoverSettings); err != nil { invalidParams.AddNested("AutomaticInputFailoverSettings", err.(smithy.InvalidParamsError)) } } if v.InputSettings != nil { if err := validateInputSettings(v.InputSettings); err != nil { invalidParams.AddNested("InputSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateInputChannelLevel(v *types.InputChannelLevel) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "InputChannelLevel"} if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateInputClippingSettings(v *types.InputClippingSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "InputClippingSettings"} if len(v.InputTimecodeSource) == 0 { invalidParams.Add(smithy.NewErrParamRequired("InputTimecodeSource")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateInputLocation(v *types.InputLocation) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "InputLocation"} if v.Uri == nil { invalidParams.Add(smithy.NewErrParamRequired("Uri")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateInputLossBehavior(v *types.InputLossBehavior) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "InputLossBehavior"} if v.InputLossImageSlate != nil { if err := validateInputLocation(v.InputLossImageSlate); err != nil { invalidParams.AddNested("InputLossImageSlate", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateInputPrepareScheduleActionSettings(v *types.InputPrepareScheduleActionSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "InputPrepareScheduleActionSettings"} if v.InputClippingSettings != nil { if err := validateInputClippingSettings(v.InputClippingSettings); err != nil { invalidParams.AddNested("InputClippingSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateInputSettings(v *types.InputSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "InputSettings"} if v.AudioSelectors != nil { if err := validate__listOfAudioSelector(v.AudioSelectors); err != nil { invalidParams.AddNested("AudioSelectors", err.(smithy.InvalidParamsError)) } } if v.CaptionSelectors != nil { if err := validate__listOfCaptionSelector(v.CaptionSelectors); err != nil { invalidParams.AddNested("CaptionSelectors", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateInputSwitchScheduleActionSettings(v *types.InputSwitchScheduleActionSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "InputSwitchScheduleActionSettings"} if v.InputAttachmentNameReference == nil { invalidParams.Add(smithy.NewErrParamRequired("InputAttachmentNameReference")) } if v.InputClippingSettings != nil { if err := validateInputClippingSettings(v.InputClippingSettings); err != nil { invalidParams.AddNested("InputClippingSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateInputVpcRequest(v *types.InputVpcRequest) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "InputVpcRequest"} if v.SubnetIds == nil { invalidParams.Add(smithy.NewErrParamRequired("SubnetIds")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateKeyProviderSettings(v *types.KeyProviderSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "KeyProviderSettings"} if v.StaticKeySettings != nil { if err := validateStaticKeySettings(v.StaticKeySettings); err != nil { invalidParams.AddNested("StaticKeySettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateM2tsSettings(v *types.M2tsSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "M2tsSettings"} if v.DvbNitSettings != nil { if err := validateDvbNitSettings(v.DvbNitSettings); err != nil { invalidParams.AddNested("DvbNitSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateMediaPackageGroupSettings(v *types.MediaPackageGroupSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "MediaPackageGroupSettings"} if v.Destination == nil { invalidParams.Add(smithy.NewErrParamRequired("Destination")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateMotionGraphicsConfiguration(v *types.MotionGraphicsConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "MotionGraphicsConfiguration"} if v.MotionGraphicsSettings == nil { invalidParams.Add(smithy.NewErrParamRequired("MotionGraphicsSettings")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateMpeg2Settings(v *types.Mpeg2Settings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Mpeg2Settings"} if v.TimecodeBurninSettings != nil { if err := validateTimecodeBurninSettings(v.TimecodeBurninSettings); err != nil { invalidParams.AddNested("TimecodeBurninSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateMsSmoothGroupSettings(v *types.MsSmoothGroupSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "MsSmoothGroupSettings"} if v.Destination == nil { invalidParams.Add(smithy.NewErrParamRequired("Destination")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateMultiplexOutputSettings(v *types.MultiplexOutputSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "MultiplexOutputSettings"} if v.Destination == nil { invalidParams.Add(smithy.NewErrParamRequired("Destination")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateMultiplexProgramServiceDescriptor(v *types.MultiplexProgramServiceDescriptor) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "MultiplexProgramServiceDescriptor"} if v.ProviderName == nil { invalidParams.Add(smithy.NewErrParamRequired("ProviderName")) } if v.ServiceName == nil { invalidParams.Add(smithy.NewErrParamRequired("ServiceName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateMultiplexProgramSettings(v *types.MultiplexProgramSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "MultiplexProgramSettings"} if v.ServiceDescriptor != nil { if err := validateMultiplexProgramServiceDescriptor(v.ServiceDescriptor); err != nil { invalidParams.AddNested("ServiceDescriptor", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateMultiplexSettings(v *types.MultiplexSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "MultiplexSettings"} if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateNielsenCBET(v *types.NielsenCBET) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "NielsenCBET"} if v.CbetCheckDigitString == nil { invalidParams.Add(smithy.NewErrParamRequired("CbetCheckDigitString")) } if len(v.CbetStepaside) == 0 { invalidParams.Add(smithy.NewErrParamRequired("CbetStepaside")) } if v.Csid == nil { invalidParams.Add(smithy.NewErrParamRequired("Csid")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateNielsenNaesIiNw(v *types.NielsenNaesIiNw) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "NielsenNaesIiNw"} if v.CheckDigitString == nil { invalidParams.Add(smithy.NewErrParamRequired("CheckDigitString")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateNielsenWatermarksSettings(v *types.NielsenWatermarksSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "NielsenWatermarksSettings"} if v.NielsenCbetSettings != nil { if err := validateNielsenCBET(v.NielsenCbetSettings); err != nil { invalidParams.AddNested("NielsenCbetSettings", err.(smithy.InvalidParamsError)) } } if v.NielsenNaesIiNwSettings != nil { if err := validateNielsenNaesIiNw(v.NielsenNaesIiNwSettings); err != nil { invalidParams.AddNested("NielsenNaesIiNwSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOutput(v *types.Output) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Output"} if v.OutputSettings == nil { invalidParams.Add(smithy.NewErrParamRequired("OutputSettings")) } else if v.OutputSettings != nil { if err := validateOutputSettings(v.OutputSettings); err != nil { invalidParams.AddNested("OutputSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOutputGroup(v *types.OutputGroup) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "OutputGroup"} if v.OutputGroupSettings == nil { invalidParams.Add(smithy.NewErrParamRequired("OutputGroupSettings")) } else if v.OutputGroupSettings != nil { if err := validateOutputGroupSettings(v.OutputGroupSettings); err != nil { invalidParams.AddNested("OutputGroupSettings", err.(smithy.InvalidParamsError)) } } if v.Outputs == nil { invalidParams.Add(smithy.NewErrParamRequired("Outputs")) } else if v.Outputs != nil { if err := validate__listOfOutput(v.Outputs); err != nil { invalidParams.AddNested("Outputs", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOutputGroupSettings(v *types.OutputGroupSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "OutputGroupSettings"} if v.ArchiveGroupSettings != nil { if err := validateArchiveGroupSettings(v.ArchiveGroupSettings); err != nil { invalidParams.AddNested("ArchiveGroupSettings", err.(smithy.InvalidParamsError)) } } if v.FrameCaptureGroupSettings != nil { if err := validateFrameCaptureGroupSettings(v.FrameCaptureGroupSettings); err != nil { invalidParams.AddNested("FrameCaptureGroupSettings", err.(smithy.InvalidParamsError)) } } if v.HlsGroupSettings != nil { if err := validateHlsGroupSettings(v.HlsGroupSettings); err != nil { invalidParams.AddNested("HlsGroupSettings", err.(smithy.InvalidParamsError)) } } if v.MediaPackageGroupSettings != nil { if err := validateMediaPackageGroupSettings(v.MediaPackageGroupSettings); err != nil { invalidParams.AddNested("MediaPackageGroupSettings", err.(smithy.InvalidParamsError)) } } if v.MsSmoothGroupSettings != nil { if err := validateMsSmoothGroupSettings(v.MsSmoothGroupSettings); err != nil { invalidParams.AddNested("MsSmoothGroupSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOutputSettings(v *types.OutputSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "OutputSettings"} if v.ArchiveOutputSettings != nil { if err := validateArchiveOutputSettings(v.ArchiveOutputSettings); err != nil { invalidParams.AddNested("ArchiveOutputSettings", err.(smithy.InvalidParamsError)) } } if v.HlsOutputSettings != nil { if err := validateHlsOutputSettings(v.HlsOutputSettings); err != nil { invalidParams.AddNested("HlsOutputSettings", err.(smithy.InvalidParamsError)) } } if v.MultiplexOutputSettings != nil { if err := validateMultiplexOutputSettings(v.MultiplexOutputSettings); err != nil { invalidParams.AddNested("MultiplexOutputSettings", err.(smithy.InvalidParamsError)) } } if v.RtmpOutputSettings != nil { if err := validateRtmpOutputSettings(v.RtmpOutputSettings); err != nil { invalidParams.AddNested("RtmpOutputSettings", err.(smithy.InvalidParamsError)) } } if v.UdpOutputSettings != nil { if err := validateUdpOutputSettings(v.UdpOutputSettings); err != nil { invalidParams.AddNested("UdpOutputSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validatePauseStateScheduleActionSettings(v *types.PauseStateScheduleActionSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PauseStateScheduleActionSettings"} if v.Pipelines != nil { if err := validate__listOfPipelinePauseStateSettings(v.Pipelines); err != nil { invalidParams.AddNested("Pipelines", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validatePipelinePauseStateSettings(v *types.PipelinePauseStateSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PipelinePauseStateSettings"} if len(v.PipelineId) == 0 { invalidParams.Add(smithy.NewErrParamRequired("PipelineId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRemixSettings(v *types.RemixSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RemixSettings"} if v.ChannelMappings == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelMappings")) } else if v.ChannelMappings != nil { if err := validate__listOfAudioChannelMapping(v.ChannelMappings); err != nil { invalidParams.AddNested("ChannelMappings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRtmpOutputSettings(v *types.RtmpOutputSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RtmpOutputSettings"} if v.Destination == nil { invalidParams.Add(smithy.NewErrParamRequired("Destination")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateScheduleAction(v *types.ScheduleAction) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ScheduleAction"} if v.ActionName == nil { invalidParams.Add(smithy.NewErrParamRequired("ActionName")) } if v.ScheduleActionSettings == nil { invalidParams.Add(smithy.NewErrParamRequired("ScheduleActionSettings")) } else if v.ScheduleActionSettings != nil { if err := validateScheduleActionSettings(v.ScheduleActionSettings); err != nil { invalidParams.AddNested("ScheduleActionSettings", err.(smithy.InvalidParamsError)) } } if v.ScheduleActionStartSettings == nil { invalidParams.Add(smithy.NewErrParamRequired("ScheduleActionStartSettings")) } else if v.ScheduleActionStartSettings != nil { if err := validateScheduleActionStartSettings(v.ScheduleActionStartSettings); err != nil { invalidParams.AddNested("ScheduleActionStartSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateScheduleActionSettings(v *types.ScheduleActionSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ScheduleActionSettings"} if v.HlsTimedMetadataSettings != nil { if err := validateHlsTimedMetadataScheduleActionSettings(v.HlsTimedMetadataSettings); err != nil { invalidParams.AddNested("HlsTimedMetadataSettings", err.(smithy.InvalidParamsError)) } } if v.InputPrepareSettings != nil { if err := validateInputPrepareScheduleActionSettings(v.InputPrepareSettings); err != nil { invalidParams.AddNested("InputPrepareSettings", err.(smithy.InvalidParamsError)) } } if v.InputSwitchSettings != nil { if err := validateInputSwitchScheduleActionSettings(v.InputSwitchSettings); err != nil { invalidParams.AddNested("InputSwitchSettings", err.(smithy.InvalidParamsError)) } } if v.PauseStateSettings != nil { if err := validatePauseStateScheduleActionSettings(v.PauseStateSettings); err != nil { invalidParams.AddNested("PauseStateSettings", err.(smithy.InvalidParamsError)) } } if v.Scte35InputSettings != nil { if err := validateScte35InputScheduleActionSettings(v.Scte35InputSettings); err != nil { invalidParams.AddNested("Scte35InputSettings", err.(smithy.InvalidParamsError)) } } if v.Scte35ReturnToNetworkSettings != nil { if err := validateScte35ReturnToNetworkScheduleActionSettings(v.Scte35ReturnToNetworkSettings); err != nil { invalidParams.AddNested("Scte35ReturnToNetworkSettings", err.(smithy.InvalidParamsError)) } } if v.Scte35SpliceInsertSettings != nil { if err := validateScte35SpliceInsertScheduleActionSettings(v.Scte35SpliceInsertSettings); err != nil { invalidParams.AddNested("Scte35SpliceInsertSettings", err.(smithy.InvalidParamsError)) } } if v.Scte35TimeSignalSettings != nil { if err := validateScte35TimeSignalScheduleActionSettings(v.Scte35TimeSignalSettings); err != nil { invalidParams.AddNested("Scte35TimeSignalSettings", err.(smithy.InvalidParamsError)) } } if v.StaticImageActivateSettings != nil { if err := validateStaticImageActivateScheduleActionSettings(v.StaticImageActivateSettings); err != nil { invalidParams.AddNested("StaticImageActivateSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateScheduleActionStartSettings(v *types.ScheduleActionStartSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ScheduleActionStartSettings"} if v.FixedModeScheduleActionStartSettings != nil { if err := validateFixedModeScheduleActionStartSettings(v.FixedModeScheduleActionStartSettings); err != nil { invalidParams.AddNested("FixedModeScheduleActionStartSettings", err.(smithy.InvalidParamsError)) } } if v.FollowModeScheduleActionStartSettings != nil { if err := validateFollowModeScheduleActionStartSettings(v.FollowModeScheduleActionStartSettings); err != nil { invalidParams.AddNested("FollowModeScheduleActionStartSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateScte35DeliveryRestrictions(v *types.Scte35DeliveryRestrictions) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Scte35DeliveryRestrictions"} if len(v.ArchiveAllowedFlag) == 0 { invalidParams.Add(smithy.NewErrParamRequired("ArchiveAllowedFlag")) } if len(v.DeviceRestrictions) == 0 { invalidParams.Add(smithy.NewErrParamRequired("DeviceRestrictions")) } if len(v.NoRegionalBlackoutFlag) == 0 { invalidParams.Add(smithy.NewErrParamRequired("NoRegionalBlackoutFlag")) } if len(v.WebDeliveryAllowedFlag) == 0 { invalidParams.Add(smithy.NewErrParamRequired("WebDeliveryAllowedFlag")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateScte35Descriptor(v *types.Scte35Descriptor) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Scte35Descriptor"} if v.Scte35DescriptorSettings == nil { invalidParams.Add(smithy.NewErrParamRequired("Scte35DescriptorSettings")) } else if v.Scte35DescriptorSettings != nil { if err := validateScte35DescriptorSettings(v.Scte35DescriptorSettings); err != nil { invalidParams.AddNested("Scte35DescriptorSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateScte35DescriptorSettings(v *types.Scte35DescriptorSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Scte35DescriptorSettings"} if v.SegmentationDescriptorScte35DescriptorSettings == nil { invalidParams.Add(smithy.NewErrParamRequired("SegmentationDescriptorScte35DescriptorSettings")) } else if v.SegmentationDescriptorScte35DescriptorSettings != nil { if err := validateScte35SegmentationDescriptor(v.SegmentationDescriptorScte35DescriptorSettings); err != nil { invalidParams.AddNested("SegmentationDescriptorScte35DescriptorSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateScte35InputScheduleActionSettings(v *types.Scte35InputScheduleActionSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Scte35InputScheduleActionSettings"} if len(v.Mode) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Mode")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateScte35ReturnToNetworkScheduleActionSettings(v *types.Scte35ReturnToNetworkScheduleActionSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Scte35ReturnToNetworkScheduleActionSettings"} if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateScte35SegmentationDescriptor(v *types.Scte35SegmentationDescriptor) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Scte35SegmentationDescriptor"} if v.DeliveryRestrictions != nil { if err := validateScte35DeliveryRestrictions(v.DeliveryRestrictions); err != nil { invalidParams.AddNested("DeliveryRestrictions", err.(smithy.InvalidParamsError)) } } if len(v.SegmentationCancelIndicator) == 0 { invalidParams.Add(smithy.NewErrParamRequired("SegmentationCancelIndicator")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateScte35SpliceInsertScheduleActionSettings(v *types.Scte35SpliceInsertScheduleActionSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Scte35SpliceInsertScheduleActionSettings"} if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateScte35TimeSignalScheduleActionSettings(v *types.Scte35TimeSignalScheduleActionSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Scte35TimeSignalScheduleActionSettings"} if v.Scte35Descriptors == nil { invalidParams.Add(smithy.NewErrParamRequired("Scte35Descriptors")) } else if v.Scte35Descriptors != nil { if err := validate__listOfScte35Descriptor(v.Scte35Descriptors); err != nil { invalidParams.AddNested("Scte35Descriptors", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateStandardHlsSettings(v *types.StandardHlsSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StandardHlsSettings"} if v.M3u8Settings == nil { invalidParams.Add(smithy.NewErrParamRequired("M3u8Settings")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateStaticImageActivateScheduleActionSettings(v *types.StaticImageActivateScheduleActionSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StaticImageActivateScheduleActionSettings"} if v.Image == nil { invalidParams.Add(smithy.NewErrParamRequired("Image")) } else if v.Image != nil { if err := validateInputLocation(v.Image); err != nil { invalidParams.AddNested("Image", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateStaticKeySettings(v *types.StaticKeySettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StaticKeySettings"} if v.KeyProviderServer != nil { if err := validateInputLocation(v.KeyProviderServer); err != nil { invalidParams.AddNested("KeyProviderServer", err.(smithy.InvalidParamsError)) } } if v.StaticKeyValue == nil { invalidParams.Add(smithy.NewErrParamRequired("StaticKeyValue")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateTeletextSourceSettings(v *types.TeletextSourceSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TeletextSourceSettings"} if v.OutputRectangle != nil { if err := validateCaptionRectangle(v.OutputRectangle); err != nil { invalidParams.AddNested("OutputRectangle", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateTimecodeBurninSettings(v *types.TimecodeBurninSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TimecodeBurninSettings"} if len(v.FontSize) == 0 { invalidParams.Add(smithy.NewErrParamRequired("FontSize")) } if len(v.Position) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Position")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateTimecodeConfig(v *types.TimecodeConfig) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TimecodeConfig"} if len(v.Source) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Source")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateUdpContainerSettings(v *types.UdpContainerSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UdpContainerSettings"} if v.M2tsSettings != nil { if err := validateM2tsSettings(v.M2tsSettings); err != nil { invalidParams.AddNested("M2tsSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateUdpOutputSettings(v *types.UdpOutputSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UdpOutputSettings"} if v.ContainerSettings == nil { invalidParams.Add(smithy.NewErrParamRequired("ContainerSettings")) } else if v.ContainerSettings != nil { if err := validateUdpContainerSettings(v.ContainerSettings); err != nil { invalidParams.AddNested("ContainerSettings", err.(smithy.InvalidParamsError)) } } if v.Destination == nil { invalidParams.Add(smithy.NewErrParamRequired("Destination")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateVideoCodecSettings(v *types.VideoCodecSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "VideoCodecSettings"} if v.FrameCaptureSettings != nil { if err := validateFrameCaptureSettings(v.FrameCaptureSettings); err != nil { invalidParams.AddNested("FrameCaptureSettings", err.(smithy.InvalidParamsError)) } } if v.H264Settings != nil { if err := validateH264Settings(v.H264Settings); err != nil { invalidParams.AddNested("H264Settings", err.(smithy.InvalidParamsError)) } } if v.H265Settings != nil { if err := validateH265Settings(v.H265Settings); err != nil { invalidParams.AddNested("H265Settings", err.(smithy.InvalidParamsError)) } } if v.Mpeg2Settings != nil { if err := validateMpeg2Settings(v.Mpeg2Settings); err != nil { invalidParams.AddNested("Mpeg2Settings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateVideoDescription(v *types.VideoDescription) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "VideoDescription"} if v.CodecSettings != nil { if err := validateVideoCodecSettings(v.CodecSettings); err != nil { invalidParams.AddNested("CodecSettings", err.(smithy.InvalidParamsError)) } } if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateVpcOutputSettings(v *types.VpcOutputSettings) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "VpcOutputSettings"} if v.SubnetIds == nil { invalidParams.Add(smithy.NewErrParamRequired("SubnetIds")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpAcceptInputDeviceTransferInput(v *AcceptInputDeviceTransferInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AcceptInputDeviceTransferInput"} if v.InputDeviceId == nil { invalidParams.Add(smithy.NewErrParamRequired("InputDeviceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpBatchUpdateScheduleInput(v *BatchUpdateScheduleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "BatchUpdateScheduleInput"} if v.ChannelId == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelId")) } if v.Creates != nil { if err := validateBatchScheduleActionCreateRequest(v.Creates); err != nil { invalidParams.AddNested("Creates", err.(smithy.InvalidParamsError)) } } if v.Deletes != nil { if err := validateBatchScheduleActionDeleteRequest(v.Deletes); err != nil { invalidParams.AddNested("Deletes", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCancelInputDeviceTransferInput(v *CancelInputDeviceTransferInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CancelInputDeviceTransferInput"} if v.InputDeviceId == nil { invalidParams.Add(smithy.NewErrParamRequired("InputDeviceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateChannelInput(v *CreateChannelInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateChannelInput"} if v.EncoderSettings != nil { if err := validateEncoderSettings(v.EncoderSettings); err != nil { invalidParams.AddNested("EncoderSettings", err.(smithy.InvalidParamsError)) } } if v.InputAttachments != nil { if err := validate__listOfInputAttachment(v.InputAttachments); err != nil { invalidParams.AddNested("InputAttachments", err.(smithy.InvalidParamsError)) } } if v.Vpc != nil { if err := validateVpcOutputSettings(v.Vpc); err != nil { invalidParams.AddNested("Vpc", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateInputInput(v *CreateInputInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateInputInput"} if v.Vpc != nil { if err := validateInputVpcRequest(v.Vpc); err != nil { invalidParams.AddNested("Vpc", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateMultiplexInput(v *CreateMultiplexInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateMultiplexInput"} if v.AvailabilityZones == nil { invalidParams.Add(smithy.NewErrParamRequired("AvailabilityZones")) } if v.MultiplexSettings == nil { invalidParams.Add(smithy.NewErrParamRequired("MultiplexSettings")) } else if v.MultiplexSettings != nil { if err := validateMultiplexSettings(v.MultiplexSettings); err != nil { invalidParams.AddNested("MultiplexSettings", err.(smithy.InvalidParamsError)) } } if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.RequestId == nil { invalidParams.Add(smithy.NewErrParamRequired("RequestId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateMultiplexProgramInput(v *CreateMultiplexProgramInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateMultiplexProgramInput"} if v.MultiplexId == nil { invalidParams.Add(smithy.NewErrParamRequired("MultiplexId")) } if v.MultiplexProgramSettings == nil { invalidParams.Add(smithy.NewErrParamRequired("MultiplexProgramSettings")) } else if v.MultiplexProgramSettings != nil { if err := validateMultiplexProgramSettings(v.MultiplexProgramSettings); err != nil { invalidParams.AddNested("MultiplexProgramSettings", err.(smithy.InvalidParamsError)) } } if v.ProgramName == nil { invalidParams.Add(smithy.NewErrParamRequired("ProgramName")) } if v.RequestId == nil { invalidParams.Add(smithy.NewErrParamRequired("RequestId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreatePartnerInputInput(v *CreatePartnerInputInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreatePartnerInputInput"} if v.InputId == nil { invalidParams.Add(smithy.NewErrParamRequired("InputId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateTagsInput(v *CreateTagsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateTagsInput"} if v.ResourceArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteChannelInput(v *DeleteChannelInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteChannelInput"} if v.ChannelId == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteInputInput(v *DeleteInputInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteInputInput"} if v.InputId == nil { invalidParams.Add(smithy.NewErrParamRequired("InputId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteInputSecurityGroupInput(v *DeleteInputSecurityGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteInputSecurityGroupInput"} if v.InputSecurityGroupId == nil { invalidParams.Add(smithy.NewErrParamRequired("InputSecurityGroupId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteMultiplexInput(v *DeleteMultiplexInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteMultiplexInput"} if v.MultiplexId == nil { invalidParams.Add(smithy.NewErrParamRequired("MultiplexId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteMultiplexProgramInput(v *DeleteMultiplexProgramInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteMultiplexProgramInput"} if v.MultiplexId == nil { invalidParams.Add(smithy.NewErrParamRequired("MultiplexId")) } if v.ProgramName == nil { invalidParams.Add(smithy.NewErrParamRequired("ProgramName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteReservationInput(v *DeleteReservationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteReservationInput"} if v.ReservationId == nil { invalidParams.Add(smithy.NewErrParamRequired("ReservationId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteScheduleInput(v *DeleteScheduleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteScheduleInput"} if v.ChannelId == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteTagsInput(v *DeleteTagsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteTagsInput"} if v.ResourceArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) } if v.TagKeys == nil { invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeChannelInput(v *DescribeChannelInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeChannelInput"} if v.ChannelId == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeInputDeviceInput(v *DescribeInputDeviceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeInputDeviceInput"} if v.InputDeviceId == nil { invalidParams.Add(smithy.NewErrParamRequired("InputDeviceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeInputDeviceThumbnailInput(v *DescribeInputDeviceThumbnailInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeInputDeviceThumbnailInput"} if v.InputDeviceId == nil { invalidParams.Add(smithy.NewErrParamRequired("InputDeviceId")) } if len(v.Accept) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Accept")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeInputInput(v *DescribeInputInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeInputInput"} if v.InputId == nil { invalidParams.Add(smithy.NewErrParamRequired("InputId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeInputSecurityGroupInput(v *DescribeInputSecurityGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeInputSecurityGroupInput"} if v.InputSecurityGroupId == nil { invalidParams.Add(smithy.NewErrParamRequired("InputSecurityGroupId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeMultiplexInput(v *DescribeMultiplexInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeMultiplexInput"} if v.MultiplexId == nil { invalidParams.Add(smithy.NewErrParamRequired("MultiplexId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeMultiplexProgramInput(v *DescribeMultiplexProgramInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeMultiplexProgramInput"} if v.MultiplexId == nil { invalidParams.Add(smithy.NewErrParamRequired("MultiplexId")) } if v.ProgramName == nil { invalidParams.Add(smithy.NewErrParamRequired("ProgramName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeOfferingInput(v *DescribeOfferingInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeOfferingInput"} if v.OfferingId == nil { invalidParams.Add(smithy.NewErrParamRequired("OfferingId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeReservationInput(v *DescribeReservationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeReservationInput"} if v.ReservationId == nil { invalidParams.Add(smithy.NewErrParamRequired("ReservationId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeScheduleInput(v *DescribeScheduleInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeScheduleInput"} if v.ChannelId == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListInputDeviceTransfersInput(v *ListInputDeviceTransfersInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListInputDeviceTransfersInput"} if v.TransferType == nil { invalidParams.Add(smithy.NewErrParamRequired("TransferType")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListMultiplexProgramsInput(v *ListMultiplexProgramsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListMultiplexProgramsInput"} if v.MultiplexId == nil { invalidParams.Add(smithy.NewErrParamRequired("MultiplexId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} if v.ResourceArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpPurchaseOfferingInput(v *PurchaseOfferingInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PurchaseOfferingInput"} if v.OfferingId == nil { invalidParams.Add(smithy.NewErrParamRequired("OfferingId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpRebootInputDeviceInput(v *RebootInputDeviceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RebootInputDeviceInput"} if v.InputDeviceId == nil { invalidParams.Add(smithy.NewErrParamRequired("InputDeviceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpRejectInputDeviceTransferInput(v *RejectInputDeviceTransferInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RejectInputDeviceTransferInput"} if v.InputDeviceId == nil { invalidParams.Add(smithy.NewErrParamRequired("InputDeviceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpStartChannelInput(v *StartChannelInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StartChannelInput"} if v.ChannelId == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpStartInputDeviceMaintenanceWindowInput(v *StartInputDeviceMaintenanceWindowInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StartInputDeviceMaintenanceWindowInput"} if v.InputDeviceId == nil { invalidParams.Add(smithy.NewErrParamRequired("InputDeviceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpStartMultiplexInput(v *StartMultiplexInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StartMultiplexInput"} if v.MultiplexId == nil { invalidParams.Add(smithy.NewErrParamRequired("MultiplexId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpStopChannelInput(v *StopChannelInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StopChannelInput"} if v.ChannelId == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpStopMultiplexInput(v *StopMultiplexInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StopMultiplexInput"} if v.MultiplexId == nil { invalidParams.Add(smithy.NewErrParamRequired("MultiplexId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpTransferInputDeviceInput(v *TransferInputDeviceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TransferInputDeviceInput"} if v.InputDeviceId == nil { invalidParams.Add(smithy.NewErrParamRequired("InputDeviceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateChannelClassInput(v *UpdateChannelClassInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateChannelClassInput"} if len(v.ChannelClass) == 0 { invalidParams.Add(smithy.NewErrParamRequired("ChannelClass")) } if v.ChannelId == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateChannelInput(v *UpdateChannelInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateChannelInput"} if v.ChannelId == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelId")) } if v.EncoderSettings != nil { if err := validateEncoderSettings(v.EncoderSettings); err != nil { invalidParams.AddNested("EncoderSettings", err.(smithy.InvalidParamsError)) } } if v.InputAttachments != nil { if err := validate__listOfInputAttachment(v.InputAttachments); err != nil { invalidParams.AddNested("InputAttachments", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateInputDeviceInput(v *UpdateInputDeviceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateInputDeviceInput"} if v.InputDeviceId == nil { invalidParams.Add(smithy.NewErrParamRequired("InputDeviceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateInputInput(v *UpdateInputInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateInputInput"} if v.InputId == nil { invalidParams.Add(smithy.NewErrParamRequired("InputId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateInputSecurityGroupInput(v *UpdateInputSecurityGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateInputSecurityGroupInput"} if v.InputSecurityGroupId == nil { invalidParams.Add(smithy.NewErrParamRequired("InputSecurityGroupId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateMultiplexInput(v *UpdateMultiplexInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateMultiplexInput"} if v.MultiplexId == nil { invalidParams.Add(smithy.NewErrParamRequired("MultiplexId")) } if v.MultiplexSettings != nil { if err := validateMultiplexSettings(v.MultiplexSettings); err != nil { invalidParams.AddNested("MultiplexSettings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateMultiplexProgramInput(v *UpdateMultiplexProgramInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateMultiplexProgramInput"} if v.MultiplexId == nil { invalidParams.Add(smithy.NewErrParamRequired("MultiplexId")) } if v.MultiplexProgramSettings != nil { if err := validateMultiplexProgramSettings(v.MultiplexProgramSettings); err != nil { invalidParams.AddNested("MultiplexProgramSettings", err.(smithy.InvalidParamsError)) } } if v.ProgramName == nil { invalidParams.Add(smithy.NewErrParamRequired("ProgramName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateReservationInput(v *UpdateReservationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateReservationInput"} if v.ReservationId == nil { invalidParams.Add(smithy.NewErrParamRequired("ReservationId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } }
4,121
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package endpoints import ( "github.com/aws/aws-sdk-go-v2/aws" endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" "github.com/aws/smithy-go/logging" "regexp" ) // Options is the endpoint resolver configuration options type Options struct { // Logger is a logging implementation that log events should be sent to. Logger logging.Logger // LogDeprecated indicates that deprecated endpoints should be logged to the // provided logger. LogDeprecated bool // ResolvedRegion is used to override the region to be resolved, rather then the // using the value passed to the ResolveEndpoint method. This value is used by the // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative // name. You must not set this value directly in your application. ResolvedRegion string // DisableHTTPS informs the resolver to return an endpoint that does not use the // HTTPS scheme. DisableHTTPS bool // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. UseDualStackEndpoint aws.DualStackEndpointState // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. UseFIPSEndpoint aws.FIPSEndpointState } func (o Options) GetResolvedRegion() string { return o.ResolvedRegion } func (o Options) GetDisableHTTPS() bool { return o.DisableHTTPS } func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { return o.UseDualStackEndpoint } func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { return o.UseFIPSEndpoint } func transformToSharedOptions(options Options) endpoints.Options { return endpoints.Options{ Logger: options.Logger, LogDeprecated: options.LogDeprecated, ResolvedRegion: options.ResolvedRegion, DisableHTTPS: options.DisableHTTPS, UseDualStackEndpoint: options.UseDualStackEndpoint, UseFIPSEndpoint: options.UseFIPSEndpoint, } } // Resolver MediaLive endpoint resolver type Resolver struct { partitions endpoints.Partitions } // ResolveEndpoint resolves the service endpoint for the given region and options func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { if len(region) == 0 { return endpoint, &aws.MissingRegionError{} } opt := transformToSharedOptions(options) return r.partitions.ResolveEndpoint(region, opt) } // New returns a new Resolver func New() *Resolver { return &Resolver{ partitions: defaultPartitions, } } var partitionRegexp = struct { Aws *regexp.Regexp AwsCn *regexp.Regexp AwsIso *regexp.Regexp AwsIsoB *regexp.Regexp AwsIsoE *regexp.Regexp AwsIsoF *regexp.Regexp AwsUsGov *regexp.Regexp }{ Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"), AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), } var defaultPartitions = endpoints.Partitions{ { ID: "aws", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "medialive.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "medialive-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "medialive-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "medialive.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.Aws, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "ap-northeast-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-northeast-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-north-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-3", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "fips-us-east-1", }: endpoints.Endpoint{ Hostname: "medialive-fips.us-east-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-east-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "fips-us-east-2", }: endpoints.Endpoint{ Hostname: "medialive-fips.us-east-2.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-east-2", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "fips-us-west-2", }: endpoints.Endpoint{ Hostname: "medialive-fips.us-west-2.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-west-2", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "sa-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-1", Variant: endpoints.FIPSVariant, }: { Hostname: "medialive-fips.us-east-1.amazonaws.com", }, endpoints.EndpointKey{ Region: "us-east-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-2", Variant: endpoints.FIPSVariant, }: { Hostname: "medialive-fips.us-east-2.amazonaws.com", }, endpoints.EndpointKey{ Region: "us-west-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-west-2", Variant: endpoints.FIPSVariant, }: { Hostname: "medialive-fips.us-west-2.amazonaws.com", }, }, }, { ID: "aws-cn", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "medialive.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "medialive-fips.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "medialive-fips.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "medialive.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsCn, IsRegionalized: true, }, { ID: "aws-iso", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "medialive-fips.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "medialive.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIso, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "us-iso-east-1", }: endpoints.Endpoint{}, }, }, { ID: "aws-iso-b", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "medialive-fips.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "medialive.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoB, IsRegionalized: true, }, { ID: "aws-iso-e", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "medialive-fips.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "medialive.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoE, IsRegionalized: true, }, { ID: "aws-iso-f", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "medialive-fips.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "medialive.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoF, IsRegionalized: true, }, { ID: "aws-us-gov", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "medialive.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "medialive-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "medialive-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "medialive.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsUsGov, IsRegionalized: true, }, }
391
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package endpoints import ( "testing" ) func TestRegexCompile(t *testing.T) { _ = defaultPartitions }
12
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types type AacCodingMode string // Enum values for AacCodingMode const ( AacCodingModeAdReceiverMix AacCodingMode = "AD_RECEIVER_MIX" AacCodingModeCodingMode10 AacCodingMode = "CODING_MODE_1_0" AacCodingModeCodingMode11 AacCodingMode = "CODING_MODE_1_1" AacCodingModeCodingMode20 AacCodingMode = "CODING_MODE_2_0" AacCodingModeCodingMode51 AacCodingMode = "CODING_MODE_5_1" ) // Values returns all known values for AacCodingMode. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (AacCodingMode) Values() []AacCodingMode { return []AacCodingMode{ "AD_RECEIVER_MIX", "CODING_MODE_1_0", "CODING_MODE_1_1", "CODING_MODE_2_0", "CODING_MODE_5_1", } } type AacInputType string // Enum values for AacInputType const ( AacInputTypeBroadcasterMixedAd AacInputType = "BROADCASTER_MIXED_AD" AacInputTypeNormal AacInputType = "NORMAL" ) // Values returns all known values for AacInputType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (AacInputType) Values() []AacInputType { return []AacInputType{ "BROADCASTER_MIXED_AD", "NORMAL", } } type AacProfile string // Enum values for AacProfile const ( AacProfileHev1 AacProfile = "HEV1" AacProfileHev2 AacProfile = "HEV2" AacProfileLc AacProfile = "LC" ) // Values returns all known values for AacProfile. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (AacProfile) Values() []AacProfile { return []AacProfile{ "HEV1", "HEV2", "LC", } } type AacRateControlMode string // Enum values for AacRateControlMode const ( AacRateControlModeCbr AacRateControlMode = "CBR" AacRateControlModeVbr AacRateControlMode = "VBR" ) // Values returns all known values for AacRateControlMode. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (AacRateControlMode) Values() []AacRateControlMode { return []AacRateControlMode{ "CBR", "VBR", } } type AacRawFormat string // Enum values for AacRawFormat const ( AacRawFormatLatmLoas AacRawFormat = "LATM_LOAS" AacRawFormatNone AacRawFormat = "NONE" ) // Values returns all known values for AacRawFormat. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (AacRawFormat) Values() []AacRawFormat { return []AacRawFormat{ "LATM_LOAS", "NONE", } } type AacSpec string // Enum values for AacSpec const ( AacSpecMpeg2 AacSpec = "MPEG2" AacSpecMpeg4 AacSpec = "MPEG4" ) // Values returns all known values for AacSpec. Note that this can be expanded in // the future, and so it is only as up to date as the client. The ordering of this // slice is not guaranteed to be stable across updates. func (AacSpec) Values() []AacSpec { return []AacSpec{ "MPEG2", "MPEG4", } } type AacVbrQuality string // Enum values for AacVbrQuality const ( AacVbrQualityHigh AacVbrQuality = "HIGH" AacVbrQualityLow AacVbrQuality = "LOW" AacVbrQualityMediumHigh AacVbrQuality = "MEDIUM_HIGH" AacVbrQualityMediumLow AacVbrQuality = "MEDIUM_LOW" ) // Values returns all known values for AacVbrQuality. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (AacVbrQuality) Values() []AacVbrQuality { return []AacVbrQuality{ "HIGH", "LOW", "MEDIUM_HIGH", "MEDIUM_LOW", } } type Ac3BitstreamMode string // Enum values for Ac3BitstreamMode const ( Ac3BitstreamModeCommentary Ac3BitstreamMode = "COMMENTARY" Ac3BitstreamModeCompleteMain Ac3BitstreamMode = "COMPLETE_MAIN" Ac3BitstreamModeDialogue Ac3BitstreamMode = "DIALOGUE" Ac3BitstreamModeEmergency Ac3BitstreamMode = "EMERGENCY" Ac3BitstreamModeHearingImpaired Ac3BitstreamMode = "HEARING_IMPAIRED" Ac3BitstreamModeMusicAndEffects Ac3BitstreamMode = "MUSIC_AND_EFFECTS" Ac3BitstreamModeVisuallyImpaired Ac3BitstreamMode = "VISUALLY_IMPAIRED" Ac3BitstreamModeVoiceOver Ac3BitstreamMode = "VOICE_OVER" ) // Values returns all known values for Ac3BitstreamMode. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Ac3BitstreamMode) Values() []Ac3BitstreamMode { return []Ac3BitstreamMode{ "COMMENTARY", "COMPLETE_MAIN", "DIALOGUE", "EMERGENCY", "HEARING_IMPAIRED", "MUSIC_AND_EFFECTS", "VISUALLY_IMPAIRED", "VOICE_OVER", } } type Ac3CodingMode string // Enum values for Ac3CodingMode const ( Ac3CodingModeCodingMode10 Ac3CodingMode = "CODING_MODE_1_0" Ac3CodingModeCodingMode11 Ac3CodingMode = "CODING_MODE_1_1" Ac3CodingModeCodingMode20 Ac3CodingMode = "CODING_MODE_2_0" Ac3CodingModeCodingMode32Lfe Ac3CodingMode = "CODING_MODE_3_2_LFE" ) // Values returns all known values for Ac3CodingMode. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Ac3CodingMode) Values() []Ac3CodingMode { return []Ac3CodingMode{ "CODING_MODE_1_0", "CODING_MODE_1_1", "CODING_MODE_2_0", "CODING_MODE_3_2_LFE", } } type Ac3DrcProfile string // Enum values for Ac3DrcProfile const ( Ac3DrcProfileFilmStandard Ac3DrcProfile = "FILM_STANDARD" Ac3DrcProfileNone Ac3DrcProfile = "NONE" ) // Values returns all known values for Ac3DrcProfile. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Ac3DrcProfile) Values() []Ac3DrcProfile { return []Ac3DrcProfile{ "FILM_STANDARD", "NONE", } } type Ac3LfeFilter string // Enum values for Ac3LfeFilter const ( Ac3LfeFilterDisabled Ac3LfeFilter = "DISABLED" Ac3LfeFilterEnabled Ac3LfeFilter = "ENABLED" ) // Values returns all known values for Ac3LfeFilter. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Ac3LfeFilter) Values() []Ac3LfeFilter { return []Ac3LfeFilter{ "DISABLED", "ENABLED", } } type Ac3MetadataControl string // Enum values for Ac3MetadataControl const ( Ac3MetadataControlFollowInput Ac3MetadataControl = "FOLLOW_INPUT" Ac3MetadataControlUseConfigured Ac3MetadataControl = "USE_CONFIGURED" ) // Values returns all known values for Ac3MetadataControl. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Ac3MetadataControl) Values() []Ac3MetadataControl { return []Ac3MetadataControl{ "FOLLOW_INPUT", "USE_CONFIGURED", } } type AcceptHeader string // Enum values for AcceptHeader const ( AcceptHeaderImageJpeg AcceptHeader = "image/jpeg" ) // Values returns all known values for AcceptHeader. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (AcceptHeader) Values() []AcceptHeader { return []AcceptHeader{ "image/jpeg", } } type AccessibilityType string // Enum values for AccessibilityType const ( AccessibilityTypeDoesNotImplementAccessibilityFeatures AccessibilityType = "DOES_NOT_IMPLEMENT_ACCESSIBILITY_FEATURES" AccessibilityTypeImplementsAccessibilityFeatures AccessibilityType = "IMPLEMENTS_ACCESSIBILITY_FEATURES" ) // Values returns all known values for AccessibilityType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (AccessibilityType) Values() []AccessibilityType { return []AccessibilityType{ "DOES_NOT_IMPLEMENT_ACCESSIBILITY_FEATURES", "IMPLEMENTS_ACCESSIBILITY_FEATURES", } } type AfdSignaling string // Enum values for AfdSignaling const ( AfdSignalingAuto AfdSignaling = "AUTO" AfdSignalingFixed AfdSignaling = "FIXED" AfdSignalingNone AfdSignaling = "NONE" ) // Values returns all known values for AfdSignaling. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (AfdSignaling) Values() []AfdSignaling { return []AfdSignaling{ "AUTO", "FIXED", "NONE", } } type AudioDescriptionAudioTypeControl string // Enum values for AudioDescriptionAudioTypeControl const ( AudioDescriptionAudioTypeControlFollowInput AudioDescriptionAudioTypeControl = "FOLLOW_INPUT" AudioDescriptionAudioTypeControlUseConfigured AudioDescriptionAudioTypeControl = "USE_CONFIGURED" ) // Values returns all known values for AudioDescriptionAudioTypeControl. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (AudioDescriptionAudioTypeControl) Values() []AudioDescriptionAudioTypeControl { return []AudioDescriptionAudioTypeControl{ "FOLLOW_INPUT", "USE_CONFIGURED", } } type AudioDescriptionLanguageCodeControl string // Enum values for AudioDescriptionLanguageCodeControl const ( AudioDescriptionLanguageCodeControlFollowInput AudioDescriptionLanguageCodeControl = "FOLLOW_INPUT" AudioDescriptionLanguageCodeControlUseConfigured AudioDescriptionLanguageCodeControl = "USE_CONFIGURED" ) // Values returns all known values for AudioDescriptionLanguageCodeControl. Note // that this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (AudioDescriptionLanguageCodeControl) Values() []AudioDescriptionLanguageCodeControl { return []AudioDescriptionLanguageCodeControl{ "FOLLOW_INPUT", "USE_CONFIGURED", } } type AudioLanguageSelectionPolicy string // Enum values for AudioLanguageSelectionPolicy const ( AudioLanguageSelectionPolicyLoose AudioLanguageSelectionPolicy = "LOOSE" AudioLanguageSelectionPolicyStrict AudioLanguageSelectionPolicy = "STRICT" ) // Values returns all known values for AudioLanguageSelectionPolicy. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (AudioLanguageSelectionPolicy) Values() []AudioLanguageSelectionPolicy { return []AudioLanguageSelectionPolicy{ "LOOSE", "STRICT", } } type AudioNormalizationAlgorithm string // Enum values for AudioNormalizationAlgorithm const ( AudioNormalizationAlgorithmItu17701 AudioNormalizationAlgorithm = "ITU_1770_1" AudioNormalizationAlgorithmItu17702 AudioNormalizationAlgorithm = "ITU_1770_2" ) // Values returns all known values for AudioNormalizationAlgorithm. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (AudioNormalizationAlgorithm) Values() []AudioNormalizationAlgorithm { return []AudioNormalizationAlgorithm{ "ITU_1770_1", "ITU_1770_2", } } type AudioNormalizationAlgorithmControl string // Enum values for AudioNormalizationAlgorithmControl const ( AudioNormalizationAlgorithmControlCorrectAudio AudioNormalizationAlgorithmControl = "CORRECT_AUDIO" ) // Values returns all known values for AudioNormalizationAlgorithmControl. Note // that this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (AudioNormalizationAlgorithmControl) Values() []AudioNormalizationAlgorithmControl { return []AudioNormalizationAlgorithmControl{ "CORRECT_AUDIO", } } type AudioOnlyHlsSegmentType string // Enum values for AudioOnlyHlsSegmentType const ( AudioOnlyHlsSegmentTypeAac AudioOnlyHlsSegmentType = "AAC" AudioOnlyHlsSegmentTypeFmp4 AudioOnlyHlsSegmentType = "FMP4" ) // Values returns all known values for AudioOnlyHlsSegmentType. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (AudioOnlyHlsSegmentType) Values() []AudioOnlyHlsSegmentType { return []AudioOnlyHlsSegmentType{ "AAC", "FMP4", } } type AudioOnlyHlsTrackType string // Enum values for AudioOnlyHlsTrackType const ( AudioOnlyHlsTrackTypeAlternateAudioAutoSelect AudioOnlyHlsTrackType = "ALTERNATE_AUDIO_AUTO_SELECT" AudioOnlyHlsTrackTypeAlternateAudioAutoSelectDefault AudioOnlyHlsTrackType = "ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT" AudioOnlyHlsTrackTypeAlternateAudioNotAutoSelect AudioOnlyHlsTrackType = "ALTERNATE_AUDIO_NOT_AUTO_SELECT" AudioOnlyHlsTrackTypeAudioOnlyVariantStream AudioOnlyHlsTrackType = "AUDIO_ONLY_VARIANT_STREAM" ) // Values returns all known values for AudioOnlyHlsTrackType. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (AudioOnlyHlsTrackType) Values() []AudioOnlyHlsTrackType { return []AudioOnlyHlsTrackType{ "ALTERNATE_AUDIO_AUTO_SELECT", "ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT", "ALTERNATE_AUDIO_NOT_AUTO_SELECT", "AUDIO_ONLY_VARIANT_STREAM", } } type AudioType string // Enum values for AudioType const ( AudioTypeCleanEffects AudioType = "CLEAN_EFFECTS" AudioTypeHearingImpaired AudioType = "HEARING_IMPAIRED" AudioTypeUndefined AudioType = "UNDEFINED" AudioTypeVisualImpairedCommentary AudioType = "VISUAL_IMPAIRED_COMMENTARY" ) // Values returns all known values for AudioType. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (AudioType) Values() []AudioType { return []AudioType{ "CLEAN_EFFECTS", "HEARING_IMPAIRED", "UNDEFINED", "VISUAL_IMPAIRED_COMMENTARY", } } type AuthenticationScheme string // Enum values for AuthenticationScheme const ( AuthenticationSchemeAkamai AuthenticationScheme = "AKAMAI" AuthenticationSchemeCommon AuthenticationScheme = "COMMON" ) // Values returns all known values for AuthenticationScheme. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (AuthenticationScheme) Values() []AuthenticationScheme { return []AuthenticationScheme{ "AKAMAI", "COMMON", } } type AvailBlankingState string // Enum values for AvailBlankingState const ( AvailBlankingStateDisabled AvailBlankingState = "DISABLED" AvailBlankingStateEnabled AvailBlankingState = "ENABLED" ) // Values returns all known values for AvailBlankingState. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (AvailBlankingState) Values() []AvailBlankingState { return []AvailBlankingState{ "DISABLED", "ENABLED", } } type BlackoutSlateNetworkEndBlackout string // Enum values for BlackoutSlateNetworkEndBlackout const ( BlackoutSlateNetworkEndBlackoutDisabled BlackoutSlateNetworkEndBlackout = "DISABLED" BlackoutSlateNetworkEndBlackoutEnabled BlackoutSlateNetworkEndBlackout = "ENABLED" ) // Values returns all known values for BlackoutSlateNetworkEndBlackout. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (BlackoutSlateNetworkEndBlackout) Values() []BlackoutSlateNetworkEndBlackout { return []BlackoutSlateNetworkEndBlackout{ "DISABLED", "ENABLED", } } type BlackoutSlateState string // Enum values for BlackoutSlateState const ( BlackoutSlateStateDisabled BlackoutSlateState = "DISABLED" BlackoutSlateStateEnabled BlackoutSlateState = "ENABLED" ) // Values returns all known values for BlackoutSlateState. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (BlackoutSlateState) Values() []BlackoutSlateState { return []BlackoutSlateState{ "DISABLED", "ENABLED", } } type BurnInAlignment string // Enum values for BurnInAlignment const ( BurnInAlignmentCentered BurnInAlignment = "CENTERED" BurnInAlignmentLeft BurnInAlignment = "LEFT" BurnInAlignmentSmart BurnInAlignment = "SMART" ) // Values returns all known values for BurnInAlignment. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (BurnInAlignment) Values() []BurnInAlignment { return []BurnInAlignment{ "CENTERED", "LEFT", "SMART", } } type BurnInBackgroundColor string // Enum values for BurnInBackgroundColor const ( BurnInBackgroundColorBlack BurnInBackgroundColor = "BLACK" BurnInBackgroundColorNone BurnInBackgroundColor = "NONE" BurnInBackgroundColorWhite BurnInBackgroundColor = "WHITE" ) // Values returns all known values for BurnInBackgroundColor. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (BurnInBackgroundColor) Values() []BurnInBackgroundColor { return []BurnInBackgroundColor{ "BLACK", "NONE", "WHITE", } } type BurnInFontColor string // Enum values for BurnInFontColor const ( BurnInFontColorBlack BurnInFontColor = "BLACK" BurnInFontColorBlue BurnInFontColor = "BLUE" BurnInFontColorGreen BurnInFontColor = "GREEN" BurnInFontColorRed BurnInFontColor = "RED" BurnInFontColorWhite BurnInFontColor = "WHITE" BurnInFontColorYellow BurnInFontColor = "YELLOW" ) // Values returns all known values for BurnInFontColor. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (BurnInFontColor) Values() []BurnInFontColor { return []BurnInFontColor{ "BLACK", "BLUE", "GREEN", "RED", "WHITE", "YELLOW", } } type BurnInOutlineColor string // Enum values for BurnInOutlineColor const ( BurnInOutlineColorBlack BurnInOutlineColor = "BLACK" BurnInOutlineColorBlue BurnInOutlineColor = "BLUE" BurnInOutlineColorGreen BurnInOutlineColor = "GREEN" BurnInOutlineColorRed BurnInOutlineColor = "RED" BurnInOutlineColorWhite BurnInOutlineColor = "WHITE" BurnInOutlineColorYellow BurnInOutlineColor = "YELLOW" ) // Values returns all known values for BurnInOutlineColor. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (BurnInOutlineColor) Values() []BurnInOutlineColor { return []BurnInOutlineColor{ "BLACK", "BLUE", "GREEN", "RED", "WHITE", "YELLOW", } } type BurnInShadowColor string // Enum values for BurnInShadowColor const ( BurnInShadowColorBlack BurnInShadowColor = "BLACK" BurnInShadowColorNone BurnInShadowColor = "NONE" BurnInShadowColorWhite BurnInShadowColor = "WHITE" ) // Values returns all known values for BurnInShadowColor. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (BurnInShadowColor) Values() []BurnInShadowColor { return []BurnInShadowColor{ "BLACK", "NONE", "WHITE", } } type BurnInTeletextGridControl string // Enum values for BurnInTeletextGridControl const ( BurnInTeletextGridControlFixed BurnInTeletextGridControl = "FIXED" BurnInTeletextGridControlScaled BurnInTeletextGridControl = "SCALED" ) // Values returns all known values for BurnInTeletextGridControl. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (BurnInTeletextGridControl) Values() []BurnInTeletextGridControl { return []BurnInTeletextGridControl{ "FIXED", "SCALED", } } type CdiInputResolution string // Enum values for CdiInputResolution const ( CdiInputResolutionSd CdiInputResolution = "SD" CdiInputResolutionHd CdiInputResolution = "HD" CdiInputResolutionFhd CdiInputResolution = "FHD" CdiInputResolutionUhd CdiInputResolution = "UHD" ) // Values returns all known values for CdiInputResolution. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (CdiInputResolution) Values() []CdiInputResolution { return []CdiInputResolution{ "SD", "HD", "FHD", "UHD", } } type ChannelClass string // Enum values for ChannelClass const ( ChannelClassStandard ChannelClass = "STANDARD" ChannelClassSinglePipeline ChannelClass = "SINGLE_PIPELINE" ) // Values returns all known values for ChannelClass. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ChannelClass) Values() []ChannelClass { return []ChannelClass{ "STANDARD", "SINGLE_PIPELINE", } } type ChannelState string // Enum values for ChannelState const ( ChannelStateCreating ChannelState = "CREATING" ChannelStateCreateFailed ChannelState = "CREATE_FAILED" ChannelStateIdle ChannelState = "IDLE" ChannelStateStarting ChannelState = "STARTING" ChannelStateRunning ChannelState = "RUNNING" ChannelStateRecovering ChannelState = "RECOVERING" ChannelStateStopping ChannelState = "STOPPING" ChannelStateDeleting ChannelState = "DELETING" ChannelStateDeleted ChannelState = "DELETED" ChannelStateUpdating ChannelState = "UPDATING" ChannelStateUpdateFailed ChannelState = "UPDATE_FAILED" ) // Values returns all known values for ChannelState. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ChannelState) Values() []ChannelState { return []ChannelState{ "CREATING", "CREATE_FAILED", "IDLE", "STARTING", "RUNNING", "RECOVERING", "STOPPING", "DELETING", "DELETED", "UPDATING", "UPDATE_FAILED", } } type ContentType string // Enum values for ContentType const ( ContentTypeImageJpeg ContentType = "image/jpeg" ) // Values returns all known values for ContentType. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (ContentType) Values() []ContentType { return []ContentType{ "image/jpeg", } } type DeviceSettingsSyncState string // Enum values for DeviceSettingsSyncState const ( DeviceSettingsSyncStateSynced DeviceSettingsSyncState = "SYNCED" DeviceSettingsSyncStateSyncing DeviceSettingsSyncState = "SYNCING" ) // Values returns all known values for DeviceSettingsSyncState. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (DeviceSettingsSyncState) Values() []DeviceSettingsSyncState { return []DeviceSettingsSyncState{ "SYNCED", "SYNCING", } } type DeviceUpdateStatus string // Enum values for DeviceUpdateStatus const ( DeviceUpdateStatusUpToDate DeviceUpdateStatus = "UP_TO_DATE" DeviceUpdateStatusNotUpToDate DeviceUpdateStatus = "NOT_UP_TO_DATE" DeviceUpdateStatusUpdating DeviceUpdateStatus = "UPDATING" ) // Values returns all known values for DeviceUpdateStatus. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (DeviceUpdateStatus) Values() []DeviceUpdateStatus { return []DeviceUpdateStatus{ "UP_TO_DATE", "NOT_UP_TO_DATE", "UPDATING", } } type DolbyEProgramSelection string // Enum values for DolbyEProgramSelection const ( DolbyEProgramSelectionAllChannels DolbyEProgramSelection = "ALL_CHANNELS" DolbyEProgramSelectionProgram1 DolbyEProgramSelection = "PROGRAM_1" DolbyEProgramSelectionProgram2 DolbyEProgramSelection = "PROGRAM_2" DolbyEProgramSelectionProgram3 DolbyEProgramSelection = "PROGRAM_3" DolbyEProgramSelectionProgram4 DolbyEProgramSelection = "PROGRAM_4" DolbyEProgramSelectionProgram5 DolbyEProgramSelection = "PROGRAM_5" DolbyEProgramSelectionProgram6 DolbyEProgramSelection = "PROGRAM_6" DolbyEProgramSelectionProgram7 DolbyEProgramSelection = "PROGRAM_7" DolbyEProgramSelectionProgram8 DolbyEProgramSelection = "PROGRAM_8" ) // Values returns all known values for DolbyEProgramSelection. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (DolbyEProgramSelection) Values() []DolbyEProgramSelection { return []DolbyEProgramSelection{ "ALL_CHANNELS", "PROGRAM_1", "PROGRAM_2", "PROGRAM_3", "PROGRAM_4", "PROGRAM_5", "PROGRAM_6", "PROGRAM_7", "PROGRAM_8", } } type DvbSdtOutputSdt string // Enum values for DvbSdtOutputSdt const ( DvbSdtOutputSdtSdtFollow DvbSdtOutputSdt = "SDT_FOLLOW" DvbSdtOutputSdtSdtFollowIfPresent DvbSdtOutputSdt = "SDT_FOLLOW_IF_PRESENT" DvbSdtOutputSdtSdtManual DvbSdtOutputSdt = "SDT_MANUAL" DvbSdtOutputSdtSdtNone DvbSdtOutputSdt = "SDT_NONE" ) // Values returns all known values for DvbSdtOutputSdt. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (DvbSdtOutputSdt) Values() []DvbSdtOutputSdt { return []DvbSdtOutputSdt{ "SDT_FOLLOW", "SDT_FOLLOW_IF_PRESENT", "SDT_MANUAL", "SDT_NONE", } } type DvbSubDestinationAlignment string // Enum values for DvbSubDestinationAlignment const ( DvbSubDestinationAlignmentCentered DvbSubDestinationAlignment = "CENTERED" DvbSubDestinationAlignmentLeft DvbSubDestinationAlignment = "LEFT" DvbSubDestinationAlignmentSmart DvbSubDestinationAlignment = "SMART" ) // Values returns all known values for DvbSubDestinationAlignment. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (DvbSubDestinationAlignment) Values() []DvbSubDestinationAlignment { return []DvbSubDestinationAlignment{ "CENTERED", "LEFT", "SMART", } } type DvbSubDestinationBackgroundColor string // Enum values for DvbSubDestinationBackgroundColor const ( DvbSubDestinationBackgroundColorBlack DvbSubDestinationBackgroundColor = "BLACK" DvbSubDestinationBackgroundColorNone DvbSubDestinationBackgroundColor = "NONE" DvbSubDestinationBackgroundColorWhite DvbSubDestinationBackgroundColor = "WHITE" ) // Values returns all known values for DvbSubDestinationBackgroundColor. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (DvbSubDestinationBackgroundColor) Values() []DvbSubDestinationBackgroundColor { return []DvbSubDestinationBackgroundColor{ "BLACK", "NONE", "WHITE", } } type DvbSubDestinationFontColor string // Enum values for DvbSubDestinationFontColor const ( DvbSubDestinationFontColorBlack DvbSubDestinationFontColor = "BLACK" DvbSubDestinationFontColorBlue DvbSubDestinationFontColor = "BLUE" DvbSubDestinationFontColorGreen DvbSubDestinationFontColor = "GREEN" DvbSubDestinationFontColorRed DvbSubDestinationFontColor = "RED" DvbSubDestinationFontColorWhite DvbSubDestinationFontColor = "WHITE" DvbSubDestinationFontColorYellow DvbSubDestinationFontColor = "YELLOW" ) // Values returns all known values for DvbSubDestinationFontColor. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (DvbSubDestinationFontColor) Values() []DvbSubDestinationFontColor { return []DvbSubDestinationFontColor{ "BLACK", "BLUE", "GREEN", "RED", "WHITE", "YELLOW", } } type DvbSubDestinationOutlineColor string // Enum values for DvbSubDestinationOutlineColor const ( DvbSubDestinationOutlineColorBlack DvbSubDestinationOutlineColor = "BLACK" DvbSubDestinationOutlineColorBlue DvbSubDestinationOutlineColor = "BLUE" DvbSubDestinationOutlineColorGreen DvbSubDestinationOutlineColor = "GREEN" DvbSubDestinationOutlineColorRed DvbSubDestinationOutlineColor = "RED" DvbSubDestinationOutlineColorWhite DvbSubDestinationOutlineColor = "WHITE" DvbSubDestinationOutlineColorYellow DvbSubDestinationOutlineColor = "YELLOW" ) // Values returns all known values for DvbSubDestinationOutlineColor. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (DvbSubDestinationOutlineColor) Values() []DvbSubDestinationOutlineColor { return []DvbSubDestinationOutlineColor{ "BLACK", "BLUE", "GREEN", "RED", "WHITE", "YELLOW", } } type DvbSubDestinationShadowColor string // Enum values for DvbSubDestinationShadowColor const ( DvbSubDestinationShadowColorBlack DvbSubDestinationShadowColor = "BLACK" DvbSubDestinationShadowColorNone DvbSubDestinationShadowColor = "NONE" DvbSubDestinationShadowColorWhite DvbSubDestinationShadowColor = "WHITE" ) // Values returns all known values for DvbSubDestinationShadowColor. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (DvbSubDestinationShadowColor) Values() []DvbSubDestinationShadowColor { return []DvbSubDestinationShadowColor{ "BLACK", "NONE", "WHITE", } } type DvbSubDestinationTeletextGridControl string // Enum values for DvbSubDestinationTeletextGridControl const ( DvbSubDestinationTeletextGridControlFixed DvbSubDestinationTeletextGridControl = "FIXED" DvbSubDestinationTeletextGridControlScaled DvbSubDestinationTeletextGridControl = "SCALED" ) // Values returns all known values for DvbSubDestinationTeletextGridControl. Note // that this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (DvbSubDestinationTeletextGridControl) Values() []DvbSubDestinationTeletextGridControl { return []DvbSubDestinationTeletextGridControl{ "FIXED", "SCALED", } } type DvbSubOcrLanguage string // Enum values for DvbSubOcrLanguage const ( DvbSubOcrLanguageDeu DvbSubOcrLanguage = "DEU" DvbSubOcrLanguageEng DvbSubOcrLanguage = "ENG" DvbSubOcrLanguageFra DvbSubOcrLanguage = "FRA" DvbSubOcrLanguageNld DvbSubOcrLanguage = "NLD" DvbSubOcrLanguagePor DvbSubOcrLanguage = "POR" DvbSubOcrLanguageSpa DvbSubOcrLanguage = "SPA" ) // Values returns all known values for DvbSubOcrLanguage. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (DvbSubOcrLanguage) Values() []DvbSubOcrLanguage { return []DvbSubOcrLanguage{ "DEU", "ENG", "FRA", "NLD", "POR", "SPA", } } type Eac3AtmosCodingMode string // Enum values for Eac3AtmosCodingMode const ( Eac3AtmosCodingModeCodingMode514 Eac3AtmosCodingMode = "CODING_MODE_5_1_4" Eac3AtmosCodingModeCodingMode714 Eac3AtmosCodingMode = "CODING_MODE_7_1_4" Eac3AtmosCodingModeCodingMode916 Eac3AtmosCodingMode = "CODING_MODE_9_1_6" ) // Values returns all known values for Eac3AtmosCodingMode. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Eac3AtmosCodingMode) Values() []Eac3AtmosCodingMode { return []Eac3AtmosCodingMode{ "CODING_MODE_5_1_4", "CODING_MODE_7_1_4", "CODING_MODE_9_1_6", } } type Eac3AtmosDrcLine string // Enum values for Eac3AtmosDrcLine const ( Eac3AtmosDrcLineFilmLight Eac3AtmosDrcLine = "FILM_LIGHT" Eac3AtmosDrcLineFilmStandard Eac3AtmosDrcLine = "FILM_STANDARD" Eac3AtmosDrcLineMusicLight Eac3AtmosDrcLine = "MUSIC_LIGHT" Eac3AtmosDrcLineMusicStandard Eac3AtmosDrcLine = "MUSIC_STANDARD" Eac3AtmosDrcLineNone Eac3AtmosDrcLine = "NONE" Eac3AtmosDrcLineSpeech Eac3AtmosDrcLine = "SPEECH" ) // Values returns all known values for Eac3AtmosDrcLine. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Eac3AtmosDrcLine) Values() []Eac3AtmosDrcLine { return []Eac3AtmosDrcLine{ "FILM_LIGHT", "FILM_STANDARD", "MUSIC_LIGHT", "MUSIC_STANDARD", "NONE", "SPEECH", } } type Eac3AtmosDrcRf string // Enum values for Eac3AtmosDrcRf const ( Eac3AtmosDrcRfFilmLight Eac3AtmosDrcRf = "FILM_LIGHT" Eac3AtmosDrcRfFilmStandard Eac3AtmosDrcRf = "FILM_STANDARD" Eac3AtmosDrcRfMusicLight Eac3AtmosDrcRf = "MUSIC_LIGHT" Eac3AtmosDrcRfMusicStandard Eac3AtmosDrcRf = "MUSIC_STANDARD" Eac3AtmosDrcRfNone Eac3AtmosDrcRf = "NONE" Eac3AtmosDrcRfSpeech Eac3AtmosDrcRf = "SPEECH" ) // Values returns all known values for Eac3AtmosDrcRf. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Eac3AtmosDrcRf) Values() []Eac3AtmosDrcRf { return []Eac3AtmosDrcRf{ "FILM_LIGHT", "FILM_STANDARD", "MUSIC_LIGHT", "MUSIC_STANDARD", "NONE", "SPEECH", } } type Eac3AttenuationControl string // Enum values for Eac3AttenuationControl const ( Eac3AttenuationControlAttenuate3Db Eac3AttenuationControl = "ATTENUATE_3_DB" Eac3AttenuationControlNone Eac3AttenuationControl = "NONE" ) // Values returns all known values for Eac3AttenuationControl. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Eac3AttenuationControl) Values() []Eac3AttenuationControl { return []Eac3AttenuationControl{ "ATTENUATE_3_DB", "NONE", } } type Eac3BitstreamMode string // Enum values for Eac3BitstreamMode const ( Eac3BitstreamModeCommentary Eac3BitstreamMode = "COMMENTARY" Eac3BitstreamModeCompleteMain Eac3BitstreamMode = "COMPLETE_MAIN" Eac3BitstreamModeEmergency Eac3BitstreamMode = "EMERGENCY" Eac3BitstreamModeHearingImpaired Eac3BitstreamMode = "HEARING_IMPAIRED" Eac3BitstreamModeVisuallyImpaired Eac3BitstreamMode = "VISUALLY_IMPAIRED" ) // Values returns all known values for Eac3BitstreamMode. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Eac3BitstreamMode) Values() []Eac3BitstreamMode { return []Eac3BitstreamMode{ "COMMENTARY", "COMPLETE_MAIN", "EMERGENCY", "HEARING_IMPAIRED", "VISUALLY_IMPAIRED", } } type Eac3CodingMode string // Enum values for Eac3CodingMode const ( Eac3CodingModeCodingMode10 Eac3CodingMode = "CODING_MODE_1_0" Eac3CodingModeCodingMode20 Eac3CodingMode = "CODING_MODE_2_0" Eac3CodingModeCodingMode32 Eac3CodingMode = "CODING_MODE_3_2" ) // Values returns all known values for Eac3CodingMode. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Eac3CodingMode) Values() []Eac3CodingMode { return []Eac3CodingMode{ "CODING_MODE_1_0", "CODING_MODE_2_0", "CODING_MODE_3_2", } } type Eac3DcFilter string // Enum values for Eac3DcFilter const ( Eac3DcFilterDisabled Eac3DcFilter = "DISABLED" Eac3DcFilterEnabled Eac3DcFilter = "ENABLED" ) // Values returns all known values for Eac3DcFilter. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Eac3DcFilter) Values() []Eac3DcFilter { return []Eac3DcFilter{ "DISABLED", "ENABLED", } } type Eac3DrcLine string // Enum values for Eac3DrcLine const ( Eac3DrcLineFilmLight Eac3DrcLine = "FILM_LIGHT" Eac3DrcLineFilmStandard Eac3DrcLine = "FILM_STANDARD" Eac3DrcLineMusicLight Eac3DrcLine = "MUSIC_LIGHT" Eac3DrcLineMusicStandard Eac3DrcLine = "MUSIC_STANDARD" Eac3DrcLineNone Eac3DrcLine = "NONE" Eac3DrcLineSpeech Eac3DrcLine = "SPEECH" ) // Values returns all known values for Eac3DrcLine. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (Eac3DrcLine) Values() []Eac3DrcLine { return []Eac3DrcLine{ "FILM_LIGHT", "FILM_STANDARD", "MUSIC_LIGHT", "MUSIC_STANDARD", "NONE", "SPEECH", } } type Eac3DrcRf string // Enum values for Eac3DrcRf const ( Eac3DrcRfFilmLight Eac3DrcRf = "FILM_LIGHT" Eac3DrcRfFilmStandard Eac3DrcRf = "FILM_STANDARD" Eac3DrcRfMusicLight Eac3DrcRf = "MUSIC_LIGHT" Eac3DrcRfMusicStandard Eac3DrcRf = "MUSIC_STANDARD" Eac3DrcRfNone Eac3DrcRf = "NONE" Eac3DrcRfSpeech Eac3DrcRf = "SPEECH" ) // Values returns all known values for Eac3DrcRf. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (Eac3DrcRf) Values() []Eac3DrcRf { return []Eac3DrcRf{ "FILM_LIGHT", "FILM_STANDARD", "MUSIC_LIGHT", "MUSIC_STANDARD", "NONE", "SPEECH", } } type Eac3LfeControl string // Enum values for Eac3LfeControl const ( Eac3LfeControlLfe Eac3LfeControl = "LFE" Eac3LfeControlNoLfe Eac3LfeControl = "NO_LFE" ) // Values returns all known values for Eac3LfeControl. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Eac3LfeControl) Values() []Eac3LfeControl { return []Eac3LfeControl{ "LFE", "NO_LFE", } } type Eac3LfeFilter string // Enum values for Eac3LfeFilter const ( Eac3LfeFilterDisabled Eac3LfeFilter = "DISABLED" Eac3LfeFilterEnabled Eac3LfeFilter = "ENABLED" ) // Values returns all known values for Eac3LfeFilter. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Eac3LfeFilter) Values() []Eac3LfeFilter { return []Eac3LfeFilter{ "DISABLED", "ENABLED", } } type Eac3MetadataControl string // Enum values for Eac3MetadataControl const ( Eac3MetadataControlFollowInput Eac3MetadataControl = "FOLLOW_INPUT" Eac3MetadataControlUseConfigured Eac3MetadataControl = "USE_CONFIGURED" ) // Values returns all known values for Eac3MetadataControl. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Eac3MetadataControl) Values() []Eac3MetadataControl { return []Eac3MetadataControl{ "FOLLOW_INPUT", "USE_CONFIGURED", } } type Eac3PassthroughControl string // Enum values for Eac3PassthroughControl const ( Eac3PassthroughControlNoPassthrough Eac3PassthroughControl = "NO_PASSTHROUGH" Eac3PassthroughControlWhenPossible Eac3PassthroughControl = "WHEN_POSSIBLE" ) // Values returns all known values for Eac3PassthroughControl. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Eac3PassthroughControl) Values() []Eac3PassthroughControl { return []Eac3PassthroughControl{ "NO_PASSTHROUGH", "WHEN_POSSIBLE", } } type Eac3PhaseControl string // Enum values for Eac3PhaseControl const ( Eac3PhaseControlNoShift Eac3PhaseControl = "NO_SHIFT" Eac3PhaseControlShift90Degrees Eac3PhaseControl = "SHIFT_90_DEGREES" ) // Values returns all known values for Eac3PhaseControl. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Eac3PhaseControl) Values() []Eac3PhaseControl { return []Eac3PhaseControl{ "NO_SHIFT", "SHIFT_90_DEGREES", } } type Eac3StereoDownmix string // Enum values for Eac3StereoDownmix const ( Eac3StereoDownmixDpl2 Eac3StereoDownmix = "DPL2" Eac3StereoDownmixLoRo Eac3StereoDownmix = "LO_RO" Eac3StereoDownmixLtRt Eac3StereoDownmix = "LT_RT" Eac3StereoDownmixNotIndicated Eac3StereoDownmix = "NOT_INDICATED" ) // Values returns all known values for Eac3StereoDownmix. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Eac3StereoDownmix) Values() []Eac3StereoDownmix { return []Eac3StereoDownmix{ "DPL2", "LO_RO", "LT_RT", "NOT_INDICATED", } } type Eac3SurroundExMode string // Enum values for Eac3SurroundExMode const ( Eac3SurroundExModeDisabled Eac3SurroundExMode = "DISABLED" Eac3SurroundExModeEnabled Eac3SurroundExMode = "ENABLED" Eac3SurroundExModeNotIndicated Eac3SurroundExMode = "NOT_INDICATED" ) // Values returns all known values for Eac3SurroundExMode. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Eac3SurroundExMode) Values() []Eac3SurroundExMode { return []Eac3SurroundExMode{ "DISABLED", "ENABLED", "NOT_INDICATED", } } type Eac3SurroundMode string // Enum values for Eac3SurroundMode const ( Eac3SurroundModeDisabled Eac3SurroundMode = "DISABLED" Eac3SurroundModeEnabled Eac3SurroundMode = "ENABLED" Eac3SurroundModeNotIndicated Eac3SurroundMode = "NOT_INDICATED" ) // Values returns all known values for Eac3SurroundMode. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Eac3SurroundMode) Values() []Eac3SurroundMode { return []Eac3SurroundMode{ "DISABLED", "ENABLED", "NOT_INDICATED", } } type EbuTtDDestinationStyleControl string // Enum values for EbuTtDDestinationStyleControl const ( EbuTtDDestinationStyleControlExclude EbuTtDDestinationStyleControl = "EXCLUDE" EbuTtDDestinationStyleControlInclude EbuTtDDestinationStyleControl = "INCLUDE" ) // Values returns all known values for EbuTtDDestinationStyleControl. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (EbuTtDDestinationStyleControl) Values() []EbuTtDDestinationStyleControl { return []EbuTtDDestinationStyleControl{ "EXCLUDE", "INCLUDE", } } type EbuTtDFillLineGapControl string // Enum values for EbuTtDFillLineGapControl const ( EbuTtDFillLineGapControlDisabled EbuTtDFillLineGapControl = "DISABLED" EbuTtDFillLineGapControlEnabled EbuTtDFillLineGapControl = "ENABLED" ) // Values returns all known values for EbuTtDFillLineGapControl. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (EbuTtDFillLineGapControl) Values() []EbuTtDFillLineGapControl { return []EbuTtDFillLineGapControl{ "DISABLED", "ENABLED", } } type EmbeddedConvert608To708 string // Enum values for EmbeddedConvert608To708 const ( EmbeddedConvert608To708Disabled EmbeddedConvert608To708 = "DISABLED" EmbeddedConvert608To708Upconvert EmbeddedConvert608To708 = "UPCONVERT" ) // Values returns all known values for EmbeddedConvert608To708. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (EmbeddedConvert608To708) Values() []EmbeddedConvert608To708 { return []EmbeddedConvert608To708{ "DISABLED", "UPCONVERT", } } type EmbeddedScte20Detection string // Enum values for EmbeddedScte20Detection const ( EmbeddedScte20DetectionAuto EmbeddedScte20Detection = "AUTO" EmbeddedScte20DetectionOff EmbeddedScte20Detection = "OFF" ) // Values returns all known values for EmbeddedScte20Detection. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (EmbeddedScte20Detection) Values() []EmbeddedScte20Detection { return []EmbeddedScte20Detection{ "AUTO", "OFF", } } type FeatureActivationsInputPrepareScheduleActions string // Enum values for FeatureActivationsInputPrepareScheduleActions const ( FeatureActivationsInputPrepareScheduleActionsDisabled FeatureActivationsInputPrepareScheduleActions = "DISABLED" FeatureActivationsInputPrepareScheduleActionsEnabled FeatureActivationsInputPrepareScheduleActions = "ENABLED" ) // Values returns all known values for // FeatureActivationsInputPrepareScheduleActions. Note that this can be expanded in // the future, and so it is only as up to date as the client. The ordering of this // slice is not guaranteed to be stable across updates. func (FeatureActivationsInputPrepareScheduleActions) Values() []FeatureActivationsInputPrepareScheduleActions { return []FeatureActivationsInputPrepareScheduleActions{ "DISABLED", "ENABLED", } } type FecOutputIncludeFec string // Enum values for FecOutputIncludeFec const ( FecOutputIncludeFecColumn FecOutputIncludeFec = "COLUMN" FecOutputIncludeFecColumnAndRow FecOutputIncludeFec = "COLUMN_AND_ROW" ) // Values returns all known values for FecOutputIncludeFec. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (FecOutputIncludeFec) Values() []FecOutputIncludeFec { return []FecOutputIncludeFec{ "COLUMN", "COLUMN_AND_ROW", } } type FixedAfd string // Enum values for FixedAfd const ( FixedAfdAfd0000 FixedAfd = "AFD_0000" FixedAfdAfd0010 FixedAfd = "AFD_0010" FixedAfdAfd0011 FixedAfd = "AFD_0011" FixedAfdAfd0100 FixedAfd = "AFD_0100" FixedAfdAfd1000 FixedAfd = "AFD_1000" FixedAfdAfd1001 FixedAfd = "AFD_1001" FixedAfdAfd1010 FixedAfd = "AFD_1010" FixedAfdAfd1011 FixedAfd = "AFD_1011" FixedAfdAfd1101 FixedAfd = "AFD_1101" FixedAfdAfd1110 FixedAfd = "AFD_1110" FixedAfdAfd1111 FixedAfd = "AFD_1111" ) // Values returns all known values for FixedAfd. Note that this can be expanded in // the future, and so it is only as up to date as the client. The ordering of this // slice is not guaranteed to be stable across updates. func (FixedAfd) Values() []FixedAfd { return []FixedAfd{ "AFD_0000", "AFD_0010", "AFD_0011", "AFD_0100", "AFD_1000", "AFD_1001", "AFD_1010", "AFD_1011", "AFD_1101", "AFD_1110", "AFD_1111", } } type Fmp4NielsenId3Behavior string // Enum values for Fmp4NielsenId3Behavior const ( Fmp4NielsenId3BehaviorNoPassthrough Fmp4NielsenId3Behavior = "NO_PASSTHROUGH" Fmp4NielsenId3BehaviorPassthrough Fmp4NielsenId3Behavior = "PASSTHROUGH" ) // Values returns all known values for Fmp4NielsenId3Behavior. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Fmp4NielsenId3Behavior) Values() []Fmp4NielsenId3Behavior { return []Fmp4NielsenId3Behavior{ "NO_PASSTHROUGH", "PASSTHROUGH", } } type Fmp4TimedMetadataBehavior string // Enum values for Fmp4TimedMetadataBehavior const ( Fmp4TimedMetadataBehaviorNoPassthrough Fmp4TimedMetadataBehavior = "NO_PASSTHROUGH" Fmp4TimedMetadataBehaviorPassthrough Fmp4TimedMetadataBehavior = "PASSTHROUGH" ) // Values returns all known values for Fmp4TimedMetadataBehavior. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (Fmp4TimedMetadataBehavior) Values() []Fmp4TimedMetadataBehavior { return []Fmp4TimedMetadataBehavior{ "NO_PASSTHROUGH", "PASSTHROUGH", } } type FollowPoint string // Enum values for FollowPoint const ( FollowPointEnd FollowPoint = "END" FollowPointStart FollowPoint = "START" ) // Values returns all known values for FollowPoint. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (FollowPoint) Values() []FollowPoint { return []FollowPoint{ "END", "START", } } type FrameCaptureIntervalUnit string // Enum values for FrameCaptureIntervalUnit const ( FrameCaptureIntervalUnitMilliseconds FrameCaptureIntervalUnit = "MILLISECONDS" FrameCaptureIntervalUnitSeconds FrameCaptureIntervalUnit = "SECONDS" ) // Values returns all known values for FrameCaptureIntervalUnit. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (FrameCaptureIntervalUnit) Values() []FrameCaptureIntervalUnit { return []FrameCaptureIntervalUnit{ "MILLISECONDS", "SECONDS", } } type GlobalConfigurationInputEndAction string // Enum values for GlobalConfigurationInputEndAction const ( GlobalConfigurationInputEndActionNone GlobalConfigurationInputEndAction = "NONE" GlobalConfigurationInputEndActionSwitchAndLoopInputs GlobalConfigurationInputEndAction = "SWITCH_AND_LOOP_INPUTS" ) // Values returns all known values for GlobalConfigurationInputEndAction. Note // that this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (GlobalConfigurationInputEndAction) Values() []GlobalConfigurationInputEndAction { return []GlobalConfigurationInputEndAction{ "NONE", "SWITCH_AND_LOOP_INPUTS", } } type GlobalConfigurationLowFramerateInputs string // Enum values for GlobalConfigurationLowFramerateInputs const ( GlobalConfigurationLowFramerateInputsDisabled GlobalConfigurationLowFramerateInputs = "DISABLED" GlobalConfigurationLowFramerateInputsEnabled GlobalConfigurationLowFramerateInputs = "ENABLED" ) // Values returns all known values for GlobalConfigurationLowFramerateInputs. Note // that this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (GlobalConfigurationLowFramerateInputs) Values() []GlobalConfigurationLowFramerateInputs { return []GlobalConfigurationLowFramerateInputs{ "DISABLED", "ENABLED", } } type GlobalConfigurationOutputLockingMode string // Enum values for GlobalConfigurationOutputLockingMode const ( GlobalConfigurationOutputLockingModeEpochLocking GlobalConfigurationOutputLockingMode = "EPOCH_LOCKING" GlobalConfigurationOutputLockingModePipelineLocking GlobalConfigurationOutputLockingMode = "PIPELINE_LOCKING" ) // Values returns all known values for GlobalConfigurationOutputLockingMode. Note // that this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (GlobalConfigurationOutputLockingMode) Values() []GlobalConfigurationOutputLockingMode { return []GlobalConfigurationOutputLockingMode{ "EPOCH_LOCKING", "PIPELINE_LOCKING", } } type GlobalConfigurationOutputTimingSource string // Enum values for GlobalConfigurationOutputTimingSource const ( GlobalConfigurationOutputTimingSourceInputClock GlobalConfigurationOutputTimingSource = "INPUT_CLOCK" GlobalConfigurationOutputTimingSourceSystemClock GlobalConfigurationOutputTimingSource = "SYSTEM_CLOCK" ) // Values returns all known values for GlobalConfigurationOutputTimingSource. Note // that this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (GlobalConfigurationOutputTimingSource) Values() []GlobalConfigurationOutputTimingSource { return []GlobalConfigurationOutputTimingSource{ "INPUT_CLOCK", "SYSTEM_CLOCK", } } type H264AdaptiveQuantization string // Enum values for H264AdaptiveQuantization const ( H264AdaptiveQuantizationAuto H264AdaptiveQuantization = "AUTO" H264AdaptiveQuantizationHigh H264AdaptiveQuantization = "HIGH" H264AdaptiveQuantizationHigher H264AdaptiveQuantization = "HIGHER" H264AdaptiveQuantizationLow H264AdaptiveQuantization = "LOW" H264AdaptiveQuantizationMax H264AdaptiveQuantization = "MAX" H264AdaptiveQuantizationMedium H264AdaptiveQuantization = "MEDIUM" H264AdaptiveQuantizationOff H264AdaptiveQuantization = "OFF" ) // Values returns all known values for H264AdaptiveQuantization. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (H264AdaptiveQuantization) Values() []H264AdaptiveQuantization { return []H264AdaptiveQuantization{ "AUTO", "HIGH", "HIGHER", "LOW", "MAX", "MEDIUM", "OFF", } } type H264ColorMetadata string // Enum values for H264ColorMetadata const ( H264ColorMetadataIgnore H264ColorMetadata = "IGNORE" H264ColorMetadataInsert H264ColorMetadata = "INSERT" ) // Values returns all known values for H264ColorMetadata. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (H264ColorMetadata) Values() []H264ColorMetadata { return []H264ColorMetadata{ "IGNORE", "INSERT", } } type H264EntropyEncoding string // Enum values for H264EntropyEncoding const ( H264EntropyEncodingCabac H264EntropyEncoding = "CABAC" H264EntropyEncodingCavlc H264EntropyEncoding = "CAVLC" ) // Values returns all known values for H264EntropyEncoding. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (H264EntropyEncoding) Values() []H264EntropyEncoding { return []H264EntropyEncoding{ "CABAC", "CAVLC", } } type H264FlickerAq string // Enum values for H264FlickerAq const ( H264FlickerAqDisabled H264FlickerAq = "DISABLED" H264FlickerAqEnabled H264FlickerAq = "ENABLED" ) // Values returns all known values for H264FlickerAq. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (H264FlickerAq) Values() []H264FlickerAq { return []H264FlickerAq{ "DISABLED", "ENABLED", } } type H264ForceFieldPictures string // Enum values for H264ForceFieldPictures const ( H264ForceFieldPicturesDisabled H264ForceFieldPictures = "DISABLED" H264ForceFieldPicturesEnabled H264ForceFieldPictures = "ENABLED" ) // Values returns all known values for H264ForceFieldPictures. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (H264ForceFieldPictures) Values() []H264ForceFieldPictures { return []H264ForceFieldPictures{ "DISABLED", "ENABLED", } } type H264FramerateControl string // Enum values for H264FramerateControl const ( H264FramerateControlInitializeFromSource H264FramerateControl = "INITIALIZE_FROM_SOURCE" H264FramerateControlSpecified H264FramerateControl = "SPECIFIED" ) // Values returns all known values for H264FramerateControl. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (H264FramerateControl) Values() []H264FramerateControl { return []H264FramerateControl{ "INITIALIZE_FROM_SOURCE", "SPECIFIED", } } type H264GopBReference string // Enum values for H264GopBReference const ( H264GopBReferenceDisabled H264GopBReference = "DISABLED" H264GopBReferenceEnabled H264GopBReference = "ENABLED" ) // Values returns all known values for H264GopBReference. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (H264GopBReference) Values() []H264GopBReference { return []H264GopBReference{ "DISABLED", "ENABLED", } } type H264GopSizeUnits string // Enum values for H264GopSizeUnits const ( H264GopSizeUnitsFrames H264GopSizeUnits = "FRAMES" H264GopSizeUnitsSeconds H264GopSizeUnits = "SECONDS" ) // Values returns all known values for H264GopSizeUnits. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (H264GopSizeUnits) Values() []H264GopSizeUnits { return []H264GopSizeUnits{ "FRAMES", "SECONDS", } } type H264Level string // Enum values for H264Level const ( H264LevelH264Level1 H264Level = "H264_LEVEL_1" H264LevelH264Level11 H264Level = "H264_LEVEL_1_1" H264LevelH264Level12 H264Level = "H264_LEVEL_1_2" H264LevelH264Level13 H264Level = "H264_LEVEL_1_3" H264LevelH264Level2 H264Level = "H264_LEVEL_2" H264LevelH264Level21 H264Level = "H264_LEVEL_2_1" H264LevelH264Level22 H264Level = "H264_LEVEL_2_2" H264LevelH264Level3 H264Level = "H264_LEVEL_3" H264LevelH264Level31 H264Level = "H264_LEVEL_3_1" H264LevelH264Level32 H264Level = "H264_LEVEL_3_2" H264LevelH264Level4 H264Level = "H264_LEVEL_4" H264LevelH264Level41 H264Level = "H264_LEVEL_4_1" H264LevelH264Level42 H264Level = "H264_LEVEL_4_2" H264LevelH264Level5 H264Level = "H264_LEVEL_5" H264LevelH264Level51 H264Level = "H264_LEVEL_5_1" H264LevelH264Level52 H264Level = "H264_LEVEL_5_2" H264LevelH264LevelAuto H264Level = "H264_LEVEL_AUTO" ) // Values returns all known values for H264Level. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (H264Level) Values() []H264Level { return []H264Level{ "H264_LEVEL_1", "H264_LEVEL_1_1", "H264_LEVEL_1_2", "H264_LEVEL_1_3", "H264_LEVEL_2", "H264_LEVEL_2_1", "H264_LEVEL_2_2", "H264_LEVEL_3", "H264_LEVEL_3_1", "H264_LEVEL_3_2", "H264_LEVEL_4", "H264_LEVEL_4_1", "H264_LEVEL_4_2", "H264_LEVEL_5", "H264_LEVEL_5_1", "H264_LEVEL_5_2", "H264_LEVEL_AUTO", } } type H264LookAheadRateControl string // Enum values for H264LookAheadRateControl const ( H264LookAheadRateControlHigh H264LookAheadRateControl = "HIGH" H264LookAheadRateControlLow H264LookAheadRateControl = "LOW" H264LookAheadRateControlMedium H264LookAheadRateControl = "MEDIUM" ) // Values returns all known values for H264LookAheadRateControl. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (H264LookAheadRateControl) Values() []H264LookAheadRateControl { return []H264LookAheadRateControl{ "HIGH", "LOW", "MEDIUM", } } type H264ParControl string // Enum values for H264ParControl const ( H264ParControlInitializeFromSource H264ParControl = "INITIALIZE_FROM_SOURCE" H264ParControlSpecified H264ParControl = "SPECIFIED" ) // Values returns all known values for H264ParControl. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (H264ParControl) Values() []H264ParControl { return []H264ParControl{ "INITIALIZE_FROM_SOURCE", "SPECIFIED", } } type H264Profile string // Enum values for H264Profile const ( H264ProfileBaseline H264Profile = "BASELINE" H264ProfileHigh H264Profile = "HIGH" H264ProfileHigh10bit H264Profile = "HIGH_10BIT" H264ProfileHigh422 H264Profile = "HIGH_422" H264ProfileHigh42210bit H264Profile = "HIGH_422_10BIT" H264ProfileMain H264Profile = "MAIN" ) // Values returns all known values for H264Profile. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (H264Profile) Values() []H264Profile { return []H264Profile{ "BASELINE", "HIGH", "HIGH_10BIT", "HIGH_422", "HIGH_422_10BIT", "MAIN", } } type H264QualityLevel string // Enum values for H264QualityLevel const ( H264QualityLevelEnhancedQuality H264QualityLevel = "ENHANCED_QUALITY" H264QualityLevelStandardQuality H264QualityLevel = "STANDARD_QUALITY" ) // Values returns all known values for H264QualityLevel. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (H264QualityLevel) Values() []H264QualityLevel { return []H264QualityLevel{ "ENHANCED_QUALITY", "STANDARD_QUALITY", } } type H264RateControlMode string // Enum values for H264RateControlMode const ( H264RateControlModeCbr H264RateControlMode = "CBR" H264RateControlModeMultiplex H264RateControlMode = "MULTIPLEX" H264RateControlModeQvbr H264RateControlMode = "QVBR" H264RateControlModeVbr H264RateControlMode = "VBR" ) // Values returns all known values for H264RateControlMode. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (H264RateControlMode) Values() []H264RateControlMode { return []H264RateControlMode{ "CBR", "MULTIPLEX", "QVBR", "VBR", } } type H264ScanType string // Enum values for H264ScanType const ( H264ScanTypeInterlaced H264ScanType = "INTERLACED" H264ScanTypeProgressive H264ScanType = "PROGRESSIVE" ) // Values returns all known values for H264ScanType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (H264ScanType) Values() []H264ScanType { return []H264ScanType{ "INTERLACED", "PROGRESSIVE", } } type H264SceneChangeDetect string // Enum values for H264SceneChangeDetect const ( H264SceneChangeDetectDisabled H264SceneChangeDetect = "DISABLED" H264SceneChangeDetectEnabled H264SceneChangeDetect = "ENABLED" ) // Values returns all known values for H264SceneChangeDetect. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (H264SceneChangeDetect) Values() []H264SceneChangeDetect { return []H264SceneChangeDetect{ "DISABLED", "ENABLED", } } type H264SpatialAq string // Enum values for H264SpatialAq const ( H264SpatialAqDisabled H264SpatialAq = "DISABLED" H264SpatialAqEnabled H264SpatialAq = "ENABLED" ) // Values returns all known values for H264SpatialAq. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (H264SpatialAq) Values() []H264SpatialAq { return []H264SpatialAq{ "DISABLED", "ENABLED", } } type H264SubGopLength string // Enum values for H264SubGopLength const ( H264SubGopLengthDynamic H264SubGopLength = "DYNAMIC" H264SubGopLengthFixed H264SubGopLength = "FIXED" ) // Values returns all known values for H264SubGopLength. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (H264SubGopLength) Values() []H264SubGopLength { return []H264SubGopLength{ "DYNAMIC", "FIXED", } } type H264Syntax string // Enum values for H264Syntax const ( H264SyntaxDefault H264Syntax = "DEFAULT" H264SyntaxRp2027 H264Syntax = "RP2027" ) // Values returns all known values for H264Syntax. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (H264Syntax) Values() []H264Syntax { return []H264Syntax{ "DEFAULT", "RP2027", } } type H264TemporalAq string // Enum values for H264TemporalAq const ( H264TemporalAqDisabled H264TemporalAq = "DISABLED" H264TemporalAqEnabled H264TemporalAq = "ENABLED" ) // Values returns all known values for H264TemporalAq. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (H264TemporalAq) Values() []H264TemporalAq { return []H264TemporalAq{ "DISABLED", "ENABLED", } } type H264TimecodeInsertionBehavior string // Enum values for H264TimecodeInsertionBehavior const ( H264TimecodeInsertionBehaviorDisabled H264TimecodeInsertionBehavior = "DISABLED" H264TimecodeInsertionBehaviorPicTimingSei H264TimecodeInsertionBehavior = "PIC_TIMING_SEI" ) // Values returns all known values for H264TimecodeInsertionBehavior. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (H264TimecodeInsertionBehavior) Values() []H264TimecodeInsertionBehavior { return []H264TimecodeInsertionBehavior{ "DISABLED", "PIC_TIMING_SEI", } } type H265AdaptiveQuantization string // Enum values for H265AdaptiveQuantization const ( H265AdaptiveQuantizationAuto H265AdaptiveQuantization = "AUTO" H265AdaptiveQuantizationHigh H265AdaptiveQuantization = "HIGH" H265AdaptiveQuantizationHigher H265AdaptiveQuantization = "HIGHER" H265AdaptiveQuantizationLow H265AdaptiveQuantization = "LOW" H265AdaptiveQuantizationMax H265AdaptiveQuantization = "MAX" H265AdaptiveQuantizationMedium H265AdaptiveQuantization = "MEDIUM" H265AdaptiveQuantizationOff H265AdaptiveQuantization = "OFF" ) // Values returns all known values for H265AdaptiveQuantization. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (H265AdaptiveQuantization) Values() []H265AdaptiveQuantization { return []H265AdaptiveQuantization{ "AUTO", "HIGH", "HIGHER", "LOW", "MAX", "MEDIUM", "OFF", } } type H265AlternativeTransferFunction string // Enum values for H265AlternativeTransferFunction const ( H265AlternativeTransferFunctionInsert H265AlternativeTransferFunction = "INSERT" H265AlternativeTransferFunctionOmit H265AlternativeTransferFunction = "OMIT" ) // Values returns all known values for H265AlternativeTransferFunction. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (H265AlternativeTransferFunction) Values() []H265AlternativeTransferFunction { return []H265AlternativeTransferFunction{ "INSERT", "OMIT", } } type H265ColorMetadata string // Enum values for H265ColorMetadata const ( H265ColorMetadataIgnore H265ColorMetadata = "IGNORE" H265ColorMetadataInsert H265ColorMetadata = "INSERT" ) // Values returns all known values for H265ColorMetadata. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (H265ColorMetadata) Values() []H265ColorMetadata { return []H265ColorMetadata{ "IGNORE", "INSERT", } } type H265FlickerAq string // Enum values for H265FlickerAq const ( H265FlickerAqDisabled H265FlickerAq = "DISABLED" H265FlickerAqEnabled H265FlickerAq = "ENABLED" ) // Values returns all known values for H265FlickerAq. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (H265FlickerAq) Values() []H265FlickerAq { return []H265FlickerAq{ "DISABLED", "ENABLED", } } type H265GopSizeUnits string // Enum values for H265GopSizeUnits const ( H265GopSizeUnitsFrames H265GopSizeUnits = "FRAMES" H265GopSizeUnitsSeconds H265GopSizeUnits = "SECONDS" ) // Values returns all known values for H265GopSizeUnits. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (H265GopSizeUnits) Values() []H265GopSizeUnits { return []H265GopSizeUnits{ "FRAMES", "SECONDS", } } type H265Level string // Enum values for H265Level const ( H265LevelH265Level1 H265Level = "H265_LEVEL_1" H265LevelH265Level2 H265Level = "H265_LEVEL_2" H265LevelH265Level21 H265Level = "H265_LEVEL_2_1" H265LevelH265Level3 H265Level = "H265_LEVEL_3" H265LevelH265Level31 H265Level = "H265_LEVEL_3_1" H265LevelH265Level4 H265Level = "H265_LEVEL_4" H265LevelH265Level41 H265Level = "H265_LEVEL_4_1" H265LevelH265Level5 H265Level = "H265_LEVEL_5" H265LevelH265Level51 H265Level = "H265_LEVEL_5_1" H265LevelH265Level52 H265Level = "H265_LEVEL_5_2" H265LevelH265Level6 H265Level = "H265_LEVEL_6" H265LevelH265Level61 H265Level = "H265_LEVEL_6_1" H265LevelH265Level62 H265Level = "H265_LEVEL_6_2" H265LevelH265LevelAuto H265Level = "H265_LEVEL_AUTO" ) // Values returns all known values for H265Level. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (H265Level) Values() []H265Level { return []H265Level{ "H265_LEVEL_1", "H265_LEVEL_2", "H265_LEVEL_2_1", "H265_LEVEL_3", "H265_LEVEL_3_1", "H265_LEVEL_4", "H265_LEVEL_4_1", "H265_LEVEL_5", "H265_LEVEL_5_1", "H265_LEVEL_5_2", "H265_LEVEL_6", "H265_LEVEL_6_1", "H265_LEVEL_6_2", "H265_LEVEL_AUTO", } } type H265LookAheadRateControl string // Enum values for H265LookAheadRateControl const ( H265LookAheadRateControlHigh H265LookAheadRateControl = "HIGH" H265LookAheadRateControlLow H265LookAheadRateControl = "LOW" H265LookAheadRateControlMedium H265LookAheadRateControl = "MEDIUM" ) // Values returns all known values for H265LookAheadRateControl. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (H265LookAheadRateControl) Values() []H265LookAheadRateControl { return []H265LookAheadRateControl{ "HIGH", "LOW", "MEDIUM", } } type H265Profile string // Enum values for H265Profile const ( H265ProfileMain H265Profile = "MAIN" H265ProfileMain10bit H265Profile = "MAIN_10BIT" ) // Values returns all known values for H265Profile. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (H265Profile) Values() []H265Profile { return []H265Profile{ "MAIN", "MAIN_10BIT", } } type H265RateControlMode string // Enum values for H265RateControlMode const ( H265RateControlModeCbr H265RateControlMode = "CBR" H265RateControlModeMultiplex H265RateControlMode = "MULTIPLEX" H265RateControlModeQvbr H265RateControlMode = "QVBR" ) // Values returns all known values for H265RateControlMode. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (H265RateControlMode) Values() []H265RateControlMode { return []H265RateControlMode{ "CBR", "MULTIPLEX", "QVBR", } } type H265ScanType string // Enum values for H265ScanType const ( H265ScanTypeInterlaced H265ScanType = "INTERLACED" H265ScanTypeProgressive H265ScanType = "PROGRESSIVE" ) // Values returns all known values for H265ScanType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (H265ScanType) Values() []H265ScanType { return []H265ScanType{ "INTERLACED", "PROGRESSIVE", } } type H265SceneChangeDetect string // Enum values for H265SceneChangeDetect const ( H265SceneChangeDetectDisabled H265SceneChangeDetect = "DISABLED" H265SceneChangeDetectEnabled H265SceneChangeDetect = "ENABLED" ) // Values returns all known values for H265SceneChangeDetect. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (H265SceneChangeDetect) Values() []H265SceneChangeDetect { return []H265SceneChangeDetect{ "DISABLED", "ENABLED", } } type H265Tier string // Enum values for H265Tier const ( H265TierHigh H265Tier = "HIGH" H265TierMain H265Tier = "MAIN" ) // Values returns all known values for H265Tier. Note that this can be expanded in // the future, and so it is only as up to date as the client. The ordering of this // slice is not guaranteed to be stable across updates. func (H265Tier) Values() []H265Tier { return []H265Tier{ "HIGH", "MAIN", } } type H265TimecodeInsertionBehavior string // Enum values for H265TimecodeInsertionBehavior const ( H265TimecodeInsertionBehaviorDisabled H265TimecodeInsertionBehavior = "DISABLED" H265TimecodeInsertionBehaviorPicTimingSei H265TimecodeInsertionBehavior = "PIC_TIMING_SEI" ) // Values returns all known values for H265TimecodeInsertionBehavior. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (H265TimecodeInsertionBehavior) Values() []H265TimecodeInsertionBehavior { return []H265TimecodeInsertionBehavior{ "DISABLED", "PIC_TIMING_SEI", } } type HlsAdMarkers string // Enum values for HlsAdMarkers const ( HlsAdMarkersAdobe HlsAdMarkers = "ADOBE" HlsAdMarkersElemental HlsAdMarkers = "ELEMENTAL" HlsAdMarkersElementalScte35 HlsAdMarkers = "ELEMENTAL_SCTE35" ) // Values returns all known values for HlsAdMarkers. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (HlsAdMarkers) Values() []HlsAdMarkers { return []HlsAdMarkers{ "ADOBE", "ELEMENTAL", "ELEMENTAL_SCTE35", } } type HlsAkamaiHttpTransferMode string // Enum values for HlsAkamaiHttpTransferMode const ( HlsAkamaiHttpTransferModeChunked HlsAkamaiHttpTransferMode = "CHUNKED" HlsAkamaiHttpTransferModeNonChunked HlsAkamaiHttpTransferMode = "NON_CHUNKED" ) // Values returns all known values for HlsAkamaiHttpTransferMode. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (HlsAkamaiHttpTransferMode) Values() []HlsAkamaiHttpTransferMode { return []HlsAkamaiHttpTransferMode{ "CHUNKED", "NON_CHUNKED", } } type HlsCaptionLanguageSetting string // Enum values for HlsCaptionLanguageSetting const ( HlsCaptionLanguageSettingInsert HlsCaptionLanguageSetting = "INSERT" HlsCaptionLanguageSettingNone HlsCaptionLanguageSetting = "NONE" HlsCaptionLanguageSettingOmit HlsCaptionLanguageSetting = "OMIT" ) // Values returns all known values for HlsCaptionLanguageSetting. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (HlsCaptionLanguageSetting) Values() []HlsCaptionLanguageSetting { return []HlsCaptionLanguageSetting{ "INSERT", "NONE", "OMIT", } } type HlsClientCache string // Enum values for HlsClientCache const ( HlsClientCacheDisabled HlsClientCache = "DISABLED" HlsClientCacheEnabled HlsClientCache = "ENABLED" ) // Values returns all known values for HlsClientCache. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (HlsClientCache) Values() []HlsClientCache { return []HlsClientCache{ "DISABLED", "ENABLED", } } type HlsCodecSpecification string // Enum values for HlsCodecSpecification const ( HlsCodecSpecificationRfc4281 HlsCodecSpecification = "RFC_4281" HlsCodecSpecificationRfc6381 HlsCodecSpecification = "RFC_6381" ) // Values returns all known values for HlsCodecSpecification. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (HlsCodecSpecification) Values() []HlsCodecSpecification { return []HlsCodecSpecification{ "RFC_4281", "RFC_6381", } } type HlsDirectoryStructure string // Enum values for HlsDirectoryStructure const ( HlsDirectoryStructureSingleDirectory HlsDirectoryStructure = "SINGLE_DIRECTORY" HlsDirectoryStructureSubdirectoryPerStream HlsDirectoryStructure = "SUBDIRECTORY_PER_STREAM" ) // Values returns all known values for HlsDirectoryStructure. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (HlsDirectoryStructure) Values() []HlsDirectoryStructure { return []HlsDirectoryStructure{ "SINGLE_DIRECTORY", "SUBDIRECTORY_PER_STREAM", } } type HlsDiscontinuityTags string // Enum values for HlsDiscontinuityTags const ( HlsDiscontinuityTagsInsert HlsDiscontinuityTags = "INSERT" HlsDiscontinuityTagsNeverInsert HlsDiscontinuityTags = "NEVER_INSERT" ) // Values returns all known values for HlsDiscontinuityTags. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (HlsDiscontinuityTags) Values() []HlsDiscontinuityTags { return []HlsDiscontinuityTags{ "INSERT", "NEVER_INSERT", } } type HlsEncryptionType string // Enum values for HlsEncryptionType const ( HlsEncryptionTypeAes128 HlsEncryptionType = "AES128" HlsEncryptionTypeSampleAes HlsEncryptionType = "SAMPLE_AES" ) // Values returns all known values for HlsEncryptionType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (HlsEncryptionType) Values() []HlsEncryptionType { return []HlsEncryptionType{ "AES128", "SAMPLE_AES", } } type HlsH265PackagingType string // Enum values for HlsH265PackagingType const ( HlsH265PackagingTypeHev1 HlsH265PackagingType = "HEV1" HlsH265PackagingTypeHvc1 HlsH265PackagingType = "HVC1" ) // Values returns all known values for HlsH265PackagingType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (HlsH265PackagingType) Values() []HlsH265PackagingType { return []HlsH265PackagingType{ "HEV1", "HVC1", } } type HlsId3SegmentTaggingState string // Enum values for HlsId3SegmentTaggingState const ( HlsId3SegmentTaggingStateDisabled HlsId3SegmentTaggingState = "DISABLED" HlsId3SegmentTaggingStateEnabled HlsId3SegmentTaggingState = "ENABLED" ) // Values returns all known values for HlsId3SegmentTaggingState. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (HlsId3SegmentTaggingState) Values() []HlsId3SegmentTaggingState { return []HlsId3SegmentTaggingState{ "DISABLED", "ENABLED", } } type HlsIncompleteSegmentBehavior string // Enum values for HlsIncompleteSegmentBehavior const ( HlsIncompleteSegmentBehaviorAuto HlsIncompleteSegmentBehavior = "AUTO" HlsIncompleteSegmentBehaviorSuppress HlsIncompleteSegmentBehavior = "SUPPRESS" ) // Values returns all known values for HlsIncompleteSegmentBehavior. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (HlsIncompleteSegmentBehavior) Values() []HlsIncompleteSegmentBehavior { return []HlsIncompleteSegmentBehavior{ "AUTO", "SUPPRESS", } } type HlsIvInManifest string // Enum values for HlsIvInManifest const ( HlsIvInManifestExclude HlsIvInManifest = "EXCLUDE" HlsIvInManifestInclude HlsIvInManifest = "INCLUDE" ) // Values returns all known values for HlsIvInManifest. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (HlsIvInManifest) Values() []HlsIvInManifest { return []HlsIvInManifest{ "EXCLUDE", "INCLUDE", } } type HlsIvSource string // Enum values for HlsIvSource const ( HlsIvSourceExplicit HlsIvSource = "EXPLICIT" HlsIvSourceFollowsSegmentNumber HlsIvSource = "FOLLOWS_SEGMENT_NUMBER" ) // Values returns all known values for HlsIvSource. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (HlsIvSource) Values() []HlsIvSource { return []HlsIvSource{ "EXPLICIT", "FOLLOWS_SEGMENT_NUMBER", } } type HlsManifestCompression string // Enum values for HlsManifestCompression const ( HlsManifestCompressionGzip HlsManifestCompression = "GZIP" HlsManifestCompressionNone HlsManifestCompression = "NONE" ) // Values returns all known values for HlsManifestCompression. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (HlsManifestCompression) Values() []HlsManifestCompression { return []HlsManifestCompression{ "GZIP", "NONE", } } type HlsManifestDurationFormat string // Enum values for HlsManifestDurationFormat const ( HlsManifestDurationFormatFloatingPoint HlsManifestDurationFormat = "FLOATING_POINT" HlsManifestDurationFormatInteger HlsManifestDurationFormat = "INTEGER" ) // Values returns all known values for HlsManifestDurationFormat. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (HlsManifestDurationFormat) Values() []HlsManifestDurationFormat { return []HlsManifestDurationFormat{ "FLOATING_POINT", "INTEGER", } } type HlsMediaStoreStorageClass string // Enum values for HlsMediaStoreStorageClass const ( HlsMediaStoreStorageClassTemporal HlsMediaStoreStorageClass = "TEMPORAL" ) // Values returns all known values for HlsMediaStoreStorageClass. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (HlsMediaStoreStorageClass) Values() []HlsMediaStoreStorageClass { return []HlsMediaStoreStorageClass{ "TEMPORAL", } } type HlsMode string // Enum values for HlsMode const ( HlsModeLive HlsMode = "LIVE" HlsModeVod HlsMode = "VOD" ) // Values returns all known values for HlsMode. Note that this can be expanded in // the future, and so it is only as up to date as the client. The ordering of this // slice is not guaranteed to be stable across updates. func (HlsMode) Values() []HlsMode { return []HlsMode{ "LIVE", "VOD", } } type HlsOutputSelection string // Enum values for HlsOutputSelection const ( HlsOutputSelectionManifestsAndSegments HlsOutputSelection = "MANIFESTS_AND_SEGMENTS" HlsOutputSelectionSegmentsOnly HlsOutputSelection = "SEGMENTS_ONLY" HlsOutputSelectionVariantManifestsAndSegments HlsOutputSelection = "VARIANT_MANIFESTS_AND_SEGMENTS" ) // Values returns all known values for HlsOutputSelection. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (HlsOutputSelection) Values() []HlsOutputSelection { return []HlsOutputSelection{ "MANIFESTS_AND_SEGMENTS", "SEGMENTS_ONLY", "VARIANT_MANIFESTS_AND_SEGMENTS", } } type HlsProgramDateTime string // Enum values for HlsProgramDateTime const ( HlsProgramDateTimeExclude HlsProgramDateTime = "EXCLUDE" HlsProgramDateTimeInclude HlsProgramDateTime = "INCLUDE" ) // Values returns all known values for HlsProgramDateTime. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (HlsProgramDateTime) Values() []HlsProgramDateTime { return []HlsProgramDateTime{ "EXCLUDE", "INCLUDE", } } type HlsProgramDateTimeClock string // Enum values for HlsProgramDateTimeClock const ( HlsProgramDateTimeClockInitializeFromOutputTimecode HlsProgramDateTimeClock = "INITIALIZE_FROM_OUTPUT_TIMECODE" HlsProgramDateTimeClockSystemClock HlsProgramDateTimeClock = "SYSTEM_CLOCK" ) // Values returns all known values for HlsProgramDateTimeClock. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (HlsProgramDateTimeClock) Values() []HlsProgramDateTimeClock { return []HlsProgramDateTimeClock{ "INITIALIZE_FROM_OUTPUT_TIMECODE", "SYSTEM_CLOCK", } } type HlsRedundantManifest string // Enum values for HlsRedundantManifest const ( HlsRedundantManifestDisabled HlsRedundantManifest = "DISABLED" HlsRedundantManifestEnabled HlsRedundantManifest = "ENABLED" ) // Values returns all known values for HlsRedundantManifest. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (HlsRedundantManifest) Values() []HlsRedundantManifest { return []HlsRedundantManifest{ "DISABLED", "ENABLED", } } type HlsScte35SourceType string // Enum values for HlsScte35SourceType const ( HlsScte35SourceTypeManifest HlsScte35SourceType = "MANIFEST" HlsScte35SourceTypeSegments HlsScte35SourceType = "SEGMENTS" ) // Values returns all known values for HlsScte35SourceType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (HlsScte35SourceType) Values() []HlsScte35SourceType { return []HlsScte35SourceType{ "MANIFEST", "SEGMENTS", } } type HlsSegmentationMode string // Enum values for HlsSegmentationMode const ( HlsSegmentationModeUseInputSegmentation HlsSegmentationMode = "USE_INPUT_SEGMENTATION" HlsSegmentationModeUseSegmentDuration HlsSegmentationMode = "USE_SEGMENT_DURATION" ) // Values returns all known values for HlsSegmentationMode. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (HlsSegmentationMode) Values() []HlsSegmentationMode { return []HlsSegmentationMode{ "USE_INPUT_SEGMENTATION", "USE_SEGMENT_DURATION", } } type HlsStreamInfResolution string // Enum values for HlsStreamInfResolution const ( HlsStreamInfResolutionExclude HlsStreamInfResolution = "EXCLUDE" HlsStreamInfResolutionInclude HlsStreamInfResolution = "INCLUDE" ) // Values returns all known values for HlsStreamInfResolution. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (HlsStreamInfResolution) Values() []HlsStreamInfResolution { return []HlsStreamInfResolution{ "EXCLUDE", "INCLUDE", } } type HlsTimedMetadataId3Frame string // Enum values for HlsTimedMetadataId3Frame const ( HlsTimedMetadataId3FrameNone HlsTimedMetadataId3Frame = "NONE" HlsTimedMetadataId3FramePriv HlsTimedMetadataId3Frame = "PRIV" HlsTimedMetadataId3FrameTdrl HlsTimedMetadataId3Frame = "TDRL" ) // Values returns all known values for HlsTimedMetadataId3Frame. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (HlsTimedMetadataId3Frame) Values() []HlsTimedMetadataId3Frame { return []HlsTimedMetadataId3Frame{ "NONE", "PRIV", "TDRL", } } type HlsTsFileMode string // Enum values for HlsTsFileMode const ( HlsTsFileModeSegmentedFiles HlsTsFileMode = "SEGMENTED_FILES" HlsTsFileModeSingleFile HlsTsFileMode = "SINGLE_FILE" ) // Values returns all known values for HlsTsFileMode. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (HlsTsFileMode) Values() []HlsTsFileMode { return []HlsTsFileMode{ "SEGMENTED_FILES", "SINGLE_FILE", } } type HlsWebdavHttpTransferMode string // Enum values for HlsWebdavHttpTransferMode const ( HlsWebdavHttpTransferModeChunked HlsWebdavHttpTransferMode = "CHUNKED" HlsWebdavHttpTransferModeNonChunked HlsWebdavHttpTransferMode = "NON_CHUNKED" ) // Values returns all known values for HlsWebdavHttpTransferMode. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (HlsWebdavHttpTransferMode) Values() []HlsWebdavHttpTransferMode { return []HlsWebdavHttpTransferMode{ "CHUNKED", "NON_CHUNKED", } } type IFrameOnlyPlaylistType string // Enum values for IFrameOnlyPlaylistType const ( IFrameOnlyPlaylistTypeDisabled IFrameOnlyPlaylistType = "DISABLED" IFrameOnlyPlaylistTypeStandard IFrameOnlyPlaylistType = "STANDARD" ) // Values returns all known values for IFrameOnlyPlaylistType. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (IFrameOnlyPlaylistType) Values() []IFrameOnlyPlaylistType { return []IFrameOnlyPlaylistType{ "DISABLED", "STANDARD", } } type InputClass string // Enum values for InputClass const ( InputClassStandard InputClass = "STANDARD" InputClassSinglePipeline InputClass = "SINGLE_PIPELINE" ) // Values returns all known values for InputClass. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (InputClass) Values() []InputClass { return []InputClass{ "STANDARD", "SINGLE_PIPELINE", } } type InputCodec string // Enum values for InputCodec const ( InputCodecMpeg2 InputCodec = "MPEG2" InputCodecAvc InputCodec = "AVC" InputCodecHevc InputCodec = "HEVC" ) // Values returns all known values for InputCodec. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (InputCodec) Values() []InputCodec { return []InputCodec{ "MPEG2", "AVC", "HEVC", } } type InputDeblockFilter string // Enum values for InputDeblockFilter const ( InputDeblockFilterDisabled InputDeblockFilter = "DISABLED" InputDeblockFilterEnabled InputDeblockFilter = "ENABLED" ) // Values returns all known values for InputDeblockFilter. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (InputDeblockFilter) Values() []InputDeblockFilter { return []InputDeblockFilter{ "DISABLED", "ENABLED", } } type InputDenoiseFilter string // Enum values for InputDenoiseFilter const ( InputDenoiseFilterDisabled InputDenoiseFilter = "DISABLED" InputDenoiseFilterEnabled InputDenoiseFilter = "ENABLED" ) // Values returns all known values for InputDenoiseFilter. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (InputDenoiseFilter) Values() []InputDenoiseFilter { return []InputDenoiseFilter{ "DISABLED", "ENABLED", } } type InputDeviceActiveInput string // Enum values for InputDeviceActiveInput const ( InputDeviceActiveInputHdmi InputDeviceActiveInput = "HDMI" InputDeviceActiveInputSdi InputDeviceActiveInput = "SDI" ) // Values returns all known values for InputDeviceActiveInput. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (InputDeviceActiveInput) Values() []InputDeviceActiveInput { return []InputDeviceActiveInput{ "HDMI", "SDI", } } type InputDeviceConfiguredInput string // Enum values for InputDeviceConfiguredInput const ( InputDeviceConfiguredInputAuto InputDeviceConfiguredInput = "AUTO" InputDeviceConfiguredInputHdmi InputDeviceConfiguredInput = "HDMI" InputDeviceConfiguredInputSdi InputDeviceConfiguredInput = "SDI" ) // Values returns all known values for InputDeviceConfiguredInput. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (InputDeviceConfiguredInput) Values() []InputDeviceConfiguredInput { return []InputDeviceConfiguredInput{ "AUTO", "HDMI", "SDI", } } type InputDeviceConnectionState string // Enum values for InputDeviceConnectionState const ( InputDeviceConnectionStateDisconnected InputDeviceConnectionState = "DISCONNECTED" InputDeviceConnectionStateConnected InputDeviceConnectionState = "CONNECTED" ) // Values returns all known values for InputDeviceConnectionState. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (InputDeviceConnectionState) Values() []InputDeviceConnectionState { return []InputDeviceConnectionState{ "DISCONNECTED", "CONNECTED", } } type InputDeviceIpScheme string // Enum values for InputDeviceIpScheme const ( InputDeviceIpSchemeStatic InputDeviceIpScheme = "STATIC" InputDeviceIpSchemeDhcp InputDeviceIpScheme = "DHCP" ) // Values returns all known values for InputDeviceIpScheme. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (InputDeviceIpScheme) Values() []InputDeviceIpScheme { return []InputDeviceIpScheme{ "STATIC", "DHCP", } } type InputDeviceScanType string // Enum values for InputDeviceScanType const ( InputDeviceScanTypeInterlaced InputDeviceScanType = "INTERLACED" InputDeviceScanTypeProgressive InputDeviceScanType = "PROGRESSIVE" ) // Values returns all known values for InputDeviceScanType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (InputDeviceScanType) Values() []InputDeviceScanType { return []InputDeviceScanType{ "INTERLACED", "PROGRESSIVE", } } type InputDeviceState string // Enum values for InputDeviceState const ( InputDeviceStateIdle InputDeviceState = "IDLE" InputDeviceStateStreaming InputDeviceState = "STREAMING" ) // Values returns all known values for InputDeviceState. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (InputDeviceState) Values() []InputDeviceState { return []InputDeviceState{ "IDLE", "STREAMING", } } type InputDeviceTransferType string // Enum values for InputDeviceTransferType const ( InputDeviceTransferTypeOutgoing InputDeviceTransferType = "OUTGOING" InputDeviceTransferTypeIncoming InputDeviceTransferType = "INCOMING" ) // Values returns all known values for InputDeviceTransferType. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (InputDeviceTransferType) Values() []InputDeviceTransferType { return []InputDeviceTransferType{ "OUTGOING", "INCOMING", } } type InputDeviceType string // Enum values for InputDeviceType const ( InputDeviceTypeHd InputDeviceType = "HD" InputDeviceTypeUhd InputDeviceType = "UHD" ) // Values returns all known values for InputDeviceType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (InputDeviceType) Values() []InputDeviceType { return []InputDeviceType{ "HD", "UHD", } } type InputFilter string // Enum values for InputFilter const ( InputFilterAuto InputFilter = "AUTO" InputFilterDisabled InputFilter = "DISABLED" InputFilterForced InputFilter = "FORCED" ) // Values returns all known values for InputFilter. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (InputFilter) Values() []InputFilter { return []InputFilter{ "AUTO", "DISABLED", "FORCED", } } type InputLossActionForHlsOut string // Enum values for InputLossActionForHlsOut const ( InputLossActionForHlsOutEmitOutput InputLossActionForHlsOut = "EMIT_OUTPUT" InputLossActionForHlsOutPauseOutput InputLossActionForHlsOut = "PAUSE_OUTPUT" ) // Values returns all known values for InputLossActionForHlsOut. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (InputLossActionForHlsOut) Values() []InputLossActionForHlsOut { return []InputLossActionForHlsOut{ "EMIT_OUTPUT", "PAUSE_OUTPUT", } } type InputLossActionForMsSmoothOut string // Enum values for InputLossActionForMsSmoothOut const ( InputLossActionForMsSmoothOutEmitOutput InputLossActionForMsSmoothOut = "EMIT_OUTPUT" InputLossActionForMsSmoothOutPauseOutput InputLossActionForMsSmoothOut = "PAUSE_OUTPUT" ) // Values returns all known values for InputLossActionForMsSmoothOut. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (InputLossActionForMsSmoothOut) Values() []InputLossActionForMsSmoothOut { return []InputLossActionForMsSmoothOut{ "EMIT_OUTPUT", "PAUSE_OUTPUT", } } type InputLossActionForRtmpOut string // Enum values for InputLossActionForRtmpOut const ( InputLossActionForRtmpOutEmitOutput InputLossActionForRtmpOut = "EMIT_OUTPUT" InputLossActionForRtmpOutPauseOutput InputLossActionForRtmpOut = "PAUSE_OUTPUT" ) // Values returns all known values for InputLossActionForRtmpOut. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (InputLossActionForRtmpOut) Values() []InputLossActionForRtmpOut { return []InputLossActionForRtmpOut{ "EMIT_OUTPUT", "PAUSE_OUTPUT", } } type InputLossActionForUdpOut string // Enum values for InputLossActionForUdpOut const ( InputLossActionForUdpOutDropProgram InputLossActionForUdpOut = "DROP_PROGRAM" InputLossActionForUdpOutDropTs InputLossActionForUdpOut = "DROP_TS" InputLossActionForUdpOutEmitProgram InputLossActionForUdpOut = "EMIT_PROGRAM" ) // Values returns all known values for InputLossActionForUdpOut. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (InputLossActionForUdpOut) Values() []InputLossActionForUdpOut { return []InputLossActionForUdpOut{ "DROP_PROGRAM", "DROP_TS", "EMIT_PROGRAM", } } type InputLossImageType string // Enum values for InputLossImageType const ( InputLossImageTypeColor InputLossImageType = "COLOR" InputLossImageTypeSlate InputLossImageType = "SLATE" ) // Values returns all known values for InputLossImageType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (InputLossImageType) Values() []InputLossImageType { return []InputLossImageType{ "COLOR", "SLATE", } } type InputMaximumBitrate string // Enum values for InputMaximumBitrate const ( InputMaximumBitrateMax10Mbps InputMaximumBitrate = "MAX_10_MBPS" InputMaximumBitrateMax20Mbps InputMaximumBitrate = "MAX_20_MBPS" InputMaximumBitrateMax50Mbps InputMaximumBitrate = "MAX_50_MBPS" ) // Values returns all known values for InputMaximumBitrate. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (InputMaximumBitrate) Values() []InputMaximumBitrate { return []InputMaximumBitrate{ "MAX_10_MBPS", "MAX_20_MBPS", "MAX_50_MBPS", } } type InputPreference string // Enum values for InputPreference const ( InputPreferenceEqualInputPreference InputPreference = "EQUAL_INPUT_PREFERENCE" InputPreferencePrimaryInputPreferred InputPreference = "PRIMARY_INPUT_PREFERRED" ) // Values returns all known values for InputPreference. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (InputPreference) Values() []InputPreference { return []InputPreference{ "EQUAL_INPUT_PREFERENCE", "PRIMARY_INPUT_PREFERRED", } } type InputResolution string // Enum values for InputResolution const ( InputResolutionSd InputResolution = "SD" InputResolutionHd InputResolution = "HD" InputResolutionUhd InputResolution = "UHD" ) // Values returns all known values for InputResolution. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (InputResolution) Values() []InputResolution { return []InputResolution{ "SD", "HD", "UHD", } } type InputSecurityGroupState string // Enum values for InputSecurityGroupState const ( InputSecurityGroupStateIdle InputSecurityGroupState = "IDLE" InputSecurityGroupStateInUse InputSecurityGroupState = "IN_USE" InputSecurityGroupStateUpdating InputSecurityGroupState = "UPDATING" InputSecurityGroupStateDeleted InputSecurityGroupState = "DELETED" ) // Values returns all known values for InputSecurityGroupState. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (InputSecurityGroupState) Values() []InputSecurityGroupState { return []InputSecurityGroupState{ "IDLE", "IN_USE", "UPDATING", "DELETED", } } type InputSourceEndBehavior string // Enum values for InputSourceEndBehavior const ( InputSourceEndBehaviorContinue InputSourceEndBehavior = "CONTINUE" InputSourceEndBehaviorLoop InputSourceEndBehavior = "LOOP" ) // Values returns all known values for InputSourceEndBehavior. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (InputSourceEndBehavior) Values() []InputSourceEndBehavior { return []InputSourceEndBehavior{ "CONTINUE", "LOOP", } } type InputSourceType string // Enum values for InputSourceType const ( InputSourceTypeStatic InputSourceType = "STATIC" InputSourceTypeDynamic InputSourceType = "DYNAMIC" ) // Values returns all known values for InputSourceType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (InputSourceType) Values() []InputSourceType { return []InputSourceType{ "STATIC", "DYNAMIC", } } type InputState string // Enum values for InputState const ( InputStateCreating InputState = "CREATING" InputStateDetached InputState = "DETACHED" InputStateAttached InputState = "ATTACHED" InputStateDeleting InputState = "DELETING" InputStateDeleted InputState = "DELETED" ) // Values returns all known values for InputState. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (InputState) Values() []InputState { return []InputState{ "CREATING", "DETACHED", "ATTACHED", "DELETING", "DELETED", } } type InputTimecodeSource string // Enum values for InputTimecodeSource const ( InputTimecodeSourceZerobased InputTimecodeSource = "ZEROBASED" InputTimecodeSourceEmbedded InputTimecodeSource = "EMBEDDED" ) // Values returns all known values for InputTimecodeSource. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (InputTimecodeSource) Values() []InputTimecodeSource { return []InputTimecodeSource{ "ZEROBASED", "EMBEDDED", } } type InputType string // Enum values for InputType const ( InputTypeUdpPush InputType = "UDP_PUSH" InputTypeRtpPush InputType = "RTP_PUSH" InputTypeRtmpPush InputType = "RTMP_PUSH" InputTypeRtmpPull InputType = "RTMP_PULL" InputTypeUrlPull InputType = "URL_PULL" InputTypeMp4File InputType = "MP4_FILE" InputTypeMediaconnect InputType = "MEDIACONNECT" InputTypeInputDevice InputType = "INPUT_DEVICE" InputTypeAwsCdi InputType = "AWS_CDI" InputTypeTsFile InputType = "TS_FILE" ) // Values returns all known values for InputType. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (InputType) Values() []InputType { return []InputType{ "UDP_PUSH", "RTP_PUSH", "RTMP_PUSH", "RTMP_PULL", "URL_PULL", "MP4_FILE", "MEDIACONNECT", "INPUT_DEVICE", "AWS_CDI", "TS_FILE", } } type LastFrameClippingBehavior string // Enum values for LastFrameClippingBehavior const ( LastFrameClippingBehaviorExcludeLastFrame LastFrameClippingBehavior = "EXCLUDE_LAST_FRAME" LastFrameClippingBehaviorIncludeLastFrame LastFrameClippingBehavior = "INCLUDE_LAST_FRAME" ) // Values returns all known values for LastFrameClippingBehavior. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (LastFrameClippingBehavior) Values() []LastFrameClippingBehavior { return []LastFrameClippingBehavior{ "EXCLUDE_LAST_FRAME", "INCLUDE_LAST_FRAME", } } type LogLevel string // Enum values for LogLevel const ( LogLevelError LogLevel = "ERROR" LogLevelWarning LogLevel = "WARNING" LogLevelInfo LogLevel = "INFO" LogLevelDebug LogLevel = "DEBUG" LogLevelDisabled LogLevel = "DISABLED" ) // Values returns all known values for LogLevel. Note that this can be expanded in // the future, and so it is only as up to date as the client. The ordering of this // slice is not guaranteed to be stable across updates. func (LogLevel) Values() []LogLevel { return []LogLevel{ "ERROR", "WARNING", "INFO", "DEBUG", "DISABLED", } } type M2tsAbsentInputAudioBehavior string // Enum values for M2tsAbsentInputAudioBehavior const ( M2tsAbsentInputAudioBehaviorDrop M2tsAbsentInputAudioBehavior = "DROP" M2tsAbsentInputAudioBehaviorEncodeSilence M2tsAbsentInputAudioBehavior = "ENCODE_SILENCE" ) // Values returns all known values for M2tsAbsentInputAudioBehavior. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (M2tsAbsentInputAudioBehavior) Values() []M2tsAbsentInputAudioBehavior { return []M2tsAbsentInputAudioBehavior{ "DROP", "ENCODE_SILENCE", } } type M2tsArib string // Enum values for M2tsArib const ( M2tsAribDisabled M2tsArib = "DISABLED" M2tsAribEnabled M2tsArib = "ENABLED" ) // Values returns all known values for M2tsArib. Note that this can be expanded in // the future, and so it is only as up to date as the client. The ordering of this // slice is not guaranteed to be stable across updates. func (M2tsArib) Values() []M2tsArib { return []M2tsArib{ "DISABLED", "ENABLED", } } type M2tsAribCaptionsPidControl string // Enum values for M2tsAribCaptionsPidControl const ( M2tsAribCaptionsPidControlAuto M2tsAribCaptionsPidControl = "AUTO" M2tsAribCaptionsPidControlUseConfigured M2tsAribCaptionsPidControl = "USE_CONFIGURED" ) // Values returns all known values for M2tsAribCaptionsPidControl. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (M2tsAribCaptionsPidControl) Values() []M2tsAribCaptionsPidControl { return []M2tsAribCaptionsPidControl{ "AUTO", "USE_CONFIGURED", } } type M2tsAudioBufferModel string // Enum values for M2tsAudioBufferModel const ( M2tsAudioBufferModelAtsc M2tsAudioBufferModel = "ATSC" M2tsAudioBufferModelDvb M2tsAudioBufferModel = "DVB" ) // Values returns all known values for M2tsAudioBufferModel. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (M2tsAudioBufferModel) Values() []M2tsAudioBufferModel { return []M2tsAudioBufferModel{ "ATSC", "DVB", } } type M2tsAudioInterval string // Enum values for M2tsAudioInterval const ( M2tsAudioIntervalVideoAndFixedIntervals M2tsAudioInterval = "VIDEO_AND_FIXED_INTERVALS" M2tsAudioIntervalVideoInterval M2tsAudioInterval = "VIDEO_INTERVAL" ) // Values returns all known values for M2tsAudioInterval. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (M2tsAudioInterval) Values() []M2tsAudioInterval { return []M2tsAudioInterval{ "VIDEO_AND_FIXED_INTERVALS", "VIDEO_INTERVAL", } } type M2tsAudioStreamType string // Enum values for M2tsAudioStreamType const ( M2tsAudioStreamTypeAtsc M2tsAudioStreamType = "ATSC" M2tsAudioStreamTypeDvb M2tsAudioStreamType = "DVB" ) // Values returns all known values for M2tsAudioStreamType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (M2tsAudioStreamType) Values() []M2tsAudioStreamType { return []M2tsAudioStreamType{ "ATSC", "DVB", } } type M2tsBufferModel string // Enum values for M2tsBufferModel const ( M2tsBufferModelMultiplex M2tsBufferModel = "MULTIPLEX" M2tsBufferModelNone M2tsBufferModel = "NONE" ) // Values returns all known values for M2tsBufferModel. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (M2tsBufferModel) Values() []M2tsBufferModel { return []M2tsBufferModel{ "MULTIPLEX", "NONE", } } type M2tsCcDescriptor string // Enum values for M2tsCcDescriptor const ( M2tsCcDescriptorDisabled M2tsCcDescriptor = "DISABLED" M2tsCcDescriptorEnabled M2tsCcDescriptor = "ENABLED" ) // Values returns all known values for M2tsCcDescriptor. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (M2tsCcDescriptor) Values() []M2tsCcDescriptor { return []M2tsCcDescriptor{ "DISABLED", "ENABLED", } } type M2tsEbifControl string // Enum values for M2tsEbifControl const ( M2tsEbifControlNone M2tsEbifControl = "NONE" M2tsEbifControlPassthrough M2tsEbifControl = "PASSTHROUGH" ) // Values returns all known values for M2tsEbifControl. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (M2tsEbifControl) Values() []M2tsEbifControl { return []M2tsEbifControl{ "NONE", "PASSTHROUGH", } } type M2tsEbpPlacement string // Enum values for M2tsEbpPlacement const ( M2tsEbpPlacementVideoAndAudioPids M2tsEbpPlacement = "VIDEO_AND_AUDIO_PIDS" M2tsEbpPlacementVideoPid M2tsEbpPlacement = "VIDEO_PID" ) // Values returns all known values for M2tsEbpPlacement. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (M2tsEbpPlacement) Values() []M2tsEbpPlacement { return []M2tsEbpPlacement{ "VIDEO_AND_AUDIO_PIDS", "VIDEO_PID", } } type M2tsEsRateInPes string // Enum values for M2tsEsRateInPes const ( M2tsEsRateInPesExclude M2tsEsRateInPes = "EXCLUDE" M2tsEsRateInPesInclude M2tsEsRateInPes = "INCLUDE" ) // Values returns all known values for M2tsEsRateInPes. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (M2tsEsRateInPes) Values() []M2tsEsRateInPes { return []M2tsEsRateInPes{ "EXCLUDE", "INCLUDE", } } type M2tsKlv string // Enum values for M2tsKlv const ( M2tsKlvNone M2tsKlv = "NONE" M2tsKlvPassthrough M2tsKlv = "PASSTHROUGH" ) // Values returns all known values for M2tsKlv. Note that this can be expanded in // the future, and so it is only as up to date as the client. The ordering of this // slice is not guaranteed to be stable across updates. func (M2tsKlv) Values() []M2tsKlv { return []M2tsKlv{ "NONE", "PASSTHROUGH", } } type M2tsNielsenId3Behavior string // Enum values for M2tsNielsenId3Behavior const ( M2tsNielsenId3BehaviorNoPassthrough M2tsNielsenId3Behavior = "NO_PASSTHROUGH" M2tsNielsenId3BehaviorPassthrough M2tsNielsenId3Behavior = "PASSTHROUGH" ) // Values returns all known values for M2tsNielsenId3Behavior. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (M2tsNielsenId3Behavior) Values() []M2tsNielsenId3Behavior { return []M2tsNielsenId3Behavior{ "NO_PASSTHROUGH", "PASSTHROUGH", } } type M2tsPcrControl string // Enum values for M2tsPcrControl const ( M2tsPcrControlConfiguredPcrPeriod M2tsPcrControl = "CONFIGURED_PCR_PERIOD" M2tsPcrControlPcrEveryPesPacket M2tsPcrControl = "PCR_EVERY_PES_PACKET" ) // Values returns all known values for M2tsPcrControl. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (M2tsPcrControl) Values() []M2tsPcrControl { return []M2tsPcrControl{ "CONFIGURED_PCR_PERIOD", "PCR_EVERY_PES_PACKET", } } type M2tsRateMode string // Enum values for M2tsRateMode const ( M2tsRateModeCbr M2tsRateMode = "CBR" M2tsRateModeVbr M2tsRateMode = "VBR" ) // Values returns all known values for M2tsRateMode. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (M2tsRateMode) Values() []M2tsRateMode { return []M2tsRateMode{ "CBR", "VBR", } } type M2tsScte35Control string // Enum values for M2tsScte35Control const ( M2tsScte35ControlNone M2tsScte35Control = "NONE" M2tsScte35ControlPassthrough M2tsScte35Control = "PASSTHROUGH" ) // Values returns all known values for M2tsScte35Control. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (M2tsScte35Control) Values() []M2tsScte35Control { return []M2tsScte35Control{ "NONE", "PASSTHROUGH", } } type M2tsSegmentationMarkers string // Enum values for M2tsSegmentationMarkers const ( M2tsSegmentationMarkersEbp M2tsSegmentationMarkers = "EBP" M2tsSegmentationMarkersEbpLegacy M2tsSegmentationMarkers = "EBP_LEGACY" M2tsSegmentationMarkersNone M2tsSegmentationMarkers = "NONE" M2tsSegmentationMarkersPsiSegstart M2tsSegmentationMarkers = "PSI_SEGSTART" M2tsSegmentationMarkersRaiAdapt M2tsSegmentationMarkers = "RAI_ADAPT" M2tsSegmentationMarkersRaiSegstart M2tsSegmentationMarkers = "RAI_SEGSTART" ) // Values returns all known values for M2tsSegmentationMarkers. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (M2tsSegmentationMarkers) Values() []M2tsSegmentationMarkers { return []M2tsSegmentationMarkers{ "EBP", "EBP_LEGACY", "NONE", "PSI_SEGSTART", "RAI_ADAPT", "RAI_SEGSTART", } } type M2tsSegmentationStyle string // Enum values for M2tsSegmentationStyle const ( M2tsSegmentationStyleMaintainCadence M2tsSegmentationStyle = "MAINTAIN_CADENCE" M2tsSegmentationStyleResetCadence M2tsSegmentationStyle = "RESET_CADENCE" ) // Values returns all known values for M2tsSegmentationStyle. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (M2tsSegmentationStyle) Values() []M2tsSegmentationStyle { return []M2tsSegmentationStyle{ "MAINTAIN_CADENCE", "RESET_CADENCE", } } type M2tsTimedMetadataBehavior string // Enum values for M2tsTimedMetadataBehavior const ( M2tsTimedMetadataBehaviorNoPassthrough M2tsTimedMetadataBehavior = "NO_PASSTHROUGH" M2tsTimedMetadataBehaviorPassthrough M2tsTimedMetadataBehavior = "PASSTHROUGH" ) // Values returns all known values for M2tsTimedMetadataBehavior. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (M2tsTimedMetadataBehavior) Values() []M2tsTimedMetadataBehavior { return []M2tsTimedMetadataBehavior{ "NO_PASSTHROUGH", "PASSTHROUGH", } } type M3u8NielsenId3Behavior string // Enum values for M3u8NielsenId3Behavior const ( M3u8NielsenId3BehaviorNoPassthrough M3u8NielsenId3Behavior = "NO_PASSTHROUGH" M3u8NielsenId3BehaviorPassthrough M3u8NielsenId3Behavior = "PASSTHROUGH" ) // Values returns all known values for M3u8NielsenId3Behavior. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (M3u8NielsenId3Behavior) Values() []M3u8NielsenId3Behavior { return []M3u8NielsenId3Behavior{ "NO_PASSTHROUGH", "PASSTHROUGH", } } type M3u8PcrControl string // Enum values for M3u8PcrControl const ( M3u8PcrControlConfiguredPcrPeriod M3u8PcrControl = "CONFIGURED_PCR_PERIOD" M3u8PcrControlPcrEveryPesPacket M3u8PcrControl = "PCR_EVERY_PES_PACKET" ) // Values returns all known values for M3u8PcrControl. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (M3u8PcrControl) Values() []M3u8PcrControl { return []M3u8PcrControl{ "CONFIGURED_PCR_PERIOD", "PCR_EVERY_PES_PACKET", } } type M3u8Scte35Behavior string // Enum values for M3u8Scte35Behavior const ( M3u8Scte35BehaviorNoPassthrough M3u8Scte35Behavior = "NO_PASSTHROUGH" M3u8Scte35BehaviorPassthrough M3u8Scte35Behavior = "PASSTHROUGH" ) // Values returns all known values for M3u8Scte35Behavior. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (M3u8Scte35Behavior) Values() []M3u8Scte35Behavior { return []M3u8Scte35Behavior{ "NO_PASSTHROUGH", "PASSTHROUGH", } } type M3u8TimedMetadataBehavior string // Enum values for M3u8TimedMetadataBehavior const ( M3u8TimedMetadataBehaviorNoPassthrough M3u8TimedMetadataBehavior = "NO_PASSTHROUGH" M3u8TimedMetadataBehaviorPassthrough M3u8TimedMetadataBehavior = "PASSTHROUGH" ) // Values returns all known values for M3u8TimedMetadataBehavior. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (M3u8TimedMetadataBehavior) Values() []M3u8TimedMetadataBehavior { return []M3u8TimedMetadataBehavior{ "NO_PASSTHROUGH", "PASSTHROUGH", } } type MaintenanceDay string // Enum values for MaintenanceDay const ( MaintenanceDayMonday MaintenanceDay = "MONDAY" MaintenanceDayTuesday MaintenanceDay = "TUESDAY" MaintenanceDayWednesday MaintenanceDay = "WEDNESDAY" MaintenanceDayThursday MaintenanceDay = "THURSDAY" MaintenanceDayFriday MaintenanceDay = "FRIDAY" MaintenanceDaySaturday MaintenanceDay = "SATURDAY" MaintenanceDaySunday MaintenanceDay = "SUNDAY" ) // Values returns all known values for MaintenanceDay. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (MaintenanceDay) Values() []MaintenanceDay { return []MaintenanceDay{ "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY", } } type MotionGraphicsInsertion string // Enum values for MotionGraphicsInsertion const ( MotionGraphicsInsertionDisabled MotionGraphicsInsertion = "DISABLED" MotionGraphicsInsertionEnabled MotionGraphicsInsertion = "ENABLED" ) // Values returns all known values for MotionGraphicsInsertion. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (MotionGraphicsInsertion) Values() []MotionGraphicsInsertion { return []MotionGraphicsInsertion{ "DISABLED", "ENABLED", } } type Mp2CodingMode string // Enum values for Mp2CodingMode const ( Mp2CodingModeCodingMode10 Mp2CodingMode = "CODING_MODE_1_0" Mp2CodingModeCodingMode20 Mp2CodingMode = "CODING_MODE_2_0" ) // Values returns all known values for Mp2CodingMode. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Mp2CodingMode) Values() []Mp2CodingMode { return []Mp2CodingMode{ "CODING_MODE_1_0", "CODING_MODE_2_0", } } type Mpeg2AdaptiveQuantization string // Enum values for Mpeg2AdaptiveQuantization const ( Mpeg2AdaptiveQuantizationAuto Mpeg2AdaptiveQuantization = "AUTO" Mpeg2AdaptiveQuantizationHigh Mpeg2AdaptiveQuantization = "HIGH" Mpeg2AdaptiveQuantizationLow Mpeg2AdaptiveQuantization = "LOW" Mpeg2AdaptiveQuantizationMedium Mpeg2AdaptiveQuantization = "MEDIUM" Mpeg2AdaptiveQuantizationOff Mpeg2AdaptiveQuantization = "OFF" ) // Values returns all known values for Mpeg2AdaptiveQuantization. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (Mpeg2AdaptiveQuantization) Values() []Mpeg2AdaptiveQuantization { return []Mpeg2AdaptiveQuantization{ "AUTO", "HIGH", "LOW", "MEDIUM", "OFF", } } type Mpeg2ColorMetadata string // Enum values for Mpeg2ColorMetadata const ( Mpeg2ColorMetadataIgnore Mpeg2ColorMetadata = "IGNORE" Mpeg2ColorMetadataInsert Mpeg2ColorMetadata = "INSERT" ) // Values returns all known values for Mpeg2ColorMetadata. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Mpeg2ColorMetadata) Values() []Mpeg2ColorMetadata { return []Mpeg2ColorMetadata{ "IGNORE", "INSERT", } } type Mpeg2ColorSpace string // Enum values for Mpeg2ColorSpace const ( Mpeg2ColorSpaceAuto Mpeg2ColorSpace = "AUTO" Mpeg2ColorSpacePassthrough Mpeg2ColorSpace = "PASSTHROUGH" ) // Values returns all known values for Mpeg2ColorSpace. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Mpeg2ColorSpace) Values() []Mpeg2ColorSpace { return []Mpeg2ColorSpace{ "AUTO", "PASSTHROUGH", } } type Mpeg2DisplayRatio string // Enum values for Mpeg2DisplayRatio const ( Mpeg2DisplayRatioDisplayratio16x9 Mpeg2DisplayRatio = "DISPLAYRATIO16X9" Mpeg2DisplayRatioDisplayratio4x3 Mpeg2DisplayRatio = "DISPLAYRATIO4X3" ) // Values returns all known values for Mpeg2DisplayRatio. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Mpeg2DisplayRatio) Values() []Mpeg2DisplayRatio { return []Mpeg2DisplayRatio{ "DISPLAYRATIO16X9", "DISPLAYRATIO4X3", } } type Mpeg2GopSizeUnits string // Enum values for Mpeg2GopSizeUnits const ( Mpeg2GopSizeUnitsFrames Mpeg2GopSizeUnits = "FRAMES" Mpeg2GopSizeUnitsSeconds Mpeg2GopSizeUnits = "SECONDS" ) // Values returns all known values for Mpeg2GopSizeUnits. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Mpeg2GopSizeUnits) Values() []Mpeg2GopSizeUnits { return []Mpeg2GopSizeUnits{ "FRAMES", "SECONDS", } } type Mpeg2ScanType string // Enum values for Mpeg2ScanType const ( Mpeg2ScanTypeInterlaced Mpeg2ScanType = "INTERLACED" Mpeg2ScanTypeProgressive Mpeg2ScanType = "PROGRESSIVE" ) // Values returns all known values for Mpeg2ScanType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Mpeg2ScanType) Values() []Mpeg2ScanType { return []Mpeg2ScanType{ "INTERLACED", "PROGRESSIVE", } } type Mpeg2SubGopLength string // Enum values for Mpeg2SubGopLength const ( Mpeg2SubGopLengthDynamic Mpeg2SubGopLength = "DYNAMIC" Mpeg2SubGopLengthFixed Mpeg2SubGopLength = "FIXED" ) // Values returns all known values for Mpeg2SubGopLength. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Mpeg2SubGopLength) Values() []Mpeg2SubGopLength { return []Mpeg2SubGopLength{ "DYNAMIC", "FIXED", } } type Mpeg2TimecodeInsertionBehavior string // Enum values for Mpeg2TimecodeInsertionBehavior const ( Mpeg2TimecodeInsertionBehaviorDisabled Mpeg2TimecodeInsertionBehavior = "DISABLED" Mpeg2TimecodeInsertionBehaviorGopTimecode Mpeg2TimecodeInsertionBehavior = "GOP_TIMECODE" ) // Values returns all known values for Mpeg2TimecodeInsertionBehavior. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (Mpeg2TimecodeInsertionBehavior) Values() []Mpeg2TimecodeInsertionBehavior { return []Mpeg2TimecodeInsertionBehavior{ "DISABLED", "GOP_TIMECODE", } } type MsSmoothH265PackagingType string // Enum values for MsSmoothH265PackagingType const ( MsSmoothH265PackagingTypeHev1 MsSmoothH265PackagingType = "HEV1" MsSmoothH265PackagingTypeHvc1 MsSmoothH265PackagingType = "HVC1" ) // Values returns all known values for MsSmoothH265PackagingType. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (MsSmoothH265PackagingType) Values() []MsSmoothH265PackagingType { return []MsSmoothH265PackagingType{ "HEV1", "HVC1", } } type MultiplexState string // Enum values for MultiplexState const ( MultiplexStateCreating MultiplexState = "CREATING" MultiplexStateCreateFailed MultiplexState = "CREATE_FAILED" MultiplexStateIdle MultiplexState = "IDLE" MultiplexStateStarting MultiplexState = "STARTING" MultiplexStateRunning MultiplexState = "RUNNING" MultiplexStateRecovering MultiplexState = "RECOVERING" MultiplexStateStopping MultiplexState = "STOPPING" MultiplexStateDeleting MultiplexState = "DELETING" MultiplexStateDeleted MultiplexState = "DELETED" ) // Values returns all known values for MultiplexState. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (MultiplexState) Values() []MultiplexState { return []MultiplexState{ "CREATING", "CREATE_FAILED", "IDLE", "STARTING", "RUNNING", "RECOVERING", "STOPPING", "DELETING", "DELETED", } } type NetworkInputServerValidation string // Enum values for NetworkInputServerValidation const ( NetworkInputServerValidationCheckCryptographyAndValidateName NetworkInputServerValidation = "CHECK_CRYPTOGRAPHY_AND_VALIDATE_NAME" NetworkInputServerValidationCheckCryptographyOnly NetworkInputServerValidation = "CHECK_CRYPTOGRAPHY_ONLY" ) // Values returns all known values for NetworkInputServerValidation. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (NetworkInputServerValidation) Values() []NetworkInputServerValidation { return []NetworkInputServerValidation{ "CHECK_CRYPTOGRAPHY_AND_VALIDATE_NAME", "CHECK_CRYPTOGRAPHY_ONLY", } } type NielsenPcmToId3TaggingState string // Enum values for NielsenPcmToId3TaggingState const ( NielsenPcmToId3TaggingStateDisabled NielsenPcmToId3TaggingState = "DISABLED" NielsenPcmToId3TaggingStateEnabled NielsenPcmToId3TaggingState = "ENABLED" ) // Values returns all known values for NielsenPcmToId3TaggingState. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (NielsenPcmToId3TaggingState) Values() []NielsenPcmToId3TaggingState { return []NielsenPcmToId3TaggingState{ "DISABLED", "ENABLED", } } type NielsenWatermarksCbetStepaside string // Enum values for NielsenWatermarksCbetStepaside const ( NielsenWatermarksCbetStepasideDisabled NielsenWatermarksCbetStepaside = "DISABLED" NielsenWatermarksCbetStepasideEnabled NielsenWatermarksCbetStepaside = "ENABLED" ) // Values returns all known values for NielsenWatermarksCbetStepaside. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (NielsenWatermarksCbetStepaside) Values() []NielsenWatermarksCbetStepaside { return []NielsenWatermarksCbetStepaside{ "DISABLED", "ENABLED", } } type NielsenWatermarksDistributionTypes string // Enum values for NielsenWatermarksDistributionTypes const ( NielsenWatermarksDistributionTypesFinalDistributor NielsenWatermarksDistributionTypes = "FINAL_DISTRIBUTOR" NielsenWatermarksDistributionTypesProgramContent NielsenWatermarksDistributionTypes = "PROGRAM_CONTENT" ) // Values returns all known values for NielsenWatermarksDistributionTypes. Note // that this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (NielsenWatermarksDistributionTypes) Values() []NielsenWatermarksDistributionTypes { return []NielsenWatermarksDistributionTypes{ "FINAL_DISTRIBUTOR", "PROGRAM_CONTENT", } } type NielsenWatermarkTimezones string // Enum values for NielsenWatermarkTimezones const ( NielsenWatermarkTimezonesAmericaPuertoRico NielsenWatermarkTimezones = "AMERICA_PUERTO_RICO" NielsenWatermarkTimezonesUsAlaska NielsenWatermarkTimezones = "US_ALASKA" NielsenWatermarkTimezonesUsArizona NielsenWatermarkTimezones = "US_ARIZONA" NielsenWatermarkTimezonesUsCentral NielsenWatermarkTimezones = "US_CENTRAL" NielsenWatermarkTimezonesUsEastern NielsenWatermarkTimezones = "US_EASTERN" NielsenWatermarkTimezonesUsHawaii NielsenWatermarkTimezones = "US_HAWAII" NielsenWatermarkTimezonesUsMountain NielsenWatermarkTimezones = "US_MOUNTAIN" NielsenWatermarkTimezonesUsPacific NielsenWatermarkTimezones = "US_PACIFIC" NielsenWatermarkTimezonesUsSamoa NielsenWatermarkTimezones = "US_SAMOA" NielsenWatermarkTimezonesUtc NielsenWatermarkTimezones = "UTC" ) // Values returns all known values for NielsenWatermarkTimezones. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (NielsenWatermarkTimezones) Values() []NielsenWatermarkTimezones { return []NielsenWatermarkTimezones{ "AMERICA_PUERTO_RICO", "US_ALASKA", "US_ARIZONA", "US_CENTRAL", "US_EASTERN", "US_HAWAII", "US_MOUNTAIN", "US_PACIFIC", "US_SAMOA", "UTC", } } type OfferingDurationUnits string // Enum values for OfferingDurationUnits const ( OfferingDurationUnitsMonths OfferingDurationUnits = "MONTHS" ) // Values returns all known values for OfferingDurationUnits. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (OfferingDurationUnits) Values() []OfferingDurationUnits { return []OfferingDurationUnits{ "MONTHS", } } type OfferingType string // Enum values for OfferingType const ( OfferingTypeNoUpfront OfferingType = "NO_UPFRONT" ) // Values returns all known values for OfferingType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (OfferingType) Values() []OfferingType { return []OfferingType{ "NO_UPFRONT", } } type PipelineId string // Enum values for PipelineId const ( PipelineIdPipeline0 PipelineId = "PIPELINE_0" PipelineIdPipeline1 PipelineId = "PIPELINE_1" ) // Values returns all known values for PipelineId. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (PipelineId) Values() []PipelineId { return []PipelineId{ "PIPELINE_0", "PIPELINE_1", } } type PreferredChannelPipeline string // Enum values for PreferredChannelPipeline const ( PreferredChannelPipelineCurrentlyActive PreferredChannelPipeline = "CURRENTLY_ACTIVE" PreferredChannelPipelinePipeline0 PreferredChannelPipeline = "PIPELINE_0" PreferredChannelPipelinePipeline1 PreferredChannelPipeline = "PIPELINE_1" ) // Values returns all known values for PreferredChannelPipeline. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (PreferredChannelPipeline) Values() []PreferredChannelPipeline { return []PreferredChannelPipeline{ "CURRENTLY_ACTIVE", "PIPELINE_0", "PIPELINE_1", } } type RebootInputDeviceForce string // Enum values for RebootInputDeviceForce const ( RebootInputDeviceForceNo RebootInputDeviceForce = "NO" RebootInputDeviceForceYes RebootInputDeviceForce = "YES" ) // Values returns all known values for RebootInputDeviceForce. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (RebootInputDeviceForce) Values() []RebootInputDeviceForce { return []RebootInputDeviceForce{ "NO", "YES", } } type ReservationAutomaticRenewal string // Enum values for ReservationAutomaticRenewal const ( ReservationAutomaticRenewalDisabled ReservationAutomaticRenewal = "DISABLED" ReservationAutomaticRenewalEnabled ReservationAutomaticRenewal = "ENABLED" ReservationAutomaticRenewalUnavailable ReservationAutomaticRenewal = "UNAVAILABLE" ) // Values returns all known values for ReservationAutomaticRenewal. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (ReservationAutomaticRenewal) Values() []ReservationAutomaticRenewal { return []ReservationAutomaticRenewal{ "DISABLED", "ENABLED", "UNAVAILABLE", } } type ReservationCodec string // Enum values for ReservationCodec const ( ReservationCodecMpeg2 ReservationCodec = "MPEG2" ReservationCodecAvc ReservationCodec = "AVC" ReservationCodecHevc ReservationCodec = "HEVC" ReservationCodecAudio ReservationCodec = "AUDIO" ReservationCodecLink ReservationCodec = "LINK" ) // Values returns all known values for ReservationCodec. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ReservationCodec) Values() []ReservationCodec { return []ReservationCodec{ "MPEG2", "AVC", "HEVC", "AUDIO", "LINK", } } type ReservationMaximumBitrate string // Enum values for ReservationMaximumBitrate const ( ReservationMaximumBitrateMax10Mbps ReservationMaximumBitrate = "MAX_10_MBPS" ReservationMaximumBitrateMax20Mbps ReservationMaximumBitrate = "MAX_20_MBPS" ReservationMaximumBitrateMax50Mbps ReservationMaximumBitrate = "MAX_50_MBPS" ) // Values returns all known values for ReservationMaximumBitrate. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (ReservationMaximumBitrate) Values() []ReservationMaximumBitrate { return []ReservationMaximumBitrate{ "MAX_10_MBPS", "MAX_20_MBPS", "MAX_50_MBPS", } } type ReservationMaximumFramerate string // Enum values for ReservationMaximumFramerate const ( ReservationMaximumFramerateMax30Fps ReservationMaximumFramerate = "MAX_30_FPS" ReservationMaximumFramerateMax60Fps ReservationMaximumFramerate = "MAX_60_FPS" ) // Values returns all known values for ReservationMaximumFramerate. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (ReservationMaximumFramerate) Values() []ReservationMaximumFramerate { return []ReservationMaximumFramerate{ "MAX_30_FPS", "MAX_60_FPS", } } type ReservationResolution string // Enum values for ReservationResolution const ( ReservationResolutionSd ReservationResolution = "SD" ReservationResolutionHd ReservationResolution = "HD" ReservationResolutionFhd ReservationResolution = "FHD" ReservationResolutionUhd ReservationResolution = "UHD" ) // Values returns all known values for ReservationResolution. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ReservationResolution) Values() []ReservationResolution { return []ReservationResolution{ "SD", "HD", "FHD", "UHD", } } type ReservationResourceType string // Enum values for ReservationResourceType const ( ReservationResourceTypeInput ReservationResourceType = "INPUT" ReservationResourceTypeOutput ReservationResourceType = "OUTPUT" ReservationResourceTypeMultiplex ReservationResourceType = "MULTIPLEX" ReservationResourceTypeChannel ReservationResourceType = "CHANNEL" ) // Values returns all known values for ReservationResourceType. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ReservationResourceType) Values() []ReservationResourceType { return []ReservationResourceType{ "INPUT", "OUTPUT", "MULTIPLEX", "CHANNEL", } } type ReservationSpecialFeature string // Enum values for ReservationSpecialFeature const ( ReservationSpecialFeatureAdvancedAudio ReservationSpecialFeature = "ADVANCED_AUDIO" ReservationSpecialFeatureAudioNormalization ReservationSpecialFeature = "AUDIO_NORMALIZATION" ReservationSpecialFeatureMghd ReservationSpecialFeature = "MGHD" ReservationSpecialFeatureMguhd ReservationSpecialFeature = "MGUHD" ) // Values returns all known values for ReservationSpecialFeature. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (ReservationSpecialFeature) Values() []ReservationSpecialFeature { return []ReservationSpecialFeature{ "ADVANCED_AUDIO", "AUDIO_NORMALIZATION", "MGHD", "MGUHD", } } type ReservationState string // Enum values for ReservationState const ( ReservationStateActive ReservationState = "ACTIVE" ReservationStateExpired ReservationState = "EXPIRED" ReservationStateCanceled ReservationState = "CANCELED" ReservationStateDeleted ReservationState = "DELETED" ) // Values returns all known values for ReservationState. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ReservationState) Values() []ReservationState { return []ReservationState{ "ACTIVE", "EXPIRED", "CANCELED", "DELETED", } } type ReservationVideoQuality string // Enum values for ReservationVideoQuality const ( ReservationVideoQualityStandard ReservationVideoQuality = "STANDARD" ReservationVideoQualityEnhanced ReservationVideoQuality = "ENHANCED" ReservationVideoQualityPremium ReservationVideoQuality = "PREMIUM" ) // Values returns all known values for ReservationVideoQuality. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ReservationVideoQuality) Values() []ReservationVideoQuality { return []ReservationVideoQuality{ "STANDARD", "ENHANCED", "PREMIUM", } } type RtmpAdMarkers string // Enum values for RtmpAdMarkers const ( RtmpAdMarkersOnCuePointScte35 RtmpAdMarkers = "ON_CUE_POINT_SCTE35" ) // Values returns all known values for RtmpAdMarkers. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (RtmpAdMarkers) Values() []RtmpAdMarkers { return []RtmpAdMarkers{ "ON_CUE_POINT_SCTE35", } } type RtmpCacheFullBehavior string // Enum values for RtmpCacheFullBehavior const ( RtmpCacheFullBehaviorDisconnectImmediately RtmpCacheFullBehavior = "DISCONNECT_IMMEDIATELY" RtmpCacheFullBehaviorWaitForServer RtmpCacheFullBehavior = "WAIT_FOR_SERVER" ) // Values returns all known values for RtmpCacheFullBehavior. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (RtmpCacheFullBehavior) Values() []RtmpCacheFullBehavior { return []RtmpCacheFullBehavior{ "DISCONNECT_IMMEDIATELY", "WAIT_FOR_SERVER", } } type RtmpCaptionData string // Enum values for RtmpCaptionData const ( RtmpCaptionDataAll RtmpCaptionData = "ALL" RtmpCaptionDataField1608 RtmpCaptionData = "FIELD1_608" RtmpCaptionDataField1AndField2608 RtmpCaptionData = "FIELD1_AND_FIELD2_608" ) // Values returns all known values for RtmpCaptionData. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (RtmpCaptionData) Values() []RtmpCaptionData { return []RtmpCaptionData{ "ALL", "FIELD1_608", "FIELD1_AND_FIELD2_608", } } type RtmpOutputCertificateMode string // Enum values for RtmpOutputCertificateMode const ( RtmpOutputCertificateModeSelfSigned RtmpOutputCertificateMode = "SELF_SIGNED" RtmpOutputCertificateModeVerifyAuthenticity RtmpOutputCertificateMode = "VERIFY_AUTHENTICITY" ) // Values returns all known values for RtmpOutputCertificateMode. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (RtmpOutputCertificateMode) Values() []RtmpOutputCertificateMode { return []RtmpOutputCertificateMode{ "SELF_SIGNED", "VERIFY_AUTHENTICITY", } } type S3CannedAcl string // Enum values for S3CannedAcl const ( S3CannedAclAuthenticatedRead S3CannedAcl = "AUTHENTICATED_READ" S3CannedAclBucketOwnerFullControl S3CannedAcl = "BUCKET_OWNER_FULL_CONTROL" S3CannedAclBucketOwnerRead S3CannedAcl = "BUCKET_OWNER_READ" S3CannedAclPublicRead S3CannedAcl = "PUBLIC_READ" ) // Values returns all known values for S3CannedAcl. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (S3CannedAcl) Values() []S3CannedAcl { return []S3CannedAcl{ "AUTHENTICATED_READ", "BUCKET_OWNER_FULL_CONTROL", "BUCKET_OWNER_READ", "PUBLIC_READ", } } type Scte20Convert608To708 string // Enum values for Scte20Convert608To708 const ( Scte20Convert608To708Disabled Scte20Convert608To708 = "DISABLED" Scte20Convert608To708Upconvert Scte20Convert608To708 = "UPCONVERT" ) // Values returns all known values for Scte20Convert608To708. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Scte20Convert608To708) Values() []Scte20Convert608To708 { return []Scte20Convert608To708{ "DISABLED", "UPCONVERT", } } type Scte27OcrLanguage string // Enum values for Scte27OcrLanguage const ( Scte27OcrLanguageDeu Scte27OcrLanguage = "DEU" Scte27OcrLanguageEng Scte27OcrLanguage = "ENG" Scte27OcrLanguageFra Scte27OcrLanguage = "FRA" Scte27OcrLanguageNld Scte27OcrLanguage = "NLD" Scte27OcrLanguagePor Scte27OcrLanguage = "POR" Scte27OcrLanguageSpa Scte27OcrLanguage = "SPA" ) // Values returns all known values for Scte27OcrLanguage. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Scte27OcrLanguage) Values() []Scte27OcrLanguage { return []Scte27OcrLanguage{ "DEU", "ENG", "FRA", "NLD", "POR", "SPA", } } type Scte35AposNoRegionalBlackoutBehavior string // Enum values for Scte35AposNoRegionalBlackoutBehavior const ( Scte35AposNoRegionalBlackoutBehaviorFollow Scte35AposNoRegionalBlackoutBehavior = "FOLLOW" Scte35AposNoRegionalBlackoutBehaviorIgnore Scte35AposNoRegionalBlackoutBehavior = "IGNORE" ) // Values returns all known values for Scte35AposNoRegionalBlackoutBehavior. Note // that this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (Scte35AposNoRegionalBlackoutBehavior) Values() []Scte35AposNoRegionalBlackoutBehavior { return []Scte35AposNoRegionalBlackoutBehavior{ "FOLLOW", "IGNORE", } } type Scte35AposWebDeliveryAllowedBehavior string // Enum values for Scte35AposWebDeliveryAllowedBehavior const ( Scte35AposWebDeliveryAllowedBehaviorFollow Scte35AposWebDeliveryAllowedBehavior = "FOLLOW" Scte35AposWebDeliveryAllowedBehaviorIgnore Scte35AposWebDeliveryAllowedBehavior = "IGNORE" ) // Values returns all known values for Scte35AposWebDeliveryAllowedBehavior. Note // that this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (Scte35AposWebDeliveryAllowedBehavior) Values() []Scte35AposWebDeliveryAllowedBehavior { return []Scte35AposWebDeliveryAllowedBehavior{ "FOLLOW", "IGNORE", } } type Scte35ArchiveAllowedFlag string // Enum values for Scte35ArchiveAllowedFlag const ( Scte35ArchiveAllowedFlagArchiveNotAllowed Scte35ArchiveAllowedFlag = "ARCHIVE_NOT_ALLOWED" Scte35ArchiveAllowedFlagArchiveAllowed Scte35ArchiveAllowedFlag = "ARCHIVE_ALLOWED" ) // Values returns all known values for Scte35ArchiveAllowedFlag. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (Scte35ArchiveAllowedFlag) Values() []Scte35ArchiveAllowedFlag { return []Scte35ArchiveAllowedFlag{ "ARCHIVE_NOT_ALLOWED", "ARCHIVE_ALLOWED", } } type Scte35DeviceRestrictions string // Enum values for Scte35DeviceRestrictions const ( Scte35DeviceRestrictionsNone Scte35DeviceRestrictions = "NONE" Scte35DeviceRestrictionsRestrictGroup0 Scte35DeviceRestrictions = "RESTRICT_GROUP0" Scte35DeviceRestrictionsRestrictGroup1 Scte35DeviceRestrictions = "RESTRICT_GROUP1" Scte35DeviceRestrictionsRestrictGroup2 Scte35DeviceRestrictions = "RESTRICT_GROUP2" ) // Values returns all known values for Scte35DeviceRestrictions. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (Scte35DeviceRestrictions) Values() []Scte35DeviceRestrictions { return []Scte35DeviceRestrictions{ "NONE", "RESTRICT_GROUP0", "RESTRICT_GROUP1", "RESTRICT_GROUP2", } } type Scte35InputMode string // Enum values for Scte35InputMode const ( Scte35InputModeFixed Scte35InputMode = "FIXED" Scte35InputModeFollowActive Scte35InputMode = "FOLLOW_ACTIVE" ) // Values returns all known values for Scte35InputMode. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Scte35InputMode) Values() []Scte35InputMode { return []Scte35InputMode{ "FIXED", "FOLLOW_ACTIVE", } } type Scte35NoRegionalBlackoutFlag string // Enum values for Scte35NoRegionalBlackoutFlag const ( Scte35NoRegionalBlackoutFlagRegionalBlackout Scte35NoRegionalBlackoutFlag = "REGIONAL_BLACKOUT" Scte35NoRegionalBlackoutFlagNoRegionalBlackout Scte35NoRegionalBlackoutFlag = "NO_REGIONAL_BLACKOUT" ) // Values returns all known values for Scte35NoRegionalBlackoutFlag. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (Scte35NoRegionalBlackoutFlag) Values() []Scte35NoRegionalBlackoutFlag { return []Scte35NoRegionalBlackoutFlag{ "REGIONAL_BLACKOUT", "NO_REGIONAL_BLACKOUT", } } type Scte35SegmentationCancelIndicator string // Enum values for Scte35SegmentationCancelIndicator const ( Scte35SegmentationCancelIndicatorSegmentationEventNotCanceled Scte35SegmentationCancelIndicator = "SEGMENTATION_EVENT_NOT_CANCELED" Scte35SegmentationCancelIndicatorSegmentationEventCanceled Scte35SegmentationCancelIndicator = "SEGMENTATION_EVENT_CANCELED" ) // Values returns all known values for Scte35SegmentationCancelIndicator. Note // that this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (Scte35SegmentationCancelIndicator) Values() []Scte35SegmentationCancelIndicator { return []Scte35SegmentationCancelIndicator{ "SEGMENTATION_EVENT_NOT_CANCELED", "SEGMENTATION_EVENT_CANCELED", } } type Scte35SpliceInsertNoRegionalBlackoutBehavior string // Enum values for Scte35SpliceInsertNoRegionalBlackoutBehavior const ( Scte35SpliceInsertNoRegionalBlackoutBehaviorFollow Scte35SpliceInsertNoRegionalBlackoutBehavior = "FOLLOW" Scte35SpliceInsertNoRegionalBlackoutBehaviorIgnore Scte35SpliceInsertNoRegionalBlackoutBehavior = "IGNORE" ) // Values returns all known values for // Scte35SpliceInsertNoRegionalBlackoutBehavior. Note that this can be expanded in // the future, and so it is only as up to date as the client. The ordering of this // slice is not guaranteed to be stable across updates. func (Scte35SpliceInsertNoRegionalBlackoutBehavior) Values() []Scte35SpliceInsertNoRegionalBlackoutBehavior { return []Scte35SpliceInsertNoRegionalBlackoutBehavior{ "FOLLOW", "IGNORE", } } type Scte35SpliceInsertWebDeliveryAllowedBehavior string // Enum values for Scte35SpliceInsertWebDeliveryAllowedBehavior const ( Scte35SpliceInsertWebDeliveryAllowedBehaviorFollow Scte35SpliceInsertWebDeliveryAllowedBehavior = "FOLLOW" Scte35SpliceInsertWebDeliveryAllowedBehaviorIgnore Scte35SpliceInsertWebDeliveryAllowedBehavior = "IGNORE" ) // Values returns all known values for // Scte35SpliceInsertWebDeliveryAllowedBehavior. Note that this can be expanded in // the future, and so it is only as up to date as the client. The ordering of this // slice is not guaranteed to be stable across updates. func (Scte35SpliceInsertWebDeliveryAllowedBehavior) Values() []Scte35SpliceInsertWebDeliveryAllowedBehavior { return []Scte35SpliceInsertWebDeliveryAllowedBehavior{ "FOLLOW", "IGNORE", } } type Scte35WebDeliveryAllowedFlag string // Enum values for Scte35WebDeliveryAllowedFlag const ( Scte35WebDeliveryAllowedFlagWebDeliveryNotAllowed Scte35WebDeliveryAllowedFlag = "WEB_DELIVERY_NOT_ALLOWED" Scte35WebDeliveryAllowedFlagWebDeliveryAllowed Scte35WebDeliveryAllowedFlag = "WEB_DELIVERY_ALLOWED" ) // Values returns all known values for Scte35WebDeliveryAllowedFlag. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (Scte35WebDeliveryAllowedFlag) Values() []Scte35WebDeliveryAllowedFlag { return []Scte35WebDeliveryAllowedFlag{ "WEB_DELIVERY_NOT_ALLOWED", "WEB_DELIVERY_ALLOWED", } } type SmoothGroupAudioOnlyTimecodeControl string // Enum values for SmoothGroupAudioOnlyTimecodeControl const ( SmoothGroupAudioOnlyTimecodeControlPassthrough SmoothGroupAudioOnlyTimecodeControl = "PASSTHROUGH" SmoothGroupAudioOnlyTimecodeControlUseConfiguredClock SmoothGroupAudioOnlyTimecodeControl = "USE_CONFIGURED_CLOCK" ) // Values returns all known values for SmoothGroupAudioOnlyTimecodeControl. Note // that this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (SmoothGroupAudioOnlyTimecodeControl) Values() []SmoothGroupAudioOnlyTimecodeControl { return []SmoothGroupAudioOnlyTimecodeControl{ "PASSTHROUGH", "USE_CONFIGURED_CLOCK", } } type SmoothGroupCertificateMode string // Enum values for SmoothGroupCertificateMode const ( SmoothGroupCertificateModeSelfSigned SmoothGroupCertificateMode = "SELF_SIGNED" SmoothGroupCertificateModeVerifyAuthenticity SmoothGroupCertificateMode = "VERIFY_AUTHENTICITY" ) // Values returns all known values for SmoothGroupCertificateMode. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (SmoothGroupCertificateMode) Values() []SmoothGroupCertificateMode { return []SmoothGroupCertificateMode{ "SELF_SIGNED", "VERIFY_AUTHENTICITY", } } type SmoothGroupEventIdMode string // Enum values for SmoothGroupEventIdMode const ( SmoothGroupEventIdModeNoEventId SmoothGroupEventIdMode = "NO_EVENT_ID" SmoothGroupEventIdModeUseConfigured SmoothGroupEventIdMode = "USE_CONFIGURED" SmoothGroupEventIdModeUseTimestamp SmoothGroupEventIdMode = "USE_TIMESTAMP" ) // Values returns all known values for SmoothGroupEventIdMode. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (SmoothGroupEventIdMode) Values() []SmoothGroupEventIdMode { return []SmoothGroupEventIdMode{ "NO_EVENT_ID", "USE_CONFIGURED", "USE_TIMESTAMP", } } type SmoothGroupEventStopBehavior string // Enum values for SmoothGroupEventStopBehavior const ( SmoothGroupEventStopBehaviorNone SmoothGroupEventStopBehavior = "NONE" SmoothGroupEventStopBehaviorSendEos SmoothGroupEventStopBehavior = "SEND_EOS" ) // Values returns all known values for SmoothGroupEventStopBehavior. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (SmoothGroupEventStopBehavior) Values() []SmoothGroupEventStopBehavior { return []SmoothGroupEventStopBehavior{ "NONE", "SEND_EOS", } } type SmoothGroupSegmentationMode string // Enum values for SmoothGroupSegmentationMode const ( SmoothGroupSegmentationModeUseInputSegmentation SmoothGroupSegmentationMode = "USE_INPUT_SEGMENTATION" SmoothGroupSegmentationModeUseSegmentDuration SmoothGroupSegmentationMode = "USE_SEGMENT_DURATION" ) // Values returns all known values for SmoothGroupSegmentationMode. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (SmoothGroupSegmentationMode) Values() []SmoothGroupSegmentationMode { return []SmoothGroupSegmentationMode{ "USE_INPUT_SEGMENTATION", "USE_SEGMENT_DURATION", } } type SmoothGroupSparseTrackType string // Enum values for SmoothGroupSparseTrackType const ( SmoothGroupSparseTrackTypeNone SmoothGroupSparseTrackType = "NONE" SmoothGroupSparseTrackTypeScte35 SmoothGroupSparseTrackType = "SCTE_35" SmoothGroupSparseTrackTypeScte35WithoutSegmentation SmoothGroupSparseTrackType = "SCTE_35_WITHOUT_SEGMENTATION" ) // Values returns all known values for SmoothGroupSparseTrackType. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (SmoothGroupSparseTrackType) Values() []SmoothGroupSparseTrackType { return []SmoothGroupSparseTrackType{ "NONE", "SCTE_35", "SCTE_35_WITHOUT_SEGMENTATION", } } type SmoothGroupStreamManifestBehavior string // Enum values for SmoothGroupStreamManifestBehavior const ( SmoothGroupStreamManifestBehaviorDoNotSend SmoothGroupStreamManifestBehavior = "DO_NOT_SEND" SmoothGroupStreamManifestBehaviorSend SmoothGroupStreamManifestBehavior = "SEND" ) // Values returns all known values for SmoothGroupStreamManifestBehavior. Note // that this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (SmoothGroupStreamManifestBehavior) Values() []SmoothGroupStreamManifestBehavior { return []SmoothGroupStreamManifestBehavior{ "DO_NOT_SEND", "SEND", } } type SmoothGroupTimestampOffsetMode string // Enum values for SmoothGroupTimestampOffsetMode const ( SmoothGroupTimestampOffsetModeUseConfiguredOffset SmoothGroupTimestampOffsetMode = "USE_CONFIGURED_OFFSET" SmoothGroupTimestampOffsetModeUseEventStartDate SmoothGroupTimestampOffsetMode = "USE_EVENT_START_DATE" ) // Values returns all known values for SmoothGroupTimestampOffsetMode. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (SmoothGroupTimestampOffsetMode) Values() []SmoothGroupTimestampOffsetMode { return []SmoothGroupTimestampOffsetMode{ "USE_CONFIGURED_OFFSET", "USE_EVENT_START_DATE", } } type Smpte2038DataPreference string // Enum values for Smpte2038DataPreference const ( Smpte2038DataPreferenceIgnore Smpte2038DataPreference = "IGNORE" Smpte2038DataPreferencePrefer Smpte2038DataPreference = "PREFER" ) // Values returns all known values for Smpte2038DataPreference. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (Smpte2038DataPreference) Values() []Smpte2038DataPreference { return []Smpte2038DataPreference{ "IGNORE", "PREFER", } } type TemporalFilterPostFilterSharpening string // Enum values for TemporalFilterPostFilterSharpening const ( TemporalFilterPostFilterSharpeningAuto TemporalFilterPostFilterSharpening = "AUTO" TemporalFilterPostFilterSharpeningDisabled TemporalFilterPostFilterSharpening = "DISABLED" TemporalFilterPostFilterSharpeningEnabled TemporalFilterPostFilterSharpening = "ENABLED" ) // Values returns all known values for TemporalFilterPostFilterSharpening. Note // that this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (TemporalFilterPostFilterSharpening) Values() []TemporalFilterPostFilterSharpening { return []TemporalFilterPostFilterSharpening{ "AUTO", "DISABLED", "ENABLED", } } type TemporalFilterStrength string // Enum values for TemporalFilterStrength const ( TemporalFilterStrengthAuto TemporalFilterStrength = "AUTO" TemporalFilterStrengthStrength1 TemporalFilterStrength = "STRENGTH_1" TemporalFilterStrengthStrength2 TemporalFilterStrength = "STRENGTH_2" TemporalFilterStrengthStrength3 TemporalFilterStrength = "STRENGTH_3" TemporalFilterStrengthStrength4 TemporalFilterStrength = "STRENGTH_4" TemporalFilterStrengthStrength5 TemporalFilterStrength = "STRENGTH_5" TemporalFilterStrengthStrength6 TemporalFilterStrength = "STRENGTH_6" TemporalFilterStrengthStrength7 TemporalFilterStrength = "STRENGTH_7" TemporalFilterStrengthStrength8 TemporalFilterStrength = "STRENGTH_8" TemporalFilterStrengthStrength9 TemporalFilterStrength = "STRENGTH_9" TemporalFilterStrengthStrength10 TemporalFilterStrength = "STRENGTH_10" TemporalFilterStrengthStrength11 TemporalFilterStrength = "STRENGTH_11" TemporalFilterStrengthStrength12 TemporalFilterStrength = "STRENGTH_12" TemporalFilterStrengthStrength13 TemporalFilterStrength = "STRENGTH_13" TemporalFilterStrengthStrength14 TemporalFilterStrength = "STRENGTH_14" TemporalFilterStrengthStrength15 TemporalFilterStrength = "STRENGTH_15" TemporalFilterStrengthStrength16 TemporalFilterStrength = "STRENGTH_16" ) // Values returns all known values for TemporalFilterStrength. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (TemporalFilterStrength) Values() []TemporalFilterStrength { return []TemporalFilterStrength{ "AUTO", "STRENGTH_1", "STRENGTH_2", "STRENGTH_3", "STRENGTH_4", "STRENGTH_5", "STRENGTH_6", "STRENGTH_7", "STRENGTH_8", "STRENGTH_9", "STRENGTH_10", "STRENGTH_11", "STRENGTH_12", "STRENGTH_13", "STRENGTH_14", "STRENGTH_15", "STRENGTH_16", } } type TimecodeBurninFontSize string // Enum values for TimecodeBurninFontSize const ( TimecodeBurninFontSizeExtraSmall10 TimecodeBurninFontSize = "EXTRA_SMALL_10" TimecodeBurninFontSizeLarge48 TimecodeBurninFontSize = "LARGE_48" TimecodeBurninFontSizeMedium32 TimecodeBurninFontSize = "MEDIUM_32" TimecodeBurninFontSizeSmall16 TimecodeBurninFontSize = "SMALL_16" ) // Values returns all known values for TimecodeBurninFontSize. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (TimecodeBurninFontSize) Values() []TimecodeBurninFontSize { return []TimecodeBurninFontSize{ "EXTRA_SMALL_10", "LARGE_48", "MEDIUM_32", "SMALL_16", } } type TimecodeBurninPosition string // Enum values for TimecodeBurninPosition const ( TimecodeBurninPositionBottomCenter TimecodeBurninPosition = "BOTTOM_CENTER" TimecodeBurninPositionBottomLeft TimecodeBurninPosition = "BOTTOM_LEFT" TimecodeBurninPositionBottomRight TimecodeBurninPosition = "BOTTOM_RIGHT" TimecodeBurninPositionMiddleCenter TimecodeBurninPosition = "MIDDLE_CENTER" TimecodeBurninPositionMiddleLeft TimecodeBurninPosition = "MIDDLE_LEFT" TimecodeBurninPositionMiddleRight TimecodeBurninPosition = "MIDDLE_RIGHT" TimecodeBurninPositionTopCenter TimecodeBurninPosition = "TOP_CENTER" TimecodeBurninPositionTopLeft TimecodeBurninPosition = "TOP_LEFT" TimecodeBurninPositionTopRight TimecodeBurninPosition = "TOP_RIGHT" ) // Values returns all known values for TimecodeBurninPosition. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (TimecodeBurninPosition) Values() []TimecodeBurninPosition { return []TimecodeBurninPosition{ "BOTTOM_CENTER", "BOTTOM_LEFT", "BOTTOM_RIGHT", "MIDDLE_CENTER", "MIDDLE_LEFT", "MIDDLE_RIGHT", "TOP_CENTER", "TOP_LEFT", "TOP_RIGHT", } } type TimecodeConfigSource string // Enum values for TimecodeConfigSource const ( TimecodeConfigSourceEmbedded TimecodeConfigSource = "EMBEDDED" TimecodeConfigSourceSystemclock TimecodeConfigSource = "SYSTEMCLOCK" TimecodeConfigSourceZerobased TimecodeConfigSource = "ZEROBASED" ) // Values returns all known values for TimecodeConfigSource. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (TimecodeConfigSource) Values() []TimecodeConfigSource { return []TimecodeConfigSource{ "EMBEDDED", "SYSTEMCLOCK", "ZEROBASED", } } type TtmlDestinationStyleControl string // Enum values for TtmlDestinationStyleControl const ( TtmlDestinationStyleControlPassthrough TtmlDestinationStyleControl = "PASSTHROUGH" TtmlDestinationStyleControlUseConfigured TtmlDestinationStyleControl = "USE_CONFIGURED" ) // Values returns all known values for TtmlDestinationStyleControl. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (TtmlDestinationStyleControl) Values() []TtmlDestinationStyleControl { return []TtmlDestinationStyleControl{ "PASSTHROUGH", "USE_CONFIGURED", } } type UdpTimedMetadataId3Frame string // Enum values for UdpTimedMetadataId3Frame const ( UdpTimedMetadataId3FrameNone UdpTimedMetadataId3Frame = "NONE" UdpTimedMetadataId3FramePriv UdpTimedMetadataId3Frame = "PRIV" UdpTimedMetadataId3FrameTdrl UdpTimedMetadataId3Frame = "TDRL" ) // Values returns all known values for UdpTimedMetadataId3Frame. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (UdpTimedMetadataId3Frame) Values() []UdpTimedMetadataId3Frame { return []UdpTimedMetadataId3Frame{ "NONE", "PRIV", "TDRL", } } type VideoDescriptionRespondToAfd string // Enum values for VideoDescriptionRespondToAfd const ( VideoDescriptionRespondToAfdNone VideoDescriptionRespondToAfd = "NONE" VideoDescriptionRespondToAfdPassthrough VideoDescriptionRespondToAfd = "PASSTHROUGH" VideoDescriptionRespondToAfdRespond VideoDescriptionRespondToAfd = "RESPOND" ) // Values returns all known values for VideoDescriptionRespondToAfd. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (VideoDescriptionRespondToAfd) Values() []VideoDescriptionRespondToAfd { return []VideoDescriptionRespondToAfd{ "NONE", "PASSTHROUGH", "RESPOND", } } type VideoDescriptionScalingBehavior string // Enum values for VideoDescriptionScalingBehavior const ( VideoDescriptionScalingBehaviorDefault VideoDescriptionScalingBehavior = "DEFAULT" VideoDescriptionScalingBehaviorStretchToOutput VideoDescriptionScalingBehavior = "STRETCH_TO_OUTPUT" ) // Values returns all known values for VideoDescriptionScalingBehavior. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (VideoDescriptionScalingBehavior) Values() []VideoDescriptionScalingBehavior { return []VideoDescriptionScalingBehavior{ "DEFAULT", "STRETCH_TO_OUTPUT", } } type VideoSelectorColorSpace string // Enum values for VideoSelectorColorSpace const ( VideoSelectorColorSpaceFollow VideoSelectorColorSpace = "FOLLOW" VideoSelectorColorSpaceHdr10 VideoSelectorColorSpace = "HDR10" VideoSelectorColorSpaceHlg2020 VideoSelectorColorSpace = "HLG_2020" VideoSelectorColorSpaceRec601 VideoSelectorColorSpace = "REC_601" VideoSelectorColorSpaceRec709 VideoSelectorColorSpace = "REC_709" ) // Values returns all known values for VideoSelectorColorSpace. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (VideoSelectorColorSpace) Values() []VideoSelectorColorSpace { return []VideoSelectorColorSpace{ "FOLLOW", "HDR10", "HLG_2020", "REC_601", "REC_709", } } type VideoSelectorColorSpaceUsage string // Enum values for VideoSelectorColorSpaceUsage const ( VideoSelectorColorSpaceUsageFallback VideoSelectorColorSpaceUsage = "FALLBACK" VideoSelectorColorSpaceUsageForce VideoSelectorColorSpaceUsage = "FORCE" ) // Values returns all known values for VideoSelectorColorSpaceUsage. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (VideoSelectorColorSpaceUsage) Values() []VideoSelectorColorSpaceUsage { return []VideoSelectorColorSpaceUsage{ "FALLBACK", "FORCE", } } type WavCodingMode string // Enum values for WavCodingMode const ( WavCodingModeCodingMode10 WavCodingMode = "CODING_MODE_1_0" WavCodingModeCodingMode20 WavCodingMode = "CODING_MODE_2_0" WavCodingModeCodingMode40 WavCodingMode = "CODING_MODE_4_0" WavCodingModeCodingMode80 WavCodingMode = "CODING_MODE_8_0" ) // Values returns all known values for WavCodingMode. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (WavCodingMode) Values() []WavCodingMode { return []WavCodingMode{ "CODING_MODE_1_0", "CODING_MODE_2_0", "CODING_MODE_4_0", "CODING_MODE_8_0", } } type WebvttDestinationStyleControl string // Enum values for WebvttDestinationStyleControl const ( WebvttDestinationStyleControlNoStyleData WebvttDestinationStyleControl = "NO_STYLE_DATA" WebvttDestinationStyleControlPassthrough WebvttDestinationStyleControl = "PASSTHROUGH" ) // Values returns all known values for WebvttDestinationStyleControl. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (WebvttDestinationStyleControl) Values() []WebvttDestinationStyleControl { return []WebvttDestinationStyleControl{ "NO_STYLE_DATA", "PASSTHROUGH", } }
5,317
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types import ( "fmt" smithy "github.com/aws/smithy-go" ) // Placeholder documentation for BadGatewayException type BadGatewayException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *BadGatewayException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *BadGatewayException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *BadGatewayException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "BadGatewayException" } return *e.ErrorCodeOverride } func (e *BadGatewayException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } // Placeholder documentation for BadRequestException type BadRequestException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *BadRequestException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *BadRequestException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *BadRequestException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "BadRequestException" } return *e.ErrorCodeOverride } func (e *BadRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Placeholder documentation for ConflictException type ConflictException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ConflictException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ConflictException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ConflictException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ConflictException" } return *e.ErrorCodeOverride } func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Placeholder documentation for ForbiddenException type ForbiddenException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ForbiddenException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ForbiddenException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ForbiddenException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ForbiddenException" } return *e.ErrorCodeOverride } func (e *ForbiddenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Placeholder documentation for GatewayTimeoutException type GatewayTimeoutException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *GatewayTimeoutException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *GatewayTimeoutException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *GatewayTimeoutException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "GatewayTimeoutException" } return *e.ErrorCodeOverride } func (e *GatewayTimeoutException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } // Placeholder documentation for InternalServerErrorException type InternalServerErrorException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InternalServerErrorException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InternalServerErrorException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InternalServerErrorException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InternalServerErrorException" } return *e.ErrorCodeOverride } func (e *InternalServerErrorException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } // Placeholder documentation for NotFoundException type NotFoundException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *NotFoundException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *NotFoundException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *NotFoundException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "NotFoundException" } return *e.ErrorCodeOverride } func (e *NotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Placeholder documentation for TooManyRequestsException type TooManyRequestsException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *TooManyRequestsException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *TooManyRequestsException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *TooManyRequestsException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "TooManyRequestsException" } return *e.ErrorCodeOverride } func (e *TooManyRequestsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Placeholder documentation for UnprocessableEntityException type UnprocessableEntityException struct { Message *string ErrorCodeOverride *string ValidationErrors []ValidationError noSmithyDocumentSerde } func (e *UnprocessableEntityException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *UnprocessableEntityException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *UnprocessableEntityException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "UnprocessableEntityException" } return *e.ErrorCodeOverride } func (e *UnprocessableEntityException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
245
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackage import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/retry" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" smithy "github.com/aws/smithy-go" smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "net" "net/http" "time" ) const ServiceID = "MediaPackage" const ServiceAPIVersion = "2017-10-12" // Client provides the API client to make operations call for AWS Elemental // MediaPackage. type Client struct { options Options } // New returns an initialized Client based on the functional options. Provide // additional functional options to further configure the behavior of the client, // such as changing the client's endpoint or adding custom middleware behavior. func New(options Options, optFns ...func(*Options)) *Client { options = options.Copy() resolveDefaultLogger(&options) setResolvedDefaultsMode(&options) resolveRetryer(&options) resolveHTTPClient(&options) resolveHTTPSignerV4(&options) resolveDefaultEndpointConfiguration(&options) for _, fn := range optFns { fn(&options) } client := &Client{ options: options, } return client } type Options struct { // Set of options to modify how an operation is invoked. These apply to all // operations invoked for this client. Use functional options on operation call to // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error // Configures the events that will be sent to the configured logger. ClientLogMode aws.ClientLogMode // The credentials object to use when signing requests. Credentials aws.CredentialsProvider // The configuration DefaultsMode that the SDK should use when constructing the // clients initial default settings. DefaultsMode aws.DefaultsMode // The endpoint options to be used when attempting to resolve an endpoint. EndpointOptions EndpointResolverOptions // The service endpoint resolver. EndpointResolver EndpointResolver // Signature Version 4 (SigV4) Signer HTTPSignerV4 HTTPSignerV4 // The logger writer interface to write logging messages to. Logger logging.Logger // The region to send requests to. (Required) Region string // RetryMaxAttempts specifies the maximum number attempts an API client will call // an operation that fails with a retryable error. A value of 0 is ignored, and // will not be used to configure the API client created default retryer, or modify // per operation call's retry max attempts. When creating a new API Clients this // member will only be used if the Retryer Options member is nil. This value will // be ignored if Retryer is not nil. If specified in an operation call's functional // options with a value that is different than the constructed client's Options, // the Client's Retryer will be wrapped to use the operation's specific // RetryMaxAttempts value. RetryMaxAttempts int // RetryMode specifies the retry mode the API client will be created with, if // Retryer option is not also specified. When creating a new API Clients this // member will only be used if the Retryer Options member is nil. This value will // be ignored if Retryer is not nil. Currently does not support per operation call // overrides, may in the future. RetryMode aws.RetryMode // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. The kind of // default retry created by the API client can be changed with the RetryMode // option. Retryer aws.Retryer // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You // should not populate this structure programmatically, or rely on the values here // within your applications. RuntimeEnvironment aws.RuntimeEnvironment // The initial DefaultsMode used when the client options were constructed. If the // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved // value was at that point in time. Currently does not support per operation call // overrides, may in the future. resolvedDefaultsMode aws.DefaultsMode // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. HTTPClient HTTPClient } // WithAPIOptions returns a functional option for setting the Client's APIOptions // option. func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { return func(o *Options) { o.APIOptions = append(o.APIOptions, optFns...) } } // WithEndpointResolver returns a functional option for setting the Client's // EndpointResolver option. func WithEndpointResolver(v EndpointResolver) func(*Options) { return func(o *Options) { o.EndpointResolver = v } } type HTTPClient interface { Do(*http.Request) (*http.Response, error) } // Copy creates a clone where the APIOptions list is deep copied. func (o Options) Copy() Options { to := o to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) copy(to.APIOptions, o.APIOptions) return to } func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { ctx = middleware.ClearStackValues(ctx) stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) options := c.options.Copy() for _, fn := range optFns { fn(&options) } finalizeRetryMaxAttemptOptions(&options, *c) finalizeClientEndpointResolverOptions(&options) for _, fn := range stackFns { if err := fn(stack, options); err != nil { return nil, metadata, err } } for _, fn := range options.APIOptions { if err := fn(stack); err != nil { return nil, metadata, err } } handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) result, metadata, err = handler.Handle(ctx, params) if err != nil { err = &smithy.OperationError{ ServiceID: ServiceID, OperationName: opID, Err: err, } } return result, metadata, err } type noSmithyDocumentSerde = smithydocument.NoSerde func resolveDefaultLogger(o *Options) { if o.Logger != nil { return } o.Logger = logging.Nop{} } func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { return middleware.AddSetLoggerMiddleware(stack, o.Logger) } func setResolvedDefaultsMode(o *Options) { if len(o.resolvedDefaultsMode) > 0 { return } var mode aws.DefaultsMode mode.SetFromString(string(o.DefaultsMode)) if mode == aws.DefaultsModeAuto { mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) } o.resolvedDefaultsMode = mode } // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, DefaultsMode: cfg.DefaultsMode, RuntimeEnvironment: cfg.RuntimeEnvironment, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) resolveAWSRetryMode(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) resolveUseDualStackEndpoint(cfg, &opts) resolveUseFIPSEndpoint(cfg, &opts) return New(opts, optFns...) } func resolveHTTPClient(o *Options) { var buildable *awshttp.BuildableClient if o.HTTPClient != nil { var ok bool buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) if !ok { return } } else { buildable = awshttp.NewBuildableClient() } modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) if err == nil { buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { dialer.Timeout = dialerTimeout } }) buildable = buildable.WithTransportOptions(func(transport *http.Transport) { if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { transport.TLSHandshakeTimeout = tlsHandshakeTimeout } }) } o.HTTPClient = buildable } func resolveRetryer(o *Options) { if o.Retryer != nil { return } if len(o.RetryMode) == 0 { modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) if err == nil { o.RetryMode = modeConfig.RetryMode } } if len(o.RetryMode) == 0 { o.RetryMode = aws.RetryModeStandard } var standardOptions []func(*retry.StandardOptions) if v := o.RetryMaxAttempts; v != 0 { standardOptions = append(standardOptions, func(so *retry.StandardOptions) { so.MaxAttempts = v }) } switch o.RetryMode { case aws.RetryModeAdaptive: var adaptiveOptions []func(*retry.AdaptiveModeOptions) if len(standardOptions) != 0 { adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { ao.StandardOptions = append(ao.StandardOptions, standardOptions...) }) } o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) default: o.Retryer = retry.NewStandard(standardOptions...) } } func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { if cfg.Retryer == nil { return } o.Retryer = cfg.Retryer() } func resolveAWSRetryMode(cfg aws.Config, o *Options) { if len(cfg.RetryMode) == 0 { return } o.RetryMode = cfg.RetryMode } func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { if cfg.RetryMaxAttempts == 0 { return } o.RetryMaxAttempts = cfg.RetryMaxAttempts } func finalizeRetryMaxAttemptOptions(o *Options, client Client) { if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { return } o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) } func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { return } o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver()) } func addClientUserAgent(stack *middleware.Stack) error { return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "mediapackage", goModuleVersion)(stack) } func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error { mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{ CredentialsProvider: o.Credentials, Signer: o.HTTPSignerV4, LogSigning: o.ClientLogMode.IsSigning(), }) return stack.Finalize.Add(mw, middleware.After) } type HTTPSignerV4 interface { SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error } func resolveHTTPSignerV4(o *Options) { if o.HTTPSignerV4 != nil { return } o.HTTPSignerV4 = newDefaultV4Signer(*o) } func newDefaultV4Signer(o Options) *v4.Signer { return v4.NewSigner(func(so *v4.SignerOptions) { so.Logger = o.Logger so.LogSigning = o.ClientLogMode.IsSigning() }) } func addRetryMiddlewares(stack *middleware.Stack, o Options) error { mo := retry.AddRetryMiddlewaresOptions{ Retryer: o.Retryer, LogRetryAttempts: o.ClientLogMode.IsRetries(), } return retry.AddRetryMiddlewares(stack, mo) } // resolves dual-stack endpoint configuration func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { if len(cfg.ConfigSources) == 0 { return nil } value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) if err != nil { return err } if found { o.EndpointOptions.UseDualStackEndpoint = value } return nil } // resolves FIPS endpoint configuration func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { if len(cfg.ConfigSources) == 0 { return nil } value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) if err != nil { return err } if found { o.EndpointOptions.UseFIPSEndpoint = value } return nil } func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) } func addResponseErrorMiddleware(stack *middleware.Stack) error { return awshttp.AddResponseErrorMiddleware(stack) } func addRequestResponseLogging(stack *middleware.Stack, o Options) error { return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ LogRequest: o.ClientLogMode.IsRequest(), LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), LogResponse: o.ClientLogMode.IsResponse(), LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), }, middleware.After) }
435
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackage import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "io/ioutil" "net/http" "strings" "testing" ) func TestClient_resolveRetryOptions(t *testing.T) { nopClient := smithyhttp.ClientDoFunc(func(_ *http.Request) (*http.Response, error) { return &http.Response{ StatusCode: 200, Header: http.Header{}, Body: ioutil.NopCloser(strings.NewReader("")), }, nil }) cases := map[string]struct { defaultsMode aws.DefaultsMode retryer aws.Retryer retryMaxAttempts int opRetryMaxAttempts *int retryMode aws.RetryMode expectClientRetryMode aws.RetryMode expectClientMaxAttempts int expectOpMaxAttempts int }{ "defaults": { defaultsMode: aws.DefaultsModeStandard, expectClientRetryMode: aws.RetryModeStandard, expectClientMaxAttempts: 3, expectOpMaxAttempts: 3, }, "custom default retry": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, "custom op max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(2), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 2, }, "custom op no change max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(10), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, "custom op 0 max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(0), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, } for name, c := range cases { t.Run(name, func(t *testing.T) { client := NewFromConfig(aws.Config{ DefaultsMode: c.defaultsMode, Retryer: func() func() aws.Retryer { if c.retryer == nil { return nil } return func() aws.Retryer { return c.retryer } }(), HTTPClient: nopClient, RetryMaxAttempts: c.retryMaxAttempts, RetryMode: c.retryMode, }) if e, a := c.expectClientRetryMode, client.options.RetryMode; e != a { t.Errorf("expect %v retry mode, got %v", e, a) } if e, a := c.expectClientMaxAttempts, client.options.Retryer.MaxAttempts(); e != a { t.Errorf("expect %v max attempts, got %v", e, a) } _, _, err := client.invokeOperation(context.Background(), "mockOperation", struct{}{}, []func(*Options){ func(o *Options) { if c.opRetryMaxAttempts == nil { return } o.RetryMaxAttempts = *c.opRetryMaxAttempts }, }, func(s *middleware.Stack, o Options) error { s.Initialize.Clear() s.Serialize.Clear() s.Build.Clear() s.Finalize.Clear() s.Deserialize.Clear() if e, a := c.expectOpMaxAttempts, o.Retryer.MaxAttempts(); e != a { t.Errorf("expect %v op max attempts, got %v", e, a) } return nil }) if err != nil { t.Fatalf("expect no operation error, got %v", err) } }) } }
124
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackage import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackage/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Changes the Channel's properities to configure log subscription func (c *Client) ConfigureLogs(ctx context.Context, params *ConfigureLogsInput, optFns ...func(*Options)) (*ConfigureLogsOutput, error) { if params == nil { params = &ConfigureLogsInput{} } result, metadata, err := c.invokeOperation(ctx, "ConfigureLogs", params, optFns, c.addOperationConfigureLogsMiddlewares) if err != nil { return nil, err } out := result.(*ConfigureLogsOutput) out.ResultMetadata = metadata return out, nil } // the option to configure log subscription. type ConfigureLogsInput struct { // The ID of the channel to log subscription. // // This member is required. Id *string // Configure egress access logging. EgressAccessLogs *types.EgressAccessLogs // Configure ingress access logging. IngressAccessLogs *types.IngressAccessLogs noSmithyDocumentSerde } type ConfigureLogsOutput struct { // The Amazon Resource Name (ARN) assigned to the Channel. Arn *string // The date and time the Channel was created. CreatedAt *string // A short text description of the Channel. Description *string // Configure egress access logging. EgressAccessLogs *types.EgressAccessLogs // An HTTP Live Streaming (HLS) ingest resource configuration. HlsIngest *types.HlsIngest // The ID of the Channel. Id *string // Configure ingress access logging. IngressAccessLogs *types.IngressAccessLogs // A collection of tags associated with a resource Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationConfigureLogsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpConfigureLogs{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpConfigureLogs{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpConfigureLogsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opConfigureLogs(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opConfigureLogs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage", OperationName: "ConfigureLogs", } }
153
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackage import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackage/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new Channel. func (c *Client) CreateChannel(ctx context.Context, params *CreateChannelInput, optFns ...func(*Options)) (*CreateChannelOutput, error) { if params == nil { params = &CreateChannelInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateChannel", params, optFns, c.addOperationCreateChannelMiddlewares) if err != nil { return nil, err } out := result.(*CreateChannelOutput) out.ResultMetadata = metadata return out, nil } // A new Channel configuration. type CreateChannelInput struct { // The ID of the Channel. The ID must be unique within the region and it cannot be // changed after a Channel is created. // // This member is required. Id *string // A short text description of the Channel. Description *string // A collection of tags associated with a resource Tags map[string]string noSmithyDocumentSerde } type CreateChannelOutput struct { // The Amazon Resource Name (ARN) assigned to the Channel. Arn *string // The date and time the Channel was created. CreatedAt *string // A short text description of the Channel. Description *string // Configure egress access logging. EgressAccessLogs *types.EgressAccessLogs // An HTTP Live Streaming (HLS) ingest resource configuration. HlsIngest *types.HlsIngest // The ID of the Channel. Id *string // Configure ingress access logging. IngressAccessLogs *types.IngressAccessLogs // A collection of tags associated with a resource Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateChannelMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateChannel{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateChannel{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateChannelValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateChannel(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opCreateChannel(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage", OperationName: "CreateChannel", } }
154
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackage import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackage/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new HarvestJob record. func (c *Client) CreateHarvestJob(ctx context.Context, params *CreateHarvestJobInput, optFns ...func(*Options)) (*CreateHarvestJobOutput, error) { if params == nil { params = &CreateHarvestJobInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateHarvestJob", params, optFns, c.addOperationCreateHarvestJobMiddlewares) if err != nil { return nil, err } out := result.(*CreateHarvestJobOutput) out.ResultMetadata = metadata return out, nil } // Configuration parameters used to create a new HarvestJob. type CreateHarvestJobInput struct { // The end of the time-window which will be harvested // // This member is required. EndTime *string // The ID of the HarvestJob. The ID must be unique within the region and it cannot // be changed after the HarvestJob is submitted // // This member is required. Id *string // The ID of the OriginEndpoint that the HarvestJob will harvest from. This cannot // be changed after the HarvestJob is submitted. // // This member is required. OriginEndpointId *string // Configuration parameters for where in an S3 bucket to place the harvested // content // // This member is required. S3Destination *types.S3Destination // The start of the time-window which will be harvested // // This member is required. StartTime *string noSmithyDocumentSerde } type CreateHarvestJobOutput struct { // The Amazon Resource Name (ARN) assigned to the HarvestJob. Arn *string // The ID of the Channel that the HarvestJob will harvest from. ChannelId *string // The date and time the HarvestJob was submitted. CreatedAt *string // The end of the time-window which will be harvested. EndTime *string // The ID of the HarvestJob. The ID must be unique within the region and it cannot // be changed after the HarvestJob is submitted. Id *string // The ID of the OriginEndpoint that the HarvestJob will harvest from. This cannot // be changed after the HarvestJob is submitted. OriginEndpointId *string // Configuration parameters for where in an S3 bucket to place the harvested // content S3Destination *types.S3Destination // The start of the time-window which will be harvested. StartTime *string // The current status of the HarvestJob. Consider setting up a CloudWatch Event to // listen for HarvestJobs as they succeed or fail. In the event of failure, the // CloudWatch Event will include an explanation of why the HarvestJob failed. Status types.Status // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateHarvestJobMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateHarvestJob{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateHarvestJob{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateHarvestJobValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateHarvestJob(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opCreateHarvestJob(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage", OperationName: "CreateHarvestJob", } }
178
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackage import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackage/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new OriginEndpoint record. func (c *Client) CreateOriginEndpoint(ctx context.Context, params *CreateOriginEndpointInput, optFns ...func(*Options)) (*CreateOriginEndpointOutput, error) { if params == nil { params = &CreateOriginEndpointInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateOriginEndpoint", params, optFns, c.addOperationCreateOriginEndpointMiddlewares) if err != nil { return nil, err } out := result.(*CreateOriginEndpointOutput) out.ResultMetadata = metadata return out, nil } // Configuration parameters used to create a new OriginEndpoint. type CreateOriginEndpointInput struct { // The ID of the Channel that the OriginEndpoint will be associated with. This // cannot be changed after the OriginEndpoint is created. // // This member is required. ChannelId *string // The ID of the OriginEndpoint. The ID must be unique within the region and it // cannot be changed after the OriginEndpoint is created. // // This member is required. Id *string // CDN Authorization credentials Authorization *types.Authorization // A Common Media Application Format (CMAF) packaging configuration. CmafPackage *types.CmafPackageCreateOrUpdateParameters // A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. DashPackage *types.DashPackage // A short text description of the OriginEndpoint. Description *string // An HTTP Live Streaming (HLS) packaging configuration. HlsPackage *types.HlsPackage // A short string that will be used as the filename of the OriginEndpoint URL // (defaults to "index"). ManifestName *string // A Microsoft Smooth Streaming (MSS) packaging configuration. MssPackage *types.MssPackage // Control whether origination of video is allowed for this OriginEndpoint. If set // to ALLOW, the OriginEndpoint may by requested, pursuant to any other form of // access control. If set to DENY, the OriginEndpoint may not be requested. This // can be helpful for Live to VOD harvesting, or for temporarily disabling // origination Origination types.Origination // Maximum duration (seconds) of content to retain for startover playback. If not // specified, startover playback will be disabled for the OriginEndpoint. StartoverWindowSeconds int32 // A collection of tags associated with a resource Tags map[string]string // Amount of delay (seconds) to enforce on the playback of live content. If not // specified, there will be no time delay in effect for the OriginEndpoint. TimeDelaySeconds int32 // A list of source IP CIDR blocks that will be allowed to access the // OriginEndpoint. Whitelist []string noSmithyDocumentSerde } type CreateOriginEndpointOutput struct { // The Amazon Resource Name (ARN) assigned to the OriginEndpoint. Arn *string // CDN Authorization credentials Authorization *types.Authorization // The ID of the Channel the OriginEndpoint is associated with. ChannelId *string // A Common Media Application Format (CMAF) packaging configuration. CmafPackage *types.CmafPackage // The date and time the OriginEndpoint was created. CreatedAt *string // A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. DashPackage *types.DashPackage // A short text description of the OriginEndpoint. Description *string // An HTTP Live Streaming (HLS) packaging configuration. HlsPackage *types.HlsPackage // The ID of the OriginEndpoint. Id *string // A short string appended to the end of the OriginEndpoint URL. ManifestName *string // A Microsoft Smooth Streaming (MSS) packaging configuration. MssPackage *types.MssPackage // Control whether origination of video is allowed for this OriginEndpoint. If set // to ALLOW, the OriginEndpoint may by requested, pursuant to any other form of // access control. If set to DENY, the OriginEndpoint may not be requested. This // can be helpful for Live to VOD harvesting, or for temporarily disabling // origination Origination types.Origination // Maximum duration (seconds) of content to retain for startover playback. If not // specified, startover playback will be disabled for the OriginEndpoint. StartoverWindowSeconds int32 // A collection of tags associated with a resource Tags map[string]string // Amount of delay (seconds) to enforce on the playback of live content. If not // specified, there will be no time delay in effect for the OriginEndpoint. TimeDelaySeconds int32 // The URL of the packaged OriginEndpoint for consumption. Url *string // A list of source IP CIDR blocks that will be allowed to access the // OriginEndpoint. Whitelist []string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateOriginEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateOriginEndpoint{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateOriginEndpoint{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateOriginEndpointValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateOriginEndpoint(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opCreateOriginEndpoint(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage", OperationName: "CreateOriginEndpoint", } }
232
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackage import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes an existing Channel. func (c *Client) DeleteChannel(ctx context.Context, params *DeleteChannelInput, optFns ...func(*Options)) (*DeleteChannelOutput, error) { if params == nil { params = &DeleteChannelInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteChannel", params, optFns, c.addOperationDeleteChannelMiddlewares) if err != nil { return nil, err } out := result.(*DeleteChannelOutput) out.ResultMetadata = metadata return out, nil } type DeleteChannelInput struct { // The ID of the Channel to delete. // // This member is required. Id *string noSmithyDocumentSerde } type DeleteChannelOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteChannelMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteChannel{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteChannel{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteChannelValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteChannel(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDeleteChannel(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage", OperationName: "DeleteChannel", } }
120
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackage import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes an existing OriginEndpoint. func (c *Client) DeleteOriginEndpoint(ctx context.Context, params *DeleteOriginEndpointInput, optFns ...func(*Options)) (*DeleteOriginEndpointOutput, error) { if params == nil { params = &DeleteOriginEndpointInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteOriginEndpoint", params, optFns, c.addOperationDeleteOriginEndpointMiddlewares) if err != nil { return nil, err } out := result.(*DeleteOriginEndpointOutput) out.ResultMetadata = metadata return out, nil } type DeleteOriginEndpointInput struct { // The ID of the OriginEndpoint to delete. // // This member is required. Id *string noSmithyDocumentSerde } type DeleteOriginEndpointOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteOriginEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteOriginEndpoint{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteOriginEndpoint{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteOriginEndpointValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteOriginEndpoint(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDeleteOriginEndpoint(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage", OperationName: "DeleteOriginEndpoint", } }
120
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackage import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackage/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Gets details about a Channel. func (c *Client) DescribeChannel(ctx context.Context, params *DescribeChannelInput, optFns ...func(*Options)) (*DescribeChannelOutput, error) { if params == nil { params = &DescribeChannelInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeChannel", params, optFns, c.addOperationDescribeChannelMiddlewares) if err != nil { return nil, err } out := result.(*DescribeChannelOutput) out.ResultMetadata = metadata return out, nil } type DescribeChannelInput struct { // The ID of a Channel. // // This member is required. Id *string noSmithyDocumentSerde } type DescribeChannelOutput struct { // The Amazon Resource Name (ARN) assigned to the Channel. Arn *string // The date and time the Channel was created. CreatedAt *string // A short text description of the Channel. Description *string // Configure egress access logging. EgressAccessLogs *types.EgressAccessLogs // An HTTP Live Streaming (HLS) ingest resource configuration. HlsIngest *types.HlsIngest // The ID of the Channel. Id *string // Configure ingress access logging. IngressAccessLogs *types.IngressAccessLogs // A collection of tags associated with a resource Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeChannelMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeChannel{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeChannel{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDescribeChannelValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeChannel(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDescribeChannel(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage", OperationName: "DescribeChannel", } }
146
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackage import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackage/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Gets details about an existing HarvestJob. func (c *Client) DescribeHarvestJob(ctx context.Context, params *DescribeHarvestJobInput, optFns ...func(*Options)) (*DescribeHarvestJobOutput, error) { if params == nil { params = &DescribeHarvestJobInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeHarvestJob", params, optFns, c.addOperationDescribeHarvestJobMiddlewares) if err != nil { return nil, err } out := result.(*DescribeHarvestJobOutput) out.ResultMetadata = metadata return out, nil } type DescribeHarvestJobInput struct { // The ID of the HarvestJob. // // This member is required. Id *string noSmithyDocumentSerde } type DescribeHarvestJobOutput struct { // The Amazon Resource Name (ARN) assigned to the HarvestJob. Arn *string // The ID of the Channel that the HarvestJob will harvest from. ChannelId *string // The date and time the HarvestJob was submitted. CreatedAt *string // The end of the time-window which will be harvested. EndTime *string // The ID of the HarvestJob. The ID must be unique within the region and it cannot // be changed after the HarvestJob is submitted. Id *string // The ID of the OriginEndpoint that the HarvestJob will harvest from. This cannot // be changed after the HarvestJob is submitted. OriginEndpointId *string // Configuration parameters for where in an S3 bucket to place the harvested // content S3Destination *types.S3Destination // The start of the time-window which will be harvested. StartTime *string // The current status of the HarvestJob. Consider setting up a CloudWatch Event to // listen for HarvestJobs as they succeed or fail. In the event of failure, the // CloudWatch Event will include an explanation of why the HarvestJob failed. Status types.Status // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeHarvestJobMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeHarvestJob{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeHarvestJob{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDescribeHarvestJobValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeHarvestJob(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDescribeHarvestJob(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage", OperationName: "DescribeHarvestJob", } }
154
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackage import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackage/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Gets details about an existing OriginEndpoint. func (c *Client) DescribeOriginEndpoint(ctx context.Context, params *DescribeOriginEndpointInput, optFns ...func(*Options)) (*DescribeOriginEndpointOutput, error) { if params == nil { params = &DescribeOriginEndpointInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeOriginEndpoint", params, optFns, c.addOperationDescribeOriginEndpointMiddlewares) if err != nil { return nil, err } out := result.(*DescribeOriginEndpointOutput) out.ResultMetadata = metadata return out, nil } type DescribeOriginEndpointInput struct { // The ID of the OriginEndpoint. // // This member is required. Id *string noSmithyDocumentSerde } type DescribeOriginEndpointOutput struct { // The Amazon Resource Name (ARN) assigned to the OriginEndpoint. Arn *string // CDN Authorization credentials Authorization *types.Authorization // The ID of the Channel the OriginEndpoint is associated with. ChannelId *string // A Common Media Application Format (CMAF) packaging configuration. CmafPackage *types.CmafPackage // The date and time the OriginEndpoint was created. CreatedAt *string // A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. DashPackage *types.DashPackage // A short text description of the OriginEndpoint. Description *string // An HTTP Live Streaming (HLS) packaging configuration. HlsPackage *types.HlsPackage // The ID of the OriginEndpoint. Id *string // A short string appended to the end of the OriginEndpoint URL. ManifestName *string // A Microsoft Smooth Streaming (MSS) packaging configuration. MssPackage *types.MssPackage // Control whether origination of video is allowed for this OriginEndpoint. If set // to ALLOW, the OriginEndpoint may by requested, pursuant to any other form of // access control. If set to DENY, the OriginEndpoint may not be requested. This // can be helpful for Live to VOD harvesting, or for temporarily disabling // origination Origination types.Origination // Maximum duration (seconds) of content to retain for startover playback. If not // specified, startover playback will be disabled for the OriginEndpoint. StartoverWindowSeconds int32 // A collection of tags associated with a resource Tags map[string]string // Amount of delay (seconds) to enforce on the playback of live content. If not // specified, there will be no time delay in effect for the OriginEndpoint. TimeDelaySeconds int32 // The URL of the packaged OriginEndpoint for consumption. Url *string // A list of source IP CIDR blocks that will be allowed to access the // OriginEndpoint. Whitelist []string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeOriginEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeOriginEndpoint{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeOriginEndpoint{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDescribeOriginEndpointValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeOriginEndpoint(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDescribeOriginEndpoint(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage", OperationName: "DescribeOriginEndpoint", } }
180
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackage import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackage/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns a collection of Channels. func (c *Client) ListChannels(ctx context.Context, params *ListChannelsInput, optFns ...func(*Options)) (*ListChannelsOutput, error) { if params == nil { params = &ListChannelsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListChannels", params, optFns, c.addOperationListChannelsMiddlewares) if err != nil { return nil, err } out := result.(*ListChannelsOutput) out.ResultMetadata = metadata return out, nil } type ListChannelsInput struct { // Upper bound on number of records to return. MaxResults int32 // A token used to resume pagination from the end of a previous request. NextToken *string noSmithyDocumentSerde } type ListChannelsOutput struct { // A list of Channel records. Channels []types.Channel // A token that can be used to resume pagination from the end of the collection. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListChannelsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpListChannels{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListChannels{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListChannels(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } // ListChannelsAPIClient is a client that implements the ListChannels operation. type ListChannelsAPIClient interface { ListChannels(context.Context, *ListChannelsInput, ...func(*Options)) (*ListChannelsOutput, error) } var _ ListChannelsAPIClient = (*Client)(nil) // ListChannelsPaginatorOptions is the paginator options for ListChannels type ListChannelsPaginatorOptions struct { // Upper bound on number of records to return. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool } // ListChannelsPaginator is a paginator for ListChannels type ListChannelsPaginator struct { options ListChannelsPaginatorOptions client ListChannelsAPIClient params *ListChannelsInput nextToken *string firstPage bool } // NewListChannelsPaginator returns a new ListChannelsPaginator func NewListChannelsPaginator(client ListChannelsAPIClient, params *ListChannelsInput, optFns ...func(*ListChannelsPaginatorOptions)) *ListChannelsPaginator { if params == nil { params = &ListChannelsInput{} } options := ListChannelsPaginatorOptions{} if params.MaxResults != 0 { options.Limit = params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListChannelsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListChannelsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListChannels page. func (p *ListChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListChannelsOutput, error) { if !p.HasMorePages() { return nil, fmt.Errorf("no more pages available") } params := *p.params params.NextToken = p.nextToken params.MaxResults = p.options.Limit result, err := p.client.ListChannels(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListChannels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage", OperationName: "ListChannels", } }
212
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackage import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackage/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns a collection of HarvestJob records. func (c *Client) ListHarvestJobs(ctx context.Context, params *ListHarvestJobsInput, optFns ...func(*Options)) (*ListHarvestJobsOutput, error) { if params == nil { params = &ListHarvestJobsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListHarvestJobs", params, optFns, c.addOperationListHarvestJobsMiddlewares) if err != nil { return nil, err } out := result.(*ListHarvestJobsOutput) out.ResultMetadata = metadata return out, nil } type ListHarvestJobsInput struct { // When specified, the request will return only HarvestJobs associated with the // given Channel ID. IncludeChannelId *string // When specified, the request will return only HarvestJobs in the given status. IncludeStatus *string // The upper bound on the number of records to return. MaxResults int32 // A token used to resume pagination from the end of a previous request. NextToken *string noSmithyDocumentSerde } type ListHarvestJobsOutput struct { // A list of HarvestJob records. HarvestJobs []types.HarvestJob // A token that can be used to resume pagination from the end of the collection. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListHarvestJobsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpListHarvestJobs{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListHarvestJobs{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHarvestJobs(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } // ListHarvestJobsAPIClient is a client that implements the ListHarvestJobs // operation. type ListHarvestJobsAPIClient interface { ListHarvestJobs(context.Context, *ListHarvestJobsInput, ...func(*Options)) (*ListHarvestJobsOutput, error) } var _ ListHarvestJobsAPIClient = (*Client)(nil) // ListHarvestJobsPaginatorOptions is the paginator options for ListHarvestJobs type ListHarvestJobsPaginatorOptions struct { // The upper bound on the number of records to return. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool } // ListHarvestJobsPaginator is a paginator for ListHarvestJobs type ListHarvestJobsPaginator struct { options ListHarvestJobsPaginatorOptions client ListHarvestJobsAPIClient params *ListHarvestJobsInput nextToken *string firstPage bool } // NewListHarvestJobsPaginator returns a new ListHarvestJobsPaginator func NewListHarvestJobsPaginator(client ListHarvestJobsAPIClient, params *ListHarvestJobsInput, optFns ...func(*ListHarvestJobsPaginatorOptions)) *ListHarvestJobsPaginator { if params == nil { params = &ListHarvestJobsInput{} } options := ListHarvestJobsPaginatorOptions{} if params.MaxResults != 0 { options.Limit = params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListHarvestJobsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListHarvestJobsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListHarvestJobs page. func (p *ListHarvestJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListHarvestJobsOutput, error) { if !p.HasMorePages() { return nil, fmt.Errorf("no more pages available") } params := *p.params params.NextToken = p.nextToken params.MaxResults = p.options.Limit result, err := p.client.ListHarvestJobs(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListHarvestJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage", OperationName: "ListHarvestJobs", } }
220
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackage import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackage/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns a collection of OriginEndpoint records. func (c *Client) ListOriginEndpoints(ctx context.Context, params *ListOriginEndpointsInput, optFns ...func(*Options)) (*ListOriginEndpointsOutput, error) { if params == nil { params = &ListOriginEndpointsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListOriginEndpoints", params, optFns, c.addOperationListOriginEndpointsMiddlewares) if err != nil { return nil, err } out := result.(*ListOriginEndpointsOutput) out.ResultMetadata = metadata return out, nil } type ListOriginEndpointsInput struct { // When specified, the request will return only OriginEndpoints associated with // the given Channel ID. ChannelId *string // The upper bound on the number of records to return. MaxResults int32 // A token used to resume pagination from the end of a previous request. NextToken *string noSmithyDocumentSerde } type ListOriginEndpointsOutput struct { // A token that can be used to resume pagination from the end of the collection. NextToken *string // A list of OriginEndpoint records. OriginEndpoints []types.OriginEndpoint // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListOriginEndpointsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpListOriginEndpoints{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListOriginEndpoints{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOriginEndpoints(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } // ListOriginEndpointsAPIClient is a client that implements the // ListOriginEndpoints operation. type ListOriginEndpointsAPIClient interface { ListOriginEndpoints(context.Context, *ListOriginEndpointsInput, ...func(*Options)) (*ListOriginEndpointsOutput, error) } var _ ListOriginEndpointsAPIClient = (*Client)(nil) // ListOriginEndpointsPaginatorOptions is the paginator options for // ListOriginEndpoints type ListOriginEndpointsPaginatorOptions struct { // The upper bound on the number of records to return. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool } // ListOriginEndpointsPaginator is a paginator for ListOriginEndpoints type ListOriginEndpointsPaginator struct { options ListOriginEndpointsPaginatorOptions client ListOriginEndpointsAPIClient params *ListOriginEndpointsInput nextToken *string firstPage bool } // NewListOriginEndpointsPaginator returns a new ListOriginEndpointsPaginator func NewListOriginEndpointsPaginator(client ListOriginEndpointsAPIClient, params *ListOriginEndpointsInput, optFns ...func(*ListOriginEndpointsPaginatorOptions)) *ListOriginEndpointsPaginator { if params == nil { params = &ListOriginEndpointsInput{} } options := ListOriginEndpointsPaginatorOptions{} if params.MaxResults != 0 { options.Limit = params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListOriginEndpointsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListOriginEndpointsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListOriginEndpoints page. func (p *ListOriginEndpointsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListOriginEndpointsOutput, error) { if !p.HasMorePages() { return nil, fmt.Errorf("no more pages available") } params := *p.params params.NextToken = p.nextToken params.MaxResults = p.options.Limit result, err := p.client.ListOriginEndpoints(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListOriginEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage", OperationName: "ListOriginEndpoints", } }
218
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackage import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { if params == nil { params = &ListTagsForResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) if err != nil { return nil, err } out := result.(*ListTagsForResourceOutput) out.ResultMetadata = metadata return out, nil } type ListTagsForResourceInput struct { // This member is required. ResourceArn *string noSmithyDocumentSerde } type ListTagsForResourceOutput struct { Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpListTagsForResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTagsForResource{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage", OperationName: "ListTagsForResource", } }
119
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackage import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackage/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Changes the Channel's first IngestEndpoint's username and password. WARNING - // This API is deprecated. Please use RotateIngestEndpointCredentials instead // // Deprecated: This API is deprecated. Please use RotateIngestEndpointCredentials // instead func (c *Client) RotateChannelCredentials(ctx context.Context, params *RotateChannelCredentialsInput, optFns ...func(*Options)) (*RotateChannelCredentialsOutput, error) { if params == nil { params = &RotateChannelCredentialsInput{} } result, metadata, err := c.invokeOperation(ctx, "RotateChannelCredentials", params, optFns, c.addOperationRotateChannelCredentialsMiddlewares) if err != nil { return nil, err } out := result.(*RotateChannelCredentialsOutput) out.ResultMetadata = metadata return out, nil } type RotateChannelCredentialsInput struct { // The ID of the channel to update. // // This member is required. Id *string noSmithyDocumentSerde } type RotateChannelCredentialsOutput struct { // The Amazon Resource Name (ARN) assigned to the Channel. Arn *string // The date and time the Channel was created. CreatedAt *string // A short text description of the Channel. Description *string // Configure egress access logging. EgressAccessLogs *types.EgressAccessLogs // An HTTP Live Streaming (HLS) ingest resource configuration. HlsIngest *types.HlsIngest // The ID of the Channel. Id *string // Configure ingress access logging. IngressAccessLogs *types.IngressAccessLogs // A collection of tags associated with a resource Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationRotateChannelCredentialsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpRotateChannelCredentials{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRotateChannelCredentials{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpRotateChannelCredentialsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRotateChannelCredentials(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opRotateChannelCredentials(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage", OperationName: "RotateChannelCredentials", } }
150
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackage import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackage/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Rotate the IngestEndpoint's username and password, as specified by the // IngestEndpoint's id. func (c *Client) RotateIngestEndpointCredentials(ctx context.Context, params *RotateIngestEndpointCredentialsInput, optFns ...func(*Options)) (*RotateIngestEndpointCredentialsOutput, error) { if params == nil { params = &RotateIngestEndpointCredentialsInput{} } result, metadata, err := c.invokeOperation(ctx, "RotateIngestEndpointCredentials", params, optFns, c.addOperationRotateIngestEndpointCredentialsMiddlewares) if err != nil { return nil, err } out := result.(*RotateIngestEndpointCredentialsOutput) out.ResultMetadata = metadata return out, nil } type RotateIngestEndpointCredentialsInput struct { // The ID of the channel the IngestEndpoint is on. // // This member is required. Id *string // The id of the IngestEndpoint whose credentials should be rotated // // This member is required. IngestEndpointId *string noSmithyDocumentSerde } type RotateIngestEndpointCredentialsOutput struct { // The Amazon Resource Name (ARN) assigned to the Channel. Arn *string // The date and time the Channel was created. CreatedAt *string // A short text description of the Channel. Description *string // Configure egress access logging. EgressAccessLogs *types.EgressAccessLogs // An HTTP Live Streaming (HLS) ingest resource configuration. HlsIngest *types.HlsIngest // The ID of the Channel. Id *string // Configure ingress access logging. IngressAccessLogs *types.IngressAccessLogs // A collection of tags associated with a resource Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationRotateIngestEndpointCredentialsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpRotateIngestEndpointCredentials{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRotateIngestEndpointCredentials{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpRotateIngestEndpointCredentialsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRotateIngestEndpointCredentials(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opRotateIngestEndpointCredentials(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage", OperationName: "RotateIngestEndpointCredentials", } }
152
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackage import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { if params == nil { params = &TagResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares) if err != nil { return nil, err } out := result.(*TagResourceOutput) out.ResultMetadata = metadata return out, nil } type TagResourceInput struct { // This member is required. ResourceArn *string // This member is required. Tags map[string]string noSmithyDocumentSerde } type TagResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpTagResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTagResource{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage", OperationName: "TagResource", } }
120
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackage import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { if params == nil { params = &UntagResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares) if err != nil { return nil, err } out := result.(*UntagResourceOutput) out.ResultMetadata = metadata return out, nil } type UntagResourceInput struct { // This member is required. ResourceArn *string // The key(s) of tag to be deleted // // This member is required. TagKeys []string noSmithyDocumentSerde } type UntagResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpUntagResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUntagResource{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage", OperationName: "UntagResource", } }
122
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackage import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackage/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates an existing Channel. func (c *Client) UpdateChannel(ctx context.Context, params *UpdateChannelInput, optFns ...func(*Options)) (*UpdateChannelOutput, error) { if params == nil { params = &UpdateChannelInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateChannel", params, optFns, c.addOperationUpdateChannelMiddlewares) if err != nil { return nil, err } out := result.(*UpdateChannelOutput) out.ResultMetadata = metadata return out, nil } // Configuration parameters used to update the Channel. type UpdateChannelInput struct { // The ID of the Channel to update. // // This member is required. Id *string // A short text description of the Channel. Description *string noSmithyDocumentSerde } type UpdateChannelOutput struct { // The Amazon Resource Name (ARN) assigned to the Channel. Arn *string // The date and time the Channel was created. CreatedAt *string // A short text description of the Channel. Description *string // Configure egress access logging. EgressAccessLogs *types.EgressAccessLogs // An HTTP Live Streaming (HLS) ingest resource configuration. HlsIngest *types.HlsIngest // The ID of the Channel. Id *string // Configure ingress access logging. IngressAccessLogs *types.IngressAccessLogs // A collection of tags associated with a resource Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateChannelMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateChannel{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateChannel{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateChannelValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateChannel(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateChannel(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage", OperationName: "UpdateChannel", } }
150
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackage import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackage/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates an existing OriginEndpoint. func (c *Client) UpdateOriginEndpoint(ctx context.Context, params *UpdateOriginEndpointInput, optFns ...func(*Options)) (*UpdateOriginEndpointOutput, error) { if params == nil { params = &UpdateOriginEndpointInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateOriginEndpoint", params, optFns, c.addOperationUpdateOriginEndpointMiddlewares) if err != nil { return nil, err } out := result.(*UpdateOriginEndpointOutput) out.ResultMetadata = metadata return out, nil } // Configuration parameters used to update an existing OriginEndpoint. type UpdateOriginEndpointInput struct { // The ID of the OriginEndpoint to update. // // This member is required. Id *string // CDN Authorization credentials Authorization *types.Authorization // A Common Media Application Format (CMAF) packaging configuration. CmafPackage *types.CmafPackageCreateOrUpdateParameters // A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. DashPackage *types.DashPackage // A short text description of the OriginEndpoint. Description *string // An HTTP Live Streaming (HLS) packaging configuration. HlsPackage *types.HlsPackage // A short string that will be appended to the end of the Endpoint URL. ManifestName *string // A Microsoft Smooth Streaming (MSS) packaging configuration. MssPackage *types.MssPackage // Control whether origination of video is allowed for this OriginEndpoint. If set // to ALLOW, the OriginEndpoint may by requested, pursuant to any other form of // access control. If set to DENY, the OriginEndpoint may not be requested. This // can be helpful for Live to VOD harvesting, or for temporarily disabling // origination Origination types.Origination // Maximum duration (in seconds) of content to retain for startover playback. If // not specified, startover playback will be disabled for the OriginEndpoint. StartoverWindowSeconds int32 // Amount of delay (in seconds) to enforce on the playback of live content. If not // specified, there will be no time delay in effect for the OriginEndpoint. TimeDelaySeconds int32 // A list of source IP CIDR blocks that will be allowed to access the // OriginEndpoint. Whitelist []string noSmithyDocumentSerde } type UpdateOriginEndpointOutput struct { // The Amazon Resource Name (ARN) assigned to the OriginEndpoint. Arn *string // CDN Authorization credentials Authorization *types.Authorization // The ID of the Channel the OriginEndpoint is associated with. ChannelId *string // A Common Media Application Format (CMAF) packaging configuration. CmafPackage *types.CmafPackage // The date and time the OriginEndpoint was created. CreatedAt *string // A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. DashPackage *types.DashPackage // A short text description of the OriginEndpoint. Description *string // An HTTP Live Streaming (HLS) packaging configuration. HlsPackage *types.HlsPackage // The ID of the OriginEndpoint. Id *string // A short string appended to the end of the OriginEndpoint URL. ManifestName *string // A Microsoft Smooth Streaming (MSS) packaging configuration. MssPackage *types.MssPackage // Control whether origination of video is allowed for this OriginEndpoint. If set // to ALLOW, the OriginEndpoint may by requested, pursuant to any other form of // access control. If set to DENY, the OriginEndpoint may not be requested. This // can be helpful for Live to VOD harvesting, or for temporarily disabling // origination Origination types.Origination // Maximum duration (seconds) of content to retain for startover playback. If not // specified, startover playback will be disabled for the OriginEndpoint. StartoverWindowSeconds int32 // A collection of tags associated with a resource Tags map[string]string // Amount of delay (seconds) to enforce on the playback of live content. If not // specified, there will be no time delay in effect for the OriginEndpoint. TimeDelaySeconds int32 // The URL of the packaged OriginEndpoint for consumption. Url *string // A list of source IP CIDR blocks that will be allowed to access the // OriginEndpoint. Whitelist []string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateOriginEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateOriginEndpoint{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateOriginEndpoint{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateOriginEndpointValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateOriginEndpoint(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateOriginEndpoint(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage", OperationName: "UpdateOriginEndpoint", } }
221
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackage import ( "bytes" "context" "encoding/json" "fmt" "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" "github.com/aws/aws-sdk-go-v2/service/mediapackage/types" smithy "github.com/aws/smithy-go" smithyio "github.com/aws/smithy-go/io" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "io/ioutil" "strings" ) type awsRestjson1_deserializeOpConfigureLogs struct { } func (*awsRestjson1_deserializeOpConfigureLogs) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpConfigureLogs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorConfigureLogs(response, &metadata) } output := &ConfigureLogsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentConfigureLogsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorConfigureLogs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) case strings.EqualFold("UnprocessableEntityException", errorCode): return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentConfigureLogsOutput(v **ConfigureLogsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ConfigureLogsOutput if *v == nil { sv = &ConfigureLogsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "createdAt": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.CreatedAt = ptr.String(jtv) } case "description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "egressAccessLogs": if err := awsRestjson1_deserializeDocumentEgressAccessLogs(&sv.EgressAccessLogs, value); err != nil { return err } case "hlsIngest": if err := awsRestjson1_deserializeDocumentHlsIngest(&sv.HlsIngest, value); err != nil { return err } case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "ingressAccessLogs": if err := awsRestjson1_deserializeDocumentIngressAccessLogs(&sv.IngressAccessLogs, value); err != nil { return err } case "tags": if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpCreateChannel struct { } func (*awsRestjson1_deserializeOpCreateChannel) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpCreateChannel) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorCreateChannel(response, &metadata) } output := &CreateChannelOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentCreateChannelOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorCreateChannel(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) case strings.EqualFold("UnprocessableEntityException", errorCode): return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentCreateChannelOutput(v **CreateChannelOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateChannelOutput if *v == nil { sv = &CreateChannelOutput{} } else { sv = *v } for key, value := range shape { switch key { case "arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "createdAt": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.CreatedAt = ptr.String(jtv) } case "description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "egressAccessLogs": if err := awsRestjson1_deserializeDocumentEgressAccessLogs(&sv.EgressAccessLogs, value); err != nil { return err } case "hlsIngest": if err := awsRestjson1_deserializeDocumentHlsIngest(&sv.HlsIngest, value); err != nil { return err } case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "ingressAccessLogs": if err := awsRestjson1_deserializeDocumentIngressAccessLogs(&sv.IngressAccessLogs, value); err != nil { return err } case "tags": if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpCreateHarvestJob struct { } func (*awsRestjson1_deserializeOpCreateHarvestJob) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpCreateHarvestJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorCreateHarvestJob(response, &metadata) } output := &CreateHarvestJobOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentCreateHarvestJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorCreateHarvestJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) case strings.EqualFold("UnprocessableEntityException", errorCode): return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentCreateHarvestJobOutput(v **CreateHarvestJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateHarvestJobOutput if *v == nil { sv = &CreateHarvestJobOutput{} } else { sv = *v } for key, value := range shape { switch key { case "arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "channelId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.ChannelId = ptr.String(jtv) } case "createdAt": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.CreatedAt = ptr.String(jtv) } case "endTime": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.EndTime = ptr.String(jtv) } case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "originEndpointId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.OriginEndpointId = ptr.String(jtv) } case "s3Destination": if err := awsRestjson1_deserializeDocumentS3Destination(&sv.S3Destination, value); err != nil { return err } case "startTime": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.StartTime = ptr.String(jtv) } case "status": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Status to be of type string, got %T instead", value) } sv.Status = types.Status(jtv) } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpCreateOriginEndpoint struct { } func (*awsRestjson1_deserializeOpCreateOriginEndpoint) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpCreateOriginEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorCreateOriginEndpoint(response, &metadata) } output := &CreateOriginEndpointOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentCreateOriginEndpointOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorCreateOriginEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) case strings.EqualFold("UnprocessableEntityException", errorCode): return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentCreateOriginEndpointOutput(v **CreateOriginEndpointOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateOriginEndpointOutput if *v == nil { sv = &CreateOriginEndpointOutput{} } else { sv = *v } for key, value := range shape { switch key { case "arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "authorization": if err := awsRestjson1_deserializeDocumentAuthorization(&sv.Authorization, value); err != nil { return err } case "channelId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.ChannelId = ptr.String(jtv) } case "cmafPackage": if err := awsRestjson1_deserializeDocumentCmafPackage(&sv.CmafPackage, value); err != nil { return err } case "createdAt": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.CreatedAt = ptr.String(jtv) } case "dashPackage": if err := awsRestjson1_deserializeDocumentDashPackage(&sv.DashPackage, value); err != nil { return err } case "description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "hlsPackage": if err := awsRestjson1_deserializeDocumentHlsPackage(&sv.HlsPackage, value); err != nil { return err } case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "manifestName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.ManifestName = ptr.String(jtv) } case "mssPackage": if err := awsRestjson1_deserializeDocumentMssPackage(&sv.MssPackage, value); err != nil { return err } case "origination": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Origination to be of type string, got %T instead", value) } sv.Origination = types.Origination(jtv) } case "startoverWindowSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.StartoverWindowSeconds = int32(i64) } case "tags": if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err } case "timeDelaySeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.TimeDelaySeconds = int32(i64) } case "url": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Url = ptr.String(jtv) } case "whitelist": if err := awsRestjson1_deserializeDocument__listOf__string(&sv.Whitelist, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpDeleteChannel struct { } func (*awsRestjson1_deserializeOpDeleteChannel) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpDeleteChannel) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorDeleteChannel(response, &metadata) } output := &DeleteChannelOutput{} out.Result = output return out, metadata, err } func awsRestjson1_deserializeOpErrorDeleteChannel(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) case strings.EqualFold("UnprocessableEntityException", errorCode): return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsRestjson1_deserializeOpDeleteOriginEndpoint struct { } func (*awsRestjson1_deserializeOpDeleteOriginEndpoint) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpDeleteOriginEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorDeleteOriginEndpoint(response, &metadata) } output := &DeleteOriginEndpointOutput{} out.Result = output return out, metadata, err } func awsRestjson1_deserializeOpErrorDeleteOriginEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) case strings.EqualFold("UnprocessableEntityException", errorCode): return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsRestjson1_deserializeOpDescribeChannel struct { } func (*awsRestjson1_deserializeOpDescribeChannel) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpDescribeChannel) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorDescribeChannel(response, &metadata) } output := &DescribeChannelOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentDescribeChannelOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorDescribeChannel(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) case strings.EqualFold("UnprocessableEntityException", errorCode): return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentDescribeChannelOutput(v **DescribeChannelOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DescribeChannelOutput if *v == nil { sv = &DescribeChannelOutput{} } else { sv = *v } for key, value := range shape { switch key { case "arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "createdAt": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.CreatedAt = ptr.String(jtv) } case "description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "egressAccessLogs": if err := awsRestjson1_deserializeDocumentEgressAccessLogs(&sv.EgressAccessLogs, value); err != nil { return err } case "hlsIngest": if err := awsRestjson1_deserializeDocumentHlsIngest(&sv.HlsIngest, value); err != nil { return err } case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "ingressAccessLogs": if err := awsRestjson1_deserializeDocumentIngressAccessLogs(&sv.IngressAccessLogs, value); err != nil { return err } case "tags": if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpDescribeHarvestJob struct { } func (*awsRestjson1_deserializeOpDescribeHarvestJob) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpDescribeHarvestJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorDescribeHarvestJob(response, &metadata) } output := &DescribeHarvestJobOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentDescribeHarvestJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorDescribeHarvestJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) case strings.EqualFold("UnprocessableEntityException", errorCode): return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentDescribeHarvestJobOutput(v **DescribeHarvestJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DescribeHarvestJobOutput if *v == nil { sv = &DescribeHarvestJobOutput{} } else { sv = *v } for key, value := range shape { switch key { case "arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "channelId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.ChannelId = ptr.String(jtv) } case "createdAt": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.CreatedAt = ptr.String(jtv) } case "endTime": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.EndTime = ptr.String(jtv) } case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "originEndpointId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.OriginEndpointId = ptr.String(jtv) } case "s3Destination": if err := awsRestjson1_deserializeDocumentS3Destination(&sv.S3Destination, value); err != nil { return err } case "startTime": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.StartTime = ptr.String(jtv) } case "status": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Status to be of type string, got %T instead", value) } sv.Status = types.Status(jtv) } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpDescribeOriginEndpoint struct { } func (*awsRestjson1_deserializeOpDescribeOriginEndpoint) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpDescribeOriginEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorDescribeOriginEndpoint(response, &metadata) } output := &DescribeOriginEndpointOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentDescribeOriginEndpointOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorDescribeOriginEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) case strings.EqualFold("UnprocessableEntityException", errorCode): return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentDescribeOriginEndpointOutput(v **DescribeOriginEndpointOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DescribeOriginEndpointOutput if *v == nil { sv = &DescribeOriginEndpointOutput{} } else { sv = *v } for key, value := range shape { switch key { case "arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "authorization": if err := awsRestjson1_deserializeDocumentAuthorization(&sv.Authorization, value); err != nil { return err } case "channelId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.ChannelId = ptr.String(jtv) } case "cmafPackage": if err := awsRestjson1_deserializeDocumentCmafPackage(&sv.CmafPackage, value); err != nil { return err } case "createdAt": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.CreatedAt = ptr.String(jtv) } case "dashPackage": if err := awsRestjson1_deserializeDocumentDashPackage(&sv.DashPackage, value); err != nil { return err } case "description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "hlsPackage": if err := awsRestjson1_deserializeDocumentHlsPackage(&sv.HlsPackage, value); err != nil { return err } case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "manifestName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.ManifestName = ptr.String(jtv) } case "mssPackage": if err := awsRestjson1_deserializeDocumentMssPackage(&sv.MssPackage, value); err != nil { return err } case "origination": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Origination to be of type string, got %T instead", value) } sv.Origination = types.Origination(jtv) } case "startoverWindowSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.StartoverWindowSeconds = int32(i64) } case "tags": if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err } case "timeDelaySeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.TimeDelaySeconds = int32(i64) } case "url": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Url = ptr.String(jtv) } case "whitelist": if err := awsRestjson1_deserializeDocument__listOf__string(&sv.Whitelist, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpListChannels struct { } func (*awsRestjson1_deserializeOpListChannels) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpListChannels) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorListChannels(response, &metadata) } output := &ListChannelsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentListChannelsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorListChannels(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) case strings.EqualFold("UnprocessableEntityException", errorCode): return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentListChannelsOutput(v **ListChannelsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListChannelsOutput if *v == nil { sv = &ListChannelsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "channels": if err := awsRestjson1_deserializeDocument__listOfChannel(&sv.Channels, value); err != nil { return err } case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpListHarvestJobs struct { } func (*awsRestjson1_deserializeOpListHarvestJobs) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpListHarvestJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorListHarvestJobs(response, &metadata) } output := &ListHarvestJobsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentListHarvestJobsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorListHarvestJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) case strings.EqualFold("UnprocessableEntityException", errorCode): return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentListHarvestJobsOutput(v **ListHarvestJobsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListHarvestJobsOutput if *v == nil { sv = &ListHarvestJobsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "harvestJobs": if err := awsRestjson1_deserializeDocument__listOfHarvestJob(&sv.HarvestJobs, value); err != nil { return err } case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpListOriginEndpoints struct { } func (*awsRestjson1_deserializeOpListOriginEndpoints) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpListOriginEndpoints) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorListOriginEndpoints(response, &metadata) } output := &ListOriginEndpointsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentListOriginEndpointsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorListOriginEndpoints(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) case strings.EqualFold("UnprocessableEntityException", errorCode): return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentListOriginEndpointsOutput(v **ListOriginEndpointsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListOriginEndpointsOutput if *v == nil { sv = &ListOriginEndpointsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "originEndpoints": if err := awsRestjson1_deserializeDocument__listOfOriginEndpoint(&sv.OriginEndpoints, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpListTagsForResource struct { } func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) } output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListTagsForResourceOutput if *v == nil { sv = &ListTagsForResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { case "tags": if err := awsRestjson1_deserializeDocument__mapOf__string(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpRotateChannelCredentials struct { } func (*awsRestjson1_deserializeOpRotateChannelCredentials) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpRotateChannelCredentials) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorRotateChannelCredentials(response, &metadata) } output := &RotateChannelCredentialsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentRotateChannelCredentialsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorRotateChannelCredentials(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) case strings.EqualFold("UnprocessableEntityException", errorCode): return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentRotateChannelCredentialsOutput(v **RotateChannelCredentialsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *RotateChannelCredentialsOutput if *v == nil { sv = &RotateChannelCredentialsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "createdAt": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.CreatedAt = ptr.String(jtv) } case "description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "egressAccessLogs": if err := awsRestjson1_deserializeDocumentEgressAccessLogs(&sv.EgressAccessLogs, value); err != nil { return err } case "hlsIngest": if err := awsRestjson1_deserializeDocumentHlsIngest(&sv.HlsIngest, value); err != nil { return err } case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "ingressAccessLogs": if err := awsRestjson1_deserializeDocumentIngressAccessLogs(&sv.IngressAccessLogs, value); err != nil { return err } case "tags": if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpRotateIngestEndpointCredentials struct { } func (*awsRestjson1_deserializeOpRotateIngestEndpointCredentials) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpRotateIngestEndpointCredentials) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorRotateIngestEndpointCredentials(response, &metadata) } output := &RotateIngestEndpointCredentialsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentRotateIngestEndpointCredentialsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorRotateIngestEndpointCredentials(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) case strings.EqualFold("UnprocessableEntityException", errorCode): return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentRotateIngestEndpointCredentialsOutput(v **RotateIngestEndpointCredentialsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *RotateIngestEndpointCredentialsOutput if *v == nil { sv = &RotateIngestEndpointCredentialsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "createdAt": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.CreatedAt = ptr.String(jtv) } case "description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "egressAccessLogs": if err := awsRestjson1_deserializeDocumentEgressAccessLogs(&sv.EgressAccessLogs, value); err != nil { return err } case "hlsIngest": if err := awsRestjson1_deserializeDocumentHlsIngest(&sv.HlsIngest, value); err != nil { return err } case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "ingressAccessLogs": if err := awsRestjson1_deserializeDocumentIngressAccessLogs(&sv.IngressAccessLogs, value); err != nil { return err } case "tags": if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpTagResource struct { } func (*awsRestjson1_deserializeOpTagResource) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) } output := &TagResourceOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsRestjson1_deserializeOpUntagResource struct { } func (*awsRestjson1_deserializeOpUntagResource) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) } output := &UntagResourceOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsRestjson1_deserializeOpUpdateChannel struct { } func (*awsRestjson1_deserializeOpUpdateChannel) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpUpdateChannel) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorUpdateChannel(response, &metadata) } output := &UpdateChannelOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentUpdateChannelOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorUpdateChannel(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) case strings.EqualFold("UnprocessableEntityException", errorCode): return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentUpdateChannelOutput(v **UpdateChannelOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateChannelOutput if *v == nil { sv = &UpdateChannelOutput{} } else { sv = *v } for key, value := range shape { switch key { case "arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "createdAt": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.CreatedAt = ptr.String(jtv) } case "description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "egressAccessLogs": if err := awsRestjson1_deserializeDocumentEgressAccessLogs(&sv.EgressAccessLogs, value); err != nil { return err } case "hlsIngest": if err := awsRestjson1_deserializeDocumentHlsIngest(&sv.HlsIngest, value); err != nil { return err } case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "ingressAccessLogs": if err := awsRestjson1_deserializeDocumentIngressAccessLogs(&sv.IngressAccessLogs, value); err != nil { return err } case "tags": if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpUpdateOriginEndpoint struct { } func (*awsRestjson1_deserializeOpUpdateOriginEndpoint) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpUpdateOriginEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorUpdateOriginEndpoint(response, &metadata) } output := &UpdateOriginEndpointOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentUpdateOriginEndpointOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorUpdateOriginEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) case strings.EqualFold("UnprocessableEntityException", errorCode): return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentUpdateOriginEndpointOutput(v **UpdateOriginEndpointOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateOriginEndpointOutput if *v == nil { sv = &UpdateOriginEndpointOutput{} } else { sv = *v } for key, value := range shape { switch key { case "arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "authorization": if err := awsRestjson1_deserializeDocumentAuthorization(&sv.Authorization, value); err != nil { return err } case "channelId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.ChannelId = ptr.String(jtv) } case "cmafPackage": if err := awsRestjson1_deserializeDocumentCmafPackage(&sv.CmafPackage, value); err != nil { return err } case "createdAt": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.CreatedAt = ptr.String(jtv) } case "dashPackage": if err := awsRestjson1_deserializeDocumentDashPackage(&sv.DashPackage, value); err != nil { return err } case "description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "hlsPackage": if err := awsRestjson1_deserializeDocumentHlsPackage(&sv.HlsPackage, value); err != nil { return err } case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "manifestName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.ManifestName = ptr.String(jtv) } case "mssPackage": if err := awsRestjson1_deserializeDocumentMssPackage(&sv.MssPackage, value); err != nil { return err } case "origination": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Origination to be of type string, got %T instead", value) } sv.Origination = types.Origination(jtv) } case "startoverWindowSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.StartoverWindowSeconds = int32(i64) } case "tags": if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err } case "timeDelaySeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.TimeDelaySeconds = int32(i64) } case "url": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Url = ptr.String(jtv) } case "whitelist": if err := awsRestjson1_deserializeDocument__listOf__string(&sv.Whitelist, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeErrorForbiddenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ForbiddenException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentForbiddenException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorInternalServerErrorException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.InternalServerErrorException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentInternalServerErrorException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.NotFoundException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorServiceUnavailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ServiceUnavailableException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentServiceUnavailableException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorTooManyRequestsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.TooManyRequestsException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentTooManyRequestsException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorUnprocessableEntityException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.UnprocessableEntityException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentUnprocessableEntityException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeDocument__listOf__PeriodTriggersElement(v *[]types.PeriodTriggersElement, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.PeriodTriggersElement if *v == nil { cv = []types.PeriodTriggersElement{} } else { cv = *v } for _, value := range shape { var col types.PeriodTriggersElement if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __PeriodTriggersElement to be of type string, got %T instead", value) } col = types.PeriodTriggersElement(jtv) } cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocument__listOf__string(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []string if *v == nil { cv = []string{} } else { cv = *v } for _, value := range shape { var col string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocument__listOfChannel(v *[]types.Channel, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.Channel if *v == nil { cv = []types.Channel{} } else { cv = *v } for _, value := range shape { var col types.Channel destAddr := &col if err := awsRestjson1_deserializeDocumentChannel(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocument__listOfHarvestJob(v *[]types.HarvestJob, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.HarvestJob if *v == nil { cv = []types.HarvestJob{} } else { cv = *v } for _, value := range shape { var col types.HarvestJob destAddr := &col if err := awsRestjson1_deserializeDocumentHarvestJob(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocument__listOfHlsManifest(v *[]types.HlsManifest, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.HlsManifest if *v == nil { cv = []types.HlsManifest{} } else { cv = *v } for _, value := range shape { var col types.HlsManifest destAddr := &col if err := awsRestjson1_deserializeDocumentHlsManifest(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocument__listOfIngestEndpoint(v *[]types.IngestEndpoint, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.IngestEndpoint if *v == nil { cv = []types.IngestEndpoint{} } else { cv = *v } for _, value := range shape { var col types.IngestEndpoint destAddr := &col if err := awsRestjson1_deserializeDocumentIngestEndpoint(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocument__listOfOriginEndpoint(v *[]types.OriginEndpoint, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.OriginEndpoint if *v == nil { cv = []types.OriginEndpoint{} } else { cv = *v } for _, value := range shape { var col types.OriginEndpoint destAddr := &col if err := awsRestjson1_deserializeDocumentOriginEndpoint(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocument__mapOf__string(v *map[string]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var mv map[string]string if *v == nil { mv = map[string]string{} } else { mv = *v } for key, value := range shape { var parsedVal string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } parsedVal = jtv } mv[key] = parsedVal } *v = mv return nil } func awsRestjson1_deserializeDocumentAdTriggers(v *[]types.AdTriggersElement, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.AdTriggersElement if *v == nil { cv = []types.AdTriggersElement{} } else { cv = *v } for _, value := range shape { var col types.AdTriggersElement if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __AdTriggersElement to be of type string, got %T instead", value) } col = types.AdTriggersElement(jtv) } cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocumentAuthorization(v **types.Authorization, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.Authorization if *v == nil { sv = &types.Authorization{} } else { sv = *v } for key, value := range shape { switch key { case "cdnIdentifierSecret": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.CdnIdentifierSecret = ptr.String(jtv) } case "secretsRoleArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.SecretsRoleArn = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentChannel(v **types.Channel, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.Channel if *v == nil { sv = &types.Channel{} } else { sv = *v } for key, value := range shape { switch key { case "arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "createdAt": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.CreatedAt = ptr.String(jtv) } case "description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "egressAccessLogs": if err := awsRestjson1_deserializeDocumentEgressAccessLogs(&sv.EgressAccessLogs, value); err != nil { return err } case "hlsIngest": if err := awsRestjson1_deserializeDocumentHlsIngest(&sv.HlsIngest, value); err != nil { return err } case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "ingressAccessLogs": if err := awsRestjson1_deserializeDocumentIngressAccessLogs(&sv.IngressAccessLogs, value); err != nil { return err } case "tags": if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentCmafEncryption(v **types.CmafEncryption, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.CmafEncryption if *v == nil { sv = &types.CmafEncryption{} } else { sv = *v } for key, value := range shape { switch key { case "constantInitializationVector": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.ConstantInitializationVector = ptr.String(jtv) } case "encryptionMethod": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected CmafEncryptionMethod to be of type string, got %T instead", value) } sv.EncryptionMethod = types.CmafEncryptionMethod(jtv) } case "keyRotationIntervalSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.KeyRotationIntervalSeconds = int32(i64) } case "spekeKeyProvider": if err := awsRestjson1_deserializeDocumentSpekeKeyProvider(&sv.SpekeKeyProvider, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentCmafPackage(v **types.CmafPackage, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.CmafPackage if *v == nil { sv = &types.CmafPackage{} } else { sv = *v } for key, value := range shape { switch key { case "encryption": if err := awsRestjson1_deserializeDocumentCmafEncryption(&sv.Encryption, value); err != nil { return err } case "hlsManifests": if err := awsRestjson1_deserializeDocument__listOfHlsManifest(&sv.HlsManifests, value); err != nil { return err } case "segmentDurationSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.SegmentDurationSeconds = int32(i64) } case "segmentPrefix": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.SegmentPrefix = ptr.String(jtv) } case "streamSelection": if err := awsRestjson1_deserializeDocumentStreamSelection(&sv.StreamSelection, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentDashEncryption(v **types.DashEncryption, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.DashEncryption if *v == nil { sv = &types.DashEncryption{} } else { sv = *v } for key, value := range shape { switch key { case "keyRotationIntervalSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.KeyRotationIntervalSeconds = int32(i64) } case "spekeKeyProvider": if err := awsRestjson1_deserializeDocumentSpekeKeyProvider(&sv.SpekeKeyProvider, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentDashPackage(v **types.DashPackage, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.DashPackage if *v == nil { sv = &types.DashPackage{} } else { sv = *v } for key, value := range shape { switch key { case "adsOnDeliveryRestrictions": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AdsOnDeliveryRestrictions to be of type string, got %T instead", value) } sv.AdsOnDeliveryRestrictions = types.AdsOnDeliveryRestrictions(jtv) } case "adTriggers": if err := awsRestjson1_deserializeDocumentAdTriggers(&sv.AdTriggers, value); err != nil { return err } case "encryption": if err := awsRestjson1_deserializeDocumentDashEncryption(&sv.Encryption, value); err != nil { return err } case "includeIframeOnlyStream": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected __boolean to be of type *bool, got %T instead", value) } sv.IncludeIframeOnlyStream = jtv } case "manifestLayout": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ManifestLayout to be of type string, got %T instead", value) } sv.ManifestLayout = types.ManifestLayout(jtv) } case "manifestWindowSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ManifestWindowSeconds = int32(i64) } case "minBufferTimeSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.MinBufferTimeSeconds = int32(i64) } case "minUpdatePeriodSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.MinUpdatePeriodSeconds = int32(i64) } case "periodTriggers": if err := awsRestjson1_deserializeDocument__listOf__PeriodTriggersElement(&sv.PeriodTriggers, value); err != nil { return err } case "profile": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Profile to be of type string, got %T instead", value) } sv.Profile = types.Profile(jtv) } case "segmentDurationSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.SegmentDurationSeconds = int32(i64) } case "segmentTemplateFormat": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SegmentTemplateFormat to be of type string, got %T instead", value) } sv.SegmentTemplateFormat = types.SegmentTemplateFormat(jtv) } case "streamSelection": if err := awsRestjson1_deserializeDocumentStreamSelection(&sv.StreamSelection, value); err != nil { return err } case "suggestedPresentationDelaySeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.SuggestedPresentationDelaySeconds = int32(i64) } case "utcTiming": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UtcTiming to be of type string, got %T instead", value) } sv.UtcTiming = types.UtcTiming(jtv) } case "utcTimingUri": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.UtcTimingUri = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentEgressAccessLogs(v **types.EgressAccessLogs, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.EgressAccessLogs if *v == nil { sv = &types.EgressAccessLogs{} } else { sv = *v } for key, value := range shape { switch key { case "logGroupName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.LogGroupName = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentEncryptionContractConfiguration(v **types.EncryptionContractConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.EncryptionContractConfiguration if *v == nil { sv = &types.EncryptionContractConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "presetSpeke20Audio": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PresetSpeke20Audio to be of type string, got %T instead", value) } sv.PresetSpeke20Audio = types.PresetSpeke20Audio(jtv) } case "presetSpeke20Video": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PresetSpeke20Video to be of type string, got %T instead", value) } sv.PresetSpeke20Video = types.PresetSpeke20Video(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentForbiddenException(v **types.ForbiddenException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ForbiddenException if *v == nil { sv = &types.ForbiddenException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentHarvestJob(v **types.HarvestJob, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.HarvestJob if *v == nil { sv = &types.HarvestJob{} } else { sv = *v } for key, value := range shape { switch key { case "arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "channelId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.ChannelId = ptr.String(jtv) } case "createdAt": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.CreatedAt = ptr.String(jtv) } case "endTime": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.EndTime = ptr.String(jtv) } case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "originEndpointId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.OriginEndpointId = ptr.String(jtv) } case "s3Destination": if err := awsRestjson1_deserializeDocumentS3Destination(&sv.S3Destination, value); err != nil { return err } case "startTime": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.StartTime = ptr.String(jtv) } case "status": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Status to be of type string, got %T instead", value) } sv.Status = types.Status(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentHlsEncryption(v **types.HlsEncryption, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.HlsEncryption if *v == nil { sv = &types.HlsEncryption{} } else { sv = *v } for key, value := range shape { switch key { case "constantInitializationVector": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.ConstantInitializationVector = ptr.String(jtv) } case "encryptionMethod": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected EncryptionMethod to be of type string, got %T instead", value) } sv.EncryptionMethod = types.EncryptionMethod(jtv) } case "keyRotationIntervalSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.KeyRotationIntervalSeconds = int32(i64) } case "repeatExtXKey": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected __boolean to be of type *bool, got %T instead", value) } sv.RepeatExtXKey = jtv } case "spekeKeyProvider": if err := awsRestjson1_deserializeDocumentSpekeKeyProvider(&sv.SpekeKeyProvider, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentHlsIngest(v **types.HlsIngest, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.HlsIngest if *v == nil { sv = &types.HlsIngest{} } else { sv = *v } for key, value := range shape { switch key { case "ingestEndpoints": if err := awsRestjson1_deserializeDocument__listOfIngestEndpoint(&sv.IngestEndpoints, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentHlsManifest(v **types.HlsManifest, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.HlsManifest if *v == nil { sv = &types.HlsManifest{} } else { sv = *v } for key, value := range shape { switch key { case "adMarkers": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AdMarkers to be of type string, got %T instead", value) } sv.AdMarkers = types.AdMarkers(jtv) } case "adsOnDeliveryRestrictions": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AdsOnDeliveryRestrictions to be of type string, got %T instead", value) } sv.AdsOnDeliveryRestrictions = types.AdsOnDeliveryRestrictions(jtv) } case "adTriggers": if err := awsRestjson1_deserializeDocumentAdTriggers(&sv.AdTriggers, value); err != nil { return err } case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "includeIframeOnlyStream": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected __boolean to be of type *bool, got %T instead", value) } sv.IncludeIframeOnlyStream = jtv } case "manifestName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.ManifestName = ptr.String(jtv) } case "playlistType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PlaylistType to be of type string, got %T instead", value) } sv.PlaylistType = types.PlaylistType(jtv) } case "playlistWindowSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.PlaylistWindowSeconds = int32(i64) } case "programDateTimeIntervalSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ProgramDateTimeIntervalSeconds = int32(i64) } case "url": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Url = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentHlsPackage(v **types.HlsPackage, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.HlsPackage if *v == nil { sv = &types.HlsPackage{} } else { sv = *v } for key, value := range shape { switch key { case "adMarkers": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AdMarkers to be of type string, got %T instead", value) } sv.AdMarkers = types.AdMarkers(jtv) } case "adsOnDeliveryRestrictions": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AdsOnDeliveryRestrictions to be of type string, got %T instead", value) } sv.AdsOnDeliveryRestrictions = types.AdsOnDeliveryRestrictions(jtv) } case "adTriggers": if err := awsRestjson1_deserializeDocumentAdTriggers(&sv.AdTriggers, value); err != nil { return err } case "encryption": if err := awsRestjson1_deserializeDocumentHlsEncryption(&sv.Encryption, value); err != nil { return err } case "includeDvbSubtitles": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected __boolean to be of type *bool, got %T instead", value) } sv.IncludeDvbSubtitles = jtv } case "includeIframeOnlyStream": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected __boolean to be of type *bool, got %T instead", value) } sv.IncludeIframeOnlyStream = jtv } case "playlistType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PlaylistType to be of type string, got %T instead", value) } sv.PlaylistType = types.PlaylistType(jtv) } case "playlistWindowSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.PlaylistWindowSeconds = int32(i64) } case "programDateTimeIntervalSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ProgramDateTimeIntervalSeconds = int32(i64) } case "segmentDurationSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.SegmentDurationSeconds = int32(i64) } case "streamSelection": if err := awsRestjson1_deserializeDocumentStreamSelection(&sv.StreamSelection, value); err != nil { return err } case "useAudioRenditionGroup": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected __boolean to be of type *bool, got %T instead", value) } sv.UseAudioRenditionGroup = jtv } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentIngestEndpoint(v **types.IngestEndpoint, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.IngestEndpoint if *v == nil { sv = &types.IngestEndpoint{} } else { sv = *v } for key, value := range shape { switch key { case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "password": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Password = ptr.String(jtv) } case "url": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Url = ptr.String(jtv) } case "username": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Username = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentIngressAccessLogs(v **types.IngressAccessLogs, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.IngressAccessLogs if *v == nil { sv = &types.IngressAccessLogs{} } else { sv = *v } for key, value := range shape { switch key { case "logGroupName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.LogGroupName = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentInternalServerErrorException(v **types.InternalServerErrorException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InternalServerErrorException if *v == nil { sv = &types.InternalServerErrorException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentMssEncryption(v **types.MssEncryption, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.MssEncryption if *v == nil { sv = &types.MssEncryption{} } else { sv = *v } for key, value := range shape { switch key { case "spekeKeyProvider": if err := awsRestjson1_deserializeDocumentSpekeKeyProvider(&sv.SpekeKeyProvider, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentMssPackage(v **types.MssPackage, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.MssPackage if *v == nil { sv = &types.MssPackage{} } else { sv = *v } for key, value := range shape { switch key { case "encryption": if err := awsRestjson1_deserializeDocumentMssEncryption(&sv.Encryption, value); err != nil { return err } case "manifestWindowSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ManifestWindowSeconds = int32(i64) } case "segmentDurationSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.SegmentDurationSeconds = int32(i64) } case "streamSelection": if err := awsRestjson1_deserializeDocumentStreamSelection(&sv.StreamSelection, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentNotFoundException(v **types.NotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.NotFoundException if *v == nil { sv = &types.NotFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentOriginEndpoint(v **types.OriginEndpoint, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.OriginEndpoint if *v == nil { sv = &types.OriginEndpoint{} } else { sv = *v } for key, value := range shape { switch key { case "arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "authorization": if err := awsRestjson1_deserializeDocumentAuthorization(&sv.Authorization, value); err != nil { return err } case "channelId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.ChannelId = ptr.String(jtv) } case "cmafPackage": if err := awsRestjson1_deserializeDocumentCmafPackage(&sv.CmafPackage, value); err != nil { return err } case "createdAt": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.CreatedAt = ptr.String(jtv) } case "dashPackage": if err := awsRestjson1_deserializeDocumentDashPackage(&sv.DashPackage, value); err != nil { return err } case "description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "hlsPackage": if err := awsRestjson1_deserializeDocumentHlsPackage(&sv.HlsPackage, value); err != nil { return err } case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "manifestName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.ManifestName = ptr.String(jtv) } case "mssPackage": if err := awsRestjson1_deserializeDocumentMssPackage(&sv.MssPackage, value); err != nil { return err } case "origination": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Origination to be of type string, got %T instead", value) } sv.Origination = types.Origination(jtv) } case "startoverWindowSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.StartoverWindowSeconds = int32(i64) } case "tags": if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err } case "timeDelaySeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.TimeDelaySeconds = int32(i64) } case "url": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Url = ptr.String(jtv) } case "whitelist": if err := awsRestjson1_deserializeDocument__listOf__string(&sv.Whitelist, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentS3Destination(v **types.S3Destination, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.S3Destination if *v == nil { sv = &types.S3Destination{} } else { sv = *v } for key, value := range shape { switch key { case "bucketName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.BucketName = ptr.String(jtv) } case "manifestKey": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.ManifestKey = ptr.String(jtv) } case "roleArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.RoleArn = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentServiceUnavailableException(v **types.ServiceUnavailableException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ServiceUnavailableException if *v == nil { sv = &types.ServiceUnavailableException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentSpekeKeyProvider(v **types.SpekeKeyProvider, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.SpekeKeyProvider if *v == nil { sv = &types.SpekeKeyProvider{} } else { sv = *v } for key, value := range shape { switch key { case "certificateArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.CertificateArn = ptr.String(jtv) } case "encryptionContractConfiguration": if err := awsRestjson1_deserializeDocumentEncryptionContractConfiguration(&sv.EncryptionContractConfiguration, value); err != nil { return err } case "resourceId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.ResourceId = ptr.String(jtv) } case "roleArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.RoleArn = ptr.String(jtv) } case "systemIds": if err := awsRestjson1_deserializeDocument__listOf__string(&sv.SystemIds, value); err != nil { return err } case "url": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Url = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentStreamSelection(v **types.StreamSelection, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.StreamSelection if *v == nil { sv = &types.StreamSelection{} } else { sv = *v } for key, value := range shape { switch key { case "maxVideoBitsPerSecond": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.MaxVideoBitsPerSecond = int32(i64) } case "minVideoBitsPerSecond": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.MinVideoBitsPerSecond = int32(i64) } case "streamOrder": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected StreamOrder to be of type string, got %T instead", value) } sv.StreamOrder = types.StreamOrder(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentTags(v *map[string]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var mv map[string]string if *v == nil { mv = map[string]string{} } else { mv = *v } for key, value := range shape { var parsedVal string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } parsedVal = jtv } mv[key] = parsedVal } *v = mv return nil } func awsRestjson1_deserializeDocumentTooManyRequestsException(v **types.TooManyRequestsException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.TooManyRequestsException if *v == nil { sv = &types.TooManyRequestsException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentUnprocessableEntityException(v **types.UnprocessableEntityException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.UnprocessableEntityException if *v == nil { sv = &types.UnprocessableEntityException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil }
6,115
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. // Package mediapackage provides the API client, operations, and parameter types // for AWS Elemental MediaPackage. // // AWS Elemental MediaPackage package mediapackage
8
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackage import ( "context" "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" internalendpoints "github.com/aws/aws-sdk-go-v2/service/mediapackage/internal/endpoints" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "net/url" "strings" ) // EndpointResolverOptions is the service endpoint resolver options type EndpointResolverOptions = internalendpoints.Options // EndpointResolver interface for resolving service endpoints. type EndpointResolver interface { ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) } var _ EndpointResolver = &internalendpoints.Resolver{} // NewDefaultEndpointResolver constructs a new service endpoint resolver func NewDefaultEndpointResolver() *internalendpoints.Resolver { return internalendpoints.New() } // EndpointResolverFunc is a helper utility that wraps a function so it satisfies // the EndpointResolver interface. This is useful when you want to add additional // endpoint resolving logic, or stub out specific endpoints with custom values. type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { return fn(region, options) } func resolveDefaultEndpointConfiguration(o *Options) { if o.EndpointResolver != nil { return } o.EndpointResolver = NewDefaultEndpointResolver() } // EndpointResolverFromURL returns an EndpointResolver configured using the // provided endpoint url. By default, the resolved endpoint resolver uses the // client region as signing region, and the endpoint source is set to // EndpointSourceCustom.You can provide functional options to configure endpoint // values for the resolved endpoint. func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} for _, fn := range optFns { fn(&e) } return EndpointResolverFunc( func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { if len(e.SigningRegion) == 0 { e.SigningRegion = region } return e, nil }, ) } type ResolveEndpoint struct { Resolver EndpointResolver Options EndpointResolverOptions } func (*ResolveEndpoint) ID() string { return "ResolveEndpoint" } func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) } if m.Resolver == nil { return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") } eo := m.Options eo.Logger = middleware.GetLogger(ctx) var endpoint aws.Endpoint endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) if err != nil { return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) } req.URL, err = url.Parse(endpoint.URL) if err != nil { return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) } if len(awsmiddleware.GetSigningName(ctx)) == 0 { signingName := endpoint.SigningName if len(signingName) == 0 { signingName = "mediapackage" } ctx = awsmiddleware.SetSigningName(ctx, signingName) } ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) return next.HandleSerialize(ctx, in) } func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { return stack.Serialize.Insert(&ResolveEndpoint{ Resolver: o.EndpointResolver, Options: o.EndpointOptions, }, "OperationSerializer", middleware.Before) } func removeResolveEndpointMiddleware(stack *middleware.Stack) error { _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) return err } type wrappedEndpointResolver struct { awsResolver aws.EndpointResolverWithOptions resolver EndpointResolver } func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { if w.awsResolver == nil { goto fallback } endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options) if err == nil { return endpoint, nil } if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) { return endpoint, err } fallback: if w.resolver == nil { return endpoint, fmt.Errorf("default endpoint resolver provided was nil") } return w.resolver.ResolveEndpoint(region, options) } type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { return a(service, region) } var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) // withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver. // If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided // fallbackResolver for resolution. // // fallbackResolver must not be nil func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver { var resolver aws.EndpointResolverWithOptions if awsResolverWithOptions != nil { resolver = awsResolverWithOptions } else if awsResolver != nil { resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) } return &wrappedEndpointResolver{ awsResolver: resolver, resolver: fallbackResolver, } } func finalizeClientEndpointResolverOptions(options *Options) { options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() if len(options.EndpointOptions.ResolvedRegion) == 0 { const fipsInfix = "-fips-" const fipsPrefix = "fips-" const fipsSuffix = "-fips" if strings.Contains(options.Region, fipsInfix) || strings.Contains(options.Region, fipsPrefix) || strings.Contains(options.Region, fipsSuffix) { options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled } } }
201
aws-sdk-go-v2
aws
Go
// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. package mediapackage // goModuleVersion is the tagged release for this module const goModuleVersion = "1.21.8"
7
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackage
4
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackage import ( "bytes" "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/mediapackage/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) type awsRestjson1_serializeOpConfigureLogs struct { } func (*awsRestjson1_serializeOpConfigureLogs) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpConfigureLogs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ConfigureLogsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/channels/{Id}/configure_logs") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PUT" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsConfigureLogsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentConfigureLogsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsConfigureLogsInput(v *ConfigureLogsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.Id == nil || len(*v.Id) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} } if v.Id != nil { if err := encoder.SetURI("Id").String(*v.Id); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentConfigureLogsInput(v *ConfigureLogsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EgressAccessLogs != nil { ok := object.Key("egressAccessLogs") if err := awsRestjson1_serializeDocumentEgressAccessLogs(v.EgressAccessLogs, ok); err != nil { return err } } if v.IngressAccessLogs != nil { ok := object.Key("ingressAccessLogs") if err := awsRestjson1_serializeDocumentIngressAccessLogs(v.IngressAccessLogs, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpCreateChannel struct { } func (*awsRestjson1_serializeOpCreateChannel) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpCreateChannel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateChannelInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/channels") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentCreateChannelInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsCreateChannelInput(v *CreateChannelInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentCreateChannelInput(v *CreateChannelInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Description != nil { ok := object.Key("description") ok.String(*v.Description) } if v.Id != nil { ok := object.Key("id") ok.String(*v.Id) } if v.Tags != nil { ok := object.Key("tags") if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpCreateHarvestJob struct { } func (*awsRestjson1_serializeOpCreateHarvestJob) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpCreateHarvestJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateHarvestJobInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/harvest_jobs") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentCreateHarvestJobInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsCreateHarvestJobInput(v *CreateHarvestJobInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentCreateHarvestJobInput(v *CreateHarvestJobInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EndTime != nil { ok := object.Key("endTime") ok.String(*v.EndTime) } if v.Id != nil { ok := object.Key("id") ok.String(*v.Id) } if v.OriginEndpointId != nil { ok := object.Key("originEndpointId") ok.String(*v.OriginEndpointId) } if v.S3Destination != nil { ok := object.Key("s3Destination") if err := awsRestjson1_serializeDocumentS3Destination(v.S3Destination, ok); err != nil { return err } } if v.StartTime != nil { ok := object.Key("startTime") ok.String(*v.StartTime) } return nil } type awsRestjson1_serializeOpCreateOriginEndpoint struct { } func (*awsRestjson1_serializeOpCreateOriginEndpoint) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpCreateOriginEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateOriginEndpointInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/origin_endpoints") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentCreateOriginEndpointInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsCreateOriginEndpointInput(v *CreateOriginEndpointInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentCreateOriginEndpointInput(v *CreateOriginEndpointInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Authorization != nil { ok := object.Key("authorization") if err := awsRestjson1_serializeDocumentAuthorization(v.Authorization, ok); err != nil { return err } } if v.ChannelId != nil { ok := object.Key("channelId") ok.String(*v.ChannelId) } if v.CmafPackage != nil { ok := object.Key("cmafPackage") if err := awsRestjson1_serializeDocumentCmafPackageCreateOrUpdateParameters(v.CmafPackage, ok); err != nil { return err } } if v.DashPackage != nil { ok := object.Key("dashPackage") if err := awsRestjson1_serializeDocumentDashPackage(v.DashPackage, ok); err != nil { return err } } if v.Description != nil { ok := object.Key("description") ok.String(*v.Description) } if v.HlsPackage != nil { ok := object.Key("hlsPackage") if err := awsRestjson1_serializeDocumentHlsPackage(v.HlsPackage, ok); err != nil { return err } } if v.Id != nil { ok := object.Key("id") ok.String(*v.Id) } if v.ManifestName != nil { ok := object.Key("manifestName") ok.String(*v.ManifestName) } if v.MssPackage != nil { ok := object.Key("mssPackage") if err := awsRestjson1_serializeDocumentMssPackage(v.MssPackage, ok); err != nil { return err } } if len(v.Origination) > 0 { ok := object.Key("origination") ok.String(string(v.Origination)) } if v.StartoverWindowSeconds != 0 { ok := object.Key("startoverWindowSeconds") ok.Integer(v.StartoverWindowSeconds) } if v.Tags != nil { ok := object.Key("tags") if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { return err } } if v.TimeDelaySeconds != 0 { ok := object.Key("timeDelaySeconds") ok.Integer(v.TimeDelaySeconds) } if v.Whitelist != nil { ok := object.Key("whitelist") if err := awsRestjson1_serializeDocument__listOf__string(v.Whitelist, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpDeleteChannel struct { } func (*awsRestjson1_serializeOpDeleteChannel) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteChannel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteChannelInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/channels/{Id}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsDeleteChannelInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsDeleteChannelInput(v *DeleteChannelInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.Id == nil || len(*v.Id) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} } if v.Id != nil { if err := encoder.SetURI("Id").String(*v.Id); err != nil { return err } } return nil } type awsRestjson1_serializeOpDeleteOriginEndpoint struct { } func (*awsRestjson1_serializeOpDeleteOriginEndpoint) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteOriginEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteOriginEndpointInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/origin_endpoints/{Id}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsDeleteOriginEndpointInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsDeleteOriginEndpointInput(v *DeleteOriginEndpointInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.Id == nil || len(*v.Id) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} } if v.Id != nil { if err := encoder.SetURI("Id").String(*v.Id); err != nil { return err } } return nil } type awsRestjson1_serializeOpDescribeChannel struct { } func (*awsRestjson1_serializeOpDescribeChannel) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDescribeChannel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeChannelInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/channels/{Id}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsDescribeChannelInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsDescribeChannelInput(v *DescribeChannelInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.Id == nil || len(*v.Id) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} } if v.Id != nil { if err := encoder.SetURI("Id").String(*v.Id); err != nil { return err } } return nil } type awsRestjson1_serializeOpDescribeHarvestJob struct { } func (*awsRestjson1_serializeOpDescribeHarvestJob) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDescribeHarvestJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeHarvestJobInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/harvest_jobs/{Id}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsDescribeHarvestJobInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsDescribeHarvestJobInput(v *DescribeHarvestJobInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.Id == nil || len(*v.Id) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} } if v.Id != nil { if err := encoder.SetURI("Id").String(*v.Id); err != nil { return err } } return nil } type awsRestjson1_serializeOpDescribeOriginEndpoint struct { } func (*awsRestjson1_serializeOpDescribeOriginEndpoint) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDescribeOriginEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeOriginEndpointInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/origin_endpoints/{Id}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsDescribeOriginEndpointInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsDescribeOriginEndpointInput(v *DescribeOriginEndpointInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.Id == nil || len(*v.Id) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} } if v.Id != nil { if err := encoder.SetURI("Id").String(*v.Id); err != nil { return err } } return nil } type awsRestjson1_serializeOpListChannels struct { } func (*awsRestjson1_serializeOpListChannels) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpListChannels) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListChannelsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/channels") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsListChannelsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsListChannelsInput(v *ListChannelsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.MaxResults != 0 { encoder.SetQuery("maxResults").Integer(v.MaxResults) } if v.NextToken != nil { encoder.SetQuery("nextToken").String(*v.NextToken) } return nil } type awsRestjson1_serializeOpListHarvestJobs struct { } func (*awsRestjson1_serializeOpListHarvestJobs) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpListHarvestJobs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListHarvestJobsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/harvest_jobs") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsListHarvestJobsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsListHarvestJobsInput(v *ListHarvestJobsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.IncludeChannelId != nil { encoder.SetQuery("includeChannelId").String(*v.IncludeChannelId) } if v.IncludeStatus != nil { encoder.SetQuery("includeStatus").String(*v.IncludeStatus) } if v.MaxResults != 0 { encoder.SetQuery("maxResults").Integer(v.MaxResults) } if v.NextToken != nil { encoder.SetQuery("nextToken").String(*v.NextToken) } return nil } type awsRestjson1_serializeOpListOriginEndpoints struct { } func (*awsRestjson1_serializeOpListOriginEndpoints) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpListOriginEndpoints) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListOriginEndpointsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/origin_endpoints") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsListOriginEndpointsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsListOriginEndpointsInput(v *ListOriginEndpointsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ChannelId != nil { encoder.SetQuery("channelId").String(*v.ChannelId) } if v.MaxResults != 0 { encoder.SetQuery("maxResults").Integer(v.MaxResults) } if v.NextToken != nil { encoder.SetQuery("nextToken").String(*v.NextToken) } return nil } type awsRestjson1_serializeOpListTagsForResource struct { } func (*awsRestjson1_serializeOpListTagsForResource) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListTagsForResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} } if v.ResourceArn != nil { if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { return err } } return nil } type awsRestjson1_serializeOpRotateChannelCredentials struct { } func (*awsRestjson1_serializeOpRotateChannelCredentials) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpRotateChannelCredentials) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*RotateChannelCredentialsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/channels/{Id}/credentials") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PUT" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsRotateChannelCredentialsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsRotateChannelCredentialsInput(v *RotateChannelCredentialsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.Id == nil || len(*v.Id) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} } if v.Id != nil { if err := encoder.SetURI("Id").String(*v.Id); err != nil { return err } } return nil } type awsRestjson1_serializeOpRotateIngestEndpointCredentials struct { } func (*awsRestjson1_serializeOpRotateIngestEndpointCredentials) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpRotateIngestEndpointCredentials) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*RotateIngestEndpointCredentialsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/channels/{Id}/ingest_endpoints/{IngestEndpointId}/credentials") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PUT" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsRotateIngestEndpointCredentialsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsRotateIngestEndpointCredentialsInput(v *RotateIngestEndpointCredentialsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.Id == nil || len(*v.Id) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} } if v.Id != nil { if err := encoder.SetURI("Id").String(*v.Id); err != nil { return err } } if v.IngestEndpointId == nil || len(*v.IngestEndpointId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member IngestEndpointId must not be empty")} } if v.IngestEndpointId != nil { if err := encoder.SetURI("IngestEndpointId").String(*v.IngestEndpointId); err != nil { return err } } return nil } type awsRestjson1_serializeOpTagResource struct { } func (*awsRestjson1_serializeOpTagResource) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*TagResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} } if v.ResourceArn != nil { if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Tags != nil { ok := object.Key("tags") if err := awsRestjson1_serializeDocument__mapOf__string(v.Tags, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpUntagResource struct { } func (*awsRestjson1_serializeOpUntagResource) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UntagResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} } if v.ResourceArn != nil { if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { return err } } if v.TagKeys != nil { for i := range v.TagKeys { encoder.AddQuery("tagKeys").String(v.TagKeys[i]) } } return nil } type awsRestjson1_serializeOpUpdateChannel struct { } func (*awsRestjson1_serializeOpUpdateChannel) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateChannel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateChannelInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/channels/{Id}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PUT" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsUpdateChannelInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateChannelInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsUpdateChannelInput(v *UpdateChannelInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.Id == nil || len(*v.Id) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} } if v.Id != nil { if err := encoder.SetURI("Id").String(*v.Id); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentUpdateChannelInput(v *UpdateChannelInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Description != nil { ok := object.Key("description") ok.String(*v.Description) } return nil } type awsRestjson1_serializeOpUpdateOriginEndpoint struct { } func (*awsRestjson1_serializeOpUpdateOriginEndpoint) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateOriginEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateOriginEndpointInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/origin_endpoints/{Id}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PUT" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsUpdateOriginEndpointInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateOriginEndpointInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsUpdateOriginEndpointInput(v *UpdateOriginEndpointInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.Id == nil || len(*v.Id) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} } if v.Id != nil { if err := encoder.SetURI("Id").String(*v.Id); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentUpdateOriginEndpointInput(v *UpdateOriginEndpointInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Authorization != nil { ok := object.Key("authorization") if err := awsRestjson1_serializeDocumentAuthorization(v.Authorization, ok); err != nil { return err } } if v.CmafPackage != nil { ok := object.Key("cmafPackage") if err := awsRestjson1_serializeDocumentCmafPackageCreateOrUpdateParameters(v.CmafPackage, ok); err != nil { return err } } if v.DashPackage != nil { ok := object.Key("dashPackage") if err := awsRestjson1_serializeDocumentDashPackage(v.DashPackage, ok); err != nil { return err } } if v.Description != nil { ok := object.Key("description") ok.String(*v.Description) } if v.HlsPackage != nil { ok := object.Key("hlsPackage") if err := awsRestjson1_serializeDocumentHlsPackage(v.HlsPackage, ok); err != nil { return err } } if v.ManifestName != nil { ok := object.Key("manifestName") ok.String(*v.ManifestName) } if v.MssPackage != nil { ok := object.Key("mssPackage") if err := awsRestjson1_serializeDocumentMssPackage(v.MssPackage, ok); err != nil { return err } } if len(v.Origination) > 0 { ok := object.Key("origination") ok.String(string(v.Origination)) } if v.StartoverWindowSeconds != 0 { ok := object.Key("startoverWindowSeconds") ok.Integer(v.StartoverWindowSeconds) } if v.TimeDelaySeconds != 0 { ok := object.Key("timeDelaySeconds") ok.Integer(v.TimeDelaySeconds) } if v.Whitelist != nil { ok := object.Key("whitelist") if err := awsRestjson1_serializeDocument__listOf__string(v.Whitelist, ok); err != nil { return err } } return nil } func awsRestjson1_serializeDocument__listOf__PeriodTriggersElement(v []types.PeriodTriggersElement, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(string(v[i])) } return nil } func awsRestjson1_serializeDocument__listOf__string(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsRestjson1_serializeDocument__listOfHlsManifestCreateOrUpdateParameters(v []types.HlsManifestCreateOrUpdateParameters, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsRestjson1_serializeDocumentHlsManifestCreateOrUpdateParameters(&v[i], av); err != nil { return err } } return nil } func awsRestjson1_serializeDocument__mapOf__string(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() for key := range v { om := object.Key(key) om.String(v[key]) } return nil } func awsRestjson1_serializeDocumentAdTriggers(v []types.AdTriggersElement, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(string(v[i])) } return nil } func awsRestjson1_serializeDocumentAuthorization(v *types.Authorization, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CdnIdentifierSecret != nil { ok := object.Key("cdnIdentifierSecret") ok.String(*v.CdnIdentifierSecret) } if v.SecretsRoleArn != nil { ok := object.Key("secretsRoleArn") ok.String(*v.SecretsRoleArn) } return nil } func awsRestjson1_serializeDocumentCmafEncryption(v *types.CmafEncryption, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ConstantInitializationVector != nil { ok := object.Key("constantInitializationVector") ok.String(*v.ConstantInitializationVector) } if len(v.EncryptionMethod) > 0 { ok := object.Key("encryptionMethod") ok.String(string(v.EncryptionMethod)) } if v.KeyRotationIntervalSeconds != 0 { ok := object.Key("keyRotationIntervalSeconds") ok.Integer(v.KeyRotationIntervalSeconds) } if v.SpekeKeyProvider != nil { ok := object.Key("spekeKeyProvider") if err := awsRestjson1_serializeDocumentSpekeKeyProvider(v.SpekeKeyProvider, ok); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentCmafPackageCreateOrUpdateParameters(v *types.CmafPackageCreateOrUpdateParameters, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Encryption != nil { ok := object.Key("encryption") if err := awsRestjson1_serializeDocumentCmafEncryption(v.Encryption, ok); err != nil { return err } } if v.HlsManifests != nil { ok := object.Key("hlsManifests") if err := awsRestjson1_serializeDocument__listOfHlsManifestCreateOrUpdateParameters(v.HlsManifests, ok); err != nil { return err } } if v.SegmentDurationSeconds != 0 { ok := object.Key("segmentDurationSeconds") ok.Integer(v.SegmentDurationSeconds) } if v.SegmentPrefix != nil { ok := object.Key("segmentPrefix") ok.String(*v.SegmentPrefix) } if v.StreamSelection != nil { ok := object.Key("streamSelection") if err := awsRestjson1_serializeDocumentStreamSelection(v.StreamSelection, ok); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentDashEncryption(v *types.DashEncryption, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.KeyRotationIntervalSeconds != 0 { ok := object.Key("keyRotationIntervalSeconds") ok.Integer(v.KeyRotationIntervalSeconds) } if v.SpekeKeyProvider != nil { ok := object.Key("spekeKeyProvider") if err := awsRestjson1_serializeDocumentSpekeKeyProvider(v.SpekeKeyProvider, ok); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentDashPackage(v *types.DashPackage, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.AdsOnDeliveryRestrictions) > 0 { ok := object.Key("adsOnDeliveryRestrictions") ok.String(string(v.AdsOnDeliveryRestrictions)) } if v.AdTriggers != nil { ok := object.Key("adTriggers") if err := awsRestjson1_serializeDocumentAdTriggers(v.AdTriggers, ok); err != nil { return err } } if v.Encryption != nil { ok := object.Key("encryption") if err := awsRestjson1_serializeDocumentDashEncryption(v.Encryption, ok); err != nil { return err } } if v.IncludeIframeOnlyStream { ok := object.Key("includeIframeOnlyStream") ok.Boolean(v.IncludeIframeOnlyStream) } if len(v.ManifestLayout) > 0 { ok := object.Key("manifestLayout") ok.String(string(v.ManifestLayout)) } if v.ManifestWindowSeconds != 0 { ok := object.Key("manifestWindowSeconds") ok.Integer(v.ManifestWindowSeconds) } if v.MinBufferTimeSeconds != 0 { ok := object.Key("minBufferTimeSeconds") ok.Integer(v.MinBufferTimeSeconds) } if v.MinUpdatePeriodSeconds != 0 { ok := object.Key("minUpdatePeriodSeconds") ok.Integer(v.MinUpdatePeriodSeconds) } if v.PeriodTriggers != nil { ok := object.Key("periodTriggers") if err := awsRestjson1_serializeDocument__listOf__PeriodTriggersElement(v.PeriodTriggers, ok); err != nil { return err } } if len(v.Profile) > 0 { ok := object.Key("profile") ok.String(string(v.Profile)) } if v.SegmentDurationSeconds != 0 { ok := object.Key("segmentDurationSeconds") ok.Integer(v.SegmentDurationSeconds) } if len(v.SegmentTemplateFormat) > 0 { ok := object.Key("segmentTemplateFormat") ok.String(string(v.SegmentTemplateFormat)) } if v.StreamSelection != nil { ok := object.Key("streamSelection") if err := awsRestjson1_serializeDocumentStreamSelection(v.StreamSelection, ok); err != nil { return err } } if v.SuggestedPresentationDelaySeconds != 0 { ok := object.Key("suggestedPresentationDelaySeconds") ok.Integer(v.SuggestedPresentationDelaySeconds) } if len(v.UtcTiming) > 0 { ok := object.Key("utcTiming") ok.String(string(v.UtcTiming)) } if v.UtcTimingUri != nil { ok := object.Key("utcTimingUri") ok.String(*v.UtcTimingUri) } return nil } func awsRestjson1_serializeDocumentEgressAccessLogs(v *types.EgressAccessLogs, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.LogGroupName != nil { ok := object.Key("logGroupName") ok.String(*v.LogGroupName) } return nil } func awsRestjson1_serializeDocumentEncryptionContractConfiguration(v *types.EncryptionContractConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.PresetSpeke20Audio) > 0 { ok := object.Key("presetSpeke20Audio") ok.String(string(v.PresetSpeke20Audio)) } if len(v.PresetSpeke20Video) > 0 { ok := object.Key("presetSpeke20Video") ok.String(string(v.PresetSpeke20Video)) } return nil } func awsRestjson1_serializeDocumentHlsEncryption(v *types.HlsEncryption, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ConstantInitializationVector != nil { ok := object.Key("constantInitializationVector") ok.String(*v.ConstantInitializationVector) } if len(v.EncryptionMethod) > 0 { ok := object.Key("encryptionMethod") ok.String(string(v.EncryptionMethod)) } if v.KeyRotationIntervalSeconds != 0 { ok := object.Key("keyRotationIntervalSeconds") ok.Integer(v.KeyRotationIntervalSeconds) } if v.RepeatExtXKey { ok := object.Key("repeatExtXKey") ok.Boolean(v.RepeatExtXKey) } if v.SpekeKeyProvider != nil { ok := object.Key("spekeKeyProvider") if err := awsRestjson1_serializeDocumentSpekeKeyProvider(v.SpekeKeyProvider, ok); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentHlsManifestCreateOrUpdateParameters(v *types.HlsManifestCreateOrUpdateParameters, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.AdMarkers) > 0 { ok := object.Key("adMarkers") ok.String(string(v.AdMarkers)) } if len(v.AdsOnDeliveryRestrictions) > 0 { ok := object.Key("adsOnDeliveryRestrictions") ok.String(string(v.AdsOnDeliveryRestrictions)) } if v.AdTriggers != nil { ok := object.Key("adTriggers") if err := awsRestjson1_serializeDocumentAdTriggers(v.AdTriggers, ok); err != nil { return err } } if v.Id != nil { ok := object.Key("id") ok.String(*v.Id) } if v.IncludeIframeOnlyStream { ok := object.Key("includeIframeOnlyStream") ok.Boolean(v.IncludeIframeOnlyStream) } if v.ManifestName != nil { ok := object.Key("manifestName") ok.String(*v.ManifestName) } if len(v.PlaylistType) > 0 { ok := object.Key("playlistType") ok.String(string(v.PlaylistType)) } if v.PlaylistWindowSeconds != 0 { ok := object.Key("playlistWindowSeconds") ok.Integer(v.PlaylistWindowSeconds) } if v.ProgramDateTimeIntervalSeconds != 0 { ok := object.Key("programDateTimeIntervalSeconds") ok.Integer(v.ProgramDateTimeIntervalSeconds) } return nil } func awsRestjson1_serializeDocumentHlsPackage(v *types.HlsPackage, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.AdMarkers) > 0 { ok := object.Key("adMarkers") ok.String(string(v.AdMarkers)) } if len(v.AdsOnDeliveryRestrictions) > 0 { ok := object.Key("adsOnDeliveryRestrictions") ok.String(string(v.AdsOnDeliveryRestrictions)) } if v.AdTriggers != nil { ok := object.Key("adTriggers") if err := awsRestjson1_serializeDocumentAdTriggers(v.AdTriggers, ok); err != nil { return err } } if v.Encryption != nil { ok := object.Key("encryption") if err := awsRestjson1_serializeDocumentHlsEncryption(v.Encryption, ok); err != nil { return err } } if v.IncludeDvbSubtitles { ok := object.Key("includeDvbSubtitles") ok.Boolean(v.IncludeDvbSubtitles) } if v.IncludeIframeOnlyStream { ok := object.Key("includeIframeOnlyStream") ok.Boolean(v.IncludeIframeOnlyStream) } if len(v.PlaylistType) > 0 { ok := object.Key("playlistType") ok.String(string(v.PlaylistType)) } if v.PlaylistWindowSeconds != 0 { ok := object.Key("playlistWindowSeconds") ok.Integer(v.PlaylistWindowSeconds) } if v.ProgramDateTimeIntervalSeconds != 0 { ok := object.Key("programDateTimeIntervalSeconds") ok.Integer(v.ProgramDateTimeIntervalSeconds) } if v.SegmentDurationSeconds != 0 { ok := object.Key("segmentDurationSeconds") ok.Integer(v.SegmentDurationSeconds) } if v.StreamSelection != nil { ok := object.Key("streamSelection") if err := awsRestjson1_serializeDocumentStreamSelection(v.StreamSelection, ok); err != nil { return err } } if v.UseAudioRenditionGroup { ok := object.Key("useAudioRenditionGroup") ok.Boolean(v.UseAudioRenditionGroup) } return nil } func awsRestjson1_serializeDocumentIngressAccessLogs(v *types.IngressAccessLogs, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.LogGroupName != nil { ok := object.Key("logGroupName") ok.String(*v.LogGroupName) } return nil } func awsRestjson1_serializeDocumentMssEncryption(v *types.MssEncryption, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.SpekeKeyProvider != nil { ok := object.Key("spekeKeyProvider") if err := awsRestjson1_serializeDocumentSpekeKeyProvider(v.SpekeKeyProvider, ok); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentMssPackage(v *types.MssPackage, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Encryption != nil { ok := object.Key("encryption") if err := awsRestjson1_serializeDocumentMssEncryption(v.Encryption, ok); err != nil { return err } } if v.ManifestWindowSeconds != 0 { ok := object.Key("manifestWindowSeconds") ok.Integer(v.ManifestWindowSeconds) } if v.SegmentDurationSeconds != 0 { ok := object.Key("segmentDurationSeconds") ok.Integer(v.SegmentDurationSeconds) } if v.StreamSelection != nil { ok := object.Key("streamSelection") if err := awsRestjson1_serializeDocumentStreamSelection(v.StreamSelection, ok); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentS3Destination(v *types.S3Destination, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.BucketName != nil { ok := object.Key("bucketName") ok.String(*v.BucketName) } if v.ManifestKey != nil { ok := object.Key("manifestKey") ok.String(*v.ManifestKey) } if v.RoleArn != nil { ok := object.Key("roleArn") ok.String(*v.RoleArn) } return nil } func awsRestjson1_serializeDocumentSpekeKeyProvider(v *types.SpekeKeyProvider, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CertificateArn != nil { ok := object.Key("certificateArn") ok.String(*v.CertificateArn) } if v.EncryptionContractConfiguration != nil { ok := object.Key("encryptionContractConfiguration") if err := awsRestjson1_serializeDocumentEncryptionContractConfiguration(v.EncryptionContractConfiguration, ok); err != nil { return err } } if v.ResourceId != nil { ok := object.Key("resourceId") ok.String(*v.ResourceId) } if v.RoleArn != nil { ok := object.Key("roleArn") ok.String(*v.RoleArn) } if v.SystemIds != nil { ok := object.Key("systemIds") if err := awsRestjson1_serializeDocument__listOf__string(v.SystemIds, ok); err != nil { return err } } if v.Url != nil { ok := object.Key("url") ok.String(*v.Url) } return nil } func awsRestjson1_serializeDocumentStreamSelection(v *types.StreamSelection, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MaxVideoBitsPerSecond != 0 { ok := object.Key("maxVideoBitsPerSecond") ok.Integer(v.MaxVideoBitsPerSecond) } if v.MinVideoBitsPerSecond != 0 { ok := object.Key("minVideoBitsPerSecond") ok.Integer(v.MinVideoBitsPerSecond) } if len(v.StreamOrder) > 0 { ok := object.Key("streamOrder") ok.String(string(v.StreamOrder)) } return nil } func awsRestjson1_serializeDocumentTags(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() for key := range v { om := object.Key(key) om.String(v[key]) } return nil }
2,048
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackage import ( "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/mediapackage/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" ) type validateOpConfigureLogs struct { } func (*validateOpConfigureLogs) ID() string { return "OperationInputValidation" } func (m *validateOpConfigureLogs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ConfigureLogsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpConfigureLogsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateChannel struct { } func (*validateOpCreateChannel) ID() string { return "OperationInputValidation" } func (m *validateOpCreateChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateChannelInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateChannelInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateHarvestJob struct { } func (*validateOpCreateHarvestJob) ID() string { return "OperationInputValidation" } func (m *validateOpCreateHarvestJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateHarvestJobInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateHarvestJobInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateOriginEndpoint struct { } func (*validateOpCreateOriginEndpoint) ID() string { return "OperationInputValidation" } func (m *validateOpCreateOriginEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateOriginEndpointInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateOriginEndpointInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteChannel struct { } func (*validateOpDeleteChannel) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteChannelInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteChannelInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteOriginEndpoint struct { } func (*validateOpDeleteOriginEndpoint) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteOriginEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteOriginEndpointInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteOriginEndpointInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeChannel struct { } func (*validateOpDescribeChannel) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeChannelInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeChannelInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeHarvestJob struct { } func (*validateOpDescribeHarvestJob) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeHarvestJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeHarvestJobInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeHarvestJobInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeOriginEndpoint struct { } func (*validateOpDescribeOriginEndpoint) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeOriginEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeOriginEndpointInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeOriginEndpointInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListTagsForResource struct { } func (*validateOpListTagsForResource) ID() string { return "OperationInputValidation" } func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListTagsForResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListTagsForResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpRotateChannelCredentials struct { } func (*validateOpRotateChannelCredentials) ID() string { return "OperationInputValidation" } func (m *validateOpRotateChannelCredentials) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*RotateChannelCredentialsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpRotateChannelCredentialsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpRotateIngestEndpointCredentials struct { } func (*validateOpRotateIngestEndpointCredentials) ID() string { return "OperationInputValidation" } func (m *validateOpRotateIngestEndpointCredentials) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*RotateIngestEndpointCredentialsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpRotateIngestEndpointCredentialsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpTagResource struct { } func (*validateOpTagResource) ID() string { return "OperationInputValidation" } func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*TagResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpTagResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUntagResource struct { } func (*validateOpUntagResource) ID() string { return "OperationInputValidation" } func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UntagResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUntagResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateChannel struct { } func (*validateOpUpdateChannel) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateChannelInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateChannelInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateOriginEndpoint struct { } func (*validateOpUpdateOriginEndpoint) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateOriginEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateOriginEndpointInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateOriginEndpointInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } func addOpConfigureLogsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpConfigureLogs{}, middleware.After) } func addOpCreateChannelValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateChannel{}, middleware.After) } func addOpCreateHarvestJobValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateHarvestJob{}, middleware.After) } func addOpCreateOriginEndpointValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateOriginEndpoint{}, middleware.After) } func addOpDeleteChannelValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteChannel{}, middleware.After) } func addOpDeleteOriginEndpointValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteOriginEndpoint{}, middleware.After) } func addOpDescribeChannelValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeChannel{}, middleware.After) } func addOpDescribeHarvestJobValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeHarvestJob{}, middleware.After) } func addOpDescribeOriginEndpointValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeOriginEndpoint{}, middleware.After) } func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } func addOpRotateChannelCredentialsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRotateChannelCredentials{}, middleware.After) } func addOpRotateIngestEndpointCredentialsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRotateIngestEndpointCredentials{}, middleware.After) } func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) } func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) } func addOpUpdateChannelValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateChannel{}, middleware.After) } func addOpUpdateOriginEndpointValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateOriginEndpoint{}, middleware.After) } func validate__listOfHlsManifestCreateOrUpdateParameters(v []types.HlsManifestCreateOrUpdateParameters) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListOfHlsManifestCreateOrUpdateParameters"} for i := range v { if err := validateHlsManifestCreateOrUpdateParameters(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateAuthorization(v *types.Authorization) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Authorization"} if v.CdnIdentifierSecret == nil { invalidParams.Add(smithy.NewErrParamRequired("CdnIdentifierSecret")) } if v.SecretsRoleArn == nil { invalidParams.Add(smithy.NewErrParamRequired("SecretsRoleArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateCmafEncryption(v *types.CmafEncryption) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CmafEncryption"} if v.SpekeKeyProvider == nil { invalidParams.Add(smithy.NewErrParamRequired("SpekeKeyProvider")) } else if v.SpekeKeyProvider != nil { if err := validateSpekeKeyProvider(v.SpekeKeyProvider); err != nil { invalidParams.AddNested("SpekeKeyProvider", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateCmafPackageCreateOrUpdateParameters(v *types.CmafPackageCreateOrUpdateParameters) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CmafPackageCreateOrUpdateParameters"} if v.Encryption != nil { if err := validateCmafEncryption(v.Encryption); err != nil { invalidParams.AddNested("Encryption", err.(smithy.InvalidParamsError)) } } if v.HlsManifests != nil { if err := validate__listOfHlsManifestCreateOrUpdateParameters(v.HlsManifests); err != nil { invalidParams.AddNested("HlsManifests", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateDashEncryption(v *types.DashEncryption) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DashEncryption"} if v.SpekeKeyProvider == nil { invalidParams.Add(smithy.NewErrParamRequired("SpekeKeyProvider")) } else if v.SpekeKeyProvider != nil { if err := validateSpekeKeyProvider(v.SpekeKeyProvider); err != nil { invalidParams.AddNested("SpekeKeyProvider", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateDashPackage(v *types.DashPackage) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DashPackage"} if v.Encryption != nil { if err := validateDashEncryption(v.Encryption); err != nil { invalidParams.AddNested("Encryption", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateEncryptionContractConfiguration(v *types.EncryptionContractConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "EncryptionContractConfiguration"} if len(v.PresetSpeke20Audio) == 0 { invalidParams.Add(smithy.NewErrParamRequired("PresetSpeke20Audio")) } if len(v.PresetSpeke20Video) == 0 { invalidParams.Add(smithy.NewErrParamRequired("PresetSpeke20Video")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateHlsEncryption(v *types.HlsEncryption) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "HlsEncryption"} if v.SpekeKeyProvider == nil { invalidParams.Add(smithy.NewErrParamRequired("SpekeKeyProvider")) } else if v.SpekeKeyProvider != nil { if err := validateSpekeKeyProvider(v.SpekeKeyProvider); err != nil { invalidParams.AddNested("SpekeKeyProvider", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateHlsManifestCreateOrUpdateParameters(v *types.HlsManifestCreateOrUpdateParameters) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "HlsManifestCreateOrUpdateParameters"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateHlsPackage(v *types.HlsPackage) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "HlsPackage"} if v.Encryption != nil { if err := validateHlsEncryption(v.Encryption); err != nil { invalidParams.AddNested("Encryption", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateMssEncryption(v *types.MssEncryption) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "MssEncryption"} if v.SpekeKeyProvider == nil { invalidParams.Add(smithy.NewErrParamRequired("SpekeKeyProvider")) } else if v.SpekeKeyProvider != nil { if err := validateSpekeKeyProvider(v.SpekeKeyProvider); err != nil { invalidParams.AddNested("SpekeKeyProvider", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateMssPackage(v *types.MssPackage) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "MssPackage"} if v.Encryption != nil { if err := validateMssEncryption(v.Encryption); err != nil { invalidParams.AddNested("Encryption", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateS3Destination(v *types.S3Destination) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "S3Destination"} if v.BucketName == nil { invalidParams.Add(smithy.NewErrParamRequired("BucketName")) } if v.ManifestKey == nil { invalidParams.Add(smithy.NewErrParamRequired("ManifestKey")) } if v.RoleArn == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSpekeKeyProvider(v *types.SpekeKeyProvider) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SpekeKeyProvider"} if v.EncryptionContractConfiguration != nil { if err := validateEncryptionContractConfiguration(v.EncryptionContractConfiguration); err != nil { invalidParams.AddNested("EncryptionContractConfiguration", err.(smithy.InvalidParamsError)) } } if v.ResourceId == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) } if v.RoleArn == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) } if v.SystemIds == nil { invalidParams.Add(smithy.NewErrParamRequired("SystemIds")) } if v.Url == nil { invalidParams.Add(smithy.NewErrParamRequired("Url")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpConfigureLogsInput(v *ConfigureLogsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ConfigureLogsInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateChannelInput(v *CreateChannelInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateChannelInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateHarvestJobInput(v *CreateHarvestJobInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateHarvestJobInput"} if v.EndTime == nil { invalidParams.Add(smithy.NewErrParamRequired("EndTime")) } if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if v.OriginEndpointId == nil { invalidParams.Add(smithy.NewErrParamRequired("OriginEndpointId")) } if v.S3Destination == nil { invalidParams.Add(smithy.NewErrParamRequired("S3Destination")) } else if v.S3Destination != nil { if err := validateS3Destination(v.S3Destination); err != nil { invalidParams.AddNested("S3Destination", err.(smithy.InvalidParamsError)) } } if v.StartTime == nil { invalidParams.Add(smithy.NewErrParamRequired("StartTime")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateOriginEndpointInput(v *CreateOriginEndpointInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateOriginEndpointInput"} if v.Authorization != nil { if err := validateAuthorization(v.Authorization); err != nil { invalidParams.AddNested("Authorization", err.(smithy.InvalidParamsError)) } } if v.ChannelId == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelId")) } if v.CmafPackage != nil { if err := validateCmafPackageCreateOrUpdateParameters(v.CmafPackage); err != nil { invalidParams.AddNested("CmafPackage", err.(smithy.InvalidParamsError)) } } if v.DashPackage != nil { if err := validateDashPackage(v.DashPackage); err != nil { invalidParams.AddNested("DashPackage", err.(smithy.InvalidParamsError)) } } if v.HlsPackage != nil { if err := validateHlsPackage(v.HlsPackage); err != nil { invalidParams.AddNested("HlsPackage", err.(smithy.InvalidParamsError)) } } if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if v.MssPackage != nil { if err := validateMssPackage(v.MssPackage); err != nil { invalidParams.AddNested("MssPackage", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteChannelInput(v *DeleteChannelInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteChannelInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteOriginEndpointInput(v *DeleteOriginEndpointInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteOriginEndpointInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeChannelInput(v *DescribeChannelInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeChannelInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeHarvestJobInput(v *DescribeHarvestJobInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeHarvestJobInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeOriginEndpointInput(v *DescribeOriginEndpointInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeOriginEndpointInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} if v.ResourceArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpRotateChannelCredentialsInput(v *RotateChannelCredentialsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RotateChannelCredentialsInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpRotateIngestEndpointCredentialsInput(v *RotateIngestEndpointCredentialsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RotateIngestEndpointCredentialsInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if v.IngestEndpointId == nil { invalidParams.Add(smithy.NewErrParamRequired("IngestEndpointId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpTagResourceInput(v *TagResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} if v.ResourceArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) } if v.Tags == nil { invalidParams.Add(smithy.NewErrParamRequired("Tags")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUntagResourceInput(v *UntagResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} if v.ResourceArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) } if v.TagKeys == nil { invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateChannelInput(v *UpdateChannelInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateChannelInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateOriginEndpointInput(v *UpdateOriginEndpointInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateOriginEndpointInput"} if v.Authorization != nil { if err := validateAuthorization(v.Authorization); err != nil { invalidParams.AddNested("Authorization", err.(smithy.InvalidParamsError)) } } if v.CmafPackage != nil { if err := validateCmafPackageCreateOrUpdateParameters(v.CmafPackage); err != nil { invalidParams.AddNested("CmafPackage", err.(smithy.InvalidParamsError)) } } if v.DashPackage != nil { if err := validateDashPackage(v.DashPackage); err != nil { invalidParams.AddNested("DashPackage", err.(smithy.InvalidParamsError)) } } if v.HlsPackage != nil { if err := validateHlsPackage(v.HlsPackage); err != nil { invalidParams.AddNested("HlsPackage", err.(smithy.InvalidParamsError)) } } if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if v.MssPackage != nil { if err := validateMssPackage(v.MssPackage); err != nil { invalidParams.AddNested("MssPackage", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } }
981
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package endpoints import ( "github.com/aws/aws-sdk-go-v2/aws" endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" "github.com/aws/smithy-go/logging" "regexp" ) // Options is the endpoint resolver configuration options type Options struct { // Logger is a logging implementation that log events should be sent to. Logger logging.Logger // LogDeprecated indicates that deprecated endpoints should be logged to the // provided logger. LogDeprecated bool // ResolvedRegion is used to override the region to be resolved, rather then the // using the value passed to the ResolveEndpoint method. This value is used by the // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative // name. You must not set this value directly in your application. ResolvedRegion string // DisableHTTPS informs the resolver to return an endpoint that does not use the // HTTPS scheme. DisableHTTPS bool // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. UseDualStackEndpoint aws.DualStackEndpointState // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. UseFIPSEndpoint aws.FIPSEndpointState } func (o Options) GetResolvedRegion() string { return o.ResolvedRegion } func (o Options) GetDisableHTTPS() bool { return o.DisableHTTPS } func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { return o.UseDualStackEndpoint } func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { return o.UseFIPSEndpoint } func transformToSharedOptions(options Options) endpoints.Options { return endpoints.Options{ Logger: options.Logger, LogDeprecated: options.LogDeprecated, ResolvedRegion: options.ResolvedRegion, DisableHTTPS: options.DisableHTTPS, UseDualStackEndpoint: options.UseDualStackEndpoint, UseFIPSEndpoint: options.UseFIPSEndpoint, } } // Resolver MediaPackage endpoint resolver type Resolver struct { partitions endpoints.Partitions } // ResolveEndpoint resolves the service endpoint for the given region and options func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { if len(region) == 0 { return endpoint, &aws.MissingRegionError{} } opt := transformToSharedOptions(options) return r.partitions.ResolveEndpoint(region, opt) } // New returns a new Resolver func New() *Resolver { return &Resolver{ partitions: defaultPartitions, } } var partitionRegexp = struct { Aws *regexp.Regexp AwsCn *regexp.Regexp AwsIso *regexp.Regexp AwsIsoB *regexp.Regexp AwsIsoE *regexp.Regexp AwsIsoF *regexp.Regexp AwsUsGov *regexp.Regexp }{ Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"), AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), } var defaultPartitions = endpoints.Partitions{ { ID: "aws", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "mediapackage.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "mediapackage-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "mediapackage-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "mediapackage.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.Aws, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "ap-northeast-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-northeast-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-north-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-3", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "sa-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-west-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-west-2", }: endpoints.Endpoint{}, }, }, { ID: "aws-cn", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "mediapackage.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "mediapackage-fips.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "mediapackage-fips.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "mediapackage.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsCn, IsRegionalized: true, }, { ID: "aws-iso", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "mediapackage-fips.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "mediapackage.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIso, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "us-iso-east-1", }: endpoints.Endpoint{}, }, }, { ID: "aws-iso-b", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "mediapackage-fips.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "mediapackage.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoB, IsRegionalized: true, }, { ID: "aws-iso-e", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "mediapackage-fips.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "mediapackage.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoE, IsRegionalized: true, }, { ID: "aws-iso-f", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "mediapackage-fips.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "mediapackage.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoF, IsRegionalized: true, }, { ID: "aws-us-gov", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "mediapackage.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "mediapackage-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "mediapackage-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "mediapackage.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsUsGov, IsRegionalized: true, }, }
349
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package endpoints import ( "testing" ) func TestRegexCompile(t *testing.T) { _ = defaultPartitions }
12
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types type AdTriggersElement string // Enum values for AdTriggersElement const ( AdTriggersElementSpliceInsert AdTriggersElement = "SPLICE_INSERT" AdTriggersElementBreak AdTriggersElement = "BREAK" AdTriggersElementProviderAdvertisement AdTriggersElement = "PROVIDER_ADVERTISEMENT" AdTriggersElementDistributorAdvertisement AdTriggersElement = "DISTRIBUTOR_ADVERTISEMENT" AdTriggersElementProviderPlacementOpportunity AdTriggersElement = "PROVIDER_PLACEMENT_OPPORTUNITY" AdTriggersElementDistributorPlacementOpportunity AdTriggersElement = "DISTRIBUTOR_PLACEMENT_OPPORTUNITY" AdTriggersElementProviderOverlayPlacementOpportunity AdTriggersElement = "PROVIDER_OVERLAY_PLACEMENT_OPPORTUNITY" AdTriggersElementDistributorOverlayPlacementOpportunity AdTriggersElement = "DISTRIBUTOR_OVERLAY_PLACEMENT_OPPORTUNITY" ) // Values returns all known values for AdTriggersElement. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (AdTriggersElement) Values() []AdTriggersElement { return []AdTriggersElement{ "SPLICE_INSERT", "BREAK", "PROVIDER_ADVERTISEMENT", "DISTRIBUTOR_ADVERTISEMENT", "PROVIDER_PLACEMENT_OPPORTUNITY", "DISTRIBUTOR_PLACEMENT_OPPORTUNITY", "PROVIDER_OVERLAY_PLACEMENT_OPPORTUNITY", "DISTRIBUTOR_OVERLAY_PLACEMENT_OPPORTUNITY", } } type PeriodTriggersElement string // Enum values for PeriodTriggersElement const ( PeriodTriggersElementAds PeriodTriggersElement = "ADS" ) // Values returns all known values for PeriodTriggersElement. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (PeriodTriggersElement) Values() []PeriodTriggersElement { return []PeriodTriggersElement{ "ADS", } } type AdMarkers string // Enum values for AdMarkers const ( AdMarkersNone AdMarkers = "NONE" AdMarkersScte35Enhanced AdMarkers = "SCTE35_ENHANCED" AdMarkersPassthrough AdMarkers = "PASSTHROUGH" AdMarkersDaterange AdMarkers = "DATERANGE" ) // Values returns all known values for AdMarkers. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (AdMarkers) Values() []AdMarkers { return []AdMarkers{ "NONE", "SCTE35_ENHANCED", "PASSTHROUGH", "DATERANGE", } } type AdsOnDeliveryRestrictions string // Enum values for AdsOnDeliveryRestrictions const ( AdsOnDeliveryRestrictionsNone AdsOnDeliveryRestrictions = "NONE" AdsOnDeliveryRestrictionsRestricted AdsOnDeliveryRestrictions = "RESTRICTED" AdsOnDeliveryRestrictionsUnrestricted AdsOnDeliveryRestrictions = "UNRESTRICTED" AdsOnDeliveryRestrictionsBoth AdsOnDeliveryRestrictions = "BOTH" ) // Values returns all known values for AdsOnDeliveryRestrictions. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (AdsOnDeliveryRestrictions) Values() []AdsOnDeliveryRestrictions { return []AdsOnDeliveryRestrictions{ "NONE", "RESTRICTED", "UNRESTRICTED", "BOTH", } } type CmafEncryptionMethod string // Enum values for CmafEncryptionMethod const ( CmafEncryptionMethodSampleAes CmafEncryptionMethod = "SAMPLE_AES" CmafEncryptionMethodAesCtr CmafEncryptionMethod = "AES_CTR" ) // Values returns all known values for CmafEncryptionMethod. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (CmafEncryptionMethod) Values() []CmafEncryptionMethod { return []CmafEncryptionMethod{ "SAMPLE_AES", "AES_CTR", } } type EncryptionMethod string // Enum values for EncryptionMethod const ( EncryptionMethodAes128 EncryptionMethod = "AES_128" EncryptionMethodSampleAes EncryptionMethod = "SAMPLE_AES" ) // Values returns all known values for EncryptionMethod. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (EncryptionMethod) Values() []EncryptionMethod { return []EncryptionMethod{ "AES_128", "SAMPLE_AES", } } type ManifestLayout string // Enum values for ManifestLayout const ( ManifestLayoutFull ManifestLayout = "FULL" ManifestLayoutCompact ManifestLayout = "COMPACT" ) // Values returns all known values for ManifestLayout. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ManifestLayout) Values() []ManifestLayout { return []ManifestLayout{ "FULL", "COMPACT", } } type Origination string // Enum values for Origination const ( OriginationAllow Origination = "ALLOW" OriginationDeny Origination = "DENY" ) // Values returns all known values for Origination. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (Origination) Values() []Origination { return []Origination{ "ALLOW", "DENY", } } type PlaylistType string // Enum values for PlaylistType const ( PlaylistTypeNone PlaylistType = "NONE" PlaylistTypeEvent PlaylistType = "EVENT" PlaylistTypeVod PlaylistType = "VOD" ) // Values returns all known values for PlaylistType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (PlaylistType) Values() []PlaylistType { return []PlaylistType{ "NONE", "EVENT", "VOD", } } type PresetSpeke20Audio string // Enum values for PresetSpeke20Audio const ( PresetSpeke20AudioPresetAudio1 PresetSpeke20Audio = "PRESET-AUDIO-1" PresetSpeke20AudioPresetAudio2 PresetSpeke20Audio = "PRESET-AUDIO-2" PresetSpeke20AudioPresetAudio3 PresetSpeke20Audio = "PRESET-AUDIO-3" PresetSpeke20AudioShared PresetSpeke20Audio = "SHARED" PresetSpeke20AudioUnencrypted PresetSpeke20Audio = "UNENCRYPTED" ) // Values returns all known values for PresetSpeke20Audio. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (PresetSpeke20Audio) Values() []PresetSpeke20Audio { return []PresetSpeke20Audio{ "PRESET-AUDIO-1", "PRESET-AUDIO-2", "PRESET-AUDIO-3", "SHARED", "UNENCRYPTED", } } type PresetSpeke20Video string // Enum values for PresetSpeke20Video const ( PresetSpeke20VideoPresetVideo1 PresetSpeke20Video = "PRESET-VIDEO-1" PresetSpeke20VideoPresetVideo2 PresetSpeke20Video = "PRESET-VIDEO-2" PresetSpeke20VideoPresetVideo3 PresetSpeke20Video = "PRESET-VIDEO-3" PresetSpeke20VideoPresetVideo4 PresetSpeke20Video = "PRESET-VIDEO-4" PresetSpeke20VideoPresetVideo5 PresetSpeke20Video = "PRESET-VIDEO-5" PresetSpeke20VideoPresetVideo6 PresetSpeke20Video = "PRESET-VIDEO-6" PresetSpeke20VideoPresetVideo7 PresetSpeke20Video = "PRESET-VIDEO-7" PresetSpeke20VideoPresetVideo8 PresetSpeke20Video = "PRESET-VIDEO-8" PresetSpeke20VideoShared PresetSpeke20Video = "SHARED" PresetSpeke20VideoUnencrypted PresetSpeke20Video = "UNENCRYPTED" ) // Values returns all known values for PresetSpeke20Video. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (PresetSpeke20Video) Values() []PresetSpeke20Video { return []PresetSpeke20Video{ "PRESET-VIDEO-1", "PRESET-VIDEO-2", "PRESET-VIDEO-3", "PRESET-VIDEO-4", "PRESET-VIDEO-5", "PRESET-VIDEO-6", "PRESET-VIDEO-7", "PRESET-VIDEO-8", "SHARED", "UNENCRYPTED", } } type Profile string // Enum values for Profile const ( ProfileNone Profile = "NONE" ProfileHbbtv15 Profile = "HBBTV_1_5" ProfileHybridcast Profile = "HYBRIDCAST" ProfileDvbDash2014 Profile = "DVB_DASH_2014" ) // Values returns all known values for Profile. Note that this can be expanded in // the future, and so it is only as up to date as the client. The ordering of this // slice is not guaranteed to be stable across updates. func (Profile) Values() []Profile { return []Profile{ "NONE", "HBBTV_1_5", "HYBRIDCAST", "DVB_DASH_2014", } } type SegmentTemplateFormat string // Enum values for SegmentTemplateFormat const ( SegmentTemplateFormatNumberWithTimeline SegmentTemplateFormat = "NUMBER_WITH_TIMELINE" SegmentTemplateFormatTimeWithTimeline SegmentTemplateFormat = "TIME_WITH_TIMELINE" SegmentTemplateFormatNumberWithDuration SegmentTemplateFormat = "NUMBER_WITH_DURATION" ) // Values returns all known values for SegmentTemplateFormat. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (SegmentTemplateFormat) Values() []SegmentTemplateFormat { return []SegmentTemplateFormat{ "NUMBER_WITH_TIMELINE", "TIME_WITH_TIMELINE", "NUMBER_WITH_DURATION", } } type Status string // Enum values for Status const ( StatusInProgress Status = "IN_PROGRESS" StatusSucceeded Status = "SUCCEEDED" StatusFailed Status = "FAILED" ) // Values returns all known values for Status. Note that this can be expanded in // the future, and so it is only as up to date as the client. The ordering of this // slice is not guaranteed to be stable across updates. func (Status) Values() []Status { return []Status{ "IN_PROGRESS", "SUCCEEDED", "FAILED", } } type StreamOrder string // Enum values for StreamOrder const ( StreamOrderOriginal StreamOrder = "ORIGINAL" StreamOrderVideoBitrateAscending StreamOrder = "VIDEO_BITRATE_ASCENDING" StreamOrderVideoBitrateDescending StreamOrder = "VIDEO_BITRATE_DESCENDING" ) // Values returns all known values for StreamOrder. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (StreamOrder) Values() []StreamOrder { return []StreamOrder{ "ORIGINAL", "VIDEO_BITRATE_ASCENDING", "VIDEO_BITRATE_DESCENDING", } } type UtcTiming string // Enum values for UtcTiming const ( UtcTimingNone UtcTiming = "NONE" UtcTimingHttpHead UtcTiming = "HTTP-HEAD" UtcTimingHttpIso UtcTiming = "HTTP-ISO" UtcTimingHttpXsdate UtcTiming = "HTTP-XSDATE" ) // Values returns all known values for UtcTiming. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (UtcTiming) Values() []UtcTiming { return []UtcTiming{ "NONE", "HTTP-HEAD", "HTTP-ISO", "HTTP-XSDATE", } }
348
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types import ( "fmt" smithy "github.com/aws/smithy-go" ) // The client is not authorized to access the requested resource. type ForbiddenException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ForbiddenException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ForbiddenException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ForbiddenException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ForbiddenException" } return *e.ErrorCodeOverride } func (e *ForbiddenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // An unexpected error occurred. type InternalServerErrorException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InternalServerErrorException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InternalServerErrorException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InternalServerErrorException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InternalServerErrorException" } return *e.ErrorCodeOverride } func (e *InternalServerErrorException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } // The requested resource does not exist. type NotFoundException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *NotFoundException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *NotFoundException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *NotFoundException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "NotFoundException" } return *e.ErrorCodeOverride } func (e *NotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // An unexpected error occurred. type ServiceUnavailableException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ServiceUnavailableException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ServiceUnavailableException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ServiceUnavailableException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ServiceUnavailableException" } return *e.ErrorCodeOverride } func (e *ServiceUnavailableException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } // The client has exceeded their resource or throttling limits. type TooManyRequestsException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *TooManyRequestsException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *TooManyRequestsException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *TooManyRequestsException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "TooManyRequestsException" } return *e.ErrorCodeOverride } func (e *TooManyRequestsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The parameters sent in the request are not valid. type UnprocessableEntityException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *UnprocessableEntityException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *UnprocessableEntityException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *UnprocessableEntityException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "UnprocessableEntityException" } return *e.ErrorCodeOverride } func (e *UnprocessableEntityException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
165
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types import ( smithydocument "github.com/aws/smithy-go/document" ) // CDN Authorization credentials type Authorization struct { // The Amazon Resource Name (ARN) for the secret in Secrets Manager that your // Content Distribution Network (CDN) uses for authorization to access your // endpoint. // // This member is required. CdnIdentifierSecret *string // The Amazon Resource Name (ARN) for the IAM role that allows MediaPackage to // communicate with AWS Secrets Manager. // // This member is required. SecretsRoleArn *string noSmithyDocumentSerde } // A Channel resource configuration. type Channel struct { // The Amazon Resource Name (ARN) assigned to the Channel. Arn *string // The date and time the Channel was created. CreatedAt *string // A short text description of the Channel. Description *string // Configure egress access logging. EgressAccessLogs *EgressAccessLogs // An HTTP Live Streaming (HLS) ingest resource configuration. HlsIngest *HlsIngest // The ID of the Channel. Id *string // Configure ingress access logging. IngressAccessLogs *IngressAccessLogs // A collection of tags associated with a resource Tags map[string]string noSmithyDocumentSerde } // A Common Media Application Format (CMAF) encryption configuration. type CmafEncryption struct { // A configuration for accessing an external Secure Packager and Encoder Key // Exchange (SPEKE) service that will provide encryption keys. // // This member is required. SpekeKeyProvider *SpekeKeyProvider // An optional 128-bit, 16-byte hex value represented by a 32-character string, // used in conjunction with the key for encrypting blocks. If you don't specify a // value, then MediaPackage creates the constant initialization vector (IV). ConstantInitializationVector *string // The encryption method to use. EncryptionMethod CmafEncryptionMethod // Time (in seconds) between each encryption key rotation. KeyRotationIntervalSeconds int32 noSmithyDocumentSerde } // A Common Media Application Format (CMAF) packaging configuration. type CmafPackage struct { // A Common Media Application Format (CMAF) encryption configuration. Encryption *CmafEncryption // A list of HLS manifest configurations HlsManifests []HlsManifest // Duration (in seconds) of each segment. Actual segments will be rounded to the // nearest multiple of the source segment duration. SegmentDurationSeconds int32 // An optional custom string that is prepended to the name of each segment. If not // specified, it defaults to the ChannelId. SegmentPrefix *string // A StreamSelection configuration. StreamSelection *StreamSelection noSmithyDocumentSerde } // A Common Media Application Format (CMAF) packaging configuration. type CmafPackageCreateOrUpdateParameters struct { // A Common Media Application Format (CMAF) encryption configuration. Encryption *CmafEncryption // A list of HLS manifest configurations HlsManifests []HlsManifestCreateOrUpdateParameters // Duration (in seconds) of each segment. Actual segments will be rounded to the // nearest multiple of the source segment duration. SegmentDurationSeconds int32 // An optional custom string that is prepended to the name of each segment. If not // specified, it defaults to the ChannelId. SegmentPrefix *string // A StreamSelection configuration. StreamSelection *StreamSelection noSmithyDocumentSerde } // A Dynamic Adaptive Streaming over HTTP (DASH) encryption configuration. type DashEncryption struct { // A configuration for accessing an external Secure Packager and Encoder Key // Exchange (SPEKE) service that will provide encryption keys. // // This member is required. SpekeKeyProvider *SpekeKeyProvider // Time (in seconds) between each encryption key rotation. KeyRotationIntervalSeconds int32 noSmithyDocumentSerde } // A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. type DashPackage struct { // A list of SCTE-35 message types that are treated as ad markers in the output. // If empty, no ad markers are output. Specify multiple items to create ad markers // for all of the included message types. AdTriggers []AdTriggersElement // This setting allows the delivery restriction flags on SCTE-35 segmentation // descriptors to determine whether a message signals an ad. Choosing "NONE" means // no SCTE-35 messages become ads. Choosing "RESTRICTED" means SCTE-35 messages of // the types specified in AdTriggers that contain delivery restrictions will be // treated as ads. Choosing "UNRESTRICTED" means SCTE-35 messages of the types // specified in AdTriggers that do not contain delivery restrictions will be // treated as ads. Choosing "BOTH" means all SCTE-35 messages of the types // specified in AdTriggers will be treated as ads. Note that Splice Insert messages // do not have these flags and are always treated as ads if specified in // AdTriggers. AdsOnDeliveryRestrictions AdsOnDeliveryRestrictions // A Dynamic Adaptive Streaming over HTTP (DASH) encryption configuration. Encryption *DashEncryption // When enabled, an I-Frame only stream will be included in the output. IncludeIframeOnlyStream bool // Determines the position of some tags in the Media Presentation Description // (MPD). When set to FULL, elements like SegmentTemplate and ContentProtection are // included in each Representation. When set to COMPACT, duplicate elements are // combined and presented at the AdaptationSet level. ManifestLayout ManifestLayout // Time window (in seconds) contained in each manifest. ManifestWindowSeconds int32 // Minimum duration (in seconds) that a player will buffer media before starting // the presentation. MinBufferTimeSeconds int32 // Minimum duration (in seconds) between potential changes to the Dynamic Adaptive // Streaming over HTTP (DASH) Media Presentation Description (MPD). MinUpdatePeriodSeconds int32 // A list of triggers that controls when the outgoing Dynamic Adaptive Streaming // over HTTP (DASH) Media Presentation Description (MPD) will be partitioned into // multiple periods. If empty, the content will not be partitioned into more than // one period. If the list contains "ADS", new periods will be created where the // Channel source contains SCTE-35 ad markers. PeriodTriggers []PeriodTriggersElement // The Dynamic Adaptive Streaming over HTTP (DASH) profile type. When set to // "HBBTV_1_5", HbbTV 1.5 compliant output is enabled. When set to "DVB-DASH_2014", // DVB-DASH 2014 compliant output is enabled. Profile Profile // Duration (in seconds) of each segment. Actual segments will be rounded to the // nearest multiple of the source segment duration. SegmentDurationSeconds int32 // Determines the type of SegmentTemplate included in the Media Presentation // Description (MPD). When set to NUMBER_WITH_TIMELINE, a full timeline is // presented in each SegmentTemplate, with $Number$ media URLs. When set to // TIME_WITH_TIMELINE, a full timeline is presented in each SegmentTemplate, with // $Time$ media URLs. When set to NUMBER_WITH_DURATION, only a duration is // included in each SegmentTemplate, with $Number$ media URLs. SegmentTemplateFormat SegmentTemplateFormat // A StreamSelection configuration. StreamSelection *StreamSelection // Duration (in seconds) to delay live content before presentation. SuggestedPresentationDelaySeconds int32 // Determines the type of UTCTiming included in the Media Presentation Description // (MPD) UtcTiming UtcTiming // Specifies the value attribute of the UTCTiming field when utcTiming is set to // HTTP-ISO, HTTP-HEAD or HTTP-XSDATE UtcTimingUri *string noSmithyDocumentSerde } // Configure egress access logging. type EgressAccessLogs struct { // Customize the log group name. LogGroupName *string noSmithyDocumentSerde } // Use encryptionContractConfiguration to configure one or more content encryption // keys for your endpoints that use SPEKE 2.0. The encryption contract defines // which content keys are used to encrypt the audio and video tracks in your // stream. To configure the encryption contract, specify which audio and video // encryption presets to use. Note the following considerations when using // encryptionContractConfiguration: encryptionContractConfiguration can be used for // DASH or CMAF endpoints that use SPEKE 2.0. SPEKE 2.0 relies on the CPIX 2.3 // specification. You must disable key rotation for this endpoint by setting // keyRotationIntervalSeconds to 0. type EncryptionContractConfiguration struct { // A collection of audio encryption presets. // // This member is required. PresetSpeke20Audio PresetSpeke20Audio // A collection of video encryption presets. // // This member is required. PresetSpeke20Video PresetSpeke20Video noSmithyDocumentSerde } // A HarvestJob resource configuration type HarvestJob struct { // The Amazon Resource Name (ARN) assigned to the HarvestJob. Arn *string // The ID of the Channel that the HarvestJob will harvest from. ChannelId *string // The date and time the HarvestJob was submitted. CreatedAt *string // The end of the time-window which will be harvested. EndTime *string // The ID of the HarvestJob. The ID must be unique within the region and it cannot // be changed after the HarvestJob is submitted. Id *string // The ID of the OriginEndpoint that the HarvestJob will harvest from. This cannot // be changed after the HarvestJob is submitted. OriginEndpointId *string // Configuration parameters for where in an S3 bucket to place the harvested // content S3Destination *S3Destination // The start of the time-window which will be harvested. StartTime *string // The current status of the HarvestJob. Consider setting up a CloudWatch Event to // listen for HarvestJobs as they succeed or fail. In the event of failure, the // CloudWatch Event will include an explanation of why the HarvestJob failed. Status Status noSmithyDocumentSerde } // An HTTP Live Streaming (HLS) encryption configuration. type HlsEncryption struct { // A configuration for accessing an external Secure Packager and Encoder Key // Exchange (SPEKE) service that will provide encryption keys. // // This member is required. SpekeKeyProvider *SpekeKeyProvider // A constant initialization vector for encryption (optional). When not specified // the initialization vector will be periodically rotated. ConstantInitializationVector *string // The encryption method to use. EncryptionMethod EncryptionMethod // Interval (in seconds) between each encryption key rotation. KeyRotationIntervalSeconds int32 // When enabled, the EXT-X-KEY tag will be repeated in output manifests. RepeatExtXKey bool noSmithyDocumentSerde } // An HTTP Live Streaming (HLS) ingest resource configuration. type HlsIngest struct { // A list of endpoints to which the source stream should be sent. IngestEndpoints []IngestEndpoint noSmithyDocumentSerde } // A HTTP Live Streaming (HLS) manifest configuration. type HlsManifest struct { // The ID of the manifest. The ID must be unique within the OriginEndpoint and it // cannot be changed after it is created. // // This member is required. Id *string // This setting controls how ad markers are included in the packaged // OriginEndpoint. "NONE" will omit all SCTE-35 ad markers from the output. // "PASSTHROUGH" causes the manifest to contain a copy of the SCTE-35 ad markers // (comments) taken directly from the input HTTP Live Streaming (HLS) manifest. // "SCTE35_ENHANCED" generates ad markers and blackout tags based on SCTE-35 // messages in the input source. "DATERANGE" inserts EXT-X-DATERANGE tags to signal // ad and program transition events in HLS and CMAF manifests. For this option, you // must set a programDateTimeIntervalSeconds value that is greater than 0. AdMarkers AdMarkers // A list of SCTE-35 message types that are treated as ad markers in the output. // If empty, no ad markers are output. Specify multiple items to create ad markers // for all of the included message types. AdTriggers []AdTriggersElement // This setting allows the delivery restriction flags on SCTE-35 segmentation // descriptors to determine whether a message signals an ad. Choosing "NONE" means // no SCTE-35 messages become ads. Choosing "RESTRICTED" means SCTE-35 messages of // the types specified in AdTriggers that contain delivery restrictions will be // treated as ads. Choosing "UNRESTRICTED" means SCTE-35 messages of the types // specified in AdTriggers that do not contain delivery restrictions will be // treated as ads. Choosing "BOTH" means all SCTE-35 messages of the types // specified in AdTriggers will be treated as ads. Note that Splice Insert messages // do not have these flags and are always treated as ads if specified in // AdTriggers. AdsOnDeliveryRestrictions AdsOnDeliveryRestrictions // When enabled, an I-Frame only stream will be included in the output. IncludeIframeOnlyStream bool // An optional short string appended to the end of the OriginEndpoint URL. If not // specified, defaults to the manifestName for the OriginEndpoint. ManifestName *string // The HTTP Live Streaming (HLS) playlist type. When either "EVENT" or "VOD" is // specified, a corresponding EXT-X-PLAYLIST-TYPE entry will be included in the // media playlist. PlaylistType PlaylistType // Time window (in seconds) contained in each parent manifest. PlaylistWindowSeconds int32 // The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag inserted // into manifests. Additionally, when an interval is specified ID3Timed Metadata // messages will be generated every 5 seconds using the ingest time of the content. // If the interval is not specified, or set to 0, then no EXT-X-PROGRAM-DATE-TIME // tags will be inserted into manifests and no ID3Timed Metadata messages will be // generated. Note that irrespective of this parameter, if any ID3 Timed Metadata // is found in HTTP Live Streaming (HLS) input, it will be passed through to HLS // output. ProgramDateTimeIntervalSeconds int32 // The URL of the packaged OriginEndpoint for consumption. Url *string noSmithyDocumentSerde } // A HTTP Live Streaming (HLS) manifest configuration. type HlsManifestCreateOrUpdateParameters struct { // The ID of the manifest. The ID must be unique within the OriginEndpoint and it // cannot be changed after it is created. // // This member is required. Id *string // This setting controls how ad markers are included in the packaged // OriginEndpoint. "NONE" will omit all SCTE-35 ad markers from the output. // "PASSTHROUGH" causes the manifest to contain a copy of the SCTE-35 ad markers // (comments) taken directly from the input HTTP Live Streaming (HLS) manifest. // "SCTE35_ENHANCED" generates ad markers and blackout tags based on SCTE-35 // messages in the input source. "DATERANGE" inserts EXT-X-DATERANGE tags to signal // ad and program transition events in HLS and CMAF manifests. For this option, you // must set a programDateTimeIntervalSeconds value that is greater than 0. AdMarkers AdMarkers // A list of SCTE-35 message types that are treated as ad markers in the output. // If empty, no ad markers are output. Specify multiple items to create ad markers // for all of the included message types. AdTriggers []AdTriggersElement // This setting allows the delivery restriction flags on SCTE-35 segmentation // descriptors to determine whether a message signals an ad. Choosing "NONE" means // no SCTE-35 messages become ads. Choosing "RESTRICTED" means SCTE-35 messages of // the types specified in AdTriggers that contain delivery restrictions will be // treated as ads. Choosing "UNRESTRICTED" means SCTE-35 messages of the types // specified in AdTriggers that do not contain delivery restrictions will be // treated as ads. Choosing "BOTH" means all SCTE-35 messages of the types // specified in AdTriggers will be treated as ads. Note that Splice Insert messages // do not have these flags and are always treated as ads if specified in // AdTriggers. AdsOnDeliveryRestrictions AdsOnDeliveryRestrictions // When enabled, an I-Frame only stream will be included in the output. IncludeIframeOnlyStream bool // An optional short string appended to the end of the OriginEndpoint URL. If not // specified, defaults to the manifestName for the OriginEndpoint. ManifestName *string // The HTTP Live Streaming (HLS) playlist type. When either "EVENT" or "VOD" is // specified, a corresponding EXT-X-PLAYLIST-TYPE entry will be included in the // media playlist. PlaylistType PlaylistType // Time window (in seconds) contained in each parent manifest. PlaylistWindowSeconds int32 // The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag inserted // into manifests. Additionally, when an interval is specified ID3Timed Metadata // messages will be generated every 5 seconds using the ingest time of the content. // If the interval is not specified, or set to 0, then no EXT-X-PROGRAM-DATE-TIME // tags will be inserted into manifests and no ID3Timed Metadata messages will be // generated. Note that irrespective of this parameter, if any ID3 Timed Metadata // is found in HTTP Live Streaming (HLS) input, it will be passed through to HLS // output. ProgramDateTimeIntervalSeconds int32 noSmithyDocumentSerde } // An HTTP Live Streaming (HLS) packaging configuration. type HlsPackage struct { // This setting controls how ad markers are included in the packaged // OriginEndpoint. "NONE" will omit all SCTE-35 ad markers from the output. // "PASSTHROUGH" causes the manifest to contain a copy of the SCTE-35 ad markers // (comments) taken directly from the input HTTP Live Streaming (HLS) manifest. // "SCTE35_ENHANCED" generates ad markers and blackout tags based on SCTE-35 // messages in the input source. "DATERANGE" inserts EXT-X-DATERANGE tags to signal // ad and program transition events in HLS and CMAF manifests. For this option, you // must set a programDateTimeIntervalSeconds value that is greater than 0. AdMarkers AdMarkers // A list of SCTE-35 message types that are treated as ad markers in the output. // If empty, no ad markers are output. Specify multiple items to create ad markers // for all of the included message types. AdTriggers []AdTriggersElement // This setting allows the delivery restriction flags on SCTE-35 segmentation // descriptors to determine whether a message signals an ad. Choosing "NONE" means // no SCTE-35 messages become ads. Choosing "RESTRICTED" means SCTE-35 messages of // the types specified in AdTriggers that contain delivery restrictions will be // treated as ads. Choosing "UNRESTRICTED" means SCTE-35 messages of the types // specified in AdTriggers that do not contain delivery restrictions will be // treated as ads. Choosing "BOTH" means all SCTE-35 messages of the types // specified in AdTriggers will be treated as ads. Note that Splice Insert messages // do not have these flags and are always treated as ads if specified in // AdTriggers. AdsOnDeliveryRestrictions AdsOnDeliveryRestrictions // An HTTP Live Streaming (HLS) encryption configuration. Encryption *HlsEncryption // When enabled, MediaPackage passes through digital video broadcasting (DVB) // subtitles into the output. IncludeDvbSubtitles bool // When enabled, an I-Frame only stream will be included in the output. IncludeIframeOnlyStream bool // The HTTP Live Streaming (HLS) playlist type. When either "EVENT" or "VOD" is // specified, a corresponding EXT-X-PLAYLIST-TYPE entry will be included in the // media playlist. PlaylistType PlaylistType // Time window (in seconds) contained in each parent manifest. PlaylistWindowSeconds int32 // The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag inserted // into manifests. Additionally, when an interval is specified ID3Timed Metadata // messages will be generated every 5 seconds using the ingest time of the content. // If the interval is not specified, or set to 0, then no EXT-X-PROGRAM-DATE-TIME // tags will be inserted into manifests and no ID3Timed Metadata messages will be // generated. Note that irrespective of this parameter, if any ID3 Timed Metadata // is found in HTTP Live Streaming (HLS) input, it will be passed through to HLS // output. ProgramDateTimeIntervalSeconds int32 // Duration (in seconds) of each fragment. Actual fragments will be rounded to the // nearest multiple of the source fragment duration. SegmentDurationSeconds int32 // A StreamSelection configuration. StreamSelection *StreamSelection // When enabled, audio streams will be placed in rendition groups in the output. UseAudioRenditionGroup bool noSmithyDocumentSerde } // An endpoint for ingesting source content for a Channel. type IngestEndpoint struct { // The system generated unique identifier for the IngestEndpoint Id *string // The system generated password for ingest authentication. Password *string // The ingest URL to which the source stream should be sent. Url *string // The system generated username for ingest authentication. Username *string noSmithyDocumentSerde } // Configure ingress access logging. type IngressAccessLogs struct { // Customize the log group name. LogGroupName *string noSmithyDocumentSerde } // A Microsoft Smooth Streaming (MSS) encryption configuration. type MssEncryption struct { // A configuration for accessing an external Secure Packager and Encoder Key // Exchange (SPEKE) service that will provide encryption keys. // // This member is required. SpekeKeyProvider *SpekeKeyProvider noSmithyDocumentSerde } // A Microsoft Smooth Streaming (MSS) packaging configuration. type MssPackage struct { // A Microsoft Smooth Streaming (MSS) encryption configuration. Encryption *MssEncryption // The time window (in seconds) contained in each manifest. ManifestWindowSeconds int32 // The duration (in seconds) of each segment. SegmentDurationSeconds int32 // A StreamSelection configuration. StreamSelection *StreamSelection noSmithyDocumentSerde } // An OriginEndpoint resource configuration. type OriginEndpoint struct { // The Amazon Resource Name (ARN) assigned to the OriginEndpoint. Arn *string // CDN Authorization credentials Authorization *Authorization // The ID of the Channel the OriginEndpoint is associated with. ChannelId *string // A Common Media Application Format (CMAF) packaging configuration. CmafPackage *CmafPackage // The date and time the OriginEndpoint was created. CreatedAt *string // A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. DashPackage *DashPackage // A short text description of the OriginEndpoint. Description *string // An HTTP Live Streaming (HLS) packaging configuration. HlsPackage *HlsPackage // The ID of the OriginEndpoint. Id *string // A short string appended to the end of the OriginEndpoint URL. ManifestName *string // A Microsoft Smooth Streaming (MSS) packaging configuration. MssPackage *MssPackage // Control whether origination of video is allowed for this OriginEndpoint. If set // to ALLOW, the OriginEndpoint may by requested, pursuant to any other form of // access control. If set to DENY, the OriginEndpoint may not be requested. This // can be helpful for Live to VOD harvesting, or for temporarily disabling // origination Origination Origination // Maximum duration (seconds) of content to retain for startover playback. If not // specified, startover playback will be disabled for the OriginEndpoint. StartoverWindowSeconds int32 // A collection of tags associated with a resource Tags map[string]string // Amount of delay (seconds) to enforce on the playback of live content. If not // specified, there will be no time delay in effect for the OriginEndpoint. TimeDelaySeconds int32 // The URL of the packaged OriginEndpoint for consumption. Url *string // A list of source IP CIDR blocks that will be allowed to access the // OriginEndpoint. Whitelist []string noSmithyDocumentSerde } // Configuration parameters for where in an S3 bucket to place the harvested // content type S3Destination struct { // The name of an S3 bucket within which harvested content will be exported // // This member is required. BucketName *string // The key in the specified S3 bucket where the harvested top-level manifest will // be placed. // // This member is required. ManifestKey *string // The IAM role used to write to the specified S3 bucket // // This member is required. RoleArn *string noSmithyDocumentSerde } // A configuration for accessing an external Secure Packager and Encoder Key // Exchange (SPEKE) service that will provide encryption keys. type SpekeKeyProvider struct { // The resource ID to include in key requests. // // This member is required. ResourceId *string // An Amazon Resource Name (ARN) of an IAM role that AWS Elemental MediaPackage // will assume when accessing the key provider service. // // This member is required. RoleArn *string // The system IDs to include in key requests. // // This member is required. SystemIds []string // The URL of the external key provider service. // // This member is required. Url *string // An Amazon Resource Name (ARN) of a Certificate Manager certificate that // MediaPackage will use for enforcing secure end-to-end data transfer with the key // provider service. CertificateArn *string // Use encryptionContractConfiguration to configure one or more content encryption // keys for your endpoints that use SPEKE 2.0. The encryption contract defines // which content keys are used to encrypt the audio and video tracks in your // stream. To configure the encryption contract, specify which audio and video // encryption presets to use. Note the following considerations when using // encryptionContractConfiguration: encryptionContractConfiguration can be used for // DASH or CMAF endpoints that use SPEKE 2.0. SPEKE 2.0 relies on the CPIX 2.3 // specification. You must disable key rotation for this endpoint by setting // keyRotationIntervalSeconds to 0. EncryptionContractConfiguration *EncryptionContractConfiguration noSmithyDocumentSerde } // A StreamSelection configuration. type StreamSelection struct { // The maximum video bitrate (bps) to include in output. MaxVideoBitsPerSecond int32 // The minimum video bitrate (bps) to include in output. MinVideoBitsPerSecond int32 // A directive that determines the order of streams in the output. StreamOrder StreamOrder noSmithyDocumentSerde } type noSmithyDocumentSerde = smithydocument.NoSerde
737
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2 import ( "context" cryptorand "crypto/rand" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/retry" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" smithy "github.com/aws/smithy-go" smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" smithyrand "github.com/aws/smithy-go/rand" smithyhttp "github.com/aws/smithy-go/transport/http" "net" "net/http" "time" ) const ServiceID = "MediaPackageV2" const ServiceAPIVersion = "2022-12-25" // Client provides the API client to make operations call for AWS Elemental // MediaPackage v2. type Client struct { options Options } // New returns an initialized Client based on the functional options. Provide // additional functional options to further configure the behavior of the client, // such as changing the client's endpoint or adding custom middleware behavior. func New(options Options, optFns ...func(*Options)) *Client { options = options.Copy() resolveDefaultLogger(&options) setResolvedDefaultsMode(&options) resolveRetryer(&options) resolveHTTPClient(&options) resolveHTTPSignerV4(&options) resolveDefaultEndpointConfiguration(&options) resolveIdempotencyTokenProvider(&options) for _, fn := range optFns { fn(&options) } client := &Client{ options: options, } return client } type Options struct { // Set of options to modify how an operation is invoked. These apply to all // operations invoked for this client. Use functional options on operation call to // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error // Configures the events that will be sent to the configured logger. ClientLogMode aws.ClientLogMode // The credentials object to use when signing requests. Credentials aws.CredentialsProvider // The configuration DefaultsMode that the SDK should use when constructing the // clients initial default settings. DefaultsMode aws.DefaultsMode // The endpoint options to be used when attempting to resolve an endpoint. EndpointOptions EndpointResolverOptions // The service endpoint resolver. EndpointResolver EndpointResolver // Signature Version 4 (SigV4) Signer HTTPSignerV4 HTTPSignerV4 // Provides idempotency tokens values that will be automatically populated into // idempotent API operations. IdempotencyTokenProvider IdempotencyTokenProvider // The logger writer interface to write logging messages to. Logger logging.Logger // The region to send requests to. (Required) Region string // RetryMaxAttempts specifies the maximum number attempts an API client will call // an operation that fails with a retryable error. A value of 0 is ignored, and // will not be used to configure the API client created default retryer, or modify // per operation call's retry max attempts. When creating a new API Clients this // member will only be used if the Retryer Options member is nil. This value will // be ignored if Retryer is not nil. If specified in an operation call's functional // options with a value that is different than the constructed client's Options, // the Client's Retryer will be wrapped to use the operation's specific // RetryMaxAttempts value. RetryMaxAttempts int // RetryMode specifies the retry mode the API client will be created with, if // Retryer option is not also specified. When creating a new API Clients this // member will only be used if the Retryer Options member is nil. This value will // be ignored if Retryer is not nil. Currently does not support per operation call // overrides, may in the future. RetryMode aws.RetryMode // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. The kind of // default retry created by the API client can be changed with the RetryMode // option. Retryer aws.Retryer // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You // should not populate this structure programmatically, or rely on the values here // within your applications. RuntimeEnvironment aws.RuntimeEnvironment // The initial DefaultsMode used when the client options were constructed. If the // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved // value was at that point in time. Currently does not support per operation call // overrides, may in the future. resolvedDefaultsMode aws.DefaultsMode // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. HTTPClient HTTPClient } // WithAPIOptions returns a functional option for setting the Client's APIOptions // option. func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { return func(o *Options) { o.APIOptions = append(o.APIOptions, optFns...) } } // WithEndpointResolver returns a functional option for setting the Client's // EndpointResolver option. func WithEndpointResolver(v EndpointResolver) func(*Options) { return func(o *Options) { o.EndpointResolver = v } } type HTTPClient interface { Do(*http.Request) (*http.Response, error) } // Copy creates a clone where the APIOptions list is deep copied. func (o Options) Copy() Options { to := o to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) copy(to.APIOptions, o.APIOptions) return to } func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { ctx = middleware.ClearStackValues(ctx) stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) options := c.options.Copy() for _, fn := range optFns { fn(&options) } finalizeRetryMaxAttemptOptions(&options, *c) finalizeClientEndpointResolverOptions(&options) for _, fn := range stackFns { if err := fn(stack, options); err != nil { return nil, metadata, err } } for _, fn := range options.APIOptions { if err := fn(stack); err != nil { return nil, metadata, err } } handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) result, metadata, err = handler.Handle(ctx, params) if err != nil { err = &smithy.OperationError{ ServiceID: ServiceID, OperationName: opID, Err: err, } } return result, metadata, err } type noSmithyDocumentSerde = smithydocument.NoSerde func resolveDefaultLogger(o *Options) { if o.Logger != nil { return } o.Logger = logging.Nop{} } func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { return middleware.AddSetLoggerMiddleware(stack, o.Logger) } func setResolvedDefaultsMode(o *Options) { if len(o.resolvedDefaultsMode) > 0 { return } var mode aws.DefaultsMode mode.SetFromString(string(o.DefaultsMode)) if mode == aws.DefaultsModeAuto { mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) } o.resolvedDefaultsMode = mode } // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, DefaultsMode: cfg.DefaultsMode, RuntimeEnvironment: cfg.RuntimeEnvironment, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) resolveAWSRetryMode(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) resolveUseDualStackEndpoint(cfg, &opts) resolveUseFIPSEndpoint(cfg, &opts) return New(opts, optFns...) } func resolveHTTPClient(o *Options) { var buildable *awshttp.BuildableClient if o.HTTPClient != nil { var ok bool buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) if !ok { return } } else { buildable = awshttp.NewBuildableClient() } modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) if err == nil { buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { dialer.Timeout = dialerTimeout } }) buildable = buildable.WithTransportOptions(func(transport *http.Transport) { if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { transport.TLSHandshakeTimeout = tlsHandshakeTimeout } }) } o.HTTPClient = buildable } func resolveRetryer(o *Options) { if o.Retryer != nil { return } if len(o.RetryMode) == 0 { modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) if err == nil { o.RetryMode = modeConfig.RetryMode } } if len(o.RetryMode) == 0 { o.RetryMode = aws.RetryModeStandard } var standardOptions []func(*retry.StandardOptions) if v := o.RetryMaxAttempts; v != 0 { standardOptions = append(standardOptions, func(so *retry.StandardOptions) { so.MaxAttempts = v }) } switch o.RetryMode { case aws.RetryModeAdaptive: var adaptiveOptions []func(*retry.AdaptiveModeOptions) if len(standardOptions) != 0 { adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { ao.StandardOptions = append(ao.StandardOptions, standardOptions...) }) } o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) default: o.Retryer = retry.NewStandard(standardOptions...) } } func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { if cfg.Retryer == nil { return } o.Retryer = cfg.Retryer() } func resolveAWSRetryMode(cfg aws.Config, o *Options) { if len(cfg.RetryMode) == 0 { return } o.RetryMode = cfg.RetryMode } func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { if cfg.RetryMaxAttempts == 0 { return } o.RetryMaxAttempts = cfg.RetryMaxAttempts } func finalizeRetryMaxAttemptOptions(o *Options, client Client) { if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { return } o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) } func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { return } o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver()) } func addClientUserAgent(stack *middleware.Stack) error { return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "mediapackagev2", goModuleVersion)(stack) } func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error { mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{ CredentialsProvider: o.Credentials, Signer: o.HTTPSignerV4, LogSigning: o.ClientLogMode.IsSigning(), }) return stack.Finalize.Add(mw, middleware.After) } type HTTPSignerV4 interface { SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error } func resolveHTTPSignerV4(o *Options) { if o.HTTPSignerV4 != nil { return } o.HTTPSignerV4 = newDefaultV4Signer(*o) } func newDefaultV4Signer(o Options) *v4.Signer { return v4.NewSigner(func(so *v4.SignerOptions) { so.Logger = o.Logger so.LogSigning = o.ClientLogMode.IsSigning() }) } func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return } o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) } func addRetryMiddlewares(stack *middleware.Stack, o Options) error { mo := retry.AddRetryMiddlewaresOptions{ Retryer: o.Retryer, LogRetryAttempts: o.ClientLogMode.IsRetries(), } return retry.AddRetryMiddlewares(stack, mo) } // resolves dual-stack endpoint configuration func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { if len(cfg.ConfigSources) == 0 { return nil } value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) if err != nil { return err } if found { o.EndpointOptions.UseDualStackEndpoint = value } return nil } // resolves FIPS endpoint configuration func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { if len(cfg.ConfigSources) == 0 { return nil } value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) if err != nil { return err } if found { o.EndpointOptions.UseFIPSEndpoint = value } return nil } // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) } func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) } func addResponseErrorMiddleware(stack *middleware.Stack) error { return awshttp.AddResponseErrorMiddleware(stack) } func addRequestResponseLogging(stack *middleware.Stack, o Options) error { return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ LogRequest: o.ClientLogMode.IsRequest(), LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), LogResponse: o.ClientLogMode.IsResponse(), LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), }, middleware.After) }
455
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2 import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "io/ioutil" "net/http" "strings" "testing" ) func TestClient_resolveRetryOptions(t *testing.T) { nopClient := smithyhttp.ClientDoFunc(func(_ *http.Request) (*http.Response, error) { return &http.Response{ StatusCode: 200, Header: http.Header{}, Body: ioutil.NopCloser(strings.NewReader("")), }, nil }) cases := map[string]struct { defaultsMode aws.DefaultsMode retryer aws.Retryer retryMaxAttempts int opRetryMaxAttempts *int retryMode aws.RetryMode expectClientRetryMode aws.RetryMode expectClientMaxAttempts int expectOpMaxAttempts int }{ "defaults": { defaultsMode: aws.DefaultsModeStandard, expectClientRetryMode: aws.RetryModeStandard, expectClientMaxAttempts: 3, expectOpMaxAttempts: 3, }, "custom default retry": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, "custom op max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(2), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 2, }, "custom op no change max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(10), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, "custom op 0 max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(0), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, } for name, c := range cases { t.Run(name, func(t *testing.T) { client := NewFromConfig(aws.Config{ DefaultsMode: c.defaultsMode, Retryer: func() func() aws.Retryer { if c.retryer == nil { return nil } return func() aws.Retryer { return c.retryer } }(), HTTPClient: nopClient, RetryMaxAttempts: c.retryMaxAttempts, RetryMode: c.retryMode, }) if e, a := c.expectClientRetryMode, client.options.RetryMode; e != a { t.Errorf("expect %v retry mode, got %v", e, a) } if e, a := c.expectClientMaxAttempts, client.options.Retryer.MaxAttempts(); e != a { t.Errorf("expect %v max attempts, got %v", e, a) } _, _, err := client.invokeOperation(context.Background(), "mockOperation", struct{}{}, []func(*Options){ func(o *Options) { if c.opRetryMaxAttempts == nil { return } o.RetryMaxAttempts = *c.opRetryMaxAttempts }, }, func(s *middleware.Stack, o Options) error { s.Initialize.Clear() s.Serialize.Clear() s.Build.Clear() s.Finalize.Clear() s.Deserialize.Clear() if e, a := c.expectOpMaxAttempts, o.Retryer.MaxAttempts(); e != a { t.Errorf("expect %v op max attempts, got %v", e, a) } return nil }) if err != nil { t.Fatalf("expect no operation error, got %v", err) } }) } }
124
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2 import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackagev2/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) // Create a channel to start receiving content streams. The channel represents the // input to MediaPackage for incoming live content from an encoder such as AWS // Elemental MediaLive. The channel receives content, and after packaging it, // outputs it through an origin endpoint to downstream devices (such as video // players or CDNs) that request the content. You can create only one channel with // each request. We recommend that you spread out channels between channel groups, // such as putting redundant channels in the same AWS Region in different channel // groups. func (c *Client) CreateChannel(ctx context.Context, params *CreateChannelInput, optFns ...func(*Options)) (*CreateChannelOutput, error) { if params == nil { params = &CreateChannelInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateChannel", params, optFns, c.addOperationCreateChannelMiddlewares) if err != nil { return nil, err } out := result.(*CreateChannelOutput) out.ResultMetadata = metadata return out, nil } type CreateChannelInput struct { // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // The name that describes the channel. The name is the primary identifier for the // channel, and must be unique for your account in the AWS Region and channel // group. You can't change the name after you create the channel. // // This member is required. ChannelName *string // A unique, case-sensitive token that you provide to ensure the idempotency of // the request. ClientToken *string // Enter any descriptive text that helps you to identify the channel. Description *string // A comma-separated list of tag key:value pairs that you define. For example: // "Key1": "Value1", // "Key2": "Value2" Tags map[string]string noSmithyDocumentSerde } type CreateChannelOutput struct { // The Amazon Resource Name (ARN) associated with the resource. // // This member is required. Arn *string // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // The name that describes the channel. The name is the primary identifier for the // channel, and must be unique for your account in the AWS Region and channel // group. // // This member is required. ChannelName *string // The date and time the channel was created. // // This member is required. CreatedAt *time.Time // The date and time the channel was modified. // // This member is required. ModifiedAt *time.Time // The description for your channel. Description *string // The list of ingest endpoints. IngestEndpoints []types.IngestEndpoint // The comma-separated list of tag key:value pairs assigned to the channel. Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateChannelMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateChannel{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateChannel{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addIdempotencyToken_opCreateChannelMiddleware(stack, options); err != nil { return err } if err = addOpCreateChannelValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateChannel(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } type idempotencyToken_initializeOpCreateChannel struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCreateChannel) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCreateChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { if m.tokenProvider == nil { return next.HandleInitialize(ctx, in) } input, ok := in.Parameters.(*CreateChannelInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateChannelInput ") } if input.ClientToken == nil { t, err := m.tokenProvider.GetIdempotencyToken() if err != nil { return out, metadata, err } input.ClientToken = &t } return next.HandleInitialize(ctx, in) } func addIdempotencyToken_opCreateChannelMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCreateChannel{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCreateChannel(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackagev2", OperationName: "CreateChannel", } }
224
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2 import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) // Create a channel group to group your channels and origin endpoints. A channel // group is the top-level resource that consists of channels and origin endpoints // that are associated with it and that provides predictable URLs for stream // delivery. All channels and origin endpoints within the channel group are // guaranteed to share the DNS. You can create only one channel group with each // request. func (c *Client) CreateChannelGroup(ctx context.Context, params *CreateChannelGroupInput, optFns ...func(*Options)) (*CreateChannelGroupOutput, error) { if params == nil { params = &CreateChannelGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateChannelGroup", params, optFns, c.addOperationCreateChannelGroupMiddlewares) if err != nil { return nil, err } out := result.(*CreateChannelGroupOutput) out.ResultMetadata = metadata return out, nil } type CreateChannelGroupInput struct { // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // You can't use spaces in the name. You can't change the name after you create the // channel group. // // This member is required. ChannelGroupName *string // A unique, case-sensitive token that you provide to ensure the idempotency of // the request. ClientToken *string // Enter any descriptive text that helps you to identify the channel group. Description *string // A comma-separated list of tag key:value pairs that you define. For example: // "Key1": "Value1", // "Key2": "Value2" Tags map[string]string noSmithyDocumentSerde } type CreateChannelGroupOutput struct { // The Amazon Resource Name (ARN) associated with the resource. // // This member is required. Arn *string // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // The date and time the channel group was created. // // This member is required. CreatedAt *time.Time // The output domain where the source stream should be sent. Integrate the egress // domain with a downstream CDN (such as Amazon CloudFront) or playback device. // // This member is required. EgressDomain *string // The date and time the channel group was modified. // // This member is required. ModifiedAt *time.Time // The description for your channel group. Description *string // The comma-separated list of tag key:value pairs assigned to the channel group. Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateChannelGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateChannelGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateChannelGroup{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addIdempotencyToken_opCreateChannelGroupMiddleware(stack, options); err != nil { return err } if err = addOpCreateChannelGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateChannelGroup(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } type idempotencyToken_initializeOpCreateChannelGroup struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCreateChannelGroup) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCreateChannelGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { if m.tokenProvider == nil { return next.HandleInitialize(ctx, in) } input, ok := in.Parameters.(*CreateChannelGroupInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateChannelGroupInput ") } if input.ClientToken == nil { t, err := m.tokenProvider.GetIdempotencyToken() if err != nil { return out, metadata, err } input.ClientToken = &t } return next.HandleInitialize(ctx, in) } func addIdempotencyToken_opCreateChannelGroupMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCreateChannelGroup{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCreateChannelGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackagev2", OperationName: "CreateChannelGroup", } }
212
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2 import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackagev2/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) // The endpoint is attached to a channel, and represents the output of the live // content. You can associate multiple endpoints to a single channel. Each endpoint // gives players and downstream CDNs (such as Amazon CloudFront) access to the // content for playback. Content can't be served from a channel until it has an // endpoint. You can create only one endpoint with each request. func (c *Client) CreateOriginEndpoint(ctx context.Context, params *CreateOriginEndpointInput, optFns ...func(*Options)) (*CreateOriginEndpointOutput, error) { if params == nil { params = &CreateOriginEndpointInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateOriginEndpoint", params, optFns, c.addOperationCreateOriginEndpointMiddlewares) if err != nil { return nil, err } out := result.(*CreateOriginEndpointOutput) out.ResultMetadata = metadata return out, nil } type CreateOriginEndpointInput struct { // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // The name that describes the channel. The name is the primary identifier for the // channel, and must be unique for your account in the AWS Region and channel // group. // // This member is required. ChannelName *string // The type of container to attach to this origin endpoint. A container type is a // file format that encapsulates one or more media streams, such as audio and // video, into a single file. You can't change the container type after you create // the endpoint. // // This member is required. ContainerType types.ContainerType // The name that describes the origin endpoint. The name is the primary identifier // for the origin endpoint, and must be unique for your account in the AWS Region // and channel. You can't use spaces in the name. You can't change the name after // you create the endpoint. // // This member is required. OriginEndpointName *string // A unique, case-sensitive token that you provide to ensure the idempotency of // the request. ClientToken *string // Enter any descriptive text that helps you to identify the origin endpoint. Description *string // An HTTP live streaming (HLS) manifest configuration. HlsManifests []types.CreateHlsManifestConfiguration // A low-latency HLS manifest configuration. LowLatencyHlsManifests []types.CreateLowLatencyHlsManifestConfiguration // The segment configuration, including the segment name, duration, and other // configuration values. Segment *types.Segment // The size of the window (in seconds) to create a window of the live stream // that's available for on-demand viewing. Viewers can start-over or catch-up on // content that falls within the window. The maximum startover window is 1,209,600 // seconds (14 days). StartoverWindowSeconds *int32 // A comma-separated list of tag key:value pairs that you define. For example: // "Key1": "Value1", // "Key2": "Value2" Tags map[string]string noSmithyDocumentSerde } type CreateOriginEndpointOutput struct { // The Amazon Resource Name (ARN) associated with the resource. // // This member is required. Arn *string // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // The name that describes the channel. The name is the primary identifier for the // channel, and must be unique for your account in the AWS Region and channel // group. // // This member is required. ChannelName *string // The type of container attached to this origin endpoint. // // This member is required. ContainerType types.ContainerType // The date and time the origin endpoint was created. // // This member is required. CreatedAt *time.Time // The date and time the origin endpoint was modified. // // This member is required. ModifiedAt *time.Time // The name that describes the origin endpoint. The name is the primary identifier // for the origin endpoint, and and must be unique for your account in the AWS // Region and channel. // // This member is required. OriginEndpointName *string // The segment configuration, including the segment name, duration, and other // configuration values. // // This member is required. Segment *types.Segment // The description for your origin endpoint. Description *string // An HTTP live streaming (HLS) manifest configuration. HlsManifests []types.GetHlsManifestConfiguration // A low-latency HLS manifest configuration. LowLatencyHlsManifests []types.GetLowLatencyHlsManifestConfiguration // The size of the window (in seconds) to create a window of the live stream // that's available for on-demand viewing. Viewers can start-over or catch-up on // content that falls within the window. StartoverWindowSeconds *int32 // The comma-separated list of tag key:value pairs assigned to the origin endpoint. Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateOriginEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateOriginEndpoint{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateOriginEndpoint{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addIdempotencyToken_opCreateOriginEndpointMiddleware(stack, options); err != nil { return err } if err = addOpCreateOriginEndpointValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateOriginEndpoint(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } type idempotencyToken_initializeOpCreateOriginEndpoint struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCreateOriginEndpoint) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCreateOriginEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { if m.tokenProvider == nil { return next.HandleInitialize(ctx, in) } input, ok := in.Parameters.(*CreateOriginEndpointInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateOriginEndpointInput ") } if input.ClientToken == nil { t, err := m.tokenProvider.GetIdempotencyToken() if err != nil { return out, metadata, err } input.ClientToken = &t } return next.HandleInitialize(ctx, in) } func addIdempotencyToken_opCreateOriginEndpointMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCreateOriginEndpoint{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCreateOriginEndpoint(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackagev2", OperationName: "CreateOriginEndpoint", } }
279
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Delete a channel to stop AWS Elemental MediaPackage from receiving further // content. You must delete the channel's origin endpoints before you can delete // the channel. func (c *Client) DeleteChannel(ctx context.Context, params *DeleteChannelInput, optFns ...func(*Options)) (*DeleteChannelOutput, error) { if params == nil { params = &DeleteChannelInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteChannel", params, optFns, c.addOperationDeleteChannelMiddlewares) if err != nil { return nil, err } out := result.(*DeleteChannelOutput) out.ResultMetadata = metadata return out, nil } type DeleteChannelInput struct { // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // The name that describes the channel. The name is the primary identifier for the // channel, and must be unique for your account in the AWS Region and channel // group. // // This member is required. ChannelName *string noSmithyDocumentSerde } type DeleteChannelOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteChannelMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteChannel{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteChannel{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteChannelValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteChannel(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDeleteChannel(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackagev2", OperationName: "DeleteChannel", } }
130
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Delete a channel group. You must delete the channel group's channels and origin // endpoints before you can delete the channel group. If you delete a channel // group, you'll lose access to the egress domain and will have to create a new // channel group to replace it. func (c *Client) DeleteChannelGroup(ctx context.Context, params *DeleteChannelGroupInput, optFns ...func(*Options)) (*DeleteChannelGroupOutput, error) { if params == nil { params = &DeleteChannelGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteChannelGroup", params, optFns, c.addOperationDeleteChannelGroupMiddlewares) if err != nil { return nil, err } out := result.(*DeleteChannelGroupOutput) out.ResultMetadata = metadata return out, nil } type DeleteChannelGroupInput struct { // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string noSmithyDocumentSerde } type DeleteChannelGroupOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteChannelGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteChannelGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteChannelGroup{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteChannelGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteChannelGroup(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDeleteChannelGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackagev2", OperationName: "DeleteChannelGroup", } }
124
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Delete a channel policy. func (c *Client) DeleteChannelPolicy(ctx context.Context, params *DeleteChannelPolicyInput, optFns ...func(*Options)) (*DeleteChannelPolicyOutput, error) { if params == nil { params = &DeleteChannelPolicyInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteChannelPolicy", params, optFns, c.addOperationDeleteChannelPolicyMiddlewares) if err != nil { return nil, err } out := result.(*DeleteChannelPolicyOutput) out.ResultMetadata = metadata return out, nil } type DeleteChannelPolicyInput struct { // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // The name that describes the channel. The name is the primary identifier for the // channel, and must be unique for your account in the AWS Region and channel // group. // // This member is required. ChannelName *string noSmithyDocumentSerde } type DeleteChannelPolicyOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteChannelPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteChannelPolicy{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteChannelPolicy{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteChannelPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteChannelPolicy(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDeleteChannelPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackagev2", OperationName: "DeleteChannelPolicy", } }
128
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Origin endpoints can serve content until they're deleted. Delete the endpoint // if it should no longer respond to playback requests. You must delete all // endpoints from a channel before you can delete the channel. func (c *Client) DeleteOriginEndpoint(ctx context.Context, params *DeleteOriginEndpointInput, optFns ...func(*Options)) (*DeleteOriginEndpointOutput, error) { if params == nil { params = &DeleteOriginEndpointInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteOriginEndpoint", params, optFns, c.addOperationDeleteOriginEndpointMiddlewares) if err != nil { return nil, err } out := result.(*DeleteOriginEndpointOutput) out.ResultMetadata = metadata return out, nil } type DeleteOriginEndpointInput struct { // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // The name that describes the channel. The name is the primary identifier for the // channel, and must be unique for your account in the AWS Region and channel // group. // // This member is required. ChannelName *string // The name that describes the origin endpoint. The name is the primary identifier // for the origin endpoint, and and must be unique for your account in the AWS // Region and channel. // // This member is required. OriginEndpointName *string noSmithyDocumentSerde } type DeleteOriginEndpointOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteOriginEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteOriginEndpoint{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteOriginEndpoint{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteOriginEndpointValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteOriginEndpoint(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDeleteOriginEndpoint(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackagev2", OperationName: "DeleteOriginEndpoint", } }
137
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Delete an origin endpoint policy. func (c *Client) DeleteOriginEndpointPolicy(ctx context.Context, params *DeleteOriginEndpointPolicyInput, optFns ...func(*Options)) (*DeleteOriginEndpointPolicyOutput, error) { if params == nil { params = &DeleteOriginEndpointPolicyInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteOriginEndpointPolicy", params, optFns, c.addOperationDeleteOriginEndpointPolicyMiddlewares) if err != nil { return nil, err } out := result.(*DeleteOriginEndpointPolicyOutput) out.ResultMetadata = metadata return out, nil } type DeleteOriginEndpointPolicyInput struct { // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // The name that describes the channel. The name is the primary identifier for the // channel, and must be unique for your account in the AWS Region and channel // group. // // This member is required. ChannelName *string // The name that describes the origin endpoint. The name is the primary identifier // for the origin endpoint, and and must be unique for your account in the AWS // Region and channel. // // This member is required. OriginEndpointName *string noSmithyDocumentSerde } type DeleteOriginEndpointPolicyOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteOriginEndpointPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteOriginEndpointPolicy{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteOriginEndpointPolicy{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteOriginEndpointPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteOriginEndpointPolicy(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDeleteOriginEndpointPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackagev2", OperationName: "DeleteOriginEndpointPolicy", } }
135
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackagev2/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) // Retrieves the specified channel that's configured in AWS Elemental // MediaPackage, including the origin endpoints that are associated with it. func (c *Client) GetChannel(ctx context.Context, params *GetChannelInput, optFns ...func(*Options)) (*GetChannelOutput, error) { if params == nil { params = &GetChannelInput{} } result, metadata, err := c.invokeOperation(ctx, "GetChannel", params, optFns, c.addOperationGetChannelMiddlewares) if err != nil { return nil, err } out := result.(*GetChannelOutput) out.ResultMetadata = metadata return out, nil } type GetChannelInput struct { // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // The name that describes the channel. The name is the primary identifier for the // channel, and must be unique for your account in the AWS Region and channel // group. // // This member is required. ChannelName *string noSmithyDocumentSerde } type GetChannelOutput struct { // The Amazon Resource Name (ARN) associated with the resource. // // This member is required. Arn *string // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // The name that describes the channel. The name is the primary identifier for the // channel, and must be unique for your account in the AWS Region and channel // group. // // This member is required. ChannelName *string // The date and time the channel was created. // // This member is required. CreatedAt *time.Time // The date and time the channel was modified. // // This member is required. ModifiedAt *time.Time // The description for your channel. Description *string // The list of ingest endpoints. IngestEndpoints []types.IngestEndpoint // The comma-separated list of tag key:value pairs assigned to the channel. Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetChannelMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpGetChannel{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetChannel{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetChannelValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetChannel(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetChannel(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackagev2", OperationName: "GetChannel", } }
169
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) // Retrieves the specified channel group that's configured in AWS Elemental // MediaPackage, including the channels and origin endpoints that are associated // with it. func (c *Client) GetChannelGroup(ctx context.Context, params *GetChannelGroupInput, optFns ...func(*Options)) (*GetChannelGroupOutput, error) { if params == nil { params = &GetChannelGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "GetChannelGroup", params, optFns, c.addOperationGetChannelGroupMiddlewares) if err != nil { return nil, err } out := result.(*GetChannelGroupOutput) out.ResultMetadata = metadata return out, nil } type GetChannelGroupInput struct { // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string noSmithyDocumentSerde } type GetChannelGroupOutput struct { // The Amazon Resource Name (ARN) associated with the resource. // // This member is required. Arn *string // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // The date and time the channel group was created. // // This member is required. CreatedAt *time.Time // The output domain where the source stream should be sent. Integrate the domain // with a downstream CDN (such as Amazon CloudFront) or playback device. // // This member is required. EgressDomain *string // The date and time the channel group was modified. // // This member is required. ModifiedAt *time.Time // The description for your channel group. Description *string // The comma-separated list of tag key:value pairs assigned to the channel group. Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetChannelGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpGetChannelGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetChannelGroup{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetChannelGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetChannelGroup(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetChannelGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackagev2", OperationName: "GetChannelGroup", } }
158
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves the specified channel policy that's configured in AWS Elemental // MediaPackage. With policies, you can specify who has access to AWS resources and // what actions they can perform on those resources. func (c *Client) GetChannelPolicy(ctx context.Context, params *GetChannelPolicyInput, optFns ...func(*Options)) (*GetChannelPolicyOutput, error) { if params == nil { params = &GetChannelPolicyInput{} } result, metadata, err := c.invokeOperation(ctx, "GetChannelPolicy", params, optFns, c.addOperationGetChannelPolicyMiddlewares) if err != nil { return nil, err } out := result.(*GetChannelPolicyOutput) out.ResultMetadata = metadata return out, nil } type GetChannelPolicyInput struct { // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // The name that describes the channel. The name is the primary identifier for the // channel, and must be unique for your account in the AWS Region and channel // group. // // This member is required. ChannelName *string noSmithyDocumentSerde } type GetChannelPolicyOutput struct { // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // The name that describes the channel. The name is the primary identifier for the // channel, and must be unique for your account in the AWS Region and channel // group. // // This member is required. ChannelName *string // The policy assigned to the channel. // // This member is required. Policy *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetChannelPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpGetChannelPolicy{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetChannelPolicy{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetChannelPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetChannelPolicy(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetChannelPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackagev2", OperationName: "GetChannelPolicy", } }
149
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackagev2/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) // Retrieves the specified origin endpoint that's configured in AWS Elemental // MediaPackage to obtain its playback URL and to view the packaging settings that // it's currently using. func (c *Client) GetOriginEndpoint(ctx context.Context, params *GetOriginEndpointInput, optFns ...func(*Options)) (*GetOriginEndpointOutput, error) { if params == nil { params = &GetOriginEndpointInput{} } result, metadata, err := c.invokeOperation(ctx, "GetOriginEndpoint", params, optFns, c.addOperationGetOriginEndpointMiddlewares) if err != nil { return nil, err } out := result.(*GetOriginEndpointOutput) out.ResultMetadata = metadata return out, nil } type GetOriginEndpointInput struct { // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // The name that describes the channel. The name is the primary identifier for the // channel, and must be unique for your account in the AWS Region and channel // group. // // This member is required. ChannelName *string // The name that describes the origin endpoint. The name is the primary identifier // for the origin endpoint, and and must be unique for your account in the AWS // Region and channel. // // This member is required. OriginEndpointName *string noSmithyDocumentSerde } type GetOriginEndpointOutput struct { // The Amazon Resource Name (ARN) associated with the resource. // // This member is required. Arn *string // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // The name that describes the channel. The name is the primary identifier for the // channel, and must be unique for your account in the AWS Region and channel // group. // // This member is required. ChannelName *string // The type of container attached to this origin endpoint. // // This member is required. ContainerType types.ContainerType // The date and time the origin endpoint was created. // // This member is required. CreatedAt *time.Time // The date and time the origin endpoint was modified. // // This member is required. ModifiedAt *time.Time // The name that describes the origin endpoint. The name is the primary identifier // for the origin endpoint, and and must be unique for your account in the AWS // Region and channel. // // This member is required. OriginEndpointName *string // The segment configuration, including the segment name, duration, and other // configuration values. // // This member is required. Segment *types.Segment // The description for your origin endpoint. Description *string // An HTTP live streaming (HLS) manifest configuration. HlsManifests []types.GetHlsManifestConfiguration // A low-latency HLS manifest configuration. LowLatencyHlsManifests []types.GetLowLatencyHlsManifestConfiguration // The size of the window (in seconds) to create a window of the live stream // that's available for on-demand viewing. Viewers can start-over or catch-up on // content that falls within the window. StartoverWindowSeconds *int32 // The comma-separated list of tag key:value pairs assigned to the origin endpoint. Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetOriginEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpGetOriginEndpoint{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetOriginEndpoint{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetOriginEndpointValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetOriginEndpoint(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetOriginEndpoint(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackagev2", OperationName: "GetOriginEndpoint", } }
203
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves the specified origin endpoint policy that's configured in AWS // Elemental MediaPackage. func (c *Client) GetOriginEndpointPolicy(ctx context.Context, params *GetOriginEndpointPolicyInput, optFns ...func(*Options)) (*GetOriginEndpointPolicyOutput, error) { if params == nil { params = &GetOriginEndpointPolicyInput{} } result, metadata, err := c.invokeOperation(ctx, "GetOriginEndpointPolicy", params, optFns, c.addOperationGetOriginEndpointPolicyMiddlewares) if err != nil { return nil, err } out := result.(*GetOriginEndpointPolicyOutput) out.ResultMetadata = metadata return out, nil } type GetOriginEndpointPolicyInput struct { // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // The name that describes the channel. The name is the primary identifier for the // channel, and must be unique for your account in the AWS Region and channel // group. // // This member is required. ChannelName *string // The name that describes the origin endpoint. The name is the primary identifier // for the origin endpoint, and and must be unique for your account in the AWS // Region and channel. // // This member is required. OriginEndpointName *string noSmithyDocumentSerde } type GetOriginEndpointPolicyOutput struct { // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // The name that describes the channel. The name is the primary identifier for the // channel, and must be unique for your account in the AWS Region and channel // group. // // This member is required. ChannelName *string // The name that describes the origin endpoint. The name is the primary identifier // for the origin endpoint, and and must be unique for your account in the AWS // Region and channel. // // This member is required. OriginEndpointName *string // The policy assigned to the origin endpoint. // // This member is required. Policy *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetOriginEndpointPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpGetOriginEndpointPolicy{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetOriginEndpointPolicy{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetOriginEndpointPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetOriginEndpointPolicy(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetOriginEndpointPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackagev2", OperationName: "GetOriginEndpointPolicy", } }
162
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2 import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackagev2/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves all channel groups that are configured in AWS Elemental MediaPackage, // including the channels and origin endpoints that are associated with it. func (c *Client) ListChannelGroups(ctx context.Context, params *ListChannelGroupsInput, optFns ...func(*Options)) (*ListChannelGroupsOutput, error) { if params == nil { params = &ListChannelGroupsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListChannelGroups", params, optFns, c.addOperationListChannelGroupsMiddlewares) if err != nil { return nil, err } out := result.(*ListChannelGroupsOutput) out.ResultMetadata = metadata return out, nil } type ListChannelGroupsInput struct { // The maximum number of results to return in the response. MaxResults *int32 // The pagination token from the GET list request. Use the token to fetch the next // page of results. NextToken *string noSmithyDocumentSerde } type ListChannelGroupsOutput struct { // The objects being returned. Items []types.ChannelGroupListConfiguration // The pagination token from the GET list request. Use the token to fetch the next // page of results. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListChannelGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpListChannelGroups{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListChannelGroups{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListChannelGroups(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } // ListChannelGroupsAPIClient is a client that implements the ListChannelGroups // operation. type ListChannelGroupsAPIClient interface { ListChannelGroups(context.Context, *ListChannelGroupsInput, ...func(*Options)) (*ListChannelGroupsOutput, error) } var _ ListChannelGroupsAPIClient = (*Client)(nil) // ListChannelGroupsPaginatorOptions is the paginator options for ListChannelGroups type ListChannelGroupsPaginatorOptions struct { // The maximum number of results to return in the response. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool } // ListChannelGroupsPaginator is a paginator for ListChannelGroups type ListChannelGroupsPaginator struct { options ListChannelGroupsPaginatorOptions client ListChannelGroupsAPIClient params *ListChannelGroupsInput nextToken *string firstPage bool } // NewListChannelGroupsPaginator returns a new ListChannelGroupsPaginator func NewListChannelGroupsPaginator(client ListChannelGroupsAPIClient, params *ListChannelGroupsInput, optFns ...func(*ListChannelGroupsPaginatorOptions)) *ListChannelGroupsPaginator { if params == nil { params = &ListChannelGroupsInput{} } options := ListChannelGroupsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListChannelGroupsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListChannelGroupsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListChannelGroups page. func (p *ListChannelGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListChannelGroupsOutput, error) { if !p.HasMorePages() { return nil, fmt.Errorf("no more pages available") } params := *p.params params.NextToken = p.nextToken var limit *int32 if p.options.Limit > 0 { limit = &p.options.Limit } params.MaxResults = limit result, err := p.client.ListChannelGroups(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListChannelGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackagev2", OperationName: "ListChannelGroups", } }
220
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2 import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackagev2/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves all channels in a specific channel group that are configured in AWS // Elemental MediaPackage, including the origin endpoints that are associated with // it. func (c *Client) ListChannels(ctx context.Context, params *ListChannelsInput, optFns ...func(*Options)) (*ListChannelsOutput, error) { if params == nil { params = &ListChannelsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListChannels", params, optFns, c.addOperationListChannelsMiddlewares) if err != nil { return nil, err } out := result.(*ListChannelsOutput) out.ResultMetadata = metadata return out, nil } type ListChannelsInput struct { // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // The maximum number of results to return in the response. MaxResults *int32 // The pagination token from the GET list request. Use the token to fetch the next // page of results. NextToken *string noSmithyDocumentSerde } type ListChannelsOutput struct { // The objects being returned. Items []types.ChannelListConfiguration // The pagination token from the GET list request. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListChannelsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpListChannels{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListChannels{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpListChannelsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListChannels(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } // ListChannelsAPIClient is a client that implements the ListChannels operation. type ListChannelsAPIClient interface { ListChannels(context.Context, *ListChannelsInput, ...func(*Options)) (*ListChannelsOutput, error) } var _ ListChannelsAPIClient = (*Client)(nil) // ListChannelsPaginatorOptions is the paginator options for ListChannels type ListChannelsPaginatorOptions struct { // The maximum number of results to return in the response. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool } // ListChannelsPaginator is a paginator for ListChannels type ListChannelsPaginator struct { options ListChannelsPaginatorOptions client ListChannelsAPIClient params *ListChannelsInput nextToken *string firstPage bool } // NewListChannelsPaginator returns a new ListChannelsPaginator func NewListChannelsPaginator(client ListChannelsAPIClient, params *ListChannelsInput, optFns ...func(*ListChannelsPaginatorOptions)) *ListChannelsPaginator { if params == nil { params = &ListChannelsInput{} } options := ListChannelsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListChannelsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListChannelsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListChannels page. func (p *ListChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListChannelsOutput, error) { if !p.HasMorePages() { return nil, fmt.Errorf("no more pages available") } params := *p.params params.NextToken = p.nextToken var limit *int32 if p.options.Limit > 0 { limit = &p.options.Limit } params.MaxResults = limit result, err := p.client.ListChannels(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListChannels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackagev2", OperationName: "ListChannels", } }
228
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2 import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackagev2/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves all origin endpoints in a specific channel that are configured in AWS // Elemental MediaPackage. func (c *Client) ListOriginEndpoints(ctx context.Context, params *ListOriginEndpointsInput, optFns ...func(*Options)) (*ListOriginEndpointsOutput, error) { if params == nil { params = &ListOriginEndpointsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListOriginEndpoints", params, optFns, c.addOperationListOriginEndpointsMiddlewares) if err != nil { return nil, err } out := result.(*ListOriginEndpointsOutput) out.ResultMetadata = metadata return out, nil } type ListOriginEndpointsInput struct { // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // The name that describes the channel. The name is the primary identifier for the // channel, and must be unique for your account in the AWS Region and channel // group. // // This member is required. ChannelName *string // The maximum number of results to return in the response. MaxResults *int32 // The pagination token from the GET list request. Use the token to fetch the next // page of results. NextToken *string noSmithyDocumentSerde } type ListOriginEndpointsOutput struct { // The objects being returned. Items []types.OriginEndpointListConfiguration // The pagination token from the GET list request. Use the token to fetch the next // page of results. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListOriginEndpointsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpListOriginEndpoints{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListOriginEndpoints{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpListOriginEndpointsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOriginEndpoints(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } // ListOriginEndpointsAPIClient is a client that implements the // ListOriginEndpoints operation. type ListOriginEndpointsAPIClient interface { ListOriginEndpoints(context.Context, *ListOriginEndpointsInput, ...func(*Options)) (*ListOriginEndpointsOutput, error) } var _ ListOriginEndpointsAPIClient = (*Client)(nil) // ListOriginEndpointsPaginatorOptions is the paginator options for // ListOriginEndpoints type ListOriginEndpointsPaginatorOptions struct { // The maximum number of results to return in the response. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool } // ListOriginEndpointsPaginator is a paginator for ListOriginEndpoints type ListOriginEndpointsPaginator struct { options ListOriginEndpointsPaginatorOptions client ListOriginEndpointsAPIClient params *ListOriginEndpointsInput nextToken *string firstPage bool } // NewListOriginEndpointsPaginator returns a new ListOriginEndpointsPaginator func NewListOriginEndpointsPaginator(client ListOriginEndpointsAPIClient, params *ListOriginEndpointsInput, optFns ...func(*ListOriginEndpointsPaginatorOptions)) *ListOriginEndpointsPaginator { if params == nil { params = &ListOriginEndpointsInput{} } options := ListOriginEndpointsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListOriginEndpointsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListOriginEndpointsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListOriginEndpoints page. func (p *ListOriginEndpointsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListOriginEndpointsOutput, error) { if !p.HasMorePages() { return nil, fmt.Errorf("no more pages available") } params := *p.params params.NextToken = p.nextToken var limit *int32 if p.options.Limit > 0 { limit = &p.options.Limit } params.MaxResults = limit result, err := p.client.ListOriginEndpoints(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListOriginEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackagev2", OperationName: "ListOriginEndpoints", } }
237
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists the tags assigned to a resource. func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { if params == nil { params = &ListTagsForResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) if err != nil { return nil, err } out := result.(*ListTagsForResourceOutput) out.ResultMetadata = metadata return out, nil } type ListTagsForResourceInput struct { // The ARN of the CloudWatch resource that you want to view tags for. // // This member is required. ResourceArn *string noSmithyDocumentSerde } type ListTagsForResourceOutput struct { // Contains a map of the key-value pairs for the resource tag or tags assigned to // the resource. Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpListTagsForResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTagsForResource{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackagev2", OperationName: "ListTagsForResource", } }
125
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Attaches an IAM policy to the specified channel. With policies, you can specify // who has access to AWS resources and what actions they can perform on those // resources. You can attach only one policy with each request. func (c *Client) PutChannelPolicy(ctx context.Context, params *PutChannelPolicyInput, optFns ...func(*Options)) (*PutChannelPolicyOutput, error) { if params == nil { params = &PutChannelPolicyInput{} } result, metadata, err := c.invokeOperation(ctx, "PutChannelPolicy", params, optFns, c.addOperationPutChannelPolicyMiddlewares) if err != nil { return nil, err } out := result.(*PutChannelPolicyOutput) out.ResultMetadata = metadata return out, nil } type PutChannelPolicyInput struct { // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // The name that describes the channel. The name is the primary identifier for the // channel, and must be unique for your account in the AWS Region and channel // group. // // This member is required. ChannelName *string // The policy to attach to the specified channel. // // This member is required. Policy *string noSmithyDocumentSerde } type PutChannelPolicyOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationPutChannelPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpPutChannelPolicy{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutChannelPolicy{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpPutChannelPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutChannelPolicy(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opPutChannelPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackagev2", OperationName: "PutChannelPolicy", } }
135
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Attaches an IAM policy to the specified origin endpoint. You can attach only // one policy with each request. func (c *Client) PutOriginEndpointPolicy(ctx context.Context, params *PutOriginEndpointPolicyInput, optFns ...func(*Options)) (*PutOriginEndpointPolicyOutput, error) { if params == nil { params = &PutOriginEndpointPolicyInput{} } result, metadata, err := c.invokeOperation(ctx, "PutOriginEndpointPolicy", params, optFns, c.addOperationPutOriginEndpointPolicyMiddlewares) if err != nil { return nil, err } out := result.(*PutOriginEndpointPolicyOutput) out.ResultMetadata = metadata return out, nil } type PutOriginEndpointPolicyInput struct { // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // The name that describes the channel. The name is the primary identifier for the // channel, and must be unique for your account in the AWS Region and channel // group. // // This member is required. ChannelName *string // The name that describes the origin endpoint. The name is the primary identifier // for the origin endpoint, and and must be unique for your account in the AWS // Region and channel. // // This member is required. OriginEndpointName *string // The policy to attach to the specified origin endpoint. // // This member is required. Policy *string noSmithyDocumentSerde } type PutOriginEndpointPolicyOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationPutOriginEndpointPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpPutOriginEndpointPolicy{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutOriginEndpointPolicy{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpPutOriginEndpointPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutOriginEndpointPolicy(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opPutOriginEndpointPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackagev2", OperationName: "PutOriginEndpointPolicy", } }
141
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Assigns one of more tags (key-value pairs) to the specified MediaPackage // resource. Tags can help you organize and categorize your resources. You can also // use them to scope user permissions, by granting a user permission to access or // change only resources with certain tag values. You can use the TagResource // operation with a resource that already has tags. If you specify a new tag key // for the resource, this tag is appended to the list of tags associated with the // resource. If you specify a tag key that is already associated with the resource, // the new tag value that you specify replaces the previous value for that tag. func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { if params == nil { params = &TagResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares) if err != nil { return nil, err } out := result.(*TagResourceOutput) out.ResultMetadata = metadata return out, nil } type TagResourceInput struct { // The ARN of the MediaPackage resource that you're adding tags to. // // This member is required. ResourceArn *string // Contains a map of the key-value pairs for the resource tag or tags assigned to // the resource. // // This member is required. Tags map[string]string noSmithyDocumentSerde } type TagResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpTagResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTagResource{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackagev2", OperationName: "TagResource", } }
133
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Removes one or more tags from the specified resource. func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { if params == nil { params = &UntagResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares) if err != nil { return nil, err } out := result.(*UntagResourceOutput) out.ResultMetadata = metadata return out, nil } type UntagResourceInput struct { // The ARN of the MediaPackage resource that you're removing tags from. // // This member is required. ResourceArn *string // The list of tag keys to remove from the resource. // // This member is required. TagKeys []string noSmithyDocumentSerde } type UntagResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpUntagResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUntagResource{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackagev2", OperationName: "UntagResource", } }
125
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackagev2/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) // Update the specified channel. You can edit if MediaPackage sends ingest or // egress access logs to the CloudWatch log group, if content will be encrypted, // the description on a channel, and your channel's policy settings. You can't edit // the name of the channel or CloudFront distribution details. Any edits you make // that impact the video output may not be reflected for a few minutes. func (c *Client) UpdateChannel(ctx context.Context, params *UpdateChannelInput, optFns ...func(*Options)) (*UpdateChannelOutput, error) { if params == nil { params = &UpdateChannelInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateChannel", params, optFns, c.addOperationUpdateChannelMiddlewares) if err != nil { return nil, err } out := result.(*UpdateChannelOutput) out.ResultMetadata = metadata return out, nil } type UpdateChannelInput struct { // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // The name that describes the channel. The name is the primary identifier for the // channel, and must be unique for your account in the AWS Region and channel // group. // // This member is required. ChannelName *string // Any descriptive information that you want to add to the channel for future // identification purposes. Description *string noSmithyDocumentSerde } type UpdateChannelOutput struct { // The Amazon Resource Name (ARN) associated with the resource. // // This member is required. Arn *string // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // The name that describes the channel. The name is the primary identifier for the // channel, and must be unique for your account in the AWS Region and channel // group. // // This member is required. ChannelName *string // The date and time the channel was created. // // This member is required. CreatedAt *time.Time // The date and time the channel was modified. // // This member is required. ModifiedAt *time.Time // The description for your channel. Description *string // The list of ingest endpoints. IngestEndpoints []types.IngestEndpoint // The comma-separated list of tag key:value pairs assigned to the channel. Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateChannelMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateChannel{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateChannel{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateChannelValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateChannel(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateChannel(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackagev2", OperationName: "UpdateChannel", } }
176
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) // Update the specified channel group. You can edit the description on a channel // group for easier identification later from the AWS Elemental MediaPackage // console. You can't edit the name of the channel group. Any edits you make that // impact the video output may not be reflected for a few minutes. func (c *Client) UpdateChannelGroup(ctx context.Context, params *UpdateChannelGroupInput, optFns ...func(*Options)) (*UpdateChannelGroupOutput, error) { if params == nil { params = &UpdateChannelGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateChannelGroup", params, optFns, c.addOperationUpdateChannelGroupMiddlewares) if err != nil { return nil, err } out := result.(*UpdateChannelGroupOutput) out.ResultMetadata = metadata return out, nil } type UpdateChannelGroupInput struct { // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // Any descriptive information that you want to add to the channel group for // future identification purposes. Description *string noSmithyDocumentSerde } type UpdateChannelGroupOutput struct { // The Amazon Resource Name (ARN) associated with the resource. // // This member is required. Arn *string // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // The date and time the channel group was created. // // This member is required. CreatedAt *time.Time // The output domain where the source stream is sent. Integrate the domain with a // downstream CDN (such as Amazon CloudFront) or playback device. // // This member is required. EgressDomain *string // The date and time the channel group was modified. // // This member is required. ModifiedAt *time.Time // The description for your channel group. Description *string // The comma-separated list of tag key:value pairs assigned to the channel group. Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateChannelGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateChannelGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateChannelGroup{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateChannelGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateChannelGroup(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateChannelGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackagev2", OperationName: "UpdateChannelGroup", } }
163
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackagev2/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) // Update the specified origin endpoint. Edit the packaging preferences on an // endpoint to optimize the viewing experience. You can't edit the name of the // endpoint. Any edits you make that impact the video output may not be reflected // for a few minutes. func (c *Client) UpdateOriginEndpoint(ctx context.Context, params *UpdateOriginEndpointInput, optFns ...func(*Options)) (*UpdateOriginEndpointOutput, error) { if params == nil { params = &UpdateOriginEndpointInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateOriginEndpoint", params, optFns, c.addOperationUpdateOriginEndpointMiddlewares) if err != nil { return nil, err } out := result.(*UpdateOriginEndpointOutput) out.ResultMetadata = metadata return out, nil } type UpdateOriginEndpointInput struct { // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // The name that describes the channel. The name is the primary identifier for the // channel, and must be unique for your account in the AWS Region and channel // group. // // This member is required. ChannelName *string // The type of container attached to this origin endpoint. A container type is a // file format that encapsulates one or more media streams, such as audio and // video, into a single file. // // This member is required. ContainerType types.ContainerType // The name that describes the origin endpoint. The name is the primary identifier // for the origin endpoint, and and must be unique for your account in the AWS // Region and channel. // // This member is required. OriginEndpointName *string // Any descriptive information that you want to add to the origin endpoint for // future identification purposes. Description *string // An HTTP live streaming (HLS) manifest configuration. HlsManifests []types.CreateHlsManifestConfiguration // A low-latency HLS manifest configuration. LowLatencyHlsManifests []types.CreateLowLatencyHlsManifestConfiguration // The segment configuration, including the segment name, duration, and other // configuration values. Segment *types.Segment // The size of the window (in seconds) to create a window of the live stream // that's available for on-demand viewing. Viewers can start-over or catch-up on // content that falls within the window. The maximum startover window is 1,209,600 // seconds (14 days). StartoverWindowSeconds *int32 noSmithyDocumentSerde } type UpdateOriginEndpointOutput struct { // The ARN associated with the resource. // // This member is required. Arn *string // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // The name that describes the channel. The name is the primary identifier for the // channel, and must be unique for your account in the AWS Region and channel // group. // // This member is required. ChannelName *string // The type of container attached to this origin endpoint. // // This member is required. ContainerType types.ContainerType // The date and time the origin endpoint was created. // // This member is required. CreatedAt *time.Time // The date and time the origin endpoint was modified. // // This member is required. ModifiedAt *time.Time // The name that describes the origin endpoint. The name is the primary identifier // for the origin endpoint, and and must be unique for your account in the AWS // Region and channel. // // This member is required. OriginEndpointName *string // The segment configuration, including the segment name, duration, and other // configuration values. // // This member is required. Segment *types.Segment // The description of the origin endpoint. Description *string // An HTTP live streaming (HLS) manifest configuration. HlsManifests []types.GetHlsManifestConfiguration // A low-latency HLS manifest configuration. LowLatencyHlsManifests []types.GetLowLatencyHlsManifestConfiguration // The size of the window (in seconds) to create a window of the live stream // that's available for on-demand viewing. Viewers can start-over or catch-up on // content that falls within the window. StartoverWindowSeconds *int32 // The comma-separated list of tag key:value pairs assigned to the origin endpoint. Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateOriginEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateOriginEndpoint{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateOriginEndpoint{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateOriginEndpointValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateOriginEndpoint(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateOriginEndpoint(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackagev2", OperationName: "UpdateOriginEndpoint", } }
231
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2 import ( "bytes" "context" "encoding/json" "fmt" "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" "github.com/aws/aws-sdk-go-v2/service/mediapackagev2/types" smithy "github.com/aws/smithy-go" smithyio "github.com/aws/smithy-go/io" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "io/ioutil" "strings" ) type awsRestjson1_deserializeOpCreateChannel struct { } func (*awsRestjson1_deserializeOpCreateChannel) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpCreateChannel) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorCreateChannel(response, &metadata) } output := &CreateChannelOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentCreateChannelOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorCreateChannel(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentCreateChannelOutput(v **CreateChannelOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateChannelOutput if *v == nil { sv = &CreateChannelOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "ChannelGroupName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.ChannelGroupName = ptr.String(jtv) } case "ChannelName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.ChannelName = ptr.String(jtv) } case "CreatedAt": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "IngestEndpoints": if err := awsRestjson1_deserializeDocumentIngestEndpointList(&sv.IngestEndpoints, value); err != nil { return err } case "ModifiedAt": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.ModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Tags": if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpCreateChannelGroup struct { } func (*awsRestjson1_deserializeOpCreateChannelGroup) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpCreateChannelGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorCreateChannelGroup(response, &metadata) } output := &CreateChannelGroupOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentCreateChannelGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorCreateChannelGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentCreateChannelGroupOutput(v **CreateChannelGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateChannelGroupOutput if *v == nil { sv = &CreateChannelGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "ChannelGroupName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.ChannelGroupName = ptr.String(jtv) } case "CreatedAt": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "EgressDomain": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.EgressDomain = ptr.String(jtv) } case "ModifiedAt": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.ModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Tags": if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpCreateOriginEndpoint struct { } func (*awsRestjson1_deserializeOpCreateOriginEndpoint) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpCreateOriginEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorCreateOriginEndpoint(response, &metadata) } output := &CreateOriginEndpointOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentCreateOriginEndpointOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorCreateOriginEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentCreateOriginEndpointOutput(v **CreateOriginEndpointOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateOriginEndpointOutput if *v == nil { sv = &CreateOriginEndpointOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "ChannelGroupName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.ChannelGroupName = ptr.String(jtv) } case "ChannelName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.ChannelName = ptr.String(jtv) } case "ContainerType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ContainerType to be of type string, got %T instead", value) } sv.ContainerType = types.ContainerType(jtv) } case "CreatedAt": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "HlsManifests": if err := awsRestjson1_deserializeDocumentGetHlsManifests(&sv.HlsManifests, value); err != nil { return err } case "LowLatencyHlsManifests": if err := awsRestjson1_deserializeDocumentGetLowLatencyHlsManifests(&sv.LowLatencyHlsManifests, value); err != nil { return err } case "ModifiedAt": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.ModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "OriginEndpointName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.OriginEndpointName = ptr.String(jtv) } case "Segment": if err := awsRestjson1_deserializeDocumentSegment(&sv.Segment, value); err != nil { return err } case "StartoverWindowSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.StartoverWindowSeconds = ptr.Int32(int32(i64)) } case "Tags": if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpDeleteChannel struct { } func (*awsRestjson1_deserializeOpDeleteChannel) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpDeleteChannel) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorDeleteChannel(response, &metadata) } output := &DeleteChannelOutput{} out.Result = output return out, metadata, err } func awsRestjson1_deserializeOpErrorDeleteChannel(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsRestjson1_deserializeOpDeleteChannelGroup struct { } func (*awsRestjson1_deserializeOpDeleteChannelGroup) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpDeleteChannelGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorDeleteChannelGroup(response, &metadata) } output := &DeleteChannelGroupOutput{} out.Result = output return out, metadata, err } func awsRestjson1_deserializeOpErrorDeleteChannelGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsRestjson1_deserializeOpDeleteChannelPolicy struct { } func (*awsRestjson1_deserializeOpDeleteChannelPolicy) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpDeleteChannelPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorDeleteChannelPolicy(response, &metadata) } output := &DeleteChannelPolicyOutput{} out.Result = output return out, metadata, err } func awsRestjson1_deserializeOpErrorDeleteChannelPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsRestjson1_deserializeOpDeleteOriginEndpoint struct { } func (*awsRestjson1_deserializeOpDeleteOriginEndpoint) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpDeleteOriginEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorDeleteOriginEndpoint(response, &metadata) } output := &DeleteOriginEndpointOutput{} out.Result = output return out, metadata, err } func awsRestjson1_deserializeOpErrorDeleteOriginEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsRestjson1_deserializeOpDeleteOriginEndpointPolicy struct { } func (*awsRestjson1_deserializeOpDeleteOriginEndpointPolicy) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpDeleteOriginEndpointPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorDeleteOriginEndpointPolicy(response, &metadata) } output := &DeleteOriginEndpointPolicyOutput{} out.Result = output return out, metadata, err } func awsRestjson1_deserializeOpErrorDeleteOriginEndpointPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsRestjson1_deserializeOpGetChannel struct { } func (*awsRestjson1_deserializeOpGetChannel) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpGetChannel) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorGetChannel(response, &metadata) } output := &GetChannelOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentGetChannelOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorGetChannel(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentGetChannelOutput(v **GetChannelOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetChannelOutput if *v == nil { sv = &GetChannelOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "ChannelGroupName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.ChannelGroupName = ptr.String(jtv) } case "ChannelName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.ChannelName = ptr.String(jtv) } case "CreatedAt": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "IngestEndpoints": if err := awsRestjson1_deserializeDocumentIngestEndpointList(&sv.IngestEndpoints, value); err != nil { return err } case "ModifiedAt": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.ModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Tags": if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpGetChannelGroup struct { } func (*awsRestjson1_deserializeOpGetChannelGroup) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpGetChannelGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorGetChannelGroup(response, &metadata) } output := &GetChannelGroupOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentGetChannelGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorGetChannelGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentGetChannelGroupOutput(v **GetChannelGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetChannelGroupOutput if *v == nil { sv = &GetChannelGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "ChannelGroupName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.ChannelGroupName = ptr.String(jtv) } case "CreatedAt": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "EgressDomain": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.EgressDomain = ptr.String(jtv) } case "ModifiedAt": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.ModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "tags": if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpGetChannelPolicy struct { } func (*awsRestjson1_deserializeOpGetChannelPolicy) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpGetChannelPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorGetChannelPolicy(response, &metadata) } output := &GetChannelPolicyOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentGetChannelPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorGetChannelPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentGetChannelPolicyOutput(v **GetChannelPolicyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetChannelPolicyOutput if *v == nil { sv = &GetChannelPolicyOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChannelGroupName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.ChannelGroupName = ptr.String(jtv) } case "ChannelName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.ChannelName = ptr.String(jtv) } case "Policy": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Policy = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpGetOriginEndpoint struct { } func (*awsRestjson1_deserializeOpGetOriginEndpoint) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpGetOriginEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorGetOriginEndpoint(response, &metadata) } output := &GetOriginEndpointOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentGetOriginEndpointOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorGetOriginEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentGetOriginEndpointOutput(v **GetOriginEndpointOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetOriginEndpointOutput if *v == nil { sv = &GetOriginEndpointOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "ChannelGroupName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.ChannelGroupName = ptr.String(jtv) } case "ChannelName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.ChannelName = ptr.String(jtv) } case "ContainerType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ContainerType to be of type string, got %T instead", value) } sv.ContainerType = types.ContainerType(jtv) } case "CreatedAt": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "HlsManifests": if err := awsRestjson1_deserializeDocumentGetHlsManifests(&sv.HlsManifests, value); err != nil { return err } case "LowLatencyHlsManifests": if err := awsRestjson1_deserializeDocumentGetLowLatencyHlsManifests(&sv.LowLatencyHlsManifests, value); err != nil { return err } case "ModifiedAt": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.ModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "OriginEndpointName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.OriginEndpointName = ptr.String(jtv) } case "Segment": if err := awsRestjson1_deserializeDocumentSegment(&sv.Segment, value); err != nil { return err } case "StartoverWindowSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.StartoverWindowSeconds = ptr.Int32(int32(i64)) } case "Tags": if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpGetOriginEndpointPolicy struct { } func (*awsRestjson1_deserializeOpGetOriginEndpointPolicy) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpGetOriginEndpointPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorGetOriginEndpointPolicy(response, &metadata) } output := &GetOriginEndpointPolicyOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentGetOriginEndpointPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorGetOriginEndpointPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentGetOriginEndpointPolicyOutput(v **GetOriginEndpointPolicyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetOriginEndpointPolicyOutput if *v == nil { sv = &GetOriginEndpointPolicyOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChannelGroupName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.ChannelGroupName = ptr.String(jtv) } case "ChannelName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.ChannelName = ptr.String(jtv) } case "OriginEndpointName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.OriginEndpointName = ptr.String(jtv) } case "Policy": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Policy = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpListChannelGroups struct { } func (*awsRestjson1_deserializeOpListChannelGroups) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpListChannelGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorListChannelGroups(response, &metadata) } output := &ListChannelGroupsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentListChannelGroupsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorListChannelGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentListChannelGroupsOutput(v **ListChannelGroupsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListChannelGroupsOutput if *v == nil { sv = &ListChannelGroupsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Items": if err := awsRestjson1_deserializeDocumentChannelGroupsList(&sv.Items, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpListChannels struct { } func (*awsRestjson1_deserializeOpListChannels) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpListChannels) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorListChannels(response, &metadata) } output := &ListChannelsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentListChannelsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorListChannels(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentListChannelsOutput(v **ListChannelsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListChannelsOutput if *v == nil { sv = &ListChannelsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Items": if err := awsRestjson1_deserializeDocumentChannelList(&sv.Items, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpListOriginEndpoints struct { } func (*awsRestjson1_deserializeOpListOriginEndpoints) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpListOriginEndpoints) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorListOriginEndpoints(response, &metadata) } output := &ListOriginEndpointsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentListOriginEndpointsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorListOriginEndpoints(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentListOriginEndpointsOutput(v **ListOriginEndpointsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListOriginEndpointsOutput if *v == nil { sv = &ListOriginEndpointsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Items": if err := awsRestjson1_deserializeDocumentOriginEndpointsList(&sv.Items, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpListTagsForResource struct { } func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) } output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListTagsForResourceOutput if *v == nil { sv = &ListTagsForResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { case "tags": if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpPutChannelPolicy struct { } func (*awsRestjson1_deserializeOpPutChannelPolicy) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpPutChannelPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorPutChannelPolicy(response, &metadata) } output := &PutChannelPolicyOutput{} out.Result = output return out, metadata, err } func awsRestjson1_deserializeOpErrorPutChannelPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsRestjson1_deserializeOpPutOriginEndpointPolicy struct { } func (*awsRestjson1_deserializeOpPutOriginEndpointPolicy) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpPutOriginEndpointPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorPutOriginEndpointPolicy(response, &metadata) } output := &PutOriginEndpointPolicyOutput{} out.Result = output return out, metadata, err } func awsRestjson1_deserializeOpErrorPutOriginEndpointPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsRestjson1_deserializeOpTagResource struct { } func (*awsRestjson1_deserializeOpTagResource) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) } output := &TagResourceOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsRestjson1_deserializeOpUntagResource struct { } func (*awsRestjson1_deserializeOpUntagResource) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) } output := &UntagResourceOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsRestjson1_deserializeOpUpdateChannel struct { } func (*awsRestjson1_deserializeOpUpdateChannel) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpUpdateChannel) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorUpdateChannel(response, &metadata) } output := &UpdateChannelOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentUpdateChannelOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorUpdateChannel(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentUpdateChannelOutput(v **UpdateChannelOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateChannelOutput if *v == nil { sv = &UpdateChannelOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "ChannelGroupName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.ChannelGroupName = ptr.String(jtv) } case "ChannelName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.ChannelName = ptr.String(jtv) } case "CreatedAt": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "IngestEndpoints": if err := awsRestjson1_deserializeDocumentIngestEndpointList(&sv.IngestEndpoints, value); err != nil { return err } case "ModifiedAt": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.ModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "tags": if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpUpdateChannelGroup struct { } func (*awsRestjson1_deserializeOpUpdateChannelGroup) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpUpdateChannelGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorUpdateChannelGroup(response, &metadata) } output := &UpdateChannelGroupOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentUpdateChannelGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorUpdateChannelGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentUpdateChannelGroupOutput(v **UpdateChannelGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateChannelGroupOutput if *v == nil { sv = &UpdateChannelGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "ChannelGroupName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.ChannelGroupName = ptr.String(jtv) } case "CreatedAt": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "EgressDomain": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.EgressDomain = ptr.String(jtv) } case "ModifiedAt": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.ModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "tags": if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpUpdateOriginEndpoint struct { } func (*awsRestjson1_deserializeOpUpdateOriginEndpoint) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpUpdateOriginEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorUpdateOriginEndpoint(response, &metadata) } output := &UpdateOriginEndpointOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentUpdateOriginEndpointOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorUpdateOriginEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentUpdateOriginEndpointOutput(v **UpdateOriginEndpointOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateOriginEndpointOutput if *v == nil { sv = &UpdateOriginEndpointOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "ChannelGroupName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.ChannelGroupName = ptr.String(jtv) } case "ChannelName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.ChannelName = ptr.String(jtv) } case "ContainerType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ContainerType to be of type string, got %T instead", value) } sv.ContainerType = types.ContainerType(jtv) } case "CreatedAt": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "HlsManifests": if err := awsRestjson1_deserializeDocumentGetHlsManifests(&sv.HlsManifests, value); err != nil { return err } case "LowLatencyHlsManifests": if err := awsRestjson1_deserializeDocumentGetLowLatencyHlsManifests(&sv.LowLatencyHlsManifests, value); err != nil { return err } case "ModifiedAt": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.ModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "OriginEndpointName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.OriginEndpointName = ptr.String(jtv) } case "Segment": if err := awsRestjson1_deserializeDocumentSegment(&sv.Segment, value); err != nil { return err } case "StartoverWindowSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.StartoverWindowSeconds = ptr.Int32(int32(i64)) } case "tags": if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.AccessDeniedException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ConflictException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentConflictException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.InternalServerException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ResourceNotFoundException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ServiceQuotaExceededException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentServiceQuotaExceededException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ThrottlingException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentThrottlingException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ValidationException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentValidationException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.AccessDeniedException if *v == nil { sv = &types.AccessDeniedException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentChannelGroupListConfiguration(v **types.ChannelGroupListConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ChannelGroupListConfiguration if *v == nil { sv = &types.ChannelGroupListConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "Arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "ChannelGroupName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.ChannelGroupName = ptr.String(jtv) } case "CreatedAt": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "ModifiedAt": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.ModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentChannelGroupsList(v *[]types.ChannelGroupListConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.ChannelGroupListConfiguration if *v == nil { cv = []types.ChannelGroupListConfiguration{} } else { cv = *v } for _, value := range shape { var col types.ChannelGroupListConfiguration destAddr := &col if err := awsRestjson1_deserializeDocumentChannelGroupListConfiguration(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocumentChannelList(v *[]types.ChannelListConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.ChannelListConfiguration if *v == nil { cv = []types.ChannelListConfiguration{} } else { cv = *v } for _, value := range shape { var col types.ChannelListConfiguration destAddr := &col if err := awsRestjson1_deserializeDocumentChannelListConfiguration(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocumentChannelListConfiguration(v **types.ChannelListConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ChannelListConfiguration if *v == nil { sv = &types.ChannelListConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "Arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "ChannelGroupName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.ChannelGroupName = ptr.String(jtv) } case "ChannelName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.ChannelName = ptr.String(jtv) } case "CreatedAt": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "ModifiedAt": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.ModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ConflictException if *v == nil { sv = &types.ConflictException{} } else { sv = *v } for key, value := range shape { switch key { case "ConflictExceptionType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ConflictExceptionType to be of type string, got %T instead", value) } sv.ConflictExceptionType = types.ConflictExceptionType(jtv) } case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentDrmSystems(v *[]types.DrmSystem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.DrmSystem if *v == nil { cv = []types.DrmSystem{} } else { cv = *v } for _, value := range shape { var col types.DrmSystem if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DrmSystem to be of type string, got %T instead", value) } col = types.DrmSystem(jtv) } cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocumentEncryption(v **types.Encryption, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.Encryption if *v == nil { sv = &types.Encryption{} } else { sv = *v } for key, value := range shape { switch key { case "ConstantInitializationVector": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.ConstantInitializationVector = ptr.String(jtv) } case "EncryptionMethod": if err := awsRestjson1_deserializeDocumentEncryptionMethod(&sv.EncryptionMethod, value); err != nil { return err } case "KeyRotationIntervalSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.KeyRotationIntervalSeconds = ptr.Int32(int32(i64)) } case "SpekeKeyProvider": if err := awsRestjson1_deserializeDocumentSpekeKeyProvider(&sv.SpekeKeyProvider, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentEncryptionContractConfiguration(v **types.EncryptionContractConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.EncryptionContractConfiguration if *v == nil { sv = &types.EncryptionContractConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "PresetSpeke20Audio": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PresetSpeke20Audio to be of type string, got %T instead", value) } sv.PresetSpeke20Audio = types.PresetSpeke20Audio(jtv) } case "PresetSpeke20Video": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PresetSpeke20Video to be of type string, got %T instead", value) } sv.PresetSpeke20Video = types.PresetSpeke20Video(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentEncryptionMethod(v **types.EncryptionMethod, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.EncryptionMethod if *v == nil { sv = &types.EncryptionMethod{} } else { sv = *v } for key, value := range shape { switch key { case "CmafEncryptionMethod": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected CmafEncryptionMethod to be of type string, got %T instead", value) } sv.CmafEncryptionMethod = types.CmafEncryptionMethod(jtv) } case "TsEncryptionMethod": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TsEncryptionMethod to be of type string, got %T instead", value) } sv.TsEncryptionMethod = types.TsEncryptionMethod(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentGetHlsManifestConfiguration(v **types.GetHlsManifestConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.GetHlsManifestConfiguration if *v == nil { sv = &types.GetHlsManifestConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "ChildManifestName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.ChildManifestName = ptr.String(jtv) } case "ManifestName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.ManifestName = ptr.String(jtv) } case "ManifestWindowSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ManifestWindowSeconds = ptr.Int32(int32(i64)) } case "ProgramDateTimeIntervalSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ProgramDateTimeIntervalSeconds = ptr.Int32(int32(i64)) } case "ScteHls": if err := awsRestjson1_deserializeDocumentScteHls(&sv.ScteHls, value); err != nil { return err } case "Url": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Url = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentGetHlsManifests(v *[]types.GetHlsManifestConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.GetHlsManifestConfiguration if *v == nil { cv = []types.GetHlsManifestConfiguration{} } else { cv = *v } for _, value := range shape { var col types.GetHlsManifestConfiguration destAddr := &col if err := awsRestjson1_deserializeDocumentGetHlsManifestConfiguration(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocumentGetLowLatencyHlsManifestConfiguration(v **types.GetLowLatencyHlsManifestConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.GetLowLatencyHlsManifestConfiguration if *v == nil { sv = &types.GetLowLatencyHlsManifestConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "ChildManifestName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.ChildManifestName = ptr.String(jtv) } case "ManifestName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.ManifestName = ptr.String(jtv) } case "ManifestWindowSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ManifestWindowSeconds = ptr.Int32(int32(i64)) } case "ProgramDateTimeIntervalSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ProgramDateTimeIntervalSeconds = ptr.Int32(int32(i64)) } case "ScteHls": if err := awsRestjson1_deserializeDocumentScteHls(&sv.ScteHls, value); err != nil { return err } case "Url": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Url = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentGetLowLatencyHlsManifests(v *[]types.GetLowLatencyHlsManifestConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.GetLowLatencyHlsManifestConfiguration if *v == nil { cv = []types.GetLowLatencyHlsManifestConfiguration{} } else { cv = *v } for _, value := range shape { var col types.GetLowLatencyHlsManifestConfiguration destAddr := &col if err := awsRestjson1_deserializeDocumentGetLowLatencyHlsManifestConfiguration(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocumentIngestEndpoint(v **types.IngestEndpoint, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.IngestEndpoint if *v == nil { sv = &types.IngestEndpoint{} } else { sv = *v } for key, value := range shape { switch key { case "Id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "Url": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Url = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentIngestEndpointList(v *[]types.IngestEndpoint, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.IngestEndpoint if *v == nil { cv = []types.IngestEndpoint{} } else { cv = *v } for _, value := range shape { var col types.IngestEndpoint destAddr := &col if err := awsRestjson1_deserializeDocumentIngestEndpoint(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InternalServerException if *v == nil { sv = &types.InternalServerException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentListHlsManifestConfiguration(v **types.ListHlsManifestConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ListHlsManifestConfiguration if *v == nil { sv = &types.ListHlsManifestConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "ChildManifestName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.ChildManifestName = ptr.String(jtv) } case "ManifestName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.ManifestName = ptr.String(jtv) } case "Url": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Url = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentListHlsManifests(v *[]types.ListHlsManifestConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.ListHlsManifestConfiguration if *v == nil { cv = []types.ListHlsManifestConfiguration{} } else { cv = *v } for _, value := range shape { var col types.ListHlsManifestConfiguration destAddr := &col if err := awsRestjson1_deserializeDocumentListHlsManifestConfiguration(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocumentListLowLatencyHlsManifestConfiguration(v **types.ListLowLatencyHlsManifestConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ListLowLatencyHlsManifestConfiguration if *v == nil { sv = &types.ListLowLatencyHlsManifestConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "ChildManifestName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.ChildManifestName = ptr.String(jtv) } case "ManifestName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.ManifestName = ptr.String(jtv) } case "Url": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Url = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentListLowLatencyHlsManifests(v *[]types.ListLowLatencyHlsManifestConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.ListLowLatencyHlsManifestConfiguration if *v == nil { cv = []types.ListLowLatencyHlsManifestConfiguration{} } else { cv = *v } for _, value := range shape { var col types.ListLowLatencyHlsManifestConfiguration destAddr := &col if err := awsRestjson1_deserializeDocumentListLowLatencyHlsManifestConfiguration(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocumentOriginEndpointListConfiguration(v **types.OriginEndpointListConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.OriginEndpointListConfiguration if *v == nil { sv = &types.OriginEndpointListConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "Arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "ChannelGroupName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.ChannelGroupName = ptr.String(jtv) } case "ChannelName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.ChannelName = ptr.String(jtv) } case "ContainerType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ContainerType to be of type string, got %T instead", value) } sv.ContainerType = types.ContainerType(jtv) } case "CreatedAt": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "HlsManifests": if err := awsRestjson1_deserializeDocumentListHlsManifests(&sv.HlsManifests, value); err != nil { return err } case "LowLatencyHlsManifests": if err := awsRestjson1_deserializeDocumentListLowLatencyHlsManifests(&sv.LowLatencyHlsManifests, value); err != nil { return err } case "ModifiedAt": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.ModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "OriginEndpointName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.OriginEndpointName = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentOriginEndpointsList(v *[]types.OriginEndpointListConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.OriginEndpointListConfiguration if *v == nil { cv = []types.OriginEndpointListConfiguration{} } else { cv = *v } for _, value := range shape { var col types.OriginEndpointListConfiguration destAddr := &col if err := awsRestjson1_deserializeDocumentOriginEndpointListConfiguration(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ResourceNotFoundException if *v == nil { sv = &types.ResourceNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } case "ResourceTypeNotFound": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceTypeNotFound to be of type string, got %T instead", value) } sv.ResourceTypeNotFound = types.ResourceTypeNotFound(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentScte(v **types.Scte, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.Scte if *v == nil { sv = &types.Scte{} } else { sv = *v } for key, value := range shape { switch key { case "ScteFilter": if err := awsRestjson1_deserializeDocumentScteFilterList(&sv.ScteFilter, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentScteFilterList(v *[]types.ScteFilter, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.ScteFilter if *v == nil { cv = []types.ScteFilter{} } else { cv = *v } for _, value := range shape { var col types.ScteFilter if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ScteFilter to be of type string, got %T instead", value) } col = types.ScteFilter(jtv) } cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocumentScteHls(v **types.ScteHls, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ScteHls if *v == nil { sv = &types.ScteHls{} } else { sv = *v } for key, value := range shape { switch key { case "AdMarkerHls": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AdMarkerHls to be of type string, got %T instead", value) } sv.AdMarkerHls = types.AdMarkerHls(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentSegment(v **types.Segment, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.Segment if *v == nil { sv = &types.Segment{} } else { sv = *v } for key, value := range shape { switch key { case "Encryption": if err := awsRestjson1_deserializeDocumentEncryption(&sv.Encryption, value); err != nil { return err } case "IncludeIframeOnlyStreams": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.IncludeIframeOnlyStreams = ptr.Bool(jtv) } case "Scte": if err := awsRestjson1_deserializeDocumentScte(&sv.Scte, value); err != nil { return err } case "SegmentDurationSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.SegmentDurationSeconds = ptr.Int32(int32(i64)) } case "SegmentName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.SegmentName = ptr.String(jtv) } case "TsIncludeDvbSubtitles": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.TsIncludeDvbSubtitles = ptr.Bool(jtv) } case "TsUseAudioRenditionGroup": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.TsUseAudioRenditionGroup = ptr.Bool(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ServiceQuotaExceededException if *v == nil { sv = &types.ServiceQuotaExceededException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentSpekeKeyProvider(v **types.SpekeKeyProvider, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.SpekeKeyProvider if *v == nil { sv = &types.SpekeKeyProvider{} } else { sv = *v } for key, value := range shape { switch key { case "DrmSystems": if err := awsRestjson1_deserializeDocumentDrmSystems(&sv.DrmSystems, value); err != nil { return err } case "EncryptionContractConfiguration": if err := awsRestjson1_deserializeDocumentEncryptionContractConfiguration(&sv.EncryptionContractConfiguration, value); err != nil { return err } case "ResourceId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.ResourceId = ptr.String(jtv) } case "RoleArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.RoleArn = ptr.String(jtv) } case "Url": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Url = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentTagMap(v *map[string]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var mv map[string]string if *v == nil { mv = map[string]string{} } else { mv = *v } for key, value := range shape { var parsedVal string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) } parsedVal = jtv } mv[key] = parsedVal } *v = mv return nil } func awsRestjson1_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ThrottlingException if *v == nil { sv = &types.ThrottlingException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentValidationException(v **types.ValidationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ValidationException if *v == nil { sv = &types.ValidationException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } case "ValidationExceptionType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ValidationExceptionType to be of type string, got %T instead", value) } sv.ValidationExceptionType = types.ValidationExceptionType(jtv) } default: _, _ = key, value } } *v = sv return nil }
6,103
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. // Package mediapackagev2 provides the API client, operations, and parameter types // for AWS Elemental MediaPackage v2. // // This guide is intended for creating AWS Elemental MediaPackage resources in // MediaPackage Version 2 (v2) starting from May 2023. To get started with // MediaPackage v2, create your MediaPackage resources. There isn't an automated // process to migrate your resources from MediaPackage v1 to MediaPackage v2. The // names of the entities that you use to access this API, like URLs and ARNs, all // have the versioning information added, like "v2", to distinguish from the prior // version. If you used MediaPackage prior to this release, you can't use the // MediaPackage v2 CLI or the MediaPackage v2 API to access any MediaPackage v1 // resources. If you created resources in MediaPackage v1, use video on demand // (VOD) workflows, and aren't looking to migrate to MediaPackage v2 yet, see the // MediaPackage v1 Live API Reference (https://docs.aws.amazon.com/mediapackage/latest/apireference/what-is.html) // . This is the AWS Elemental MediaPackage v2 Live REST API Reference. It // describes all the MediaPackage API operations for live content in detail, and // provides sample requests, responses, and errors for the supported web services // protocols. We assume that you have the IAM permissions that you need to use // MediaPackage via the REST API. We also assume that you are familiar with the // features and operations of MediaPackage, as described in the AWS Elemental // MediaPackage User Guide. package mediapackagev2
25
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2 import ( "context" "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" internalendpoints "github.com/aws/aws-sdk-go-v2/service/mediapackagev2/internal/endpoints" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "net/url" "strings" ) // EndpointResolverOptions is the service endpoint resolver options type EndpointResolverOptions = internalendpoints.Options // EndpointResolver interface for resolving service endpoints. type EndpointResolver interface { ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) } var _ EndpointResolver = &internalendpoints.Resolver{} // NewDefaultEndpointResolver constructs a new service endpoint resolver func NewDefaultEndpointResolver() *internalendpoints.Resolver { return internalendpoints.New() } // EndpointResolverFunc is a helper utility that wraps a function so it satisfies // the EndpointResolver interface. This is useful when you want to add additional // endpoint resolving logic, or stub out specific endpoints with custom values. type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { return fn(region, options) } func resolveDefaultEndpointConfiguration(o *Options) { if o.EndpointResolver != nil { return } o.EndpointResolver = NewDefaultEndpointResolver() } // EndpointResolverFromURL returns an EndpointResolver configured using the // provided endpoint url. By default, the resolved endpoint resolver uses the // client region as signing region, and the endpoint source is set to // EndpointSourceCustom.You can provide functional options to configure endpoint // values for the resolved endpoint. func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} for _, fn := range optFns { fn(&e) } return EndpointResolverFunc( func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { if len(e.SigningRegion) == 0 { e.SigningRegion = region } return e, nil }, ) } type ResolveEndpoint struct { Resolver EndpointResolver Options EndpointResolverOptions } func (*ResolveEndpoint) ID() string { return "ResolveEndpoint" } func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) } if m.Resolver == nil { return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") } eo := m.Options eo.Logger = middleware.GetLogger(ctx) var endpoint aws.Endpoint endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) if err != nil { return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) } req.URL, err = url.Parse(endpoint.URL) if err != nil { return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) } if len(awsmiddleware.GetSigningName(ctx)) == 0 { signingName := endpoint.SigningName if len(signingName) == 0 { signingName = "mediapackagev2" } ctx = awsmiddleware.SetSigningName(ctx, signingName) } ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) return next.HandleSerialize(ctx, in) } func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { return stack.Serialize.Insert(&ResolveEndpoint{ Resolver: o.EndpointResolver, Options: o.EndpointOptions, }, "OperationSerializer", middleware.Before) } func removeResolveEndpointMiddleware(stack *middleware.Stack) error { _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) return err } type wrappedEndpointResolver struct { awsResolver aws.EndpointResolverWithOptions resolver EndpointResolver } func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { if w.awsResolver == nil { goto fallback } endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options) if err == nil { return endpoint, nil } if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) { return endpoint, err } fallback: if w.resolver == nil { return endpoint, fmt.Errorf("default endpoint resolver provided was nil") } return w.resolver.ResolveEndpoint(region, options) } type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { return a(service, region) } var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) // withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver. // If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided // fallbackResolver for resolution. // // fallbackResolver must not be nil func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver { var resolver aws.EndpointResolverWithOptions if awsResolverWithOptions != nil { resolver = awsResolverWithOptions } else if awsResolver != nil { resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) } return &wrappedEndpointResolver{ awsResolver: resolver, resolver: fallbackResolver, } } func finalizeClientEndpointResolverOptions(options *Options) { options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() if len(options.EndpointOptions.ResolvedRegion) == 0 { const fipsInfix = "-fips-" const fipsPrefix = "fips-" const fipsSuffix = "-fips" if strings.Contains(options.Region, fipsInfix) || strings.Contains(options.Region, fipsPrefix) || strings.Contains(options.Region, fipsSuffix) { options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled } } }
201
aws-sdk-go-v2
aws
Go
// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. package mediapackagev2 // goModuleVersion is the tagged release for this module const goModuleVersion = "1.0.3"
7
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2
4
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2 import ( "bytes" "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/mediapackagev2/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) type awsRestjson1_serializeOpCreateChannel struct { } func (*awsRestjson1_serializeOpCreateChannel) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpCreateChannel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateChannelInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/channelGroup/{ChannelGroupName}/channel") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsCreateChannelInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentCreateChannelInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsCreateChannelInput(v *CreateChannelInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ChannelGroupName == nil || len(*v.ChannelGroupName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelGroupName must not be empty")} } if v.ChannelGroupName != nil { if err := encoder.SetURI("ChannelGroupName").String(*v.ChannelGroupName); err != nil { return err } } if v.ClientToken != nil && len(*v.ClientToken) > 0 { locationName := "X-Amzn-Client-Token" encoder.SetHeader(locationName).String(*v.ClientToken) } return nil } func awsRestjson1_serializeOpDocumentCreateChannelInput(v *CreateChannelInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChannelName != nil { ok := object.Key("ChannelName") ok.String(*v.ChannelName) } if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.Tags != nil { ok := object.Key("tags") if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpCreateChannelGroup struct { } func (*awsRestjson1_serializeOpCreateChannelGroup) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpCreateChannelGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateChannelGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/channelGroup") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsCreateChannelGroupInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentCreateChannelGroupInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsCreateChannelGroupInput(v *CreateChannelGroupInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ClientToken != nil && len(*v.ClientToken) > 0 { locationName := "X-Amzn-Client-Token" encoder.SetHeader(locationName).String(*v.ClientToken) } return nil } func awsRestjson1_serializeOpDocumentCreateChannelGroupInput(v *CreateChannelGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChannelGroupName != nil { ok := object.Key("ChannelGroupName") ok.String(*v.ChannelGroupName) } if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.Tags != nil { ok := object.Key("tags") if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpCreateOriginEndpoint struct { } func (*awsRestjson1_serializeOpCreateOriginEndpoint) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpCreateOriginEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateOriginEndpointInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsCreateOriginEndpointInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentCreateOriginEndpointInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsCreateOriginEndpointInput(v *CreateOriginEndpointInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ChannelGroupName == nil || len(*v.ChannelGroupName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelGroupName must not be empty")} } if v.ChannelGroupName != nil { if err := encoder.SetURI("ChannelGroupName").String(*v.ChannelGroupName); err != nil { return err } } if v.ChannelName == nil || len(*v.ChannelName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelName must not be empty")} } if v.ChannelName != nil { if err := encoder.SetURI("ChannelName").String(*v.ChannelName); err != nil { return err } } if v.ClientToken != nil && len(*v.ClientToken) > 0 { locationName := "X-Amzn-Client-Token" encoder.SetHeader(locationName).String(*v.ClientToken) } return nil } func awsRestjson1_serializeOpDocumentCreateOriginEndpointInput(v *CreateOriginEndpointInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.ContainerType) > 0 { ok := object.Key("ContainerType") ok.String(string(v.ContainerType)) } if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.HlsManifests != nil { ok := object.Key("HlsManifests") if err := awsRestjson1_serializeDocumentCreateHlsManifests(v.HlsManifests, ok); err != nil { return err } } if v.LowLatencyHlsManifests != nil { ok := object.Key("LowLatencyHlsManifests") if err := awsRestjson1_serializeDocumentCreateLowLatencyHlsManifests(v.LowLatencyHlsManifests, ok); err != nil { return err } } if v.OriginEndpointName != nil { ok := object.Key("OriginEndpointName") ok.String(*v.OriginEndpointName) } if v.Segment != nil { ok := object.Key("Segment") if err := awsRestjson1_serializeDocumentSegment(v.Segment, ok); err != nil { return err } } if v.StartoverWindowSeconds != nil { ok := object.Key("StartoverWindowSeconds") ok.Integer(*v.StartoverWindowSeconds) } if v.Tags != nil { ok := object.Key("Tags") if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpDeleteChannel struct { } func (*awsRestjson1_serializeOpDeleteChannel) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteChannel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteChannelInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/channelGroup/{ChannelGroupName}/channel/{ChannelName}/") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsDeleteChannelInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsDeleteChannelInput(v *DeleteChannelInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ChannelGroupName == nil || len(*v.ChannelGroupName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelGroupName must not be empty")} } if v.ChannelGroupName != nil { if err := encoder.SetURI("ChannelGroupName").String(*v.ChannelGroupName); err != nil { return err } } if v.ChannelName == nil || len(*v.ChannelName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelName must not be empty")} } if v.ChannelName != nil { if err := encoder.SetURI("ChannelName").String(*v.ChannelName); err != nil { return err } } return nil } type awsRestjson1_serializeOpDeleteChannelGroup struct { } func (*awsRestjson1_serializeOpDeleteChannelGroup) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteChannelGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteChannelGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/channelGroup/{ChannelGroupName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsDeleteChannelGroupInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsDeleteChannelGroupInput(v *DeleteChannelGroupInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ChannelGroupName == nil || len(*v.ChannelGroupName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelGroupName must not be empty")} } if v.ChannelGroupName != nil { if err := encoder.SetURI("ChannelGroupName").String(*v.ChannelGroupName); err != nil { return err } } return nil } type awsRestjson1_serializeOpDeleteChannelPolicy struct { } func (*awsRestjson1_serializeOpDeleteChannelPolicy) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteChannelPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteChannelPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/channelGroup/{ChannelGroupName}/channel/{ChannelName}/policy") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsDeleteChannelPolicyInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsDeleteChannelPolicyInput(v *DeleteChannelPolicyInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ChannelGroupName == nil || len(*v.ChannelGroupName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelGroupName must not be empty")} } if v.ChannelGroupName != nil { if err := encoder.SetURI("ChannelGroupName").String(*v.ChannelGroupName); err != nil { return err } } if v.ChannelName == nil || len(*v.ChannelName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelName must not be empty")} } if v.ChannelName != nil { if err := encoder.SetURI("ChannelName").String(*v.ChannelName); err != nil { return err } } return nil } type awsRestjson1_serializeOpDeleteOriginEndpoint struct { } func (*awsRestjson1_serializeOpDeleteOriginEndpoint) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteOriginEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteOriginEndpointInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsDeleteOriginEndpointInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsDeleteOriginEndpointInput(v *DeleteOriginEndpointInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ChannelGroupName == nil || len(*v.ChannelGroupName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelGroupName must not be empty")} } if v.ChannelGroupName != nil { if err := encoder.SetURI("ChannelGroupName").String(*v.ChannelGroupName); err != nil { return err } } if v.ChannelName == nil || len(*v.ChannelName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelName must not be empty")} } if v.ChannelName != nil { if err := encoder.SetURI("ChannelName").String(*v.ChannelName); err != nil { return err } } if v.OriginEndpointName == nil || len(*v.OriginEndpointName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member OriginEndpointName must not be empty")} } if v.OriginEndpointName != nil { if err := encoder.SetURI("OriginEndpointName").String(*v.OriginEndpointName); err != nil { return err } } return nil } type awsRestjson1_serializeOpDeleteOriginEndpointPolicy struct { } func (*awsRestjson1_serializeOpDeleteOriginEndpointPolicy) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteOriginEndpointPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteOriginEndpointPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}/policy") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsDeleteOriginEndpointPolicyInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsDeleteOriginEndpointPolicyInput(v *DeleteOriginEndpointPolicyInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ChannelGroupName == nil || len(*v.ChannelGroupName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelGroupName must not be empty")} } if v.ChannelGroupName != nil { if err := encoder.SetURI("ChannelGroupName").String(*v.ChannelGroupName); err != nil { return err } } if v.ChannelName == nil || len(*v.ChannelName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelName must not be empty")} } if v.ChannelName != nil { if err := encoder.SetURI("ChannelName").String(*v.ChannelName); err != nil { return err } } if v.OriginEndpointName == nil || len(*v.OriginEndpointName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member OriginEndpointName must not be empty")} } if v.OriginEndpointName != nil { if err := encoder.SetURI("OriginEndpointName").String(*v.OriginEndpointName); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetChannel struct { } func (*awsRestjson1_serializeOpGetChannel) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetChannel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetChannelInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/channelGroup/{ChannelGroupName}/channel/{ChannelName}/") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsGetChannelInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsGetChannelInput(v *GetChannelInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ChannelGroupName == nil || len(*v.ChannelGroupName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelGroupName must not be empty")} } if v.ChannelGroupName != nil { if err := encoder.SetURI("ChannelGroupName").String(*v.ChannelGroupName); err != nil { return err } } if v.ChannelName == nil || len(*v.ChannelName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelName must not be empty")} } if v.ChannelName != nil { if err := encoder.SetURI("ChannelName").String(*v.ChannelName); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetChannelGroup struct { } func (*awsRestjson1_serializeOpGetChannelGroup) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetChannelGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetChannelGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/channelGroup/{ChannelGroupName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsGetChannelGroupInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsGetChannelGroupInput(v *GetChannelGroupInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ChannelGroupName == nil || len(*v.ChannelGroupName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelGroupName must not be empty")} } if v.ChannelGroupName != nil { if err := encoder.SetURI("ChannelGroupName").String(*v.ChannelGroupName); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetChannelPolicy struct { } func (*awsRestjson1_serializeOpGetChannelPolicy) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetChannelPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetChannelPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/channelGroup/{ChannelGroupName}/channel/{ChannelName}/policy") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsGetChannelPolicyInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsGetChannelPolicyInput(v *GetChannelPolicyInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ChannelGroupName == nil || len(*v.ChannelGroupName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelGroupName must not be empty")} } if v.ChannelGroupName != nil { if err := encoder.SetURI("ChannelGroupName").String(*v.ChannelGroupName); err != nil { return err } } if v.ChannelName == nil || len(*v.ChannelName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelName must not be empty")} } if v.ChannelName != nil { if err := encoder.SetURI("ChannelName").String(*v.ChannelName); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetOriginEndpoint struct { } func (*awsRestjson1_serializeOpGetOriginEndpoint) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetOriginEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetOriginEndpointInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsGetOriginEndpointInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsGetOriginEndpointInput(v *GetOriginEndpointInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ChannelGroupName == nil || len(*v.ChannelGroupName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelGroupName must not be empty")} } if v.ChannelGroupName != nil { if err := encoder.SetURI("ChannelGroupName").String(*v.ChannelGroupName); err != nil { return err } } if v.ChannelName == nil || len(*v.ChannelName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelName must not be empty")} } if v.ChannelName != nil { if err := encoder.SetURI("ChannelName").String(*v.ChannelName); err != nil { return err } } if v.OriginEndpointName == nil || len(*v.OriginEndpointName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member OriginEndpointName must not be empty")} } if v.OriginEndpointName != nil { if err := encoder.SetURI("OriginEndpointName").String(*v.OriginEndpointName); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetOriginEndpointPolicy struct { } func (*awsRestjson1_serializeOpGetOriginEndpointPolicy) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetOriginEndpointPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*GetOriginEndpointPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}/policy") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsGetOriginEndpointPolicyInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsGetOriginEndpointPolicyInput(v *GetOriginEndpointPolicyInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ChannelGroupName == nil || len(*v.ChannelGroupName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelGroupName must not be empty")} } if v.ChannelGroupName != nil { if err := encoder.SetURI("ChannelGroupName").String(*v.ChannelGroupName); err != nil { return err } } if v.ChannelName == nil || len(*v.ChannelName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelName must not be empty")} } if v.ChannelName != nil { if err := encoder.SetURI("ChannelName").String(*v.ChannelName); err != nil { return err } } if v.OriginEndpointName == nil || len(*v.OriginEndpointName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member OriginEndpointName must not be empty")} } if v.OriginEndpointName != nil { if err := encoder.SetURI("OriginEndpointName").String(*v.OriginEndpointName); err != nil { return err } } return nil } type awsRestjson1_serializeOpListChannelGroups struct { } func (*awsRestjson1_serializeOpListChannelGroups) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpListChannelGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListChannelGroupsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/channelGroup") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsListChannelGroupsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsListChannelGroupsInput(v *ListChannelGroupsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.MaxResults != nil { encoder.SetQuery("maxResults").Integer(*v.MaxResults) } if v.NextToken != nil { encoder.SetQuery("nextToken").String(*v.NextToken) } return nil } type awsRestjson1_serializeOpListChannels struct { } func (*awsRestjson1_serializeOpListChannels) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpListChannels) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListChannelsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/channelGroup/{ChannelGroupName}/channel") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsListChannelsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsListChannelsInput(v *ListChannelsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ChannelGroupName == nil || len(*v.ChannelGroupName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelGroupName must not be empty")} } if v.ChannelGroupName != nil { if err := encoder.SetURI("ChannelGroupName").String(*v.ChannelGroupName); err != nil { return err } } if v.MaxResults != nil { encoder.SetQuery("maxResults").Integer(*v.MaxResults) } if v.NextToken != nil { encoder.SetQuery("nextToken").String(*v.NextToken) } return nil } type awsRestjson1_serializeOpListOriginEndpoints struct { } func (*awsRestjson1_serializeOpListOriginEndpoints) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpListOriginEndpoints) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListOriginEndpointsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsListOriginEndpointsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsListOriginEndpointsInput(v *ListOriginEndpointsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ChannelGroupName == nil || len(*v.ChannelGroupName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelGroupName must not be empty")} } if v.ChannelGroupName != nil { if err := encoder.SetURI("ChannelGroupName").String(*v.ChannelGroupName); err != nil { return err } } if v.ChannelName == nil || len(*v.ChannelName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelName must not be empty")} } if v.ChannelName != nil { if err := encoder.SetURI("ChannelName").String(*v.ChannelName); err != nil { return err } } if v.MaxResults != nil { encoder.SetQuery("maxResults").Integer(*v.MaxResults) } if v.NextToken != nil { encoder.SetQuery("nextToken").String(*v.NextToken) } return nil } type awsRestjson1_serializeOpListTagsForResource struct { } func (*awsRestjson1_serializeOpListTagsForResource) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListTagsForResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} } if v.ResourceArn != nil { if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { return err } } return nil } type awsRestjson1_serializeOpPutChannelPolicy struct { } func (*awsRestjson1_serializeOpPutChannelPolicy) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpPutChannelPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*PutChannelPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/channelGroup/{ChannelGroupName}/channel/{ChannelName}/policy") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PUT" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsPutChannelPolicyInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentPutChannelPolicyInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsPutChannelPolicyInput(v *PutChannelPolicyInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ChannelGroupName == nil || len(*v.ChannelGroupName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelGroupName must not be empty")} } if v.ChannelGroupName != nil { if err := encoder.SetURI("ChannelGroupName").String(*v.ChannelGroupName); err != nil { return err } } if v.ChannelName == nil || len(*v.ChannelName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelName must not be empty")} } if v.ChannelName != nil { if err := encoder.SetURI("ChannelName").String(*v.ChannelName); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentPutChannelPolicyInput(v *PutChannelPolicyInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Policy != nil { ok := object.Key("Policy") ok.String(*v.Policy) } return nil } type awsRestjson1_serializeOpPutOriginEndpointPolicy struct { } func (*awsRestjson1_serializeOpPutOriginEndpointPolicy) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpPutOriginEndpointPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*PutOriginEndpointPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}/policy") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsPutOriginEndpointPolicyInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentPutOriginEndpointPolicyInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsPutOriginEndpointPolicyInput(v *PutOriginEndpointPolicyInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ChannelGroupName == nil || len(*v.ChannelGroupName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelGroupName must not be empty")} } if v.ChannelGroupName != nil { if err := encoder.SetURI("ChannelGroupName").String(*v.ChannelGroupName); err != nil { return err } } if v.ChannelName == nil || len(*v.ChannelName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelName must not be empty")} } if v.ChannelName != nil { if err := encoder.SetURI("ChannelName").String(*v.ChannelName); err != nil { return err } } if v.OriginEndpointName == nil || len(*v.OriginEndpointName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member OriginEndpointName must not be empty")} } if v.OriginEndpointName != nil { if err := encoder.SetURI("OriginEndpointName").String(*v.OriginEndpointName); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentPutOriginEndpointPolicyInput(v *PutOriginEndpointPolicyInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Policy != nil { ok := object.Key("Policy") ok.String(*v.Policy) } return nil } type awsRestjson1_serializeOpTagResource struct { } func (*awsRestjson1_serializeOpTagResource) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*TagResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} } if v.ResourceArn != nil { if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Tags != nil { ok := object.Key("tags") if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpUntagResource struct { } func (*awsRestjson1_serializeOpUntagResource) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UntagResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} } if v.ResourceArn != nil { if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { return err } } if v.TagKeys != nil { for i := range v.TagKeys { encoder.AddQuery("tagKeys").String(v.TagKeys[i]) } } return nil } type awsRestjson1_serializeOpUpdateChannel struct { } func (*awsRestjson1_serializeOpUpdateChannel) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateChannel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateChannelInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/channelGroup/{ChannelGroupName}/channel/{ChannelName}/") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PUT" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsUpdateChannelInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateChannelInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsUpdateChannelInput(v *UpdateChannelInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ChannelGroupName == nil || len(*v.ChannelGroupName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelGroupName must not be empty")} } if v.ChannelGroupName != nil { if err := encoder.SetURI("ChannelGroupName").String(*v.ChannelGroupName); err != nil { return err } } if v.ChannelName == nil || len(*v.ChannelName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelName must not be empty")} } if v.ChannelName != nil { if err := encoder.SetURI("ChannelName").String(*v.ChannelName); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentUpdateChannelInput(v *UpdateChannelInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } return nil } type awsRestjson1_serializeOpUpdateChannelGroup struct { } func (*awsRestjson1_serializeOpUpdateChannelGroup) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateChannelGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateChannelGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/channelGroup/{ChannelGroupName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PUT" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsUpdateChannelGroupInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateChannelGroupInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsUpdateChannelGroupInput(v *UpdateChannelGroupInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ChannelGroupName == nil || len(*v.ChannelGroupName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelGroupName must not be empty")} } if v.ChannelGroupName != nil { if err := encoder.SetURI("ChannelGroupName").String(*v.ChannelGroupName); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentUpdateChannelGroupInput(v *UpdateChannelGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } return nil } type awsRestjson1_serializeOpUpdateOriginEndpoint struct { } func (*awsRestjson1_serializeOpUpdateOriginEndpoint) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateOriginEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateOriginEndpointInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PUT" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if err := awsRestjson1_serializeOpHttpBindingsUpdateOriginEndpointInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateOriginEndpointInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsUpdateOriginEndpointInput(v *UpdateOriginEndpointInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ChannelGroupName == nil || len(*v.ChannelGroupName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelGroupName must not be empty")} } if v.ChannelGroupName != nil { if err := encoder.SetURI("ChannelGroupName").String(*v.ChannelGroupName); err != nil { return err } } if v.ChannelName == nil || len(*v.ChannelName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelName must not be empty")} } if v.ChannelName != nil { if err := encoder.SetURI("ChannelName").String(*v.ChannelName); err != nil { return err } } if v.OriginEndpointName == nil || len(*v.OriginEndpointName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member OriginEndpointName must not be empty")} } if v.OriginEndpointName != nil { if err := encoder.SetURI("OriginEndpointName").String(*v.OriginEndpointName); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentUpdateOriginEndpointInput(v *UpdateOriginEndpointInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.ContainerType) > 0 { ok := object.Key("ContainerType") ok.String(string(v.ContainerType)) } if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.HlsManifests != nil { ok := object.Key("HlsManifests") if err := awsRestjson1_serializeDocumentCreateHlsManifests(v.HlsManifests, ok); err != nil { return err } } if v.LowLatencyHlsManifests != nil { ok := object.Key("LowLatencyHlsManifests") if err := awsRestjson1_serializeDocumentCreateLowLatencyHlsManifests(v.LowLatencyHlsManifests, ok); err != nil { return err } } if v.Segment != nil { ok := object.Key("Segment") if err := awsRestjson1_serializeDocumentSegment(v.Segment, ok); err != nil { return err } } if v.StartoverWindowSeconds != nil { ok := object.Key("StartoverWindowSeconds") ok.Integer(*v.StartoverWindowSeconds) } return nil } func awsRestjson1_serializeDocumentCreateHlsManifestConfiguration(v *types.CreateHlsManifestConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChildManifestName != nil { ok := object.Key("ChildManifestName") ok.String(*v.ChildManifestName) } if v.ManifestName != nil { ok := object.Key("ManifestName") ok.String(*v.ManifestName) } if v.ManifestWindowSeconds != nil { ok := object.Key("ManifestWindowSeconds") ok.Integer(*v.ManifestWindowSeconds) } if v.ProgramDateTimeIntervalSeconds != nil { ok := object.Key("ProgramDateTimeIntervalSeconds") ok.Integer(*v.ProgramDateTimeIntervalSeconds) } if v.ScteHls != nil { ok := object.Key("ScteHls") if err := awsRestjson1_serializeDocumentScteHls(v.ScteHls, ok); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentCreateHlsManifests(v []types.CreateHlsManifestConfiguration, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsRestjson1_serializeDocumentCreateHlsManifestConfiguration(&v[i], av); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentCreateLowLatencyHlsManifestConfiguration(v *types.CreateLowLatencyHlsManifestConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChildManifestName != nil { ok := object.Key("ChildManifestName") ok.String(*v.ChildManifestName) } if v.ManifestName != nil { ok := object.Key("ManifestName") ok.String(*v.ManifestName) } if v.ManifestWindowSeconds != nil { ok := object.Key("ManifestWindowSeconds") ok.Integer(*v.ManifestWindowSeconds) } if v.ProgramDateTimeIntervalSeconds != nil { ok := object.Key("ProgramDateTimeIntervalSeconds") ok.Integer(*v.ProgramDateTimeIntervalSeconds) } if v.ScteHls != nil { ok := object.Key("ScteHls") if err := awsRestjson1_serializeDocumentScteHls(v.ScteHls, ok); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentCreateLowLatencyHlsManifests(v []types.CreateLowLatencyHlsManifestConfiguration, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsRestjson1_serializeDocumentCreateLowLatencyHlsManifestConfiguration(&v[i], av); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentDrmSystems(v []types.DrmSystem, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(string(v[i])) } return nil } func awsRestjson1_serializeDocumentEncryption(v *types.Encryption, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ConstantInitializationVector != nil { ok := object.Key("ConstantInitializationVector") ok.String(*v.ConstantInitializationVector) } if v.EncryptionMethod != nil { ok := object.Key("EncryptionMethod") if err := awsRestjson1_serializeDocumentEncryptionMethod(v.EncryptionMethod, ok); err != nil { return err } } if v.KeyRotationIntervalSeconds != nil { ok := object.Key("KeyRotationIntervalSeconds") ok.Integer(*v.KeyRotationIntervalSeconds) } if v.SpekeKeyProvider != nil { ok := object.Key("SpekeKeyProvider") if err := awsRestjson1_serializeDocumentSpekeKeyProvider(v.SpekeKeyProvider, ok); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentEncryptionContractConfiguration(v *types.EncryptionContractConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.PresetSpeke20Audio) > 0 { ok := object.Key("PresetSpeke20Audio") ok.String(string(v.PresetSpeke20Audio)) } if len(v.PresetSpeke20Video) > 0 { ok := object.Key("PresetSpeke20Video") ok.String(string(v.PresetSpeke20Video)) } return nil } func awsRestjson1_serializeDocumentEncryptionMethod(v *types.EncryptionMethod, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.CmafEncryptionMethod) > 0 { ok := object.Key("CmafEncryptionMethod") ok.String(string(v.CmafEncryptionMethod)) } if len(v.TsEncryptionMethod) > 0 { ok := object.Key("TsEncryptionMethod") ok.String(string(v.TsEncryptionMethod)) } return nil } func awsRestjson1_serializeDocumentScte(v *types.Scte, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ScteFilter != nil { ok := object.Key("ScteFilter") if err := awsRestjson1_serializeDocumentScteFilterList(v.ScteFilter, ok); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentScteFilterList(v []types.ScteFilter, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(string(v[i])) } return nil } func awsRestjson1_serializeDocumentScteHls(v *types.ScteHls, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.AdMarkerHls) > 0 { ok := object.Key("AdMarkerHls") ok.String(string(v.AdMarkerHls)) } return nil } func awsRestjson1_serializeDocumentSegment(v *types.Segment, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Encryption != nil { ok := object.Key("Encryption") if err := awsRestjson1_serializeDocumentEncryption(v.Encryption, ok); err != nil { return err } } if v.IncludeIframeOnlyStreams != nil { ok := object.Key("IncludeIframeOnlyStreams") ok.Boolean(*v.IncludeIframeOnlyStreams) } if v.Scte != nil { ok := object.Key("Scte") if err := awsRestjson1_serializeDocumentScte(v.Scte, ok); err != nil { return err } } if v.SegmentDurationSeconds != nil { ok := object.Key("SegmentDurationSeconds") ok.Integer(*v.SegmentDurationSeconds) } if v.SegmentName != nil { ok := object.Key("SegmentName") ok.String(*v.SegmentName) } if v.TsIncludeDvbSubtitles != nil { ok := object.Key("TsIncludeDvbSubtitles") ok.Boolean(*v.TsIncludeDvbSubtitles) } if v.TsUseAudioRenditionGroup != nil { ok := object.Key("TsUseAudioRenditionGroup") ok.Boolean(*v.TsUseAudioRenditionGroup) } return nil } func awsRestjson1_serializeDocumentSpekeKeyProvider(v *types.SpekeKeyProvider, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DrmSystems != nil { ok := object.Key("DrmSystems") if err := awsRestjson1_serializeDocumentDrmSystems(v.DrmSystems, ok); err != nil { return err } } if v.EncryptionContractConfiguration != nil { ok := object.Key("EncryptionContractConfiguration") if err := awsRestjson1_serializeDocumentEncryptionContractConfiguration(v.EncryptionContractConfiguration, ok); err != nil { return err } } if v.ResourceId != nil { ok := object.Key("ResourceId") ok.String(*v.ResourceId) } if v.RoleArn != nil { ok := object.Key("RoleArn") ok.String(*v.RoleArn) } if v.Url != nil { ok := object.Key("Url") ok.String(*v.Url) } return nil } func awsRestjson1_serializeDocumentTagMap(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() for key := range v { om := object.Key(key) om.String(v[key]) } return nil }
2,222
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagev2 import ( "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/mediapackagev2/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" ) type validateOpCreateChannelGroup struct { } func (*validateOpCreateChannelGroup) ID() string { return "OperationInputValidation" } func (m *validateOpCreateChannelGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateChannelGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateChannelGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateChannel struct { } func (*validateOpCreateChannel) ID() string { return "OperationInputValidation" } func (m *validateOpCreateChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateChannelInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateChannelInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateOriginEndpoint struct { } func (*validateOpCreateOriginEndpoint) ID() string { return "OperationInputValidation" } func (m *validateOpCreateOriginEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateOriginEndpointInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateOriginEndpointInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteChannelGroup struct { } func (*validateOpDeleteChannelGroup) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteChannelGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteChannelGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteChannelGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteChannel struct { } func (*validateOpDeleteChannel) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteChannelInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteChannelInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteChannelPolicy struct { } func (*validateOpDeleteChannelPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteChannelPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteChannelPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteChannelPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteOriginEndpoint struct { } func (*validateOpDeleteOriginEndpoint) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteOriginEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteOriginEndpointInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteOriginEndpointInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteOriginEndpointPolicy struct { } func (*validateOpDeleteOriginEndpointPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteOriginEndpointPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteOriginEndpointPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteOriginEndpointPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetChannelGroup struct { } func (*validateOpGetChannelGroup) ID() string { return "OperationInputValidation" } func (m *validateOpGetChannelGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetChannelGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetChannelGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetChannel struct { } func (*validateOpGetChannel) ID() string { return "OperationInputValidation" } func (m *validateOpGetChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetChannelInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetChannelInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetChannelPolicy struct { } func (*validateOpGetChannelPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpGetChannelPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetChannelPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetChannelPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetOriginEndpoint struct { } func (*validateOpGetOriginEndpoint) ID() string { return "OperationInputValidation" } func (m *validateOpGetOriginEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetOriginEndpointInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetOriginEndpointInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetOriginEndpointPolicy struct { } func (*validateOpGetOriginEndpointPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpGetOriginEndpointPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetOriginEndpointPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetOriginEndpointPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListChannels struct { } func (*validateOpListChannels) ID() string { return "OperationInputValidation" } func (m *validateOpListChannels) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListChannelsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListChannelsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListOriginEndpoints struct { } func (*validateOpListOriginEndpoints) ID() string { return "OperationInputValidation" } func (m *validateOpListOriginEndpoints) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListOriginEndpointsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListOriginEndpointsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListTagsForResource struct { } func (*validateOpListTagsForResource) ID() string { return "OperationInputValidation" } func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListTagsForResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListTagsForResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpPutChannelPolicy struct { } func (*validateOpPutChannelPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpPutChannelPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*PutChannelPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpPutChannelPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpPutOriginEndpointPolicy struct { } func (*validateOpPutOriginEndpointPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpPutOriginEndpointPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*PutOriginEndpointPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpPutOriginEndpointPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpTagResource struct { } func (*validateOpTagResource) ID() string { return "OperationInputValidation" } func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*TagResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpTagResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUntagResource struct { } func (*validateOpUntagResource) ID() string { return "OperationInputValidation" } func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UntagResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUntagResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateChannelGroup struct { } func (*validateOpUpdateChannelGroup) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateChannelGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateChannelGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateChannelGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateChannel struct { } func (*validateOpUpdateChannel) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateChannelInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateChannelInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateOriginEndpoint struct { } func (*validateOpUpdateOriginEndpoint) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateOriginEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateOriginEndpointInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateOriginEndpointInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } func addOpCreateChannelGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateChannelGroup{}, middleware.After) } func addOpCreateChannelValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateChannel{}, middleware.After) } func addOpCreateOriginEndpointValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateOriginEndpoint{}, middleware.After) } func addOpDeleteChannelGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteChannelGroup{}, middleware.After) } func addOpDeleteChannelValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteChannel{}, middleware.After) } func addOpDeleteChannelPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteChannelPolicy{}, middleware.After) } func addOpDeleteOriginEndpointValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteOriginEndpoint{}, middleware.After) } func addOpDeleteOriginEndpointPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteOriginEndpointPolicy{}, middleware.After) } func addOpGetChannelGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetChannelGroup{}, middleware.After) } func addOpGetChannelValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetChannel{}, middleware.After) } func addOpGetChannelPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetChannelPolicy{}, middleware.After) } func addOpGetOriginEndpointValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetOriginEndpoint{}, middleware.After) } func addOpGetOriginEndpointPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetOriginEndpointPolicy{}, middleware.After) } func addOpListChannelsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListChannels{}, middleware.After) } func addOpListOriginEndpointsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListOriginEndpoints{}, middleware.After) } func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } func addOpPutChannelPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPutChannelPolicy{}, middleware.After) } func addOpPutOriginEndpointPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPutOriginEndpointPolicy{}, middleware.After) } func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) } func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) } func addOpUpdateChannelGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateChannelGroup{}, middleware.After) } func addOpUpdateChannelValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateChannel{}, middleware.After) } func addOpUpdateOriginEndpointValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateOriginEndpoint{}, middleware.After) } func validateCreateHlsManifestConfiguration(v *types.CreateHlsManifestConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateHlsManifestConfiguration"} if v.ManifestName == nil { invalidParams.Add(smithy.NewErrParamRequired("ManifestName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateCreateHlsManifests(v []types.CreateHlsManifestConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateHlsManifests"} for i := range v { if err := validateCreateHlsManifestConfiguration(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateCreateLowLatencyHlsManifestConfiguration(v *types.CreateLowLatencyHlsManifestConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateLowLatencyHlsManifestConfiguration"} if v.ManifestName == nil { invalidParams.Add(smithy.NewErrParamRequired("ManifestName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateCreateLowLatencyHlsManifests(v []types.CreateLowLatencyHlsManifestConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateLowLatencyHlsManifests"} for i := range v { if err := validateCreateLowLatencyHlsManifestConfiguration(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateEncryption(v *types.Encryption) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Encryption"} if v.EncryptionMethod == nil { invalidParams.Add(smithy.NewErrParamRequired("EncryptionMethod")) } if v.SpekeKeyProvider == nil { invalidParams.Add(smithy.NewErrParamRequired("SpekeKeyProvider")) } else if v.SpekeKeyProvider != nil { if err := validateSpekeKeyProvider(v.SpekeKeyProvider); err != nil { invalidParams.AddNested("SpekeKeyProvider", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateEncryptionContractConfiguration(v *types.EncryptionContractConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "EncryptionContractConfiguration"} if len(v.PresetSpeke20Audio) == 0 { invalidParams.Add(smithy.NewErrParamRequired("PresetSpeke20Audio")) } if len(v.PresetSpeke20Video) == 0 { invalidParams.Add(smithy.NewErrParamRequired("PresetSpeke20Video")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSegment(v *types.Segment) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Segment"} if v.Encryption != nil { if err := validateEncryption(v.Encryption); err != nil { invalidParams.AddNested("Encryption", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSpekeKeyProvider(v *types.SpekeKeyProvider) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SpekeKeyProvider"} if v.EncryptionContractConfiguration == nil { invalidParams.Add(smithy.NewErrParamRequired("EncryptionContractConfiguration")) } else if v.EncryptionContractConfiguration != nil { if err := validateEncryptionContractConfiguration(v.EncryptionContractConfiguration); err != nil { invalidParams.AddNested("EncryptionContractConfiguration", err.(smithy.InvalidParamsError)) } } if v.ResourceId == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) } if v.DrmSystems == nil { invalidParams.Add(smithy.NewErrParamRequired("DrmSystems")) } if v.RoleArn == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) } if v.Url == nil { invalidParams.Add(smithy.NewErrParamRequired("Url")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateChannelGroupInput(v *CreateChannelGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateChannelGroupInput"} if v.ChannelGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelGroupName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateChannelInput(v *CreateChannelInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateChannelInput"} if v.ChannelGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelGroupName")) } if v.ChannelName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateOriginEndpointInput(v *CreateOriginEndpointInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateOriginEndpointInput"} if v.ChannelGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelGroupName")) } if v.ChannelName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelName")) } if v.OriginEndpointName == nil { invalidParams.Add(smithy.NewErrParamRequired("OriginEndpointName")) } if len(v.ContainerType) == 0 { invalidParams.Add(smithy.NewErrParamRequired("ContainerType")) } if v.Segment != nil { if err := validateSegment(v.Segment); err != nil { invalidParams.AddNested("Segment", err.(smithy.InvalidParamsError)) } } if v.HlsManifests != nil { if err := validateCreateHlsManifests(v.HlsManifests); err != nil { invalidParams.AddNested("HlsManifests", err.(smithy.InvalidParamsError)) } } if v.LowLatencyHlsManifests != nil { if err := validateCreateLowLatencyHlsManifests(v.LowLatencyHlsManifests); err != nil { invalidParams.AddNested("LowLatencyHlsManifests", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteChannelGroupInput(v *DeleteChannelGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteChannelGroupInput"} if v.ChannelGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelGroupName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteChannelInput(v *DeleteChannelInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteChannelInput"} if v.ChannelGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelGroupName")) } if v.ChannelName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteChannelPolicyInput(v *DeleteChannelPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteChannelPolicyInput"} if v.ChannelGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelGroupName")) } if v.ChannelName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteOriginEndpointInput(v *DeleteOriginEndpointInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteOriginEndpointInput"} if v.ChannelGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelGroupName")) } if v.ChannelName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelName")) } if v.OriginEndpointName == nil { invalidParams.Add(smithy.NewErrParamRequired("OriginEndpointName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteOriginEndpointPolicyInput(v *DeleteOriginEndpointPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteOriginEndpointPolicyInput"} if v.ChannelGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelGroupName")) } if v.ChannelName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelName")) } if v.OriginEndpointName == nil { invalidParams.Add(smithy.NewErrParamRequired("OriginEndpointName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetChannelGroupInput(v *GetChannelGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetChannelGroupInput"} if v.ChannelGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelGroupName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetChannelInput(v *GetChannelInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetChannelInput"} if v.ChannelGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelGroupName")) } if v.ChannelName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetChannelPolicyInput(v *GetChannelPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetChannelPolicyInput"} if v.ChannelGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelGroupName")) } if v.ChannelName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetOriginEndpointInput(v *GetOriginEndpointInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetOriginEndpointInput"} if v.ChannelGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelGroupName")) } if v.ChannelName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelName")) } if v.OriginEndpointName == nil { invalidParams.Add(smithy.NewErrParamRequired("OriginEndpointName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetOriginEndpointPolicyInput(v *GetOriginEndpointPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetOriginEndpointPolicyInput"} if v.ChannelGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelGroupName")) } if v.ChannelName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelName")) } if v.OriginEndpointName == nil { invalidParams.Add(smithy.NewErrParamRequired("OriginEndpointName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListChannelsInput(v *ListChannelsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListChannelsInput"} if v.ChannelGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelGroupName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListOriginEndpointsInput(v *ListOriginEndpointsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListOriginEndpointsInput"} if v.ChannelGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelGroupName")) } if v.ChannelName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} if v.ResourceArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpPutChannelPolicyInput(v *PutChannelPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PutChannelPolicyInput"} if v.ChannelGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelGroupName")) } if v.ChannelName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelName")) } if v.Policy == nil { invalidParams.Add(smithy.NewErrParamRequired("Policy")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpPutOriginEndpointPolicyInput(v *PutOriginEndpointPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PutOriginEndpointPolicyInput"} if v.ChannelGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelGroupName")) } if v.ChannelName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelName")) } if v.OriginEndpointName == nil { invalidParams.Add(smithy.NewErrParamRequired("OriginEndpointName")) } if v.Policy == nil { invalidParams.Add(smithy.NewErrParamRequired("Policy")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpTagResourceInput(v *TagResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} if v.ResourceArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) } if v.Tags == nil { invalidParams.Add(smithy.NewErrParamRequired("Tags")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUntagResourceInput(v *UntagResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} if v.ResourceArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) } if v.TagKeys == nil { invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateChannelGroupInput(v *UpdateChannelGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateChannelGroupInput"} if v.ChannelGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelGroupName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateChannelInput(v *UpdateChannelInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateChannelInput"} if v.ChannelGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelGroupName")) } if v.ChannelName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateOriginEndpointInput(v *UpdateOriginEndpointInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateOriginEndpointInput"} if v.ChannelGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelGroupName")) } if v.ChannelName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelName")) } if v.OriginEndpointName == nil { invalidParams.Add(smithy.NewErrParamRequired("OriginEndpointName")) } if len(v.ContainerType) == 0 { invalidParams.Add(smithy.NewErrParamRequired("ContainerType")) } if v.Segment != nil { if err := validateSegment(v.Segment); err != nil { invalidParams.AddNested("Segment", err.(smithy.InvalidParamsError)) } } if v.HlsManifests != nil { if err := validateCreateHlsManifests(v.HlsManifests); err != nil { invalidParams.AddNested("HlsManifests", err.(smithy.InvalidParamsError)) } } if v.LowLatencyHlsManifests != nil { if err := validateCreateLowLatencyHlsManifests(v.LowLatencyHlsManifests); err != nil { invalidParams.AddNested("LowLatencyHlsManifests", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } }
1,175
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package endpoints import ( "github.com/aws/aws-sdk-go-v2/aws" endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" "github.com/aws/smithy-go/logging" "regexp" ) // Options is the endpoint resolver configuration options type Options struct { // Logger is a logging implementation that log events should be sent to. Logger logging.Logger // LogDeprecated indicates that deprecated endpoints should be logged to the // provided logger. LogDeprecated bool // ResolvedRegion is used to override the region to be resolved, rather then the // using the value passed to the ResolveEndpoint method. This value is used by the // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative // name. You must not set this value directly in your application. ResolvedRegion string // DisableHTTPS informs the resolver to return an endpoint that does not use the // HTTPS scheme. DisableHTTPS bool // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. UseDualStackEndpoint aws.DualStackEndpointState // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. UseFIPSEndpoint aws.FIPSEndpointState } func (o Options) GetResolvedRegion() string { return o.ResolvedRegion } func (o Options) GetDisableHTTPS() bool { return o.DisableHTTPS } func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { return o.UseDualStackEndpoint } func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { return o.UseFIPSEndpoint } func transformToSharedOptions(options Options) endpoints.Options { return endpoints.Options{ Logger: options.Logger, LogDeprecated: options.LogDeprecated, ResolvedRegion: options.ResolvedRegion, DisableHTTPS: options.DisableHTTPS, UseDualStackEndpoint: options.UseDualStackEndpoint, UseFIPSEndpoint: options.UseFIPSEndpoint, } } // Resolver MediaPackageV2 endpoint resolver type Resolver struct { partitions endpoints.Partitions } // ResolveEndpoint resolves the service endpoint for the given region and options func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { if len(region) == 0 { return endpoint, &aws.MissingRegionError{} } opt := transformToSharedOptions(options) return r.partitions.ResolveEndpoint(region, opt) } // New returns a new Resolver func New() *Resolver { return &Resolver{ partitions: defaultPartitions, } } var partitionRegexp = struct { Aws *regexp.Regexp AwsCn *regexp.Regexp AwsIso *regexp.Regexp AwsIsoB *regexp.Regexp AwsIsoE *regexp.Regexp AwsIsoF *regexp.Regexp AwsUsGov *regexp.Regexp }{ Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"), AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), } var defaultPartitions = endpoints.Partitions{ { ID: "aws", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "mediapackagev2.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "mediapackagev2-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "mediapackagev2-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "mediapackagev2.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.Aws, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "ap-northeast-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-northeast-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-north-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-3", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "sa-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-west-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-west-2", }: endpoints.Endpoint{}, }, }, { ID: "aws-cn", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "mediapackagev2.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "mediapackagev2-fips.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "mediapackagev2-fips.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "mediapackagev2.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsCn, IsRegionalized: true, }, { ID: "aws-iso", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "mediapackagev2-fips.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "mediapackagev2.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIso, IsRegionalized: true, }, { ID: "aws-iso-b", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "mediapackagev2-fips.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "mediapackagev2.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoB, IsRegionalized: true, }, { ID: "aws-iso-e", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "mediapackagev2-fips.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "mediapackagev2.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoE, IsRegionalized: true, }, { ID: "aws-iso-f", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "mediapackagev2-fips.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "mediapackagev2.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoF, IsRegionalized: true, }, { ID: "aws-us-gov", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "mediapackagev2.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "mediapackagev2-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "mediapackagev2-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "mediapackagev2.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsUsGov, IsRegionalized: true, }, }
344
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package endpoints import ( "testing" ) func TestRegexCompile(t *testing.T) { _ = defaultPartitions }
12
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types type AdMarkerHls string // Enum values for AdMarkerHls const ( AdMarkerHlsDaterange AdMarkerHls = "DATERANGE" ) // Values returns all known values for AdMarkerHls. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (AdMarkerHls) Values() []AdMarkerHls { return []AdMarkerHls{ "DATERANGE", } } type CmafEncryptionMethod string // Enum values for CmafEncryptionMethod const ( CmafEncryptionMethodCenc CmafEncryptionMethod = "CENC" CmafEncryptionMethodCbcs CmafEncryptionMethod = "CBCS" ) // Values returns all known values for CmafEncryptionMethod. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (CmafEncryptionMethod) Values() []CmafEncryptionMethod { return []CmafEncryptionMethod{ "CENC", "CBCS", } } type ConflictExceptionType string // Enum values for ConflictExceptionType const ( ConflictExceptionTypeResourceInUse ConflictExceptionType = "RESOURCE_IN_USE" ConflictExceptionTypeResourceAlreadyExists ConflictExceptionType = "RESOURCE_ALREADY_EXISTS" ConflictExceptionTypeIdempotentParameterMismatch ConflictExceptionType = "IDEMPOTENT_PARAMETER_MISMATCH" ConflictExceptionTypeConflictingOperation ConflictExceptionType = "CONFLICTING_OPERATION" ) // Values returns all known values for ConflictExceptionType. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ConflictExceptionType) Values() []ConflictExceptionType { return []ConflictExceptionType{ "RESOURCE_IN_USE", "RESOURCE_ALREADY_EXISTS", "IDEMPOTENT_PARAMETER_MISMATCH", "CONFLICTING_OPERATION", } } type ContainerType string // Enum values for ContainerType const ( ContainerTypeTs ContainerType = "TS" ContainerTypeCmaf ContainerType = "CMAF" ) // Values returns all known values for ContainerType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ContainerType) Values() []ContainerType { return []ContainerType{ "TS", "CMAF", } } type DrmSystem string // Enum values for DrmSystem const ( DrmSystemClearKeyAes128 DrmSystem = "CLEAR_KEY_AES_128" DrmSystemFairplay DrmSystem = "FAIRPLAY" DrmSystemPlayready DrmSystem = "PLAYREADY" DrmSystemWidevine DrmSystem = "WIDEVINE" ) // Values returns all known values for DrmSystem. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (DrmSystem) Values() []DrmSystem { return []DrmSystem{ "CLEAR_KEY_AES_128", "FAIRPLAY", "PLAYREADY", "WIDEVINE", } } type PresetSpeke20Audio string // Enum values for PresetSpeke20Audio const ( PresetSpeke20AudioPresetAudio1 PresetSpeke20Audio = "PRESET_AUDIO_1" PresetSpeke20AudioPresetAudio2 PresetSpeke20Audio = "PRESET_AUDIO_2" PresetSpeke20AudioPresetAudio3 PresetSpeke20Audio = "PRESET_AUDIO_3" PresetSpeke20AudioShared PresetSpeke20Audio = "SHARED" PresetSpeke20AudioUnencrypted PresetSpeke20Audio = "UNENCRYPTED" ) // Values returns all known values for PresetSpeke20Audio. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (PresetSpeke20Audio) Values() []PresetSpeke20Audio { return []PresetSpeke20Audio{ "PRESET_AUDIO_1", "PRESET_AUDIO_2", "PRESET_AUDIO_3", "SHARED", "UNENCRYPTED", } } type PresetSpeke20Video string // Enum values for PresetSpeke20Video const ( PresetSpeke20VideoPresetVideo1 PresetSpeke20Video = "PRESET_VIDEO_1" PresetSpeke20VideoPresetVideo2 PresetSpeke20Video = "PRESET_VIDEO_2" PresetSpeke20VideoPresetVideo3 PresetSpeke20Video = "PRESET_VIDEO_3" PresetSpeke20VideoPresetVideo4 PresetSpeke20Video = "PRESET_VIDEO_4" PresetSpeke20VideoPresetVideo5 PresetSpeke20Video = "PRESET_VIDEO_5" PresetSpeke20VideoPresetVideo6 PresetSpeke20Video = "PRESET_VIDEO_6" PresetSpeke20VideoPresetVideo7 PresetSpeke20Video = "PRESET_VIDEO_7" PresetSpeke20VideoPresetVideo8 PresetSpeke20Video = "PRESET_VIDEO_8" PresetSpeke20VideoShared PresetSpeke20Video = "SHARED" PresetSpeke20VideoUnencrypted PresetSpeke20Video = "UNENCRYPTED" ) // Values returns all known values for PresetSpeke20Video. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (PresetSpeke20Video) Values() []PresetSpeke20Video { return []PresetSpeke20Video{ "PRESET_VIDEO_1", "PRESET_VIDEO_2", "PRESET_VIDEO_3", "PRESET_VIDEO_4", "PRESET_VIDEO_5", "PRESET_VIDEO_6", "PRESET_VIDEO_7", "PRESET_VIDEO_8", "SHARED", "UNENCRYPTED", } } type ResourceTypeNotFound string // Enum values for ResourceTypeNotFound const ( ResourceTypeNotFoundChannelGroup ResourceTypeNotFound = "CHANNEL_GROUP" ResourceTypeNotFoundChannel ResourceTypeNotFound = "CHANNEL" ResourceTypeNotFoundOriginEndpoint ResourceTypeNotFound = "ORIGIN_ENDPOINT" ) // Values returns all known values for ResourceTypeNotFound. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ResourceTypeNotFound) Values() []ResourceTypeNotFound { return []ResourceTypeNotFound{ "CHANNEL_GROUP", "CHANNEL", "ORIGIN_ENDPOINT", } } type ScteFilter string // Enum values for ScteFilter const ( ScteFilterSpliceInsert ScteFilter = "SPLICE_INSERT" ScteFilterBreak ScteFilter = "BREAK" ScteFilterProviderAdvertisement ScteFilter = "PROVIDER_ADVERTISEMENT" ScteFilterDistributorAdvertisement ScteFilter = "DISTRIBUTOR_ADVERTISEMENT" ScteFilterProviderPlacementOpportunity ScteFilter = "PROVIDER_PLACEMENT_OPPORTUNITY" ScteFilterDistributorPlacementOpportunity ScteFilter = "DISTRIBUTOR_PLACEMENT_OPPORTUNITY" ScteFilterProviderOverlayPlacementOpportunity ScteFilter = "PROVIDER_OVERLAY_PLACEMENT_OPPORTUNITY" ScteFilterDistributorOverlayPlacementOpportunity ScteFilter = "DISTRIBUTOR_OVERLAY_PLACEMENT_OPPORTUNITY" ScteFilterProgram ScteFilter = "PROGRAM" ) // Values returns all known values for ScteFilter. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (ScteFilter) Values() []ScteFilter { return []ScteFilter{ "SPLICE_INSERT", "BREAK", "PROVIDER_ADVERTISEMENT", "DISTRIBUTOR_ADVERTISEMENT", "PROVIDER_PLACEMENT_OPPORTUNITY", "DISTRIBUTOR_PLACEMENT_OPPORTUNITY", "PROVIDER_OVERLAY_PLACEMENT_OPPORTUNITY", "DISTRIBUTOR_OVERLAY_PLACEMENT_OPPORTUNITY", "PROGRAM", } } type TsEncryptionMethod string // Enum values for TsEncryptionMethod const ( TsEncryptionMethodAes128 TsEncryptionMethod = "AES_128" TsEncryptionMethodSampleAes TsEncryptionMethod = "SAMPLE_AES" ) // Values returns all known values for TsEncryptionMethod. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (TsEncryptionMethod) Values() []TsEncryptionMethod { return []TsEncryptionMethod{ "AES_128", "SAMPLE_AES", } } type ValidationExceptionType string // Enum values for ValidationExceptionType const ( ValidationExceptionTypeContainerTypeImmutable ValidationExceptionType = "CONTAINER_TYPE_IMMUTABLE" ValidationExceptionTypeInvalidPaginationToken ValidationExceptionType = "INVALID_PAGINATION_TOKEN" ValidationExceptionTypeInvalidPaginationMaxResults ValidationExceptionType = "INVALID_PAGINATION_MAX_RESULTS" ValidationExceptionTypeInvalidPolicy ValidationExceptionType = "INVALID_POLICY" ValidationExceptionTypeInvalidRoleArn ValidationExceptionType = "INVALID_ROLE_ARN" ValidationExceptionTypeManifestNameCollision ValidationExceptionType = "MANIFEST_NAME_COLLISION" ValidationExceptionTypeEncryptionMethodContainerTypeMismatch ValidationExceptionType = "ENCRYPTION_METHOD_CONTAINER_TYPE_MISMATCH" ValidationExceptionTypeCencIvIncompatible ValidationExceptionType = "CENC_IV_INCOMPATIBLE" ValidationExceptionTypeEncryptionContractWithoutAudioRenditionIncompatible ValidationExceptionType = "ENCRYPTION_CONTRACT_WITHOUT_AUDIO_RENDITION_INCOMPATIBLE" ValidationExceptionTypeEncryptionContractUnencrypted ValidationExceptionType = "ENCRYPTION_CONTRACT_UNENCRYPTED" ValidationExceptionTypeEncryptionContractShared ValidationExceptionType = "ENCRYPTION_CONTRACT_SHARED" ValidationExceptionTypeNumManifestsLow ValidationExceptionType = "NUM_MANIFESTS_LOW" ValidationExceptionTypeNumManifestsHigh ValidationExceptionType = "NUM_MANIFESTS_HIGH" ValidationExceptionTypeDrmSystemsEncryptionMethodIncompatible ValidationExceptionType = "DRM_SYSTEMS_ENCRYPTION_METHOD_INCOMPATIBLE" ValidationExceptionTypeRoleArnNotAssumable ValidationExceptionType = "ROLE_ARN_NOT_ASSUMABLE" ValidationExceptionTypeRoleArnLengthOutOfRange ValidationExceptionType = "ROLE_ARN_LENGTH_OUT_OF_RANGE" ValidationExceptionTypeRoleArnInvalidFormat ValidationExceptionType = "ROLE_ARN_INVALID_FORMAT" ValidationExceptionTypeUrlInvalid ValidationExceptionType = "URL_INVALID" ValidationExceptionTypeUrlScheme ValidationExceptionType = "URL_SCHEME" ValidationExceptionTypeUrlUserInfo ValidationExceptionType = "URL_USER_INFO" ValidationExceptionTypeUrlPort ValidationExceptionType = "URL_PORT" ValidationExceptionTypeUrlUnknownHost ValidationExceptionType = "URL_UNKNOWN_HOST" ValidationExceptionTypeUrlLocalAddress ValidationExceptionType = "URL_LOCAL_ADDRESS" ValidationExceptionTypeUrlLoopbackAddress ValidationExceptionType = "URL_LOOPBACK_ADDRESS" ValidationExceptionTypeUrlLinkLocalAddress ValidationExceptionType = "URL_LINK_LOCAL_ADDRESS" ValidationExceptionTypeUrlMulticastAddress ValidationExceptionType = "URL_MULTICAST_ADDRESS" ValidationExceptionTypeMemberInvalid ValidationExceptionType = "MEMBER_INVALID" ValidationExceptionTypeMemberMissing ValidationExceptionType = "MEMBER_MISSING" ValidationExceptionTypeMemberMinValue ValidationExceptionType = "MEMBER_MIN_VALUE" ValidationExceptionTypeMemberMaxValue ValidationExceptionType = "MEMBER_MAX_VALUE" ValidationExceptionTypeMemberMinLength ValidationExceptionType = "MEMBER_MIN_LENGTH" ValidationExceptionTypeMemberMaxLength ValidationExceptionType = "MEMBER_MAX_LENGTH" ValidationExceptionTypeMemberInvalidEnumValue ValidationExceptionType = "MEMBER_INVALID_ENUM_VALUE" ValidationExceptionTypeMemberDoesNotMatchPattern ValidationExceptionType = "MEMBER_DOES_NOT_MATCH_PATTERN" ) // Values returns all known values for ValidationExceptionType. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ValidationExceptionType) Values() []ValidationExceptionType { return []ValidationExceptionType{ "CONTAINER_TYPE_IMMUTABLE", "INVALID_PAGINATION_TOKEN", "INVALID_PAGINATION_MAX_RESULTS", "INVALID_POLICY", "INVALID_ROLE_ARN", "MANIFEST_NAME_COLLISION", "ENCRYPTION_METHOD_CONTAINER_TYPE_MISMATCH", "CENC_IV_INCOMPATIBLE", "ENCRYPTION_CONTRACT_WITHOUT_AUDIO_RENDITION_INCOMPATIBLE", "ENCRYPTION_CONTRACT_UNENCRYPTED", "ENCRYPTION_CONTRACT_SHARED", "NUM_MANIFESTS_LOW", "NUM_MANIFESTS_HIGH", "DRM_SYSTEMS_ENCRYPTION_METHOD_INCOMPATIBLE", "ROLE_ARN_NOT_ASSUMABLE", "ROLE_ARN_LENGTH_OUT_OF_RANGE", "ROLE_ARN_INVALID_FORMAT", "URL_INVALID", "URL_SCHEME", "URL_USER_INFO", "URL_PORT", "URL_UNKNOWN_HOST", "URL_LOCAL_ADDRESS", "URL_LOOPBACK_ADDRESS", "URL_LINK_LOCAL_ADDRESS", "URL_MULTICAST_ADDRESS", "MEMBER_INVALID", "MEMBER_MISSING", "MEMBER_MIN_VALUE", "MEMBER_MAX_VALUE", "MEMBER_MIN_LENGTH", "MEMBER_MAX_LENGTH", "MEMBER_INVALID_ENUM_VALUE", "MEMBER_DOES_NOT_MATCH_PATTERN", } }
310
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types import ( "fmt" smithy "github.com/aws/smithy-go" ) // You don't have permissions to perform the requested operation. The user or role // that is making the request must have at least one IAM permissions policy // attached that grants the required permissions. For more information, see Access // Management in the IAM User Guide. type AccessDeniedException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *AccessDeniedException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *AccessDeniedException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "AccessDeniedException" } return *e.ErrorCodeOverride } func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Updating or deleting this resource can cause an inconsistent state. type ConflictException struct { Message *string ErrorCodeOverride *string ConflictExceptionType ConflictExceptionType noSmithyDocumentSerde } func (e *ConflictException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ConflictException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ConflictException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ConflictException" } return *e.ErrorCodeOverride } func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Indicates that an error from the service occurred while trying to process a // request. type InternalServerException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InternalServerException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InternalServerException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InternalServerException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InternalServerException" } return *e.ErrorCodeOverride } func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } // The specified resource doesn't exist. type ResourceNotFoundException struct { Message *string ErrorCodeOverride *string ResourceTypeNotFound ResourceTypeNotFound noSmithyDocumentSerde } func (e *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ResourceNotFoundException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ResourceNotFoundException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ResourceNotFoundException" } return *e.ErrorCodeOverride } func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request would cause a service quota to be exceeded. type ServiceQuotaExceededException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ServiceQuotaExceededException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ServiceQuotaExceededException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ServiceQuotaExceededException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ServiceQuotaExceededException" } return *e.ErrorCodeOverride } func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request throughput limit was exceeded. type ThrottlingException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ThrottlingException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ThrottlingException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ThrottlingException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ThrottlingException" } return *e.ErrorCodeOverride } func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The input failed to meet the constraints specified by the AWS service. type ValidationException struct { Message *string ErrorCodeOverride *string ValidationExceptionType ValidationExceptionType noSmithyDocumentSerde } func (e *ValidationException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ValidationException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ValidationException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ValidationException" } return *e.ErrorCodeOverride } func (e *ValidationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
201
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types import ( smithydocument "github.com/aws/smithy-go/document" "time" ) // The configuration of the channel group. type ChannelGroupListConfiguration struct { // The Amazon Resource Name (ARN) associated with the resource. // // This member is required. Arn *string // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // The date and time the channel group was created. // // This member is required. CreatedAt *time.Time // The date and time the channel group was modified. // // This member is required. ModifiedAt *time.Time // Any descriptive information that you want to add to the channel group for // future identification purposes. Description *string noSmithyDocumentSerde } // The configuration of the channel. type ChannelListConfiguration struct { // The Amazon Resource Name (ARN) associated with the resource. // // This member is required. Arn *string // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // The name that describes the channel. The name is the primary identifier for the // channel, and must be unique for your account in the AWS Region and channel // group. // // This member is required. ChannelName *string // The date and time the channel was created. // // This member is required. CreatedAt *time.Time // The date and time the channel was modified. // // This member is required. ModifiedAt *time.Time // Any descriptive information that you want to add to the channel for future // identification purposes. Description *string noSmithyDocumentSerde } // Create an HTTP live streaming (HLS) manifest configuration. type CreateHlsManifestConfiguration struct { // A short short string that's appended to the endpoint URL. The manifest name // creates a unique path to this endpoint. If you don't enter a value, MediaPackage // uses the default manifest name, index. MediaPackage automatically inserts the // format extension, such as .m3u8. You can't use the same manifest name if you use // HLS manifest and low-latency HLS manifest. The manifestName on the HLSManifest // object overrides the manifestName you provided on the originEndpoint object. // // This member is required. ManifestName *string // A short string that's appended to the endpoint URL. The child manifest name // creates a unique path to this endpoint. If you don't enter a value, MediaPackage // uses the default manifest name, index, with an added suffix to distinguish it // from the manifest name. The manifestName on the HLSManifest object overrides the // manifestName you provided on the originEndpoint object. ChildManifestName *string // The total duration (in seconds) of the manifest's content. ManifestWindowSeconds *int32 // Inserts EXT-X-PROGRAM-DATE-TIME tags in the output manifest at the interval // that you specify. If you don't enter an interval, EXT-X-PROGRAM-DATE-TIME tags // aren't included in the manifest. The tags sync the stream to the wall clock so // that viewers can seek to a specific time in the playback timeline on the player. // ID3Timed metadata messages generate every 5 seconds whenever the content is // ingested. Irrespective of this parameter, if any ID3Timed metadata is in the HLS // input, it is passed through to the HLS output. ProgramDateTimeIntervalSeconds *int32 // The SCTE configuration. ScteHls *ScteHls noSmithyDocumentSerde } // Create a low-latency HTTP live streaming (HLS) manifest configuration. type CreateLowLatencyHlsManifestConfiguration struct { // A short short string that's appended to the endpoint URL. The manifest name // creates a unique path to this endpoint. If you don't enter a value, MediaPackage // uses the default manifest name, index. MediaPackage automatically inserts the // format extension, such as .m3u8. You can't use the same manifest name if you use // HLS manifest and low-latency HLS manifest. The manifestName on the HLSManifest // object overrides the manifestName you provided on the originEndpoint object. // // This member is required. ManifestName *string // A short string that's appended to the endpoint URL. The child manifest name // creates a unique path to this endpoint. If you don't enter a value, MediaPackage // uses the default manifest name, index, with an added suffix to distinguish it // from the manifest name. The manifestName on the HLSManifest object overrides the // manifestName you provided on the originEndpoint object. ChildManifestName *string // The total duration (in seconds) of the manifest's content. ManifestWindowSeconds *int32 // Inserts EXT-X-PROGRAM-DATE-TIME tags in the output manifest at the interval // that you specify. If you don't enter an interval, EXT-X-PROGRAM-DATE-TIME tags // aren't included in the manifest. The tags sync the stream to the wall clock so // that viewers can seek to a specific time in the playback timeline on the player. // ID3Timed metadata messages generate every 5 seconds whenever the content is // ingested. Irrespective of this parameter, if any ID3Timed metadata is in the HLS // input, it is passed through to the HLS output. ProgramDateTimeIntervalSeconds *int32 // The SCTE configuration. ScteHls *ScteHls noSmithyDocumentSerde } // The parameters for encrypting content. type Encryption struct { // The encryption method to use. // // This member is required. EncryptionMethod *EncryptionMethod // The parameters for the SPEKE key provider. // // This member is required. SpekeKeyProvider *SpekeKeyProvider // A 128-bit, 16-byte hex value represented by a 32-character string, used in // conjunction with the key for encrypting content. If you don't specify a value, // then MediaPackage creates the constant initialization vector (IV). ConstantInitializationVector *string // The frequency (in seconds) of key changes for live workflows, in which content // is streamed real time. The service retrieves content keys before the live // content begins streaming, and then retrieves them as needed over the lifetime of // the workflow. By default, key rotation is set to 300 seconds (5 minutes), the // minimum rotation interval, which is equivalent to setting it to 300. If you // don't enter an interval, content keys aren't rotated. The following example // setting causes the service to rotate keys every thirty minutes: 1800 KeyRotationIntervalSeconds *int32 noSmithyDocumentSerde } // Configure one or more content encryption keys for your endpoints that use SPEKE // Version 2.0. The encryption contract defines which content keys are used to // encrypt the audio and video tracks in your stream. To configure the encryption // contract, specify which audio and video encryption presets to use. type EncryptionContractConfiguration struct { // A collection of audio encryption presets. Value description: // - PRESET-AUDIO-1 - Use one content key to encrypt all of the audio tracks in // your stream. // - PRESET-AUDIO-2 - Use one content key to encrypt all of the stereo audio // tracks and one content key to encrypt all of the multichannel audio tracks. // - PRESET-AUDIO-3 - Use one content key to encrypt all of the stereo audio // tracks, one content key to encrypt all of the multichannel audio tracks with 3 // to 6 channels, and one content key to encrypt all of the multichannel audio // tracks with more than 6 channels. // - SHARED - Use the same content key for all of the audio and video tracks in // your stream. // - UNENCRYPTED - Don't encrypt any of the audio tracks in your stream. // // This member is required. PresetSpeke20Audio PresetSpeke20Audio // A collection of video encryption presets. Value description: // - PRESET-VIDEO-1 - Use one content key to encrypt all of the video tracks in // your stream. // - PRESET-VIDEO-2 - Use one content key to encrypt all of the SD video tracks // and one content key for all HD and higher resolutions video tracks. // - PRESET-VIDEO-3 - Use one content key to encrypt all of the SD video tracks, // one content key for HD video tracks and one content key for all UHD video // tracks. // - PRESET-VIDEO-4 - Use one content key to encrypt all of the SD video tracks, // one content key for HD video tracks, one content key for all UHD1 video tracks // and one content key for all UHD2 video tracks. // - PRESET-VIDEO-5 - Use one content key to encrypt all of the SD video tracks, // one content key for HD1 video tracks, one content key for HD2 video tracks, one // content key for all UHD1 video tracks and one content key for all UHD2 video // tracks. // - PRESET-VIDEO-6 - Use one content key to encrypt all of the SD video tracks, // one content key for HD1 video tracks, one content key for HD2 video tracks and // one content key for all UHD video tracks. // - PRESET-VIDEO-7 - Use one content key to encrypt all of the SD+HD1 video // tracks, one content key for HD2 video tracks and one content key for all UHD // video tracks. // - PRESET-VIDEO-8 - Use one content key to encrypt all of the SD+HD1 video // tracks, one content key for HD2 video tracks, one content key for all UHD1 video // tracks and one content key for all UHD2 video tracks. // - SHARED - Use the same content key for all of the video and audio tracks in // your stream. // - UNENCRYPTED - Don't encrypt any of the video tracks in your stream. // // This member is required. PresetSpeke20Video PresetSpeke20Video noSmithyDocumentSerde } // The encryption type. type EncryptionMethod struct { // The encryption method to use. CmafEncryptionMethod CmafEncryptionMethod // The encryption method to use. TsEncryptionMethod TsEncryptionMethod noSmithyDocumentSerde } // Retrieve the HTTP live streaming (HLS) manifest configuration. type GetHlsManifestConfiguration struct { // A short short string that's appended to the endpoint URL. The manifest name // creates a unique path to this endpoint. If you don't enter a value, MediaPackage // uses the default manifest name, index. MediaPackage automatically inserts the // format extension, such as .m3u8. You can't use the same manifest name if you use // HLS manifest and low-latency HLS manifest. The manifestName on the HLSManifest // object overrides the manifestName you provided on the originEndpoint object. // // This member is required. ManifestName *string // The egress domain URL for stream delivery from MediaPackage. // // This member is required. Url *string // A short string that's appended to the endpoint URL. The child manifest name // creates a unique path to this endpoint. If you don't enter a value, MediaPackage // uses the default child manifest name, index_1. The manifestName on the // HLSManifest object overrides the manifestName you provided on the originEndpoint // object. ChildManifestName *string // The total duration (in seconds) of the manifest's content. ManifestWindowSeconds *int32 // Inserts EXT-X-PROGRAM-DATE-TIME tags in the output manifest at the interval // that you specify. If you don't enter an interval, EXT-X-PROGRAM-DATE-TIME tags // aren't included in the manifest. The tags sync the stream to the wall clock so // that viewers can seek to a specific time in the playback timeline on the player. // ID3Timed metadata messages generate every 5 seconds whenever the content is // ingested. Irrespective of this parameter, if any ID3Timed metadata is in the HLS // input, it is passed through to the HLS output. ProgramDateTimeIntervalSeconds *int32 // The SCTE configuration. ScteHls *ScteHls noSmithyDocumentSerde } // Retrieve the low-latency HTTP live streaming (HLS) manifest configuration. type GetLowLatencyHlsManifestConfiguration struct { // A short short string that's appended to the endpoint URL. The manifest name // creates a unique path to this endpoint. If you don't enter a value, MediaPackage // uses the default manifest name, index. MediaPackage automatically inserts the // format extension, such as .m3u8. You can't use the same manifest name if you use // HLS manifest and low-latency HLS manifest. The manifestName on the HLSManifest // object overrides the manifestName you provided on the originEndpoint object. // // This member is required. ManifestName *string // The egress domain URL for stream delivery from MediaPackage. // // This member is required. Url *string // A short string that's appended to the endpoint URL. The child manifest name // creates a unique path to this endpoint. If you don't enter a value, MediaPackage // uses the default child manifest name, index_1. The manifestName on the // HLSManifest object overrides the manifestName you provided on the originEndpoint // object. ChildManifestName *string // The total duration (in seconds) of the manifest's content. ManifestWindowSeconds *int32 // Inserts EXT-X-PROGRAM-DATE-TIME tags in the output manifest at the interval // that you specify. If you don't enter an interval, EXT-X-PROGRAM-DATE-TIME tags // aren't included in the manifest. The tags sync the stream to the wall clock so // that viewers can seek to a specific time in the playback timeline on the player. // ID3Timed metadata messages generate every 5 seconds whenever the content is // ingested. Irrespective of this parameter, if any ID3Timed metadata is in the HLS // input, it is passed through to the HLS output. ProgramDateTimeIntervalSeconds *int32 // The SCTE configuration. ScteHls *ScteHls noSmithyDocumentSerde } // The ingest domain URL where the source stream should be sent. type IngestEndpoint struct { // The system-generated unique identifier for the IngestEndpoint. Id *string // The ingest domain URL where the source stream should be sent. Url *string noSmithyDocumentSerde } // List the HTTP live streaming (HLS) manifest configuration. type ListHlsManifestConfiguration struct { // A short short string that's appended to the endpoint URL. The manifest name // creates a unique path to this endpoint. If you don't enter a value, MediaPackage // uses the default manifest name, index. MediaPackage automatically inserts the // format extension, such as .m3u8. You can't use the same manifest name if you use // HLS manifest and low-latency HLS manifest. The manifestName on the HLSManifest // object overrides the manifestName you provided on the originEndpoint object. // // This member is required. ManifestName *string // A short string that's appended to the endpoint URL. The child manifest name // creates a unique path to this endpoint. If you don't enter a value, MediaPackage // uses the default child manifest name, index_1. The manifestName on the // HLSManifest object overrides the manifestName you provided on the originEndpoint // object. ChildManifestName *string // The egress domain URL for stream delivery from MediaPackage. Url *string noSmithyDocumentSerde } // List the low-latency HTTP live streaming (HLS) manifest configuration. type ListLowLatencyHlsManifestConfiguration struct { // A short short string that's appended to the endpoint URL. The manifest name // creates a unique path to this endpoint. If you don't enter a value, MediaPackage // uses the default manifest name, index. MediaPackage automatically inserts the // format extension, such as .m3u8. You can't use the same manifest name if you use // HLS manifest and low-latency HLS manifest. The manifestName on the HLSManifest // object overrides the manifestName you provided on the originEndpoint object. // // This member is required. ManifestName *string // A short string that's appended to the endpoint URL. The child manifest name // creates a unique path to this endpoint. If you don't enter a value, MediaPackage // uses the default child manifest name, index_1. The manifestName on the // HLSManifest object overrides the manifestName you provided on the originEndpoint // object. ChildManifestName *string // The egress domain URL for stream delivery from MediaPackage. Url *string noSmithyDocumentSerde } // The configuration of the origin endpoint. type OriginEndpointListConfiguration struct { // The Amazon Resource Name (ARN) associated with the resource. // // This member is required. Arn *string // The name that describes the channel group. The name is the primary identifier // for the channel group, and must be unique for your account in the AWS Region. // // This member is required. ChannelGroupName *string // The name that describes the channel. The name is the primary identifier for the // channel, and must be unique for your account in the AWS Region and channel // group. // // This member is required. ChannelName *string // The type of container attached to this origin endpoint. A container type is a // file format that encapsulates one or more media streams, such as audio and // video, into a single file. // // This member is required. ContainerType ContainerType // The name that describes the origin endpoint. The name is the primary identifier // for the origin endpoint, and and must be unique for your account in the AWS // Region and channel. // // This member is required. OriginEndpointName *string // The date and time the origin endpoint was created. CreatedAt *time.Time // Any descriptive information that you want to add to the origin endpoint for // future identification purposes. Description *string // An HTTP live streaming (HLS) manifest configuration. HlsManifests []ListHlsManifestConfiguration // A low-latency HLS manifest configuration. LowLatencyHlsManifests []ListLowLatencyHlsManifestConfiguration // The date and time the origin endpoint was modified. ModifiedAt *time.Time noSmithyDocumentSerde } // The SCTE configuration. type Scte struct { // The SCTE-35 message types that you want to be treated as ad markers in the // output. ScteFilter []ScteFilter noSmithyDocumentSerde } // The SCTE configuration. type ScteHls struct { // Ad markers indicate when ads should be inserted during playback. If you include // ad markers in the content stream in your upstream encoders, then you need to // inform MediaPackage what to do with the ad markers in the output. Choose what // you want MediaPackage to do with the ad markers. Value description: // - DATERANGE - Insert EXT-X-DATERANGE tags to signal ad and program transition // events in TS and CMAF manifests. If you use DATERANGE, you must set a // programDateTimeIntervalSeconds value of 1 or higher. To learn more about // DATERANGE, see SCTE-35 Ad Marker EXT-X-DATERANGE (http://docs.aws.amazon.com/mediapackage/latest/ug/scte-35-ad-marker-ext-x-daterange.html) // . AdMarkerHls AdMarkerHls noSmithyDocumentSerde } // The segment configuration, including the segment name, duration, and other // configuration values. type Segment struct { // The parameters for encrypting content. Encryption *Encryption // When selected, the stream set includes an additional I-frame only stream, along // with the other tracks. If false, this extra stream is not included. MediaPackage // generates an I-frame only stream from the first rendition in the manifest. The // service inserts EXT-I-FRAMES-ONLY tags in the output manifest, and then // generates and includes an I-frames only playlist in the stream. This playlist // permits player functionality like fast forward and rewind. IncludeIframeOnlyStreams *bool // The SCTE configuration options in the segment settings. Scte *Scte // The duration (in seconds) of each segment. Enter a value equal to, or a // multiple of, the input segment duration. If the value that you enter is // different from the input segment duration, MediaPackage rounds segments to the // nearest multiple of the input segment duration. SegmentDurationSeconds *int32 // The name that describes the segment. The name is the base name of the segment // used in all content manifests inside of the endpoint. You can't use spaces in // the name. SegmentName *string // By default, MediaPackage excludes all digital video broadcasting (DVB) // subtitles from the output. When selected, MediaPackage passes through DVB // subtitles into the output. TsIncludeDvbSubtitles *bool // When selected, MediaPackage bundles all audio tracks in a rendition group. All // other tracks in the stream can be used with any audio rendition from the group. TsUseAudioRenditionGroup *bool noSmithyDocumentSerde } // The parameters for the SPEKE key provider. type SpekeKeyProvider struct { // The DRM solution provider you're using to protect your content during // distribution. // // This member is required. DrmSystems []DrmSystem // Configure one or more content encryption keys for your endpoints that use SPEKE // Version 2.0. The encryption contract defines which content keys are used to // encrypt the audio and video tracks in your stream. To configure the encryption // contract, specify which audio and video encryption presets to use. // // This member is required. EncryptionContractConfiguration *EncryptionContractConfiguration // The unique identifier for the content. The service sends this to the key server // to identify the current endpoint. How unique you make this depends on how // fine-grained you want access controls to be. The service does not permit you to // use the same ID for two simultaneous encryption processes. The resource ID is // also known as the content ID. The following example shows a resource ID: // MovieNight20171126093045 // // This member is required. ResourceId *string // The ARN for the IAM role granted by the key provider that provides access to // the key provider API. This role must have a trust policy that allows // MediaPackage to assume the role, and it must have a sufficient permissions // policy to allow access to the specific key retrieval URL. Get this from your DRM // solution provider. Valid format: arn:aws:iam::{accountID}:role/{name} . The // following example shows a role ARN: arn:aws:iam::444455556666:role/SpekeAccess // // This member is required. RoleArn *string // The URL of the API Gateway proxy that you set up to talk to your key server. // The API Gateway proxy must reside in the same AWS Region as MediaPackage and // must start with https://. The following example shows a URL: // https://1wm2dx1f33.execute-api.us-west-2.amazonaws.com/SpekeSample/copyProtection // // This member is required. Url *string noSmithyDocumentSerde } type noSmithyDocumentSerde = smithydocument.NoSerde
574
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagevod import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/retry" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" smithy "github.com/aws/smithy-go" smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "net" "net/http" "time" ) const ServiceID = "MediaPackage Vod" const ServiceAPIVersion = "2018-11-07" // Client provides the API client to make operations call for AWS Elemental // MediaPackage VOD. type Client struct { options Options } // New returns an initialized Client based on the functional options. Provide // additional functional options to further configure the behavior of the client, // such as changing the client's endpoint or adding custom middleware behavior. func New(options Options, optFns ...func(*Options)) *Client { options = options.Copy() resolveDefaultLogger(&options) setResolvedDefaultsMode(&options) resolveRetryer(&options) resolveHTTPClient(&options) resolveHTTPSignerV4(&options) resolveDefaultEndpointConfiguration(&options) for _, fn := range optFns { fn(&options) } client := &Client{ options: options, } return client } type Options struct { // Set of options to modify how an operation is invoked. These apply to all // operations invoked for this client. Use functional options on operation call to // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error // Configures the events that will be sent to the configured logger. ClientLogMode aws.ClientLogMode // The credentials object to use when signing requests. Credentials aws.CredentialsProvider // The configuration DefaultsMode that the SDK should use when constructing the // clients initial default settings. DefaultsMode aws.DefaultsMode // The endpoint options to be used when attempting to resolve an endpoint. EndpointOptions EndpointResolverOptions // The service endpoint resolver. EndpointResolver EndpointResolver // Signature Version 4 (SigV4) Signer HTTPSignerV4 HTTPSignerV4 // The logger writer interface to write logging messages to. Logger logging.Logger // The region to send requests to. (Required) Region string // RetryMaxAttempts specifies the maximum number attempts an API client will call // an operation that fails with a retryable error. A value of 0 is ignored, and // will not be used to configure the API client created default retryer, or modify // per operation call's retry max attempts. When creating a new API Clients this // member will only be used if the Retryer Options member is nil. This value will // be ignored if Retryer is not nil. If specified in an operation call's functional // options with a value that is different than the constructed client's Options, // the Client's Retryer will be wrapped to use the operation's specific // RetryMaxAttempts value. RetryMaxAttempts int // RetryMode specifies the retry mode the API client will be created with, if // Retryer option is not also specified. When creating a new API Clients this // member will only be used if the Retryer Options member is nil. This value will // be ignored if Retryer is not nil. Currently does not support per operation call // overrides, may in the future. RetryMode aws.RetryMode // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. The kind of // default retry created by the API client can be changed with the RetryMode // option. Retryer aws.Retryer // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You // should not populate this structure programmatically, or rely on the values here // within your applications. RuntimeEnvironment aws.RuntimeEnvironment // The initial DefaultsMode used when the client options were constructed. If the // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved // value was at that point in time. Currently does not support per operation call // overrides, may in the future. resolvedDefaultsMode aws.DefaultsMode // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. HTTPClient HTTPClient } // WithAPIOptions returns a functional option for setting the Client's APIOptions // option. func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { return func(o *Options) { o.APIOptions = append(o.APIOptions, optFns...) } } // WithEndpointResolver returns a functional option for setting the Client's // EndpointResolver option. func WithEndpointResolver(v EndpointResolver) func(*Options) { return func(o *Options) { o.EndpointResolver = v } } type HTTPClient interface { Do(*http.Request) (*http.Response, error) } // Copy creates a clone where the APIOptions list is deep copied. func (o Options) Copy() Options { to := o to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) copy(to.APIOptions, o.APIOptions) return to } func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { ctx = middleware.ClearStackValues(ctx) stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) options := c.options.Copy() for _, fn := range optFns { fn(&options) } finalizeRetryMaxAttemptOptions(&options, *c) finalizeClientEndpointResolverOptions(&options) for _, fn := range stackFns { if err := fn(stack, options); err != nil { return nil, metadata, err } } for _, fn := range options.APIOptions { if err := fn(stack); err != nil { return nil, metadata, err } } handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) result, metadata, err = handler.Handle(ctx, params) if err != nil { err = &smithy.OperationError{ ServiceID: ServiceID, OperationName: opID, Err: err, } } return result, metadata, err } type noSmithyDocumentSerde = smithydocument.NoSerde func resolveDefaultLogger(o *Options) { if o.Logger != nil { return } o.Logger = logging.Nop{} } func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { return middleware.AddSetLoggerMiddleware(stack, o.Logger) } func setResolvedDefaultsMode(o *Options) { if len(o.resolvedDefaultsMode) > 0 { return } var mode aws.DefaultsMode mode.SetFromString(string(o.DefaultsMode)) if mode == aws.DefaultsModeAuto { mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) } o.resolvedDefaultsMode = mode } // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, DefaultsMode: cfg.DefaultsMode, RuntimeEnvironment: cfg.RuntimeEnvironment, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) resolveAWSRetryMode(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) resolveUseDualStackEndpoint(cfg, &opts) resolveUseFIPSEndpoint(cfg, &opts) return New(opts, optFns...) } func resolveHTTPClient(o *Options) { var buildable *awshttp.BuildableClient if o.HTTPClient != nil { var ok bool buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) if !ok { return } } else { buildable = awshttp.NewBuildableClient() } modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) if err == nil { buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { dialer.Timeout = dialerTimeout } }) buildable = buildable.WithTransportOptions(func(transport *http.Transport) { if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { transport.TLSHandshakeTimeout = tlsHandshakeTimeout } }) } o.HTTPClient = buildable } func resolveRetryer(o *Options) { if o.Retryer != nil { return } if len(o.RetryMode) == 0 { modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) if err == nil { o.RetryMode = modeConfig.RetryMode } } if len(o.RetryMode) == 0 { o.RetryMode = aws.RetryModeStandard } var standardOptions []func(*retry.StandardOptions) if v := o.RetryMaxAttempts; v != 0 { standardOptions = append(standardOptions, func(so *retry.StandardOptions) { so.MaxAttempts = v }) } switch o.RetryMode { case aws.RetryModeAdaptive: var adaptiveOptions []func(*retry.AdaptiveModeOptions) if len(standardOptions) != 0 { adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { ao.StandardOptions = append(ao.StandardOptions, standardOptions...) }) } o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) default: o.Retryer = retry.NewStandard(standardOptions...) } } func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { if cfg.Retryer == nil { return } o.Retryer = cfg.Retryer() } func resolveAWSRetryMode(cfg aws.Config, o *Options) { if len(cfg.RetryMode) == 0 { return } o.RetryMode = cfg.RetryMode } func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { if cfg.RetryMaxAttempts == 0 { return } o.RetryMaxAttempts = cfg.RetryMaxAttempts } func finalizeRetryMaxAttemptOptions(o *Options, client Client) { if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { return } o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) } func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { return } o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver()) } func addClientUserAgent(stack *middleware.Stack) error { return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "mediapackagevod", goModuleVersion)(stack) } func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error { mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{ CredentialsProvider: o.Credentials, Signer: o.HTTPSignerV4, LogSigning: o.ClientLogMode.IsSigning(), }) return stack.Finalize.Add(mw, middleware.After) } type HTTPSignerV4 interface { SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error } func resolveHTTPSignerV4(o *Options) { if o.HTTPSignerV4 != nil { return } o.HTTPSignerV4 = newDefaultV4Signer(*o) } func newDefaultV4Signer(o Options) *v4.Signer { return v4.NewSigner(func(so *v4.SignerOptions) { so.Logger = o.Logger so.LogSigning = o.ClientLogMode.IsSigning() }) } func addRetryMiddlewares(stack *middleware.Stack, o Options) error { mo := retry.AddRetryMiddlewaresOptions{ Retryer: o.Retryer, LogRetryAttempts: o.ClientLogMode.IsRetries(), } return retry.AddRetryMiddlewares(stack, mo) } // resolves dual-stack endpoint configuration func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { if len(cfg.ConfigSources) == 0 { return nil } value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) if err != nil { return err } if found { o.EndpointOptions.UseDualStackEndpoint = value } return nil } // resolves FIPS endpoint configuration func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { if len(cfg.ConfigSources) == 0 { return nil } value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) if err != nil { return err } if found { o.EndpointOptions.UseFIPSEndpoint = value } return nil } func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) } func addResponseErrorMiddleware(stack *middleware.Stack) error { return awshttp.AddResponseErrorMiddleware(stack) } func addRequestResponseLogging(stack *middleware.Stack, o Options) error { return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ LogRequest: o.ClientLogMode.IsRequest(), LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), LogResponse: o.ClientLogMode.IsResponse(), LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), }, middleware.After) }
435
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagevod import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "io/ioutil" "net/http" "strings" "testing" ) func TestClient_resolveRetryOptions(t *testing.T) { nopClient := smithyhttp.ClientDoFunc(func(_ *http.Request) (*http.Response, error) { return &http.Response{ StatusCode: 200, Header: http.Header{}, Body: ioutil.NopCloser(strings.NewReader("")), }, nil }) cases := map[string]struct { defaultsMode aws.DefaultsMode retryer aws.Retryer retryMaxAttempts int opRetryMaxAttempts *int retryMode aws.RetryMode expectClientRetryMode aws.RetryMode expectClientMaxAttempts int expectOpMaxAttempts int }{ "defaults": { defaultsMode: aws.DefaultsModeStandard, expectClientRetryMode: aws.RetryModeStandard, expectClientMaxAttempts: 3, expectOpMaxAttempts: 3, }, "custom default retry": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, "custom op max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(2), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 2, }, "custom op no change max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(10), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, "custom op 0 max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(0), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, } for name, c := range cases { t.Run(name, func(t *testing.T) { client := NewFromConfig(aws.Config{ DefaultsMode: c.defaultsMode, Retryer: func() func() aws.Retryer { if c.retryer == nil { return nil } return func() aws.Retryer { return c.retryer } }(), HTTPClient: nopClient, RetryMaxAttempts: c.retryMaxAttempts, RetryMode: c.retryMode, }) if e, a := c.expectClientRetryMode, client.options.RetryMode; e != a { t.Errorf("expect %v retry mode, got %v", e, a) } if e, a := c.expectClientMaxAttempts, client.options.Retryer.MaxAttempts(); e != a { t.Errorf("expect %v max attempts, got %v", e, a) } _, _, err := client.invokeOperation(context.Background(), "mockOperation", struct{}{}, []func(*Options){ func(o *Options) { if c.opRetryMaxAttempts == nil { return } o.RetryMaxAttempts = *c.opRetryMaxAttempts }, }, func(s *middleware.Stack, o Options) error { s.Initialize.Clear() s.Serialize.Clear() s.Build.Clear() s.Finalize.Clear() s.Deserialize.Clear() if e, a := c.expectOpMaxAttempts, o.Retryer.MaxAttempts(); e != a { t.Errorf("expect %v op max attempts, got %v", e, a) } return nil }) if err != nil { t.Fatalf("expect no operation error, got %v", err) } }) } }
124
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagevod import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackagevod/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Changes the packaging group's properities to configure log subscription func (c *Client) ConfigureLogs(ctx context.Context, params *ConfigureLogsInput, optFns ...func(*Options)) (*ConfigureLogsOutput, error) { if params == nil { params = &ConfigureLogsInput{} } result, metadata, err := c.invokeOperation(ctx, "ConfigureLogs", params, optFns, c.addOperationConfigureLogsMiddlewares) if err != nil { return nil, err } out := result.(*ConfigureLogsOutput) out.ResultMetadata = metadata return out, nil } // The option to configure log subscription. type ConfigureLogsInput struct { // The ID of a MediaPackage VOD PackagingGroup resource. // // This member is required. Id *string // Configure egress access logging. EgressAccessLogs *types.EgressAccessLogs noSmithyDocumentSerde } type ConfigureLogsOutput struct { // The ARN of the PackagingGroup. Arn *string // CDN Authorization credentials Authorization *types.Authorization // The time the PackagingGroup was created. CreatedAt *string // The fully qualified domain name for Assets in the PackagingGroup. DomainName *string // Configure egress access logging. EgressAccessLogs *types.EgressAccessLogs // The ID of the PackagingGroup. Id *string // A collection of tags associated with a resource Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationConfigureLogsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpConfigureLogs{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpConfigureLogs{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpConfigureLogsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opConfigureLogs(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opConfigureLogs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage-vod", OperationName: "ConfigureLogs", } }
147
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagevod import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackagevod/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new MediaPackage VOD Asset resource. func (c *Client) CreateAsset(ctx context.Context, params *CreateAssetInput, optFns ...func(*Options)) (*CreateAssetOutput, error) { if params == nil { params = &CreateAssetInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateAsset", params, optFns, c.addOperationCreateAssetMiddlewares) if err != nil { return nil, err } out := result.(*CreateAssetOutput) out.ResultMetadata = metadata return out, nil } // A new MediaPackage VOD Asset configuration. type CreateAssetInput struct { // The unique identifier for the Asset. // // This member is required. Id *string // The ID of the PackagingGroup for the Asset. // // This member is required. PackagingGroupId *string // ARN of the source object in S3. // // This member is required. SourceArn *string // The IAM role ARN used to access the source S3 bucket. // // This member is required. SourceRoleArn *string // The resource ID to include in SPEKE key requests. ResourceId *string // A collection of tags associated with a resource Tags map[string]string noSmithyDocumentSerde } type CreateAssetOutput struct { // The ARN of the Asset. Arn *string // The time the Asset was initially submitted for Ingest. CreatedAt *string // The list of egress endpoints available for the Asset. EgressEndpoints []types.EgressEndpoint // The unique identifier for the Asset. Id *string // The ID of the PackagingGroup for the Asset. PackagingGroupId *string // The resource ID to include in SPEKE key requests. ResourceId *string // ARN of the source object in S3. SourceArn *string // The IAM role_arn used to access the source S3 bucket. SourceRoleArn *string // A collection of tags associated with a resource Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateAssetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateAsset{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateAsset{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateAssetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAsset(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opCreateAsset(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage-vod", OperationName: "CreateAsset", } }
171
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagevod import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackagevod/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new MediaPackage VOD PackagingConfiguration resource. func (c *Client) CreatePackagingConfiguration(ctx context.Context, params *CreatePackagingConfigurationInput, optFns ...func(*Options)) (*CreatePackagingConfigurationOutput, error) { if params == nil { params = &CreatePackagingConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "CreatePackagingConfiguration", params, optFns, c.addOperationCreatePackagingConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*CreatePackagingConfigurationOutput) out.ResultMetadata = metadata return out, nil } // A new MediaPackage VOD PackagingConfiguration resource configuration. type CreatePackagingConfigurationInput struct { // The ID of the PackagingConfiguration. // // This member is required. Id *string // The ID of a PackagingGroup. // // This member is required. PackagingGroupId *string // A CMAF packaging configuration. CmafPackage *types.CmafPackage // A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. DashPackage *types.DashPackage // An HTTP Live Streaming (HLS) packaging configuration. HlsPackage *types.HlsPackage // A Microsoft Smooth Streaming (MSS) PackagingConfiguration. MssPackage *types.MssPackage // A collection of tags associated with a resource Tags map[string]string noSmithyDocumentSerde } type CreatePackagingConfigurationOutput struct { // The ARN of the PackagingConfiguration. Arn *string // A CMAF packaging configuration. CmafPackage *types.CmafPackage // The time the PackagingConfiguration was created. CreatedAt *string // A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. DashPackage *types.DashPackage // An HTTP Live Streaming (HLS) packaging configuration. HlsPackage *types.HlsPackage // The ID of the PackagingConfiguration. Id *string // A Microsoft Smooth Streaming (MSS) PackagingConfiguration. MssPackage *types.MssPackage // The ID of a PackagingGroup. PackagingGroupId *string // A collection of tags associated with a resource Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreatePackagingConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreatePackagingConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreatePackagingConfiguration{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreatePackagingConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreatePackagingConfiguration(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opCreatePackagingConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage-vod", OperationName: "CreatePackagingConfiguration", } }
170
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagevod import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackagevod/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new MediaPackage VOD PackagingGroup resource. func (c *Client) CreatePackagingGroup(ctx context.Context, params *CreatePackagingGroupInput, optFns ...func(*Options)) (*CreatePackagingGroupOutput, error) { if params == nil { params = &CreatePackagingGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "CreatePackagingGroup", params, optFns, c.addOperationCreatePackagingGroupMiddlewares) if err != nil { return nil, err } out := result.(*CreatePackagingGroupOutput) out.ResultMetadata = metadata return out, nil } // A new MediaPackage VOD PackagingGroup resource configuration. type CreatePackagingGroupInput struct { // The ID of the PackagingGroup. // // This member is required. Id *string // CDN Authorization credentials Authorization *types.Authorization // Configure egress access logging. EgressAccessLogs *types.EgressAccessLogs // A collection of tags associated with a resource Tags map[string]string noSmithyDocumentSerde } type CreatePackagingGroupOutput struct { // The ARN of the PackagingGroup. Arn *string // CDN Authorization credentials Authorization *types.Authorization // The time the PackagingGroup was created. CreatedAt *string // The fully qualified domain name for Assets in the PackagingGroup. DomainName *string // Configure egress access logging. EgressAccessLogs *types.EgressAccessLogs // The ID of the PackagingGroup. Id *string // A collection of tags associated with a resource Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreatePackagingGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreatePackagingGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreatePackagingGroup{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreatePackagingGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreatePackagingGroup(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opCreatePackagingGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage-vod", OperationName: "CreatePackagingGroup", } }
153
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagevod import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes an existing MediaPackage VOD Asset resource. func (c *Client) DeleteAsset(ctx context.Context, params *DeleteAssetInput, optFns ...func(*Options)) (*DeleteAssetOutput, error) { if params == nil { params = &DeleteAssetInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteAsset", params, optFns, c.addOperationDeleteAssetMiddlewares) if err != nil { return nil, err } out := result.(*DeleteAssetOutput) out.ResultMetadata = metadata return out, nil } type DeleteAssetInput struct { // The ID of the MediaPackage VOD Asset resource to delete. // // This member is required. Id *string noSmithyDocumentSerde } type DeleteAssetOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteAssetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteAsset{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteAsset{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteAssetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAsset(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDeleteAsset(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage-vod", OperationName: "DeleteAsset", } }
120
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagevod import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes a MediaPackage VOD PackagingConfiguration resource. func (c *Client) DeletePackagingConfiguration(ctx context.Context, params *DeletePackagingConfigurationInput, optFns ...func(*Options)) (*DeletePackagingConfigurationOutput, error) { if params == nil { params = &DeletePackagingConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "DeletePackagingConfiguration", params, optFns, c.addOperationDeletePackagingConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*DeletePackagingConfigurationOutput) out.ResultMetadata = metadata return out, nil } type DeletePackagingConfigurationInput struct { // The ID of the MediaPackage VOD PackagingConfiguration resource to delete. // // This member is required. Id *string noSmithyDocumentSerde } type DeletePackagingConfigurationOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeletePackagingConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDeletePackagingConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeletePackagingConfiguration{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeletePackagingConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePackagingConfiguration(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDeletePackagingConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage-vod", OperationName: "DeletePackagingConfiguration", } }
120
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagevod import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes a MediaPackage VOD PackagingGroup resource. func (c *Client) DeletePackagingGroup(ctx context.Context, params *DeletePackagingGroupInput, optFns ...func(*Options)) (*DeletePackagingGroupOutput, error) { if params == nil { params = &DeletePackagingGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "DeletePackagingGroup", params, optFns, c.addOperationDeletePackagingGroupMiddlewares) if err != nil { return nil, err } out := result.(*DeletePackagingGroupOutput) out.ResultMetadata = metadata return out, nil } type DeletePackagingGroupInput struct { // The ID of the MediaPackage VOD PackagingGroup resource to delete. // // This member is required. Id *string noSmithyDocumentSerde } type DeletePackagingGroupOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeletePackagingGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDeletePackagingGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeletePackagingGroup{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeletePackagingGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePackagingGroup(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDeletePackagingGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage-vod", OperationName: "DeletePackagingGroup", } }
120
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagevod import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackagevod/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns a description of a MediaPackage VOD Asset resource. func (c *Client) DescribeAsset(ctx context.Context, params *DescribeAssetInput, optFns ...func(*Options)) (*DescribeAssetOutput, error) { if params == nil { params = &DescribeAssetInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeAsset", params, optFns, c.addOperationDescribeAssetMiddlewares) if err != nil { return nil, err } out := result.(*DescribeAssetOutput) out.ResultMetadata = metadata return out, nil } type DescribeAssetInput struct { // The ID of an MediaPackage VOD Asset resource. // // This member is required. Id *string noSmithyDocumentSerde } type DescribeAssetOutput struct { // The ARN of the Asset. Arn *string // The time the Asset was initially submitted for Ingest. CreatedAt *string // The list of egress endpoints available for the Asset. EgressEndpoints []types.EgressEndpoint // The unique identifier for the Asset. Id *string // The ID of the PackagingGroup for the Asset. PackagingGroupId *string // The resource ID to include in SPEKE key requests. ResourceId *string // ARN of the source object in S3. SourceArn *string // The IAM role_arn used to access the source S3 bucket. SourceRoleArn *string // A collection of tags associated with a resource Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeAssetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeAsset{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeAsset{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDescribeAssetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAsset(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDescribeAsset(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage-vod", OperationName: "DescribeAsset", } }
149
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagevod import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackagevod/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns a description of a MediaPackage VOD PackagingConfiguration resource. func (c *Client) DescribePackagingConfiguration(ctx context.Context, params *DescribePackagingConfigurationInput, optFns ...func(*Options)) (*DescribePackagingConfigurationOutput, error) { if params == nil { params = &DescribePackagingConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribePackagingConfiguration", params, optFns, c.addOperationDescribePackagingConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*DescribePackagingConfigurationOutput) out.ResultMetadata = metadata return out, nil } type DescribePackagingConfigurationInput struct { // The ID of a MediaPackage VOD PackagingConfiguration resource. // // This member is required. Id *string noSmithyDocumentSerde } type DescribePackagingConfigurationOutput struct { // The ARN of the PackagingConfiguration. Arn *string // A CMAF packaging configuration. CmafPackage *types.CmafPackage // The time the PackagingConfiguration was created. CreatedAt *string // A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. DashPackage *types.DashPackage // An HTTP Live Streaming (HLS) packaging configuration. HlsPackage *types.HlsPackage // The ID of the PackagingConfiguration. Id *string // A Microsoft Smooth Streaming (MSS) PackagingConfiguration. MssPackage *types.MssPackage // The ID of a PackagingGroup. PackagingGroupId *string // A collection of tags associated with a resource Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribePackagingConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribePackagingConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribePackagingConfiguration{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDescribePackagingConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePackagingConfiguration(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDescribePackagingConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage-vod", OperationName: "DescribePackagingConfiguration", } }
149
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagevod import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackagevod/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns a description of a MediaPackage VOD PackagingGroup resource. func (c *Client) DescribePackagingGroup(ctx context.Context, params *DescribePackagingGroupInput, optFns ...func(*Options)) (*DescribePackagingGroupOutput, error) { if params == nil { params = &DescribePackagingGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribePackagingGroup", params, optFns, c.addOperationDescribePackagingGroupMiddlewares) if err != nil { return nil, err } out := result.(*DescribePackagingGroupOutput) out.ResultMetadata = metadata return out, nil } type DescribePackagingGroupInput struct { // The ID of a MediaPackage VOD PackagingGroup resource. // // This member is required. Id *string noSmithyDocumentSerde } type DescribePackagingGroupOutput struct { // The approximate asset count of the PackagingGroup. ApproximateAssetCount int32 // The ARN of the PackagingGroup. Arn *string // CDN Authorization credentials Authorization *types.Authorization // The time the PackagingGroup was created. CreatedAt *string // The fully qualified domain name for Assets in the PackagingGroup. DomainName *string // Configure egress access logging. EgressAccessLogs *types.EgressAccessLogs // The ID of the PackagingGroup. Id *string // A collection of tags associated with a resource Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribePackagingGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribePackagingGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribePackagingGroup{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDescribePackagingGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePackagingGroup(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDescribePackagingGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage-vod", OperationName: "DescribePackagingGroup", } }
146
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagevod import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackagevod/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns a collection of MediaPackage VOD Asset resources. func (c *Client) ListAssets(ctx context.Context, params *ListAssetsInput, optFns ...func(*Options)) (*ListAssetsOutput, error) { if params == nil { params = &ListAssetsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListAssets", params, optFns, c.addOperationListAssetsMiddlewares) if err != nil { return nil, err } out := result.(*ListAssetsOutput) out.ResultMetadata = metadata return out, nil } type ListAssetsInput struct { // Upper bound on number of records to return. MaxResults int32 // A token used to resume pagination from the end of a previous request. NextToken *string // Returns Assets associated with the specified PackagingGroup. PackagingGroupId *string noSmithyDocumentSerde } type ListAssetsOutput struct { // A list of MediaPackage VOD Asset resources. Assets []types.AssetShallow // A token that can be used to resume pagination from the end of the collection. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListAssetsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpListAssets{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAssets{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAssets(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } // ListAssetsAPIClient is a client that implements the ListAssets operation. type ListAssetsAPIClient interface { ListAssets(context.Context, *ListAssetsInput, ...func(*Options)) (*ListAssetsOutput, error) } var _ ListAssetsAPIClient = (*Client)(nil) // ListAssetsPaginatorOptions is the paginator options for ListAssets type ListAssetsPaginatorOptions struct { // Upper bound on number of records to return. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool } // ListAssetsPaginator is a paginator for ListAssets type ListAssetsPaginator struct { options ListAssetsPaginatorOptions client ListAssetsAPIClient params *ListAssetsInput nextToken *string firstPage bool } // NewListAssetsPaginator returns a new ListAssetsPaginator func NewListAssetsPaginator(client ListAssetsAPIClient, params *ListAssetsInput, optFns ...func(*ListAssetsPaginatorOptions)) *ListAssetsPaginator { if params == nil { params = &ListAssetsInput{} } options := ListAssetsPaginatorOptions{} if params.MaxResults != 0 { options.Limit = params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListAssetsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAssetsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAssets page. func (p *ListAssetsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAssetsOutput, error) { if !p.HasMorePages() { return nil, fmt.Errorf("no more pages available") } params := *p.params params.NextToken = p.nextToken params.MaxResults = p.options.Limit result, err := p.client.ListAssets(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListAssets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage-vod", OperationName: "ListAssets", } }
215
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagevod import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackagevod/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns a collection of MediaPackage VOD PackagingConfiguration resources. func (c *Client) ListPackagingConfigurations(ctx context.Context, params *ListPackagingConfigurationsInput, optFns ...func(*Options)) (*ListPackagingConfigurationsOutput, error) { if params == nil { params = &ListPackagingConfigurationsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListPackagingConfigurations", params, optFns, c.addOperationListPackagingConfigurationsMiddlewares) if err != nil { return nil, err } out := result.(*ListPackagingConfigurationsOutput) out.ResultMetadata = metadata return out, nil } type ListPackagingConfigurationsInput struct { // Upper bound on number of records to return. MaxResults int32 // A token used to resume pagination from the end of a previous request. NextToken *string // Returns MediaPackage VOD PackagingConfigurations associated with the specified // PackagingGroup. PackagingGroupId *string noSmithyDocumentSerde } type ListPackagingConfigurationsOutput struct { // A token that can be used to resume pagination from the end of the collection. NextToken *string // A list of MediaPackage VOD PackagingConfiguration resources. PackagingConfigurations []types.PackagingConfiguration // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListPackagingConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpListPackagingConfigurations{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListPackagingConfigurations{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPackagingConfigurations(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } // ListPackagingConfigurationsAPIClient is a client that implements the // ListPackagingConfigurations operation. type ListPackagingConfigurationsAPIClient interface { ListPackagingConfigurations(context.Context, *ListPackagingConfigurationsInput, ...func(*Options)) (*ListPackagingConfigurationsOutput, error) } var _ ListPackagingConfigurationsAPIClient = (*Client)(nil) // ListPackagingConfigurationsPaginatorOptions is the paginator options for // ListPackagingConfigurations type ListPackagingConfigurationsPaginatorOptions struct { // Upper bound on number of records to return. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool } // ListPackagingConfigurationsPaginator is a paginator for // ListPackagingConfigurations type ListPackagingConfigurationsPaginator struct { options ListPackagingConfigurationsPaginatorOptions client ListPackagingConfigurationsAPIClient params *ListPackagingConfigurationsInput nextToken *string firstPage bool } // NewListPackagingConfigurationsPaginator returns a new // ListPackagingConfigurationsPaginator func NewListPackagingConfigurationsPaginator(client ListPackagingConfigurationsAPIClient, params *ListPackagingConfigurationsInput, optFns ...func(*ListPackagingConfigurationsPaginatorOptions)) *ListPackagingConfigurationsPaginator { if params == nil { params = &ListPackagingConfigurationsInput{} } options := ListPackagingConfigurationsPaginatorOptions{} if params.MaxResults != 0 { options.Limit = params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListPackagingConfigurationsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPackagingConfigurationsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPackagingConfigurations page. func (p *ListPackagingConfigurationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListPackagingConfigurationsOutput, error) { if !p.HasMorePages() { return nil, fmt.Errorf("no more pages available") } params := *p.params params.NextToken = p.nextToken params.MaxResults = p.options.Limit result, err := p.client.ListPackagingConfigurations(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListPackagingConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage-vod", OperationName: "ListPackagingConfigurations", } }
220
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagevod import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackagevod/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns a collection of MediaPackage VOD PackagingGroup resources. func (c *Client) ListPackagingGroups(ctx context.Context, params *ListPackagingGroupsInput, optFns ...func(*Options)) (*ListPackagingGroupsOutput, error) { if params == nil { params = &ListPackagingGroupsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListPackagingGroups", params, optFns, c.addOperationListPackagingGroupsMiddlewares) if err != nil { return nil, err } out := result.(*ListPackagingGroupsOutput) out.ResultMetadata = metadata return out, nil } type ListPackagingGroupsInput struct { // Upper bound on number of records to return. MaxResults int32 // A token used to resume pagination from the end of a previous request. NextToken *string noSmithyDocumentSerde } type ListPackagingGroupsOutput struct { // A token that can be used to resume pagination from the end of the collection. NextToken *string // A list of MediaPackage VOD PackagingGroup resources. PackagingGroups []types.PackagingGroup // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListPackagingGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpListPackagingGroups{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListPackagingGroups{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPackagingGroups(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } // ListPackagingGroupsAPIClient is a client that implements the // ListPackagingGroups operation. type ListPackagingGroupsAPIClient interface { ListPackagingGroups(context.Context, *ListPackagingGroupsInput, ...func(*Options)) (*ListPackagingGroupsOutput, error) } var _ ListPackagingGroupsAPIClient = (*Client)(nil) // ListPackagingGroupsPaginatorOptions is the paginator options for // ListPackagingGroups type ListPackagingGroupsPaginatorOptions struct { // Upper bound on number of records to return. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool } // ListPackagingGroupsPaginator is a paginator for ListPackagingGroups type ListPackagingGroupsPaginator struct { options ListPackagingGroupsPaginatorOptions client ListPackagingGroupsAPIClient params *ListPackagingGroupsInput nextToken *string firstPage bool } // NewListPackagingGroupsPaginator returns a new ListPackagingGroupsPaginator func NewListPackagingGroupsPaginator(client ListPackagingGroupsAPIClient, params *ListPackagingGroupsInput, optFns ...func(*ListPackagingGroupsPaginatorOptions)) *ListPackagingGroupsPaginator { if params == nil { params = &ListPackagingGroupsInput{} } options := ListPackagingGroupsPaginatorOptions{} if params.MaxResults != 0 { options.Limit = params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListPackagingGroupsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPackagingGroupsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPackagingGroups page. func (p *ListPackagingGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListPackagingGroupsOutput, error) { if !p.HasMorePages() { return nil, fmt.Errorf("no more pages available") } params := *p.params params.NextToken = p.nextToken params.MaxResults = p.options.Limit result, err := p.client.ListPackagingGroups(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListPackagingGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage-vod", OperationName: "ListPackagingGroups", } }
214
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagevod import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns a list of the tags assigned to the specified resource. func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { if params == nil { params = &ListTagsForResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) if err != nil { return nil, err } out := result.(*ListTagsForResourceOutput) out.ResultMetadata = metadata return out, nil } type ListTagsForResourceInput struct { // The Amazon Resource Name (ARN) for the resource. You can get this from the // response to any request to the resource. // // This member is required. ResourceArn *string noSmithyDocumentSerde } type ListTagsForResourceOutput struct { // A collection of tags associated with a resource Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpListTagsForResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTagsForResource{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage-vod", OperationName: "ListTagsForResource", } }
125
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagevod import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Adds tags to the specified resource. You can specify one or more tags to add. func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { if params == nil { params = &TagResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares) if err != nil { return nil, err } out := result.(*TagResourceOutput) out.ResultMetadata = metadata return out, nil } type TagResourceInput struct { // The Amazon Resource Name (ARN) for the resource. You can get this from the // response to any request to the resource. // // This member is required. ResourceArn *string // A collection of tags associated with a resource // // This member is required. Tags map[string]string noSmithyDocumentSerde } type TagResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpTagResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTagResource{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage-vod", OperationName: "TagResource", } }
126
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagevod import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Removes tags from the specified resource. You can specify one or more tags to // remove. func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { if params == nil { params = &UntagResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares) if err != nil { return nil, err } out := result.(*UntagResourceOutput) out.ResultMetadata = metadata return out, nil } type UntagResourceInput struct { // The Amazon Resource Name (ARN) for the resource. You can get this from the // response to any request to the resource. // // This member is required. ResourceArn *string // A comma-separated list of the tag keys to remove from the resource. // // This member is required. TagKeys []string noSmithyDocumentSerde } type UntagResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpUntagResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUntagResource{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage-vod", OperationName: "UntagResource", } }
127
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagevod import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/mediapackagevod/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates a specific packaging group. You can't change the id attribute or any // other system-generated attributes. func (c *Client) UpdatePackagingGroup(ctx context.Context, params *UpdatePackagingGroupInput, optFns ...func(*Options)) (*UpdatePackagingGroupOutput, error) { if params == nil { params = &UpdatePackagingGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdatePackagingGroup", params, optFns, c.addOperationUpdatePackagingGroupMiddlewares) if err != nil { return nil, err } out := result.(*UpdatePackagingGroupOutput) out.ResultMetadata = metadata return out, nil } // A MediaPackage VOD PackagingGroup resource configuration. type UpdatePackagingGroupInput struct { // The ID of a MediaPackage VOD PackagingGroup resource. // // This member is required. Id *string // CDN Authorization credentials Authorization *types.Authorization noSmithyDocumentSerde } type UpdatePackagingGroupOutput struct { // The approximate asset count of the PackagingGroup. ApproximateAssetCount int32 // The ARN of the PackagingGroup. Arn *string // CDN Authorization credentials Authorization *types.Authorization // The time the PackagingGroup was created. CreatedAt *string // The fully qualified domain name for Assets in the PackagingGroup. DomainName *string // Configure egress access logging. EgressAccessLogs *types.EgressAccessLogs // The ID of the PackagingGroup. Id *string // A collection of tags associated with a resource Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdatePackagingGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdatePackagingGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdatePackagingGroup{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdatePackagingGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdatePackagingGroup(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdatePackagingGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "mediapackage-vod", OperationName: "UpdatePackagingGroup", } }
151
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagevod import ( "bytes" "context" "encoding/json" "fmt" "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" "github.com/aws/aws-sdk-go-v2/service/mediapackagevod/types" smithy "github.com/aws/smithy-go" smithyio "github.com/aws/smithy-go/io" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "io/ioutil" "strings" ) type awsRestjson1_deserializeOpConfigureLogs struct { } func (*awsRestjson1_deserializeOpConfigureLogs) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpConfigureLogs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorConfigureLogs(response, &metadata) } output := &ConfigureLogsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentConfigureLogsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorConfigureLogs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) case strings.EqualFold("UnprocessableEntityException", errorCode): return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentConfigureLogsOutput(v **ConfigureLogsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ConfigureLogsOutput if *v == nil { sv = &ConfigureLogsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "authorization": if err := awsRestjson1_deserializeDocumentAuthorization(&sv.Authorization, value); err != nil { return err } case "createdAt": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.CreatedAt = ptr.String(jtv) } case "domainName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.DomainName = ptr.String(jtv) } case "egressAccessLogs": if err := awsRestjson1_deserializeDocumentEgressAccessLogs(&sv.EgressAccessLogs, value); err != nil { return err } case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "tags": if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpCreateAsset struct { } func (*awsRestjson1_deserializeOpCreateAsset) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpCreateAsset) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorCreateAsset(response, &metadata) } output := &CreateAssetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentCreateAssetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorCreateAsset(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) case strings.EqualFold("UnprocessableEntityException", errorCode): return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentCreateAssetOutput(v **CreateAssetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateAssetOutput if *v == nil { sv = &CreateAssetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "createdAt": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.CreatedAt = ptr.String(jtv) } case "egressEndpoints": if err := awsRestjson1_deserializeDocument__listOfEgressEndpoint(&sv.EgressEndpoints, value); err != nil { return err } case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "packagingGroupId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.PackagingGroupId = ptr.String(jtv) } case "resourceId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.ResourceId = ptr.String(jtv) } case "sourceArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.SourceArn = ptr.String(jtv) } case "sourceRoleArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.SourceRoleArn = ptr.String(jtv) } case "tags": if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpCreatePackagingConfiguration struct { } func (*awsRestjson1_deserializeOpCreatePackagingConfiguration) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpCreatePackagingConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorCreatePackagingConfiguration(response, &metadata) } output := &CreatePackagingConfigurationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentCreatePackagingConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorCreatePackagingConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) case strings.EqualFold("UnprocessableEntityException", errorCode): return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentCreatePackagingConfigurationOutput(v **CreatePackagingConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreatePackagingConfigurationOutput if *v == nil { sv = &CreatePackagingConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "cmafPackage": if err := awsRestjson1_deserializeDocumentCmafPackage(&sv.CmafPackage, value); err != nil { return err } case "createdAt": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.CreatedAt = ptr.String(jtv) } case "dashPackage": if err := awsRestjson1_deserializeDocumentDashPackage(&sv.DashPackage, value); err != nil { return err } case "hlsPackage": if err := awsRestjson1_deserializeDocumentHlsPackage(&sv.HlsPackage, value); err != nil { return err } case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "mssPackage": if err := awsRestjson1_deserializeDocumentMssPackage(&sv.MssPackage, value); err != nil { return err } case "packagingGroupId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.PackagingGroupId = ptr.String(jtv) } case "tags": if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpCreatePackagingGroup struct { } func (*awsRestjson1_deserializeOpCreatePackagingGroup) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpCreatePackagingGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorCreatePackagingGroup(response, &metadata) } output := &CreatePackagingGroupOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentCreatePackagingGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorCreatePackagingGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) case strings.EqualFold("UnprocessableEntityException", errorCode): return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentCreatePackagingGroupOutput(v **CreatePackagingGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreatePackagingGroupOutput if *v == nil { sv = &CreatePackagingGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { case "arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "authorization": if err := awsRestjson1_deserializeDocumentAuthorization(&sv.Authorization, value); err != nil { return err } case "createdAt": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.CreatedAt = ptr.String(jtv) } case "domainName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.DomainName = ptr.String(jtv) } case "egressAccessLogs": if err := awsRestjson1_deserializeDocumentEgressAccessLogs(&sv.EgressAccessLogs, value); err != nil { return err } case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "tags": if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpDeleteAsset struct { } func (*awsRestjson1_deserializeOpDeleteAsset) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpDeleteAsset) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorDeleteAsset(response, &metadata) } output := &DeleteAssetOutput{} out.Result = output return out, metadata, err } func awsRestjson1_deserializeOpErrorDeleteAsset(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) case strings.EqualFold("UnprocessableEntityException", errorCode): return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsRestjson1_deserializeOpDeletePackagingConfiguration struct { } func (*awsRestjson1_deserializeOpDeletePackagingConfiguration) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpDeletePackagingConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorDeletePackagingConfiguration(response, &metadata) } output := &DeletePackagingConfigurationOutput{} out.Result = output return out, metadata, err } func awsRestjson1_deserializeOpErrorDeletePackagingConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) case strings.EqualFold("UnprocessableEntityException", errorCode): return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsRestjson1_deserializeOpDeletePackagingGroup struct { } func (*awsRestjson1_deserializeOpDeletePackagingGroup) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpDeletePackagingGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorDeletePackagingGroup(response, &metadata) } output := &DeletePackagingGroupOutput{} out.Result = output return out, metadata, err } func awsRestjson1_deserializeOpErrorDeletePackagingGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) case strings.EqualFold("UnprocessableEntityException", errorCode): return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsRestjson1_deserializeOpDescribeAsset struct { } func (*awsRestjson1_deserializeOpDescribeAsset) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpDescribeAsset) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorDescribeAsset(response, &metadata) } output := &DescribeAssetOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentDescribeAssetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorDescribeAsset(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) case strings.EqualFold("UnprocessableEntityException", errorCode): return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentDescribeAssetOutput(v **DescribeAssetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DescribeAssetOutput if *v == nil { sv = &DescribeAssetOutput{} } else { sv = *v } for key, value := range shape { switch key { case "arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "createdAt": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.CreatedAt = ptr.String(jtv) } case "egressEndpoints": if err := awsRestjson1_deserializeDocument__listOfEgressEndpoint(&sv.EgressEndpoints, value); err != nil { return err } case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "packagingGroupId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.PackagingGroupId = ptr.String(jtv) } case "resourceId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.ResourceId = ptr.String(jtv) } case "sourceArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.SourceArn = ptr.String(jtv) } case "sourceRoleArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.SourceRoleArn = ptr.String(jtv) } case "tags": if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpDescribePackagingConfiguration struct { } func (*awsRestjson1_deserializeOpDescribePackagingConfiguration) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpDescribePackagingConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorDescribePackagingConfiguration(response, &metadata) } output := &DescribePackagingConfigurationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentDescribePackagingConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorDescribePackagingConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) case strings.EqualFold("UnprocessableEntityException", errorCode): return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentDescribePackagingConfigurationOutput(v **DescribePackagingConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DescribePackagingConfigurationOutput if *v == nil { sv = &DescribePackagingConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "cmafPackage": if err := awsRestjson1_deserializeDocumentCmafPackage(&sv.CmafPackage, value); err != nil { return err } case "createdAt": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.CreatedAt = ptr.String(jtv) } case "dashPackage": if err := awsRestjson1_deserializeDocumentDashPackage(&sv.DashPackage, value); err != nil { return err } case "hlsPackage": if err := awsRestjson1_deserializeDocumentHlsPackage(&sv.HlsPackage, value); err != nil { return err } case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "mssPackage": if err := awsRestjson1_deserializeDocumentMssPackage(&sv.MssPackage, value); err != nil { return err } case "packagingGroupId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.PackagingGroupId = ptr.String(jtv) } case "tags": if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpDescribePackagingGroup struct { } func (*awsRestjson1_deserializeOpDescribePackagingGroup) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpDescribePackagingGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorDescribePackagingGroup(response, &metadata) } output := &DescribePackagingGroupOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentDescribePackagingGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorDescribePackagingGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) case strings.EqualFold("UnprocessableEntityException", errorCode): return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentDescribePackagingGroupOutput(v **DescribePackagingGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DescribePackagingGroupOutput if *v == nil { sv = &DescribePackagingGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { case "approximateAssetCount": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ApproximateAssetCount = int32(i64) } case "arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "authorization": if err := awsRestjson1_deserializeDocumentAuthorization(&sv.Authorization, value); err != nil { return err } case "createdAt": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.CreatedAt = ptr.String(jtv) } case "domainName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.DomainName = ptr.String(jtv) } case "egressAccessLogs": if err := awsRestjson1_deserializeDocumentEgressAccessLogs(&sv.EgressAccessLogs, value); err != nil { return err } case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "tags": if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpListAssets struct { } func (*awsRestjson1_deserializeOpListAssets) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpListAssets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorListAssets(response, &metadata) } output := &ListAssetsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentListAssetsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorListAssets(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) case strings.EqualFold("UnprocessableEntityException", errorCode): return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentListAssetsOutput(v **ListAssetsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListAssetsOutput if *v == nil { sv = &ListAssetsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "assets": if err := awsRestjson1_deserializeDocument__listOfAssetShallow(&sv.Assets, value); err != nil { return err } case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpListPackagingConfigurations struct { } func (*awsRestjson1_deserializeOpListPackagingConfigurations) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpListPackagingConfigurations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorListPackagingConfigurations(response, &metadata) } output := &ListPackagingConfigurationsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentListPackagingConfigurationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorListPackagingConfigurations(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) case strings.EqualFold("UnprocessableEntityException", errorCode): return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentListPackagingConfigurationsOutput(v **ListPackagingConfigurationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListPackagingConfigurationsOutput if *v == nil { sv = &ListPackagingConfigurationsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "packagingConfigurations": if err := awsRestjson1_deserializeDocument__listOfPackagingConfiguration(&sv.PackagingConfigurations, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpListPackagingGroups struct { } func (*awsRestjson1_deserializeOpListPackagingGroups) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpListPackagingGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorListPackagingGroups(response, &metadata) } output := &ListPackagingGroupsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentListPackagingGroupsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorListPackagingGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) case strings.EqualFold("UnprocessableEntityException", errorCode): return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentListPackagingGroupsOutput(v **ListPackagingGroupsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListPackagingGroupsOutput if *v == nil { sv = &ListPackagingGroupsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "packagingGroups": if err := awsRestjson1_deserializeDocument__listOfPackagingGroup(&sv.PackagingGroups, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpListTagsForResource struct { } func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) } output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListTagsForResourceOutput if *v == nil { sv = &ListTagsForResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { case "tags": if err := awsRestjson1_deserializeDocument__mapOf__string(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpTagResource struct { } func (*awsRestjson1_deserializeOpTagResource) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) } output := &TagResourceOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsRestjson1_deserializeOpUntagResource struct { } func (*awsRestjson1_deserializeOpUntagResource) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) } output := &UntagResourceOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsRestjson1_deserializeOpUpdatePackagingGroup struct { } func (*awsRestjson1_deserializeOpUpdatePackagingGroup) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpUpdatePackagingGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorUpdatePackagingGroup(response, &metadata) } output := &UpdatePackagingGroupOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentUpdatePackagingGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } } return out, metadata, err } func awsRestjson1_deserializeOpErrorUpdatePackagingGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) case strings.EqualFold("UnprocessableEntityException", errorCode): return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentUpdatePackagingGroupOutput(v **UpdatePackagingGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdatePackagingGroupOutput if *v == nil { sv = &UpdatePackagingGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { case "approximateAssetCount": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ApproximateAssetCount = int32(i64) } case "arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "authorization": if err := awsRestjson1_deserializeDocumentAuthorization(&sv.Authorization, value); err != nil { return err } case "createdAt": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.CreatedAt = ptr.String(jtv) } case "domainName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.DomainName = ptr.String(jtv) } case "egressAccessLogs": if err := awsRestjson1_deserializeDocumentEgressAccessLogs(&sv.EgressAccessLogs, value); err != nil { return err } case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "tags": if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeErrorForbiddenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ForbiddenException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentForbiddenException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorInternalServerErrorException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.InternalServerErrorException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentInternalServerErrorException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.NotFoundException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorServiceUnavailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ServiceUnavailableException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentServiceUnavailableException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorTooManyRequestsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.TooManyRequestsException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentTooManyRequestsException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorUnprocessableEntityException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.UnprocessableEntityException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentUnprocessableEntityException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeDocument__listOf__PeriodTriggersElement(v *[]types.PeriodTriggersElement, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.PeriodTriggersElement if *v == nil { cv = []types.PeriodTriggersElement{} } else { cv = *v } for _, value := range shape { var col types.PeriodTriggersElement if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __PeriodTriggersElement to be of type string, got %T instead", value) } col = types.PeriodTriggersElement(jtv) } cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocument__listOf__string(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []string if *v == nil { cv = []string{} } else { cv = *v } for _, value := range shape { var col string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocument__listOfAssetShallow(v *[]types.AssetShallow, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.AssetShallow if *v == nil { cv = []types.AssetShallow{} } else { cv = *v } for _, value := range shape { var col types.AssetShallow destAddr := &col if err := awsRestjson1_deserializeDocumentAssetShallow(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocument__listOfDashManifest(v *[]types.DashManifest, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.DashManifest if *v == nil { cv = []types.DashManifest{} } else { cv = *v } for _, value := range shape { var col types.DashManifest destAddr := &col if err := awsRestjson1_deserializeDocumentDashManifest(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocument__listOfEgressEndpoint(v *[]types.EgressEndpoint, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.EgressEndpoint if *v == nil { cv = []types.EgressEndpoint{} } else { cv = *v } for _, value := range shape { var col types.EgressEndpoint destAddr := &col if err := awsRestjson1_deserializeDocumentEgressEndpoint(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocument__listOfHlsManifest(v *[]types.HlsManifest, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.HlsManifest if *v == nil { cv = []types.HlsManifest{} } else { cv = *v } for _, value := range shape { var col types.HlsManifest destAddr := &col if err := awsRestjson1_deserializeDocumentHlsManifest(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocument__listOfMssManifest(v *[]types.MssManifest, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.MssManifest if *v == nil { cv = []types.MssManifest{} } else { cv = *v } for _, value := range shape { var col types.MssManifest destAddr := &col if err := awsRestjson1_deserializeDocumentMssManifest(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocument__listOfPackagingConfiguration(v *[]types.PackagingConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.PackagingConfiguration if *v == nil { cv = []types.PackagingConfiguration{} } else { cv = *v } for _, value := range shape { var col types.PackagingConfiguration destAddr := &col if err := awsRestjson1_deserializeDocumentPackagingConfiguration(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocument__listOfPackagingGroup(v *[]types.PackagingGroup, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.PackagingGroup if *v == nil { cv = []types.PackagingGroup{} } else { cv = *v } for _, value := range shape { var col types.PackagingGroup destAddr := &col if err := awsRestjson1_deserializeDocumentPackagingGroup(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocument__mapOf__string(v *map[string]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var mv map[string]string if *v == nil { mv = map[string]string{} } else { mv = *v } for key, value := range shape { var parsedVal string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } parsedVal = jtv } mv[key] = parsedVal } *v = mv return nil } func awsRestjson1_deserializeDocumentAssetShallow(v **types.AssetShallow, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.AssetShallow if *v == nil { sv = &types.AssetShallow{} } else { sv = *v } for key, value := range shape { switch key { case "arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "createdAt": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.CreatedAt = ptr.String(jtv) } case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "packagingGroupId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.PackagingGroupId = ptr.String(jtv) } case "resourceId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.ResourceId = ptr.String(jtv) } case "sourceArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.SourceArn = ptr.String(jtv) } case "sourceRoleArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.SourceRoleArn = ptr.String(jtv) } case "tags": if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentAuthorization(v **types.Authorization, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.Authorization if *v == nil { sv = &types.Authorization{} } else { sv = *v } for key, value := range shape { switch key { case "cdnIdentifierSecret": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.CdnIdentifierSecret = ptr.String(jtv) } case "secretsRoleArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.SecretsRoleArn = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentCmafEncryption(v **types.CmafEncryption, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.CmafEncryption if *v == nil { sv = &types.CmafEncryption{} } else { sv = *v } for key, value := range shape { switch key { case "constantInitializationVector": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.ConstantInitializationVector = ptr.String(jtv) } case "spekeKeyProvider": if err := awsRestjson1_deserializeDocumentSpekeKeyProvider(&sv.SpekeKeyProvider, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentCmafPackage(v **types.CmafPackage, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.CmafPackage if *v == nil { sv = &types.CmafPackage{} } else { sv = *v } for key, value := range shape { switch key { case "encryption": if err := awsRestjson1_deserializeDocumentCmafEncryption(&sv.Encryption, value); err != nil { return err } case "hlsManifests": if err := awsRestjson1_deserializeDocument__listOfHlsManifest(&sv.HlsManifests, value); err != nil { return err } case "includeEncoderConfigurationInSegments": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected __boolean to be of type *bool, got %T instead", value) } sv.IncludeEncoderConfigurationInSegments = jtv } case "segmentDurationSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.SegmentDurationSeconds = int32(i64) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentDashEncryption(v **types.DashEncryption, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.DashEncryption if *v == nil { sv = &types.DashEncryption{} } else { sv = *v } for key, value := range shape { switch key { case "spekeKeyProvider": if err := awsRestjson1_deserializeDocumentSpekeKeyProvider(&sv.SpekeKeyProvider, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentDashManifest(v **types.DashManifest, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.DashManifest if *v == nil { sv = &types.DashManifest{} } else { sv = *v } for key, value := range shape { switch key { case "manifestLayout": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ManifestLayout to be of type string, got %T instead", value) } sv.ManifestLayout = types.ManifestLayout(jtv) } case "manifestName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.ManifestName = ptr.String(jtv) } case "minBufferTimeSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.MinBufferTimeSeconds = int32(i64) } case "profile": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Profile to be of type string, got %T instead", value) } sv.Profile = types.Profile(jtv) } case "scteMarkersSource": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ScteMarkersSource to be of type string, got %T instead", value) } sv.ScteMarkersSource = types.ScteMarkersSource(jtv) } case "streamSelection": if err := awsRestjson1_deserializeDocumentStreamSelection(&sv.StreamSelection, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentDashPackage(v **types.DashPackage, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.DashPackage if *v == nil { sv = &types.DashPackage{} } else { sv = *v } for key, value := range shape { switch key { case "dashManifests": if err := awsRestjson1_deserializeDocument__listOfDashManifest(&sv.DashManifests, value); err != nil { return err } case "encryption": if err := awsRestjson1_deserializeDocumentDashEncryption(&sv.Encryption, value); err != nil { return err } case "includeEncoderConfigurationInSegments": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected __boolean to be of type *bool, got %T instead", value) } sv.IncludeEncoderConfigurationInSegments = jtv } case "includeIframeOnlyStream": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected __boolean to be of type *bool, got %T instead", value) } sv.IncludeIframeOnlyStream = jtv } case "periodTriggers": if err := awsRestjson1_deserializeDocument__listOf__PeriodTriggersElement(&sv.PeriodTriggers, value); err != nil { return err } case "segmentDurationSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.SegmentDurationSeconds = int32(i64) } case "segmentTemplateFormat": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SegmentTemplateFormat to be of type string, got %T instead", value) } sv.SegmentTemplateFormat = types.SegmentTemplateFormat(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentEgressAccessLogs(v **types.EgressAccessLogs, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.EgressAccessLogs if *v == nil { sv = &types.EgressAccessLogs{} } else { sv = *v } for key, value := range shape { switch key { case "logGroupName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.LogGroupName = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentEgressEndpoint(v **types.EgressEndpoint, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.EgressEndpoint if *v == nil { sv = &types.EgressEndpoint{} } else { sv = *v } for key, value := range shape { switch key { case "packagingConfigurationId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.PackagingConfigurationId = ptr.String(jtv) } case "status": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Status = ptr.String(jtv) } case "url": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Url = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentEncryptionContractConfiguration(v **types.EncryptionContractConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.EncryptionContractConfiguration if *v == nil { sv = &types.EncryptionContractConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "presetSpeke20Audio": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PresetSpeke20Audio to be of type string, got %T instead", value) } sv.PresetSpeke20Audio = types.PresetSpeke20Audio(jtv) } case "presetSpeke20Video": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PresetSpeke20Video to be of type string, got %T instead", value) } sv.PresetSpeke20Video = types.PresetSpeke20Video(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentForbiddenException(v **types.ForbiddenException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ForbiddenException if *v == nil { sv = &types.ForbiddenException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentHlsEncryption(v **types.HlsEncryption, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.HlsEncryption if *v == nil { sv = &types.HlsEncryption{} } else { sv = *v } for key, value := range shape { switch key { case "constantInitializationVector": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.ConstantInitializationVector = ptr.String(jtv) } case "encryptionMethod": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected EncryptionMethod to be of type string, got %T instead", value) } sv.EncryptionMethod = types.EncryptionMethod(jtv) } case "spekeKeyProvider": if err := awsRestjson1_deserializeDocumentSpekeKeyProvider(&sv.SpekeKeyProvider, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentHlsManifest(v **types.HlsManifest, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.HlsManifest if *v == nil { sv = &types.HlsManifest{} } else { sv = *v } for key, value := range shape { switch key { case "adMarkers": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AdMarkers to be of type string, got %T instead", value) } sv.AdMarkers = types.AdMarkers(jtv) } case "includeIframeOnlyStream": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected __boolean to be of type *bool, got %T instead", value) } sv.IncludeIframeOnlyStream = jtv } case "manifestName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.ManifestName = ptr.String(jtv) } case "programDateTimeIntervalSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ProgramDateTimeIntervalSeconds = int32(i64) } case "repeatExtXKey": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected __boolean to be of type *bool, got %T instead", value) } sv.RepeatExtXKey = jtv } case "streamSelection": if err := awsRestjson1_deserializeDocumentStreamSelection(&sv.StreamSelection, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentHlsPackage(v **types.HlsPackage, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.HlsPackage if *v == nil { sv = &types.HlsPackage{} } else { sv = *v } for key, value := range shape { switch key { case "encryption": if err := awsRestjson1_deserializeDocumentHlsEncryption(&sv.Encryption, value); err != nil { return err } case "hlsManifests": if err := awsRestjson1_deserializeDocument__listOfHlsManifest(&sv.HlsManifests, value); err != nil { return err } case "includeDvbSubtitles": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected __boolean to be of type *bool, got %T instead", value) } sv.IncludeDvbSubtitles = jtv } case "segmentDurationSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.SegmentDurationSeconds = int32(i64) } case "useAudioRenditionGroup": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected __boolean to be of type *bool, got %T instead", value) } sv.UseAudioRenditionGroup = jtv } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentInternalServerErrorException(v **types.InternalServerErrorException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InternalServerErrorException if *v == nil { sv = &types.InternalServerErrorException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentMssEncryption(v **types.MssEncryption, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.MssEncryption if *v == nil { sv = &types.MssEncryption{} } else { sv = *v } for key, value := range shape { switch key { case "spekeKeyProvider": if err := awsRestjson1_deserializeDocumentSpekeKeyProvider(&sv.SpekeKeyProvider, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentMssManifest(v **types.MssManifest, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.MssManifest if *v == nil { sv = &types.MssManifest{} } else { sv = *v } for key, value := range shape { switch key { case "manifestName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.ManifestName = ptr.String(jtv) } case "streamSelection": if err := awsRestjson1_deserializeDocumentStreamSelection(&sv.StreamSelection, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentMssPackage(v **types.MssPackage, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.MssPackage if *v == nil { sv = &types.MssPackage{} } else { sv = *v } for key, value := range shape { switch key { case "encryption": if err := awsRestjson1_deserializeDocumentMssEncryption(&sv.Encryption, value); err != nil { return err } case "mssManifests": if err := awsRestjson1_deserializeDocument__listOfMssManifest(&sv.MssManifests, value); err != nil { return err } case "segmentDurationSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.SegmentDurationSeconds = int32(i64) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentNotFoundException(v **types.NotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.NotFoundException if *v == nil { sv = &types.NotFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentPackagingConfiguration(v **types.PackagingConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.PackagingConfiguration if *v == nil { sv = &types.PackagingConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "cmafPackage": if err := awsRestjson1_deserializeDocumentCmafPackage(&sv.CmafPackage, value); err != nil { return err } case "createdAt": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.CreatedAt = ptr.String(jtv) } case "dashPackage": if err := awsRestjson1_deserializeDocumentDashPackage(&sv.DashPackage, value); err != nil { return err } case "hlsPackage": if err := awsRestjson1_deserializeDocumentHlsPackage(&sv.HlsPackage, value); err != nil { return err } case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "mssPackage": if err := awsRestjson1_deserializeDocumentMssPackage(&sv.MssPackage, value); err != nil { return err } case "packagingGroupId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.PackagingGroupId = ptr.String(jtv) } case "tags": if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentPackagingGroup(v **types.PackagingGroup, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.PackagingGroup if *v == nil { sv = &types.PackagingGroup{} } else { sv = *v } for key, value := range shape { switch key { case "approximateAssetCount": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ApproximateAssetCount = int32(i64) } case "arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "authorization": if err := awsRestjson1_deserializeDocumentAuthorization(&sv.Authorization, value); err != nil { return err } case "createdAt": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.CreatedAt = ptr.String(jtv) } case "domainName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.DomainName = ptr.String(jtv) } case "egressAccessLogs": if err := awsRestjson1_deserializeDocumentEgressAccessLogs(&sv.EgressAccessLogs, value); err != nil { return err } case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "tags": if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentServiceUnavailableException(v **types.ServiceUnavailableException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ServiceUnavailableException if *v == nil { sv = &types.ServiceUnavailableException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentSpekeKeyProvider(v **types.SpekeKeyProvider, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.SpekeKeyProvider if *v == nil { sv = &types.SpekeKeyProvider{} } else { sv = *v } for key, value := range shape { switch key { case "encryptionContractConfiguration": if err := awsRestjson1_deserializeDocumentEncryptionContractConfiguration(&sv.EncryptionContractConfiguration, value); err != nil { return err } case "roleArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.RoleArn = ptr.String(jtv) } case "systemIds": if err := awsRestjson1_deserializeDocument__listOf__string(&sv.SystemIds, value); err != nil { return err } case "url": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Url = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentStreamSelection(v **types.StreamSelection, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.StreamSelection if *v == nil { sv = &types.StreamSelection{} } else { sv = *v } for key, value := range shape { switch key { case "maxVideoBitsPerSecond": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.MaxVideoBitsPerSecond = int32(i64) } case "minVideoBitsPerSecond": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.MinVideoBitsPerSecond = int32(i64) } case "streamOrder": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected StreamOrder to be of type string, got %T instead", value) } sv.StreamOrder = types.StreamOrder(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentTags(v *map[string]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var mv map[string]string if *v == nil { mv = map[string]string{} } else { mv = *v } for key, value := range shape { var parsedVal string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } parsedVal = jtv } mv[key] = parsedVal } *v = mv return nil } func awsRestjson1_deserializeDocumentTooManyRequestsException(v **types.TooManyRequestsException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.TooManyRequestsException if *v == nil { sv = &types.TooManyRequestsException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentUnprocessableEntityException(v **types.UnprocessableEntityException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.UnprocessableEntityException if *v == nil { sv = &types.UnprocessableEntityException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil }
5,004
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. // Package mediapackagevod provides the API client, operations, and parameter // types for AWS Elemental MediaPackage VOD. // // AWS Elemental MediaPackage VOD package mediapackagevod
8
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagevod import ( "context" "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" internalendpoints "github.com/aws/aws-sdk-go-v2/service/mediapackagevod/internal/endpoints" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "net/url" "strings" ) // EndpointResolverOptions is the service endpoint resolver options type EndpointResolverOptions = internalendpoints.Options // EndpointResolver interface for resolving service endpoints. type EndpointResolver interface { ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) } var _ EndpointResolver = &internalendpoints.Resolver{} // NewDefaultEndpointResolver constructs a new service endpoint resolver func NewDefaultEndpointResolver() *internalendpoints.Resolver { return internalendpoints.New() } // EndpointResolverFunc is a helper utility that wraps a function so it satisfies // the EndpointResolver interface. This is useful when you want to add additional // endpoint resolving logic, or stub out specific endpoints with custom values. type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { return fn(region, options) } func resolveDefaultEndpointConfiguration(o *Options) { if o.EndpointResolver != nil { return } o.EndpointResolver = NewDefaultEndpointResolver() } // EndpointResolverFromURL returns an EndpointResolver configured using the // provided endpoint url. By default, the resolved endpoint resolver uses the // client region as signing region, and the endpoint source is set to // EndpointSourceCustom.You can provide functional options to configure endpoint // values for the resolved endpoint. func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} for _, fn := range optFns { fn(&e) } return EndpointResolverFunc( func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { if len(e.SigningRegion) == 0 { e.SigningRegion = region } return e, nil }, ) } type ResolveEndpoint struct { Resolver EndpointResolver Options EndpointResolverOptions } func (*ResolveEndpoint) ID() string { return "ResolveEndpoint" } func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) } if m.Resolver == nil { return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") } eo := m.Options eo.Logger = middleware.GetLogger(ctx) var endpoint aws.Endpoint endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) if err != nil { return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) } req.URL, err = url.Parse(endpoint.URL) if err != nil { return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) } if len(awsmiddleware.GetSigningName(ctx)) == 0 { signingName := endpoint.SigningName if len(signingName) == 0 { signingName = "mediapackage-vod" } ctx = awsmiddleware.SetSigningName(ctx, signingName) } ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) return next.HandleSerialize(ctx, in) } func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { return stack.Serialize.Insert(&ResolveEndpoint{ Resolver: o.EndpointResolver, Options: o.EndpointOptions, }, "OperationSerializer", middleware.Before) } func removeResolveEndpointMiddleware(stack *middleware.Stack) error { _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) return err } type wrappedEndpointResolver struct { awsResolver aws.EndpointResolverWithOptions resolver EndpointResolver } func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { if w.awsResolver == nil { goto fallback } endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options) if err == nil { return endpoint, nil } if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) { return endpoint, err } fallback: if w.resolver == nil { return endpoint, fmt.Errorf("default endpoint resolver provided was nil") } return w.resolver.ResolveEndpoint(region, options) } type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { return a(service, region) } var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) // withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver. // If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided // fallbackResolver for resolution. // // fallbackResolver must not be nil func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver { var resolver aws.EndpointResolverWithOptions if awsResolverWithOptions != nil { resolver = awsResolverWithOptions } else if awsResolver != nil { resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) } return &wrappedEndpointResolver{ awsResolver: resolver, resolver: fallbackResolver, } } func finalizeClientEndpointResolverOptions(options *Options) { options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() if len(options.EndpointOptions.ResolvedRegion) == 0 { const fipsInfix = "-fips-" const fipsPrefix = "fips-" const fipsSuffix = "-fips" if strings.Contains(options.Region, fipsInfix) || strings.Contains(options.Region, fipsPrefix) || strings.Contains(options.Region, fipsSuffix) { options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled } } }
201
aws-sdk-go-v2
aws
Go
// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. package mediapackagevod // goModuleVersion is the tagged release for this module const goModuleVersion = "1.22.8"
7
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package mediapackagevod
4