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 proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// List provisioned resources for a component with details. For more information
// about components, see Proton components (https://docs.aws.amazon.com/proton/latest/userguide/ag-components.html)
// in the Proton User Guide.
func (c *Client) ListComponentProvisionedResources(ctx context.Context, params *ListComponentProvisionedResourcesInput, optFns ...func(*Options)) (*ListComponentProvisionedResourcesOutput, error) {
if params == nil {
params = &ListComponentProvisionedResourcesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListComponentProvisionedResources", params, optFns, c.addOperationListComponentProvisionedResourcesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListComponentProvisionedResourcesOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListComponentProvisionedResourcesInput struct {
// The name of the component whose provisioned resources you want.
//
// This member is required.
ComponentName *string
// A token that indicates the location of the next provisioned resource in the
// array of provisioned resources, after the list of provisioned resources that was
// previously requested.
NextToken *string
noSmithyDocumentSerde
}
type ListComponentProvisionedResourcesOutput struct {
// An array of provisioned resources for a component.
//
// This member is required.
ProvisionedResources []types.ProvisionedResource
// A token that indicates the location of the next provisioned resource in the
// array of provisioned resources, after the current requested list of provisioned
// resources.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListComponentProvisionedResourcesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpListComponentProvisionedResources{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListComponentProvisionedResources{}, 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 = addOpListComponentProvisionedResourcesValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListComponentProvisionedResources(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
}
// ListComponentProvisionedResourcesAPIClient is a client that implements the
// ListComponentProvisionedResources operation.
type ListComponentProvisionedResourcesAPIClient interface {
ListComponentProvisionedResources(context.Context, *ListComponentProvisionedResourcesInput, ...func(*Options)) (*ListComponentProvisionedResourcesOutput, error)
}
var _ ListComponentProvisionedResourcesAPIClient = (*Client)(nil)
// ListComponentProvisionedResourcesPaginatorOptions is the paginator options for
// ListComponentProvisionedResources
type ListComponentProvisionedResourcesPaginatorOptions struct {
// 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
}
// ListComponentProvisionedResourcesPaginator is a paginator for
// ListComponentProvisionedResources
type ListComponentProvisionedResourcesPaginator struct {
options ListComponentProvisionedResourcesPaginatorOptions
client ListComponentProvisionedResourcesAPIClient
params *ListComponentProvisionedResourcesInput
nextToken *string
firstPage bool
}
// NewListComponentProvisionedResourcesPaginator returns a new
// ListComponentProvisionedResourcesPaginator
func NewListComponentProvisionedResourcesPaginator(client ListComponentProvisionedResourcesAPIClient, params *ListComponentProvisionedResourcesInput, optFns ...func(*ListComponentProvisionedResourcesPaginatorOptions)) *ListComponentProvisionedResourcesPaginator {
if params == nil {
params = &ListComponentProvisionedResourcesInput{}
}
options := ListComponentProvisionedResourcesPaginatorOptions{}
for _, fn := range optFns {
fn(&options)
}
return &ListComponentProvisionedResourcesPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListComponentProvisionedResourcesPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListComponentProvisionedResources page.
func (p *ListComponentProvisionedResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListComponentProvisionedResourcesOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.NextToken = p.nextToken
result, err := p.client.ListComponentProvisionedResources(ctx, ¶ms, 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_opListComponentProvisionedResources(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "ListComponentProvisionedResources",
}
}
| 221 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// List components with summary data. You can filter the result list by
// environment, service, or a single service instance. For more information about
// components, see Proton components (https://docs.aws.amazon.com/proton/latest/userguide/ag-components.html)
// in the Proton User Guide.
func (c *Client) ListComponents(ctx context.Context, params *ListComponentsInput, optFns ...func(*Options)) (*ListComponentsOutput, error) {
if params == nil {
params = &ListComponentsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListComponents", params, optFns, c.addOperationListComponentsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListComponentsOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListComponentsInput struct {
// The name of an environment for result list filtering. Proton returns components
// associated with the environment or attached to service instances running in it.
EnvironmentName *string
// The maximum number of components to list.
MaxResults *int32
// A token that indicates the location of the next component in the array of
// components, after the list of components that was previously requested.
NextToken *string
// The name of a service instance for result list filtering. Proton returns the
// component attached to the service instance, if any.
ServiceInstanceName *string
// The name of a service for result list filtering. Proton returns components
// attached to service instances of the service.
ServiceName *string
noSmithyDocumentSerde
}
type ListComponentsOutput struct {
// An array of components with summary data.
//
// This member is required.
Components []types.ComponentSummary
// A token that indicates the location of the next component in the array of
// components, after the current requested list of components.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListComponentsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpListComponents{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListComponents{}, 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_opListComponents(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
}
// ListComponentsAPIClient is a client that implements the ListComponents
// operation.
type ListComponentsAPIClient interface {
ListComponents(context.Context, *ListComponentsInput, ...func(*Options)) (*ListComponentsOutput, error)
}
var _ ListComponentsAPIClient = (*Client)(nil)
// ListComponentsPaginatorOptions is the paginator options for ListComponents
type ListComponentsPaginatorOptions struct {
// The maximum number of components to list.
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
}
// ListComponentsPaginator is a paginator for ListComponents
type ListComponentsPaginator struct {
options ListComponentsPaginatorOptions
client ListComponentsAPIClient
params *ListComponentsInput
nextToken *string
firstPage bool
}
// NewListComponentsPaginator returns a new ListComponentsPaginator
func NewListComponentsPaginator(client ListComponentsAPIClient, params *ListComponentsInput, optFns ...func(*ListComponentsPaginatorOptions)) *ListComponentsPaginator {
if params == nil {
params = &ListComponentsInput{}
}
options := ListComponentsPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListComponentsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListComponentsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListComponents page.
func (p *ListComponentsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListComponentsOutput, 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.ListComponents(ctx, ¶ms, 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_opListComponents(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "ListComponents",
}
}
| 236 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// View a list of environment account connections. For more information, see
// Environment account connections (https://docs.aws.amazon.com/proton/latest/userguide/ag-env-account-connections.html)
// in the Proton User guide.
func (c *Client) ListEnvironmentAccountConnections(ctx context.Context, params *ListEnvironmentAccountConnectionsInput, optFns ...func(*Options)) (*ListEnvironmentAccountConnectionsOutput, error) {
if params == nil {
params = &ListEnvironmentAccountConnectionsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListEnvironmentAccountConnections", params, optFns, c.addOperationListEnvironmentAccountConnectionsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListEnvironmentAccountConnectionsOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListEnvironmentAccountConnectionsInput struct {
// The type of account making the ListEnvironmentAccountConnections request.
//
// This member is required.
RequestedBy types.EnvironmentAccountConnectionRequesterAccountType
// The environment name that's associated with each listed environment account
// connection.
EnvironmentName *string
// The maximum number of environment account connections to list.
MaxResults *int32
// A token that indicates the location of the next environment account connection
// in the array of environment account connections, after the list of environment
// account connections that was previously requested.
NextToken *string
// The status details for each listed environment account connection.
Statuses []types.EnvironmentAccountConnectionStatus
noSmithyDocumentSerde
}
type ListEnvironmentAccountConnectionsOutput struct {
// An array of environment account connections with details that's returned by
// Proton.
//
// This member is required.
EnvironmentAccountConnections []types.EnvironmentAccountConnectionSummary
// A token that indicates the location of the next environment account connection
// in the array of environment account connections, after the current requested
// list of environment account connections.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListEnvironmentAccountConnectionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpListEnvironmentAccountConnections{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListEnvironmentAccountConnections{}, 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 = addOpListEnvironmentAccountConnectionsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEnvironmentAccountConnections(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
}
// ListEnvironmentAccountConnectionsAPIClient is a client that implements the
// ListEnvironmentAccountConnections operation.
type ListEnvironmentAccountConnectionsAPIClient interface {
ListEnvironmentAccountConnections(context.Context, *ListEnvironmentAccountConnectionsInput, ...func(*Options)) (*ListEnvironmentAccountConnectionsOutput, error)
}
var _ ListEnvironmentAccountConnectionsAPIClient = (*Client)(nil)
// ListEnvironmentAccountConnectionsPaginatorOptions is the paginator options for
// ListEnvironmentAccountConnections
type ListEnvironmentAccountConnectionsPaginatorOptions struct {
// The maximum number of environment account connections to list.
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
}
// ListEnvironmentAccountConnectionsPaginator is a paginator for
// ListEnvironmentAccountConnections
type ListEnvironmentAccountConnectionsPaginator struct {
options ListEnvironmentAccountConnectionsPaginatorOptions
client ListEnvironmentAccountConnectionsAPIClient
params *ListEnvironmentAccountConnectionsInput
nextToken *string
firstPage bool
}
// NewListEnvironmentAccountConnectionsPaginator returns a new
// ListEnvironmentAccountConnectionsPaginator
func NewListEnvironmentAccountConnectionsPaginator(client ListEnvironmentAccountConnectionsAPIClient, params *ListEnvironmentAccountConnectionsInput, optFns ...func(*ListEnvironmentAccountConnectionsPaginatorOptions)) *ListEnvironmentAccountConnectionsPaginator {
if params == nil {
params = &ListEnvironmentAccountConnectionsInput{}
}
options := ListEnvironmentAccountConnectionsPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListEnvironmentAccountConnectionsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListEnvironmentAccountConnectionsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListEnvironmentAccountConnections page.
func (p *ListEnvironmentAccountConnectionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEnvironmentAccountConnectionsOutput, 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.ListEnvironmentAccountConnections(ctx, ¶ms, 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_opListEnvironmentAccountConnections(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "ListEnvironmentAccountConnections",
}
}
| 244 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// List the infrastructure as code outputs for your environment.
func (c *Client) ListEnvironmentOutputs(ctx context.Context, params *ListEnvironmentOutputsInput, optFns ...func(*Options)) (*ListEnvironmentOutputsOutput, error) {
if params == nil {
params = &ListEnvironmentOutputsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListEnvironmentOutputs", params, optFns, c.addOperationListEnvironmentOutputsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListEnvironmentOutputsOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListEnvironmentOutputsInput struct {
// The environment name.
//
// This member is required.
EnvironmentName *string
// A token that indicates the location of the next environment output in the array
// of environment outputs, after the list of environment outputs that was
// previously requested.
NextToken *string
noSmithyDocumentSerde
}
type ListEnvironmentOutputsOutput struct {
// An array of environment outputs with detail data.
//
// This member is required.
Outputs []types.Output
// A token that indicates the location of the next environment output in the array
// of environment outputs, after the current requested list of environment outputs.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListEnvironmentOutputsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpListEnvironmentOutputs{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListEnvironmentOutputs{}, 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 = addOpListEnvironmentOutputsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEnvironmentOutputs(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
}
// ListEnvironmentOutputsAPIClient is a client that implements the
// ListEnvironmentOutputs operation.
type ListEnvironmentOutputsAPIClient interface {
ListEnvironmentOutputs(context.Context, *ListEnvironmentOutputsInput, ...func(*Options)) (*ListEnvironmentOutputsOutput, error)
}
var _ ListEnvironmentOutputsAPIClient = (*Client)(nil)
// ListEnvironmentOutputsPaginatorOptions is the paginator options for
// ListEnvironmentOutputs
type ListEnvironmentOutputsPaginatorOptions struct {
// 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
}
// ListEnvironmentOutputsPaginator is a paginator for ListEnvironmentOutputs
type ListEnvironmentOutputsPaginator struct {
options ListEnvironmentOutputsPaginatorOptions
client ListEnvironmentOutputsAPIClient
params *ListEnvironmentOutputsInput
nextToken *string
firstPage bool
}
// NewListEnvironmentOutputsPaginator returns a new ListEnvironmentOutputsPaginator
func NewListEnvironmentOutputsPaginator(client ListEnvironmentOutputsAPIClient, params *ListEnvironmentOutputsInput, optFns ...func(*ListEnvironmentOutputsPaginatorOptions)) *ListEnvironmentOutputsPaginator {
if params == nil {
params = &ListEnvironmentOutputsInput{}
}
options := ListEnvironmentOutputsPaginatorOptions{}
for _, fn := range optFns {
fn(&options)
}
return &ListEnvironmentOutputsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListEnvironmentOutputsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListEnvironmentOutputs page.
func (p *ListEnvironmentOutputsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEnvironmentOutputsOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.NextToken = p.nextToken
result, err := p.client.ListEnvironmentOutputs(ctx, ¶ms, 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_opListEnvironmentOutputs(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "ListEnvironmentOutputs",
}
}
| 216 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// List the provisioned resources for your environment.
func (c *Client) ListEnvironmentProvisionedResources(ctx context.Context, params *ListEnvironmentProvisionedResourcesInput, optFns ...func(*Options)) (*ListEnvironmentProvisionedResourcesOutput, error) {
if params == nil {
params = &ListEnvironmentProvisionedResourcesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListEnvironmentProvisionedResources", params, optFns, c.addOperationListEnvironmentProvisionedResourcesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListEnvironmentProvisionedResourcesOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListEnvironmentProvisionedResourcesInput struct {
// The environment name.
//
// This member is required.
EnvironmentName *string
// A token that indicates the location of the next environment provisioned
// resource in the array of environment provisioned resources, after the list of
// environment provisioned resources that was previously requested.
NextToken *string
noSmithyDocumentSerde
}
type ListEnvironmentProvisionedResourcesOutput struct {
// An array of environment provisioned resources.
//
// This member is required.
ProvisionedResources []types.ProvisionedResource
// A token that indicates the location of the next environment provisioned
// resource in the array of provisioned resources, after the current requested list
// of environment provisioned resources.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListEnvironmentProvisionedResourcesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpListEnvironmentProvisionedResources{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListEnvironmentProvisionedResources{}, 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 = addOpListEnvironmentProvisionedResourcesValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEnvironmentProvisionedResources(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
}
// ListEnvironmentProvisionedResourcesAPIClient is a client that implements the
// ListEnvironmentProvisionedResources operation.
type ListEnvironmentProvisionedResourcesAPIClient interface {
ListEnvironmentProvisionedResources(context.Context, *ListEnvironmentProvisionedResourcesInput, ...func(*Options)) (*ListEnvironmentProvisionedResourcesOutput, error)
}
var _ ListEnvironmentProvisionedResourcesAPIClient = (*Client)(nil)
// ListEnvironmentProvisionedResourcesPaginatorOptions is the paginator options
// for ListEnvironmentProvisionedResources
type ListEnvironmentProvisionedResourcesPaginatorOptions struct {
// 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
}
// ListEnvironmentProvisionedResourcesPaginator is a paginator for
// ListEnvironmentProvisionedResources
type ListEnvironmentProvisionedResourcesPaginator struct {
options ListEnvironmentProvisionedResourcesPaginatorOptions
client ListEnvironmentProvisionedResourcesAPIClient
params *ListEnvironmentProvisionedResourcesInput
nextToken *string
firstPage bool
}
// NewListEnvironmentProvisionedResourcesPaginator returns a new
// ListEnvironmentProvisionedResourcesPaginator
func NewListEnvironmentProvisionedResourcesPaginator(client ListEnvironmentProvisionedResourcesAPIClient, params *ListEnvironmentProvisionedResourcesInput, optFns ...func(*ListEnvironmentProvisionedResourcesPaginatorOptions)) *ListEnvironmentProvisionedResourcesPaginator {
if params == nil {
params = &ListEnvironmentProvisionedResourcesInput{}
}
options := ListEnvironmentProvisionedResourcesPaginatorOptions{}
for _, fn := range optFns {
fn(&options)
}
return &ListEnvironmentProvisionedResourcesPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListEnvironmentProvisionedResourcesPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListEnvironmentProvisionedResources page.
func (p *ListEnvironmentProvisionedResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEnvironmentProvisionedResourcesOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.NextToken = p.nextToken
result, err := p.client.ListEnvironmentProvisionedResources(ctx, ¶ms, 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_opListEnvironmentProvisionedResources(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "ListEnvironmentProvisionedResources",
}
}
| 219 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// List environments with detail data summaries.
func (c *Client) ListEnvironments(ctx context.Context, params *ListEnvironmentsInput, optFns ...func(*Options)) (*ListEnvironmentsOutput, error) {
if params == nil {
params = &ListEnvironmentsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListEnvironments", params, optFns, c.addOperationListEnvironmentsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListEnvironmentsOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListEnvironmentsInput struct {
// An array of the versions of the environment template.
EnvironmentTemplates []types.EnvironmentTemplateFilter
// The maximum number of environments to list.
MaxResults *int32
// A token that indicates the location of the next environment in the array of
// environments, after the list of environments that was previously requested.
NextToken *string
noSmithyDocumentSerde
}
type ListEnvironmentsOutput struct {
// An array of environment detail data summaries.
//
// This member is required.
Environments []types.EnvironmentSummary
// A token that indicates the location of the next environment in the array of
// environments, after the current requested list of environments.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListEnvironmentsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpListEnvironments{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListEnvironments{}, 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 = addOpListEnvironmentsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEnvironments(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
}
// ListEnvironmentsAPIClient is a client that implements the ListEnvironments
// operation.
type ListEnvironmentsAPIClient interface {
ListEnvironments(context.Context, *ListEnvironmentsInput, ...func(*Options)) (*ListEnvironmentsOutput, error)
}
var _ ListEnvironmentsAPIClient = (*Client)(nil)
// ListEnvironmentsPaginatorOptions is the paginator options for ListEnvironments
type ListEnvironmentsPaginatorOptions struct {
// The maximum number of environments to list.
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
}
// ListEnvironmentsPaginator is a paginator for ListEnvironments
type ListEnvironmentsPaginator struct {
options ListEnvironmentsPaginatorOptions
client ListEnvironmentsAPIClient
params *ListEnvironmentsInput
nextToken *string
firstPage bool
}
// NewListEnvironmentsPaginator returns a new ListEnvironmentsPaginator
func NewListEnvironmentsPaginator(client ListEnvironmentsAPIClient, params *ListEnvironmentsInput, optFns ...func(*ListEnvironmentsPaginatorOptions)) *ListEnvironmentsPaginator {
if params == nil {
params = &ListEnvironmentsInput{}
}
options := ListEnvironmentsPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListEnvironmentsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListEnvironmentsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListEnvironments page.
func (p *ListEnvironmentsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEnvironmentsOutput, 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.ListEnvironments(ctx, ¶ms, 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_opListEnvironments(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "ListEnvironments",
}
}
| 227 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// List environment templates.
func (c *Client) ListEnvironmentTemplates(ctx context.Context, params *ListEnvironmentTemplatesInput, optFns ...func(*Options)) (*ListEnvironmentTemplatesOutput, error) {
if params == nil {
params = &ListEnvironmentTemplatesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListEnvironmentTemplates", params, optFns, c.addOperationListEnvironmentTemplatesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListEnvironmentTemplatesOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListEnvironmentTemplatesInput struct {
// The maximum number of environment templates to list.
MaxResults *int32
// A token that indicates the location of the next environment template in the
// array of environment templates, after the list of environment templates that was
// previously requested.
NextToken *string
noSmithyDocumentSerde
}
type ListEnvironmentTemplatesOutput struct {
// An array of environment templates with detail data.
//
// This member is required.
Templates []types.EnvironmentTemplateSummary
// A token that indicates the location of the next environment template in the
// array of environment templates, after the current requested list of environment
// templates.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListEnvironmentTemplatesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpListEnvironmentTemplates{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListEnvironmentTemplates{}, 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_opListEnvironmentTemplates(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
}
// ListEnvironmentTemplatesAPIClient is a client that implements the
// ListEnvironmentTemplates operation.
type ListEnvironmentTemplatesAPIClient interface {
ListEnvironmentTemplates(context.Context, *ListEnvironmentTemplatesInput, ...func(*Options)) (*ListEnvironmentTemplatesOutput, error)
}
var _ ListEnvironmentTemplatesAPIClient = (*Client)(nil)
// ListEnvironmentTemplatesPaginatorOptions is the paginator options for
// ListEnvironmentTemplates
type ListEnvironmentTemplatesPaginatorOptions struct {
// The maximum number of environment templates to list.
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
}
// ListEnvironmentTemplatesPaginator is a paginator for ListEnvironmentTemplates
type ListEnvironmentTemplatesPaginator struct {
options ListEnvironmentTemplatesPaginatorOptions
client ListEnvironmentTemplatesAPIClient
params *ListEnvironmentTemplatesInput
nextToken *string
firstPage bool
}
// NewListEnvironmentTemplatesPaginator returns a new
// ListEnvironmentTemplatesPaginator
func NewListEnvironmentTemplatesPaginator(client ListEnvironmentTemplatesAPIClient, params *ListEnvironmentTemplatesInput, optFns ...func(*ListEnvironmentTemplatesPaginatorOptions)) *ListEnvironmentTemplatesPaginator {
if params == nil {
params = &ListEnvironmentTemplatesInput{}
}
options := ListEnvironmentTemplatesPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListEnvironmentTemplatesPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListEnvironmentTemplatesPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListEnvironmentTemplates page.
func (p *ListEnvironmentTemplatesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEnvironmentTemplatesOutput, 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.ListEnvironmentTemplates(ctx, ¶ms, 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_opListEnvironmentTemplates(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "ListEnvironmentTemplates",
}
}
| 225 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// List major or minor versions of an environment template with detail data.
func (c *Client) ListEnvironmentTemplateVersions(ctx context.Context, params *ListEnvironmentTemplateVersionsInput, optFns ...func(*Options)) (*ListEnvironmentTemplateVersionsOutput, error) {
if params == nil {
params = &ListEnvironmentTemplateVersionsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListEnvironmentTemplateVersions", params, optFns, c.addOperationListEnvironmentTemplateVersionsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListEnvironmentTemplateVersionsOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListEnvironmentTemplateVersionsInput struct {
// The name of the environment template.
//
// This member is required.
TemplateName *string
// To view a list of minor of versions under a major version of an environment
// template, include major Version . To view a list of major versions of an
// environment template, exclude major Version .
MajorVersion *string
// The maximum number of major or minor versions of an environment template to
// list.
MaxResults *int32
// A token that indicates the location of the next major or minor version in the
// array of major or minor versions of an environment template, after the list of
// major or minor versions that was previously requested.
NextToken *string
noSmithyDocumentSerde
}
type ListEnvironmentTemplateVersionsOutput struct {
// An array of major or minor versions of an environment template detail data.
//
// This member is required.
TemplateVersions []types.EnvironmentTemplateVersionSummary
// A token that indicates the location of the next major or minor version in the
// array of major or minor versions of an environment template, after the list of
// major or minor versions that was previously requested.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListEnvironmentTemplateVersionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpListEnvironmentTemplateVersions{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListEnvironmentTemplateVersions{}, 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 = addOpListEnvironmentTemplateVersionsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEnvironmentTemplateVersions(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
}
// ListEnvironmentTemplateVersionsAPIClient is a client that implements the
// ListEnvironmentTemplateVersions operation.
type ListEnvironmentTemplateVersionsAPIClient interface {
ListEnvironmentTemplateVersions(context.Context, *ListEnvironmentTemplateVersionsInput, ...func(*Options)) (*ListEnvironmentTemplateVersionsOutput, error)
}
var _ ListEnvironmentTemplateVersionsAPIClient = (*Client)(nil)
// ListEnvironmentTemplateVersionsPaginatorOptions is the paginator options for
// ListEnvironmentTemplateVersions
type ListEnvironmentTemplateVersionsPaginatorOptions struct {
// The maximum number of major or minor versions of an environment template to
// list.
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
}
// ListEnvironmentTemplateVersionsPaginator is a paginator for
// ListEnvironmentTemplateVersions
type ListEnvironmentTemplateVersionsPaginator struct {
options ListEnvironmentTemplateVersionsPaginatorOptions
client ListEnvironmentTemplateVersionsAPIClient
params *ListEnvironmentTemplateVersionsInput
nextToken *string
firstPage bool
}
// NewListEnvironmentTemplateVersionsPaginator returns a new
// ListEnvironmentTemplateVersionsPaginator
func NewListEnvironmentTemplateVersionsPaginator(client ListEnvironmentTemplateVersionsAPIClient, params *ListEnvironmentTemplateVersionsInput, optFns ...func(*ListEnvironmentTemplateVersionsPaginatorOptions)) *ListEnvironmentTemplateVersionsPaginator {
if params == nil {
params = &ListEnvironmentTemplateVersionsInput{}
}
options := ListEnvironmentTemplateVersionsPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListEnvironmentTemplateVersionsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListEnvironmentTemplateVersionsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListEnvironmentTemplateVersions page.
func (p *ListEnvironmentTemplateVersionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEnvironmentTemplateVersionsOutput, 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.ListEnvironmentTemplateVersions(ctx, ¶ms, 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_opListEnvironmentTemplateVersions(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "ListEnvironmentTemplateVersions",
}
}
| 241 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// List linked repositories with detail data.
func (c *Client) ListRepositories(ctx context.Context, params *ListRepositoriesInput, optFns ...func(*Options)) (*ListRepositoriesOutput, error) {
if params == nil {
params = &ListRepositoriesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListRepositories", params, optFns, c.addOperationListRepositoriesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListRepositoriesOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListRepositoriesInput struct {
// The maximum number of repositories to list.
MaxResults *int32
// A token that indicates the location of the next repository in the array of
// repositories, after the list of repositories previously requested.
NextToken *string
noSmithyDocumentSerde
}
type ListRepositoriesOutput struct {
// An array of repository links.
//
// This member is required.
Repositories []types.RepositorySummary
// A token that indicates the location of the next repository in the array of
// repositories, after the current requested list of repositories.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListRepositoriesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpListRepositories{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListRepositories{}, 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_opListRepositories(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
}
// ListRepositoriesAPIClient is a client that implements the ListRepositories
// operation.
type ListRepositoriesAPIClient interface {
ListRepositories(context.Context, *ListRepositoriesInput, ...func(*Options)) (*ListRepositoriesOutput, error)
}
var _ ListRepositoriesAPIClient = (*Client)(nil)
// ListRepositoriesPaginatorOptions is the paginator options for ListRepositories
type ListRepositoriesPaginatorOptions struct {
// The maximum number of repositories to list.
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
}
// ListRepositoriesPaginator is a paginator for ListRepositories
type ListRepositoriesPaginator struct {
options ListRepositoriesPaginatorOptions
client ListRepositoriesAPIClient
params *ListRepositoriesInput
nextToken *string
firstPage bool
}
// NewListRepositoriesPaginator returns a new ListRepositoriesPaginator
func NewListRepositoriesPaginator(client ListRepositoriesAPIClient, params *ListRepositoriesInput, optFns ...func(*ListRepositoriesPaginatorOptions)) *ListRepositoriesPaginator {
if params == nil {
params = &ListRepositoriesInput{}
}
options := ListRepositoriesPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListRepositoriesPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListRepositoriesPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListRepositories page.
func (p *ListRepositoriesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListRepositoriesOutput, 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.ListRepositories(ctx, ¶ms, 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_opListRepositories(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "ListRepositories",
}
}
| 221 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// List repository sync definitions with detail data.
func (c *Client) ListRepositorySyncDefinitions(ctx context.Context, params *ListRepositorySyncDefinitionsInput, optFns ...func(*Options)) (*ListRepositorySyncDefinitionsOutput, error) {
if params == nil {
params = &ListRepositorySyncDefinitionsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListRepositorySyncDefinitions", params, optFns, c.addOperationListRepositorySyncDefinitionsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListRepositorySyncDefinitionsOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListRepositorySyncDefinitionsInput struct {
// The repository name.
//
// This member is required.
RepositoryName *string
// The repository provider.
//
// This member is required.
RepositoryProvider types.RepositoryProvider
// The sync type. The only supported value is TEMPLATE_SYNC .
//
// This member is required.
SyncType types.SyncType
// A token that indicates the location of the next repository sync definition in
// the array of repository sync definitions, after the list of repository sync
// definitions previously requested.
NextToken *string
noSmithyDocumentSerde
}
type ListRepositorySyncDefinitionsOutput struct {
// An array of repository sync definitions.
//
// This member is required.
SyncDefinitions []types.RepositorySyncDefinition
// A token that indicates the location of the next repository sync definition in
// the array of repository sync definitions, after the current requested list of
// repository sync definitions.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListRepositorySyncDefinitionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpListRepositorySyncDefinitions{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListRepositorySyncDefinitions{}, 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 = addOpListRepositorySyncDefinitionsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRepositorySyncDefinitions(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
}
// ListRepositorySyncDefinitionsAPIClient is a client that implements the
// ListRepositorySyncDefinitions operation.
type ListRepositorySyncDefinitionsAPIClient interface {
ListRepositorySyncDefinitions(context.Context, *ListRepositorySyncDefinitionsInput, ...func(*Options)) (*ListRepositorySyncDefinitionsOutput, error)
}
var _ ListRepositorySyncDefinitionsAPIClient = (*Client)(nil)
// ListRepositorySyncDefinitionsPaginatorOptions is the paginator options for
// ListRepositorySyncDefinitions
type ListRepositorySyncDefinitionsPaginatorOptions struct {
// 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
}
// ListRepositorySyncDefinitionsPaginator is a paginator for
// ListRepositorySyncDefinitions
type ListRepositorySyncDefinitionsPaginator struct {
options ListRepositorySyncDefinitionsPaginatorOptions
client ListRepositorySyncDefinitionsAPIClient
params *ListRepositorySyncDefinitionsInput
nextToken *string
firstPage bool
}
// NewListRepositorySyncDefinitionsPaginator returns a new
// ListRepositorySyncDefinitionsPaginator
func NewListRepositorySyncDefinitionsPaginator(client ListRepositorySyncDefinitionsAPIClient, params *ListRepositorySyncDefinitionsInput, optFns ...func(*ListRepositorySyncDefinitionsPaginatorOptions)) *ListRepositorySyncDefinitionsPaginator {
if params == nil {
params = &ListRepositorySyncDefinitionsInput{}
}
options := ListRepositorySyncDefinitionsPaginatorOptions{}
for _, fn := range optFns {
fn(&options)
}
return &ListRepositorySyncDefinitionsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListRepositorySyncDefinitionsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListRepositorySyncDefinitions page.
func (p *ListRepositorySyncDefinitionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListRepositorySyncDefinitionsOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.NextToken = p.nextToken
result, err := p.client.ListRepositorySyncDefinitions(ctx, ¶ms, 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_opListRepositorySyncDefinitions(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "ListRepositorySyncDefinitions",
}
}
| 229 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Get a list service of instance Infrastructure as Code (IaC) outputs.
func (c *Client) ListServiceInstanceOutputs(ctx context.Context, params *ListServiceInstanceOutputsInput, optFns ...func(*Options)) (*ListServiceInstanceOutputsOutput, error) {
if params == nil {
params = &ListServiceInstanceOutputsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListServiceInstanceOutputs", params, optFns, c.addOperationListServiceInstanceOutputsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListServiceInstanceOutputsOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListServiceInstanceOutputsInput struct {
// The name of the service instance whose outputs you want.
//
// This member is required.
ServiceInstanceName *string
// The name of the service that serviceInstanceName is associated to.
//
// This member is required.
ServiceName *string
// A token that indicates the location of the next output in the array of outputs,
// after the list of outputs that was previously requested.
NextToken *string
noSmithyDocumentSerde
}
type ListServiceInstanceOutputsOutput struct {
// An array of service instance Infrastructure as Code (IaC) outputs.
//
// This member is required.
Outputs []types.Output
// A token that indicates the location of the next output in the array of outputs,
// after the current requested list of outputs.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListServiceInstanceOutputsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpListServiceInstanceOutputs{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListServiceInstanceOutputs{}, 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 = addOpListServiceInstanceOutputsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServiceInstanceOutputs(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
}
// ListServiceInstanceOutputsAPIClient is a client that implements the
// ListServiceInstanceOutputs operation.
type ListServiceInstanceOutputsAPIClient interface {
ListServiceInstanceOutputs(context.Context, *ListServiceInstanceOutputsInput, ...func(*Options)) (*ListServiceInstanceOutputsOutput, error)
}
var _ ListServiceInstanceOutputsAPIClient = (*Client)(nil)
// ListServiceInstanceOutputsPaginatorOptions is the paginator options for
// ListServiceInstanceOutputs
type ListServiceInstanceOutputsPaginatorOptions struct {
// 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
}
// ListServiceInstanceOutputsPaginator is a paginator for
// ListServiceInstanceOutputs
type ListServiceInstanceOutputsPaginator struct {
options ListServiceInstanceOutputsPaginatorOptions
client ListServiceInstanceOutputsAPIClient
params *ListServiceInstanceOutputsInput
nextToken *string
firstPage bool
}
// NewListServiceInstanceOutputsPaginator returns a new
// ListServiceInstanceOutputsPaginator
func NewListServiceInstanceOutputsPaginator(client ListServiceInstanceOutputsAPIClient, params *ListServiceInstanceOutputsInput, optFns ...func(*ListServiceInstanceOutputsPaginatorOptions)) *ListServiceInstanceOutputsPaginator {
if params == nil {
params = &ListServiceInstanceOutputsInput{}
}
options := ListServiceInstanceOutputsPaginatorOptions{}
for _, fn := range optFns {
fn(&options)
}
return &ListServiceInstanceOutputsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListServiceInstanceOutputsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListServiceInstanceOutputs page.
func (p *ListServiceInstanceOutputsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListServiceInstanceOutputsOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.NextToken = p.nextToken
result, err := p.client.ListServiceInstanceOutputs(ctx, ¶ms, 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_opListServiceInstanceOutputs(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "ListServiceInstanceOutputs",
}
}
| 222 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// List provisioned resources for a service instance with details.
func (c *Client) ListServiceInstanceProvisionedResources(ctx context.Context, params *ListServiceInstanceProvisionedResourcesInput, optFns ...func(*Options)) (*ListServiceInstanceProvisionedResourcesOutput, error) {
if params == nil {
params = &ListServiceInstanceProvisionedResourcesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListServiceInstanceProvisionedResources", params, optFns, c.addOperationListServiceInstanceProvisionedResourcesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListServiceInstanceProvisionedResourcesOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListServiceInstanceProvisionedResourcesInput struct {
// The name of the service instance whose provisioned resources you want.
//
// This member is required.
ServiceInstanceName *string
// The name of the service that serviceInstanceName is associated to.
//
// This member is required.
ServiceName *string
// A token that indicates the location of the next provisioned resource in the
// array of provisioned resources, after the list of provisioned resources that was
// previously requested.
NextToken *string
noSmithyDocumentSerde
}
type ListServiceInstanceProvisionedResourcesOutput struct {
// An array of provisioned resources for a service instance.
//
// This member is required.
ProvisionedResources []types.ProvisionedResource
// A token that indicates the location of the next provisioned resource in the
// array of provisioned resources, after the current requested list of provisioned
// resources.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListServiceInstanceProvisionedResourcesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpListServiceInstanceProvisionedResources{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListServiceInstanceProvisionedResources{}, 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 = addOpListServiceInstanceProvisionedResourcesValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServiceInstanceProvisionedResources(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
}
// ListServiceInstanceProvisionedResourcesAPIClient is a client that implements
// the ListServiceInstanceProvisionedResources operation.
type ListServiceInstanceProvisionedResourcesAPIClient interface {
ListServiceInstanceProvisionedResources(context.Context, *ListServiceInstanceProvisionedResourcesInput, ...func(*Options)) (*ListServiceInstanceProvisionedResourcesOutput, error)
}
var _ ListServiceInstanceProvisionedResourcesAPIClient = (*Client)(nil)
// ListServiceInstanceProvisionedResourcesPaginatorOptions is the paginator
// options for ListServiceInstanceProvisionedResources
type ListServiceInstanceProvisionedResourcesPaginatorOptions struct {
// 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
}
// ListServiceInstanceProvisionedResourcesPaginator is a paginator for
// ListServiceInstanceProvisionedResources
type ListServiceInstanceProvisionedResourcesPaginator struct {
options ListServiceInstanceProvisionedResourcesPaginatorOptions
client ListServiceInstanceProvisionedResourcesAPIClient
params *ListServiceInstanceProvisionedResourcesInput
nextToken *string
firstPage bool
}
// NewListServiceInstanceProvisionedResourcesPaginator returns a new
// ListServiceInstanceProvisionedResourcesPaginator
func NewListServiceInstanceProvisionedResourcesPaginator(client ListServiceInstanceProvisionedResourcesAPIClient, params *ListServiceInstanceProvisionedResourcesInput, optFns ...func(*ListServiceInstanceProvisionedResourcesPaginatorOptions)) *ListServiceInstanceProvisionedResourcesPaginator {
if params == nil {
params = &ListServiceInstanceProvisionedResourcesInput{}
}
options := ListServiceInstanceProvisionedResourcesPaginatorOptions{}
for _, fn := range optFns {
fn(&options)
}
return &ListServiceInstanceProvisionedResourcesPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListServiceInstanceProvisionedResourcesPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListServiceInstanceProvisionedResources page.
func (p *ListServiceInstanceProvisionedResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListServiceInstanceProvisionedResourcesOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.NextToken = p.nextToken
result, err := p.client.ListServiceInstanceProvisionedResources(ctx, ¶ms, 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_opListServiceInstanceProvisionedResources(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "ListServiceInstanceProvisionedResources",
}
}
| 224 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// List service instances with summary data. This action lists service instances
// of all services in the Amazon Web Services account.
func (c *Client) ListServiceInstances(ctx context.Context, params *ListServiceInstancesInput, optFns ...func(*Options)) (*ListServiceInstancesOutput, error) {
if params == nil {
params = &ListServiceInstancesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListServiceInstances", params, optFns, c.addOperationListServiceInstancesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListServiceInstancesOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListServiceInstancesInput struct {
// An array of filtering criteria that scope down the result list. By default, all
// service instances in the Amazon Web Services account are returned.
Filters []types.ListServiceInstancesFilter
// The maximum number of service instances to list.
MaxResults *int32
// A token that indicates the location of the next service in the array of service
// instances, after the list of service instances that was previously requested.
NextToken *string
// The name of the service that the service instance belongs to.
ServiceName *string
// The field that the result list is sorted by. When you choose to sort by
// serviceName , service instances within each service are sorted by service
// instance name. Default: serviceName
SortBy types.ListServiceInstancesSortBy
// Result list sort order. Default: ASCENDING
SortOrder types.SortOrder
noSmithyDocumentSerde
}
type ListServiceInstancesOutput struct {
// An array of service instances with summary data.
//
// This member is required.
ServiceInstances []types.ServiceInstanceSummary
// A token that indicates the location of the next service instance in the array
// of service instances, after the current requested list of service instances.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListServiceInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpListServiceInstances{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListServiceInstances{}, 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_opListServiceInstances(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
}
// ListServiceInstancesAPIClient is a client that implements the
// ListServiceInstances operation.
type ListServiceInstancesAPIClient interface {
ListServiceInstances(context.Context, *ListServiceInstancesInput, ...func(*Options)) (*ListServiceInstancesOutput, error)
}
var _ ListServiceInstancesAPIClient = (*Client)(nil)
// ListServiceInstancesPaginatorOptions is the paginator options for
// ListServiceInstances
type ListServiceInstancesPaginatorOptions struct {
// The maximum number of service instances to list.
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
}
// ListServiceInstancesPaginator is a paginator for ListServiceInstances
type ListServiceInstancesPaginator struct {
options ListServiceInstancesPaginatorOptions
client ListServiceInstancesAPIClient
params *ListServiceInstancesInput
nextToken *string
firstPage bool
}
// NewListServiceInstancesPaginator returns a new ListServiceInstancesPaginator
func NewListServiceInstancesPaginator(client ListServiceInstancesAPIClient, params *ListServiceInstancesInput, optFns ...func(*ListServiceInstancesPaginatorOptions)) *ListServiceInstancesPaginator {
if params == nil {
params = &ListServiceInstancesInput{}
}
options := ListServiceInstancesPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListServiceInstancesPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListServiceInstancesPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListServiceInstances page.
func (p *ListServiceInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListServiceInstancesOutput, 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.ListServiceInstances(ctx, ¶ms, 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_opListServiceInstances(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "ListServiceInstances",
}
}
| 238 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Get a list of service pipeline Infrastructure as Code (IaC) outputs.
func (c *Client) ListServicePipelineOutputs(ctx context.Context, params *ListServicePipelineOutputsInput, optFns ...func(*Options)) (*ListServicePipelineOutputsOutput, error) {
if params == nil {
params = &ListServicePipelineOutputsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListServicePipelineOutputs", params, optFns, c.addOperationListServicePipelineOutputsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListServicePipelineOutputsOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListServicePipelineOutputsInput struct {
// The name of the service whose pipeline's outputs you want.
//
// This member is required.
ServiceName *string
// A token that indicates the location of the next output in the array of outputs,
// after the list of outputs that was previously requested.
NextToken *string
noSmithyDocumentSerde
}
type ListServicePipelineOutputsOutput struct {
// An array of service pipeline Infrastructure as Code (IaC) outputs.
//
// This member is required.
Outputs []types.Output
// A token that indicates the location of the next output in the array of outputs,
// after the current requested list of outputs.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListServicePipelineOutputsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpListServicePipelineOutputs{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListServicePipelineOutputs{}, 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 = addOpListServicePipelineOutputsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServicePipelineOutputs(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
}
// ListServicePipelineOutputsAPIClient is a client that implements the
// ListServicePipelineOutputs operation.
type ListServicePipelineOutputsAPIClient interface {
ListServicePipelineOutputs(context.Context, *ListServicePipelineOutputsInput, ...func(*Options)) (*ListServicePipelineOutputsOutput, error)
}
var _ ListServicePipelineOutputsAPIClient = (*Client)(nil)
// ListServicePipelineOutputsPaginatorOptions is the paginator options for
// ListServicePipelineOutputs
type ListServicePipelineOutputsPaginatorOptions struct {
// 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
}
// ListServicePipelineOutputsPaginator is a paginator for
// ListServicePipelineOutputs
type ListServicePipelineOutputsPaginator struct {
options ListServicePipelineOutputsPaginatorOptions
client ListServicePipelineOutputsAPIClient
params *ListServicePipelineOutputsInput
nextToken *string
firstPage bool
}
// NewListServicePipelineOutputsPaginator returns a new
// ListServicePipelineOutputsPaginator
func NewListServicePipelineOutputsPaginator(client ListServicePipelineOutputsAPIClient, params *ListServicePipelineOutputsInput, optFns ...func(*ListServicePipelineOutputsPaginatorOptions)) *ListServicePipelineOutputsPaginator {
if params == nil {
params = &ListServicePipelineOutputsInput{}
}
options := ListServicePipelineOutputsPaginatorOptions{}
for _, fn := range optFns {
fn(&options)
}
return &ListServicePipelineOutputsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListServicePipelineOutputsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListServicePipelineOutputs page.
func (p *ListServicePipelineOutputsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListServicePipelineOutputsOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.NextToken = p.nextToken
result, err := p.client.ListServicePipelineOutputs(ctx, ¶ms, 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_opListServicePipelineOutputs(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "ListServicePipelineOutputs",
}
}
| 217 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// List provisioned resources for a service and pipeline with details.
func (c *Client) ListServicePipelineProvisionedResources(ctx context.Context, params *ListServicePipelineProvisionedResourcesInput, optFns ...func(*Options)) (*ListServicePipelineProvisionedResourcesOutput, error) {
if params == nil {
params = &ListServicePipelineProvisionedResourcesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListServicePipelineProvisionedResources", params, optFns, c.addOperationListServicePipelineProvisionedResourcesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListServicePipelineProvisionedResourcesOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListServicePipelineProvisionedResourcesInput struct {
// The name of the service whose pipeline's provisioned resources you want.
//
// This member is required.
ServiceName *string
// A token that indicates the location of the next provisioned resource in the
// array of provisioned resources, after the list of provisioned resources that was
// previously requested.
NextToken *string
noSmithyDocumentSerde
}
type ListServicePipelineProvisionedResourcesOutput struct {
// An array of provisioned resources for a service and pipeline.
//
// This member is required.
ProvisionedResources []types.ProvisionedResource
// A token that indicates the location of the next provisioned resource in the
// array of provisioned resources, after the current requested list of provisioned
// resources.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListServicePipelineProvisionedResourcesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpListServicePipelineProvisionedResources{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListServicePipelineProvisionedResources{}, 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 = addOpListServicePipelineProvisionedResourcesValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServicePipelineProvisionedResources(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
}
// ListServicePipelineProvisionedResourcesAPIClient is a client that implements
// the ListServicePipelineProvisionedResources operation.
type ListServicePipelineProvisionedResourcesAPIClient interface {
ListServicePipelineProvisionedResources(context.Context, *ListServicePipelineProvisionedResourcesInput, ...func(*Options)) (*ListServicePipelineProvisionedResourcesOutput, error)
}
var _ ListServicePipelineProvisionedResourcesAPIClient = (*Client)(nil)
// ListServicePipelineProvisionedResourcesPaginatorOptions is the paginator
// options for ListServicePipelineProvisionedResources
type ListServicePipelineProvisionedResourcesPaginatorOptions struct {
// 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
}
// ListServicePipelineProvisionedResourcesPaginator is a paginator for
// ListServicePipelineProvisionedResources
type ListServicePipelineProvisionedResourcesPaginator struct {
options ListServicePipelineProvisionedResourcesPaginatorOptions
client ListServicePipelineProvisionedResourcesAPIClient
params *ListServicePipelineProvisionedResourcesInput
nextToken *string
firstPage bool
}
// NewListServicePipelineProvisionedResourcesPaginator returns a new
// ListServicePipelineProvisionedResourcesPaginator
func NewListServicePipelineProvisionedResourcesPaginator(client ListServicePipelineProvisionedResourcesAPIClient, params *ListServicePipelineProvisionedResourcesInput, optFns ...func(*ListServicePipelineProvisionedResourcesPaginatorOptions)) *ListServicePipelineProvisionedResourcesPaginator {
if params == nil {
params = &ListServicePipelineProvisionedResourcesInput{}
}
options := ListServicePipelineProvisionedResourcesPaginatorOptions{}
for _, fn := range optFns {
fn(&options)
}
return &ListServicePipelineProvisionedResourcesPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListServicePipelineProvisionedResourcesPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListServicePipelineProvisionedResources page.
func (p *ListServicePipelineProvisionedResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListServicePipelineProvisionedResourcesOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.NextToken = p.nextToken
result, err := p.client.ListServicePipelineProvisionedResources(ctx, ¶ms, 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_opListServicePipelineProvisionedResources(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "ListServicePipelineProvisionedResources",
}
}
| 219 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// List services with summaries of detail data.
func (c *Client) ListServices(ctx context.Context, params *ListServicesInput, optFns ...func(*Options)) (*ListServicesOutput, error) {
if params == nil {
params = &ListServicesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListServices", params, optFns, c.addOperationListServicesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListServicesOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListServicesInput struct {
// The maximum number of services to list.
MaxResults *int32
// A token that indicates the location of the next service in the array of
// services, after the list of services that was previously requested.
NextToken *string
noSmithyDocumentSerde
}
type ListServicesOutput struct {
// An array of services with summaries of detail data.
//
// This member is required.
Services []types.ServiceSummary
// A token that indicates the location of the next service in the array of
// services, after the current requested list of services.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListServicesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpListServices{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListServices{}, 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_opListServices(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
}
// ListServicesAPIClient is a client that implements the ListServices operation.
type ListServicesAPIClient interface {
ListServices(context.Context, *ListServicesInput, ...func(*Options)) (*ListServicesOutput, error)
}
var _ ListServicesAPIClient = (*Client)(nil)
// ListServicesPaginatorOptions is the paginator options for ListServices
type ListServicesPaginatorOptions struct {
// The maximum number of services to list.
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
}
// ListServicesPaginator is a paginator for ListServices
type ListServicesPaginator struct {
options ListServicesPaginatorOptions
client ListServicesAPIClient
params *ListServicesInput
nextToken *string
firstPage bool
}
// NewListServicesPaginator returns a new ListServicesPaginator
func NewListServicesPaginator(client ListServicesAPIClient, params *ListServicesInput, optFns ...func(*ListServicesPaginatorOptions)) *ListServicesPaginator {
if params == nil {
params = &ListServicesInput{}
}
options := ListServicesPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListServicesPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListServicesPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListServices page.
func (p *ListServicesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListServicesOutput, 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.ListServices(ctx, ¶ms, 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_opListServices(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "ListServices",
}
}
| 220 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// List service templates with detail data.
func (c *Client) ListServiceTemplates(ctx context.Context, params *ListServiceTemplatesInput, optFns ...func(*Options)) (*ListServiceTemplatesOutput, error) {
if params == nil {
params = &ListServiceTemplatesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListServiceTemplates", params, optFns, c.addOperationListServiceTemplatesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListServiceTemplatesOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListServiceTemplatesInput struct {
// The maximum number of service templates to list.
MaxResults *int32
// A token that indicates the location of the next service template in the array
// of service templates, after the list of service templates previously requested.
NextToken *string
noSmithyDocumentSerde
}
type ListServiceTemplatesOutput struct {
// An array of service templates with detail data.
//
// This member is required.
Templates []types.ServiceTemplateSummary
// A token that indicates the location of the next service template in the array
// of service templates, after the current requested list of service templates.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListServiceTemplatesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpListServiceTemplates{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListServiceTemplates{}, 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_opListServiceTemplates(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
}
// ListServiceTemplatesAPIClient is a client that implements the
// ListServiceTemplates operation.
type ListServiceTemplatesAPIClient interface {
ListServiceTemplates(context.Context, *ListServiceTemplatesInput, ...func(*Options)) (*ListServiceTemplatesOutput, error)
}
var _ ListServiceTemplatesAPIClient = (*Client)(nil)
// ListServiceTemplatesPaginatorOptions is the paginator options for
// ListServiceTemplates
type ListServiceTemplatesPaginatorOptions struct {
// The maximum number of service templates to list.
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
}
// ListServiceTemplatesPaginator is a paginator for ListServiceTemplates
type ListServiceTemplatesPaginator struct {
options ListServiceTemplatesPaginatorOptions
client ListServiceTemplatesAPIClient
params *ListServiceTemplatesInput
nextToken *string
firstPage bool
}
// NewListServiceTemplatesPaginator returns a new ListServiceTemplatesPaginator
func NewListServiceTemplatesPaginator(client ListServiceTemplatesAPIClient, params *ListServiceTemplatesInput, optFns ...func(*ListServiceTemplatesPaginatorOptions)) *ListServiceTemplatesPaginator {
if params == nil {
params = &ListServiceTemplatesInput{}
}
options := ListServiceTemplatesPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListServiceTemplatesPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListServiceTemplatesPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListServiceTemplates page.
func (p *ListServiceTemplatesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListServiceTemplatesOutput, 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.ListServiceTemplates(ctx, ¶ms, 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_opListServiceTemplates(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "ListServiceTemplates",
}
}
| 222 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// List major or minor versions of a service template with detail data.
func (c *Client) ListServiceTemplateVersions(ctx context.Context, params *ListServiceTemplateVersionsInput, optFns ...func(*Options)) (*ListServiceTemplateVersionsOutput, error) {
if params == nil {
params = &ListServiceTemplateVersionsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListServiceTemplateVersions", params, optFns, c.addOperationListServiceTemplateVersionsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListServiceTemplateVersionsOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListServiceTemplateVersionsInput struct {
// The name of the service template.
//
// This member is required.
TemplateName *string
// To view a list of minor of versions under a major version of a service
// template, include major Version . To view a list of major versions of a service
// template, exclude major Version .
MajorVersion *string
// The maximum number of major or minor versions of a service template to list.
MaxResults *int32
// A token that indicates the location of the next major or minor version in the
// array of major or minor versions of a service template, after the list of major
// or minor versions that was previously requested.
NextToken *string
noSmithyDocumentSerde
}
type ListServiceTemplateVersionsOutput struct {
// An array of major or minor versions of a service template with detail data.
//
// This member is required.
TemplateVersions []types.ServiceTemplateVersionSummary
// A token that indicates the location of the next major or minor version in the
// array of major or minor versions of a service template, after the current
// requested list of service major or minor versions.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListServiceTemplateVersionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpListServiceTemplateVersions{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListServiceTemplateVersions{}, 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 = addOpListServiceTemplateVersionsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServiceTemplateVersions(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
}
// ListServiceTemplateVersionsAPIClient is a client that implements the
// ListServiceTemplateVersions operation.
type ListServiceTemplateVersionsAPIClient interface {
ListServiceTemplateVersions(context.Context, *ListServiceTemplateVersionsInput, ...func(*Options)) (*ListServiceTemplateVersionsOutput, error)
}
var _ ListServiceTemplateVersionsAPIClient = (*Client)(nil)
// ListServiceTemplateVersionsPaginatorOptions is the paginator options for
// ListServiceTemplateVersions
type ListServiceTemplateVersionsPaginatorOptions struct {
// The maximum number of major or minor versions of a service template to list.
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
}
// ListServiceTemplateVersionsPaginator is a paginator for
// ListServiceTemplateVersions
type ListServiceTemplateVersionsPaginator struct {
options ListServiceTemplateVersionsPaginatorOptions
client ListServiceTemplateVersionsAPIClient
params *ListServiceTemplateVersionsInput
nextToken *string
firstPage bool
}
// NewListServiceTemplateVersionsPaginator returns a new
// ListServiceTemplateVersionsPaginator
func NewListServiceTemplateVersionsPaginator(client ListServiceTemplateVersionsAPIClient, params *ListServiceTemplateVersionsInput, optFns ...func(*ListServiceTemplateVersionsPaginatorOptions)) *ListServiceTemplateVersionsPaginator {
if params == nil {
params = &ListServiceTemplateVersionsInput{}
}
options := ListServiceTemplateVersionsPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListServiceTemplateVersionsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListServiceTemplateVersionsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListServiceTemplateVersions page.
func (p *ListServiceTemplateVersionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListServiceTemplateVersionsOutput, 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.ListServiceTemplateVersions(ctx, ¶ms, 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_opListServiceTemplateVersions(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "ListServiceTemplateVersions",
}
}
| 239 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// List tags for a resource. For more information, see Proton resources and tagging (https://docs.aws.amazon.com/proton/latest/userguide/resources.html)
// in the Proton User Guide.
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) of the resource for the listed tags.
//
// This member is required.
ResourceArn *string
// The maximum number of tags to list.
MaxResults *int32
// A token that indicates the location of the next resource tag in the array of
// resource tags, after the list of resource tags that was previously requested.
NextToken *string
noSmithyDocumentSerde
}
type ListTagsForResourceOutput struct {
// A list of resource tags with detail data.
//
// This member is required.
Tags []types.Tag
// A token that indicates the location of the next resource tag in the array of
// resource tags, after the current requested list of resource tags.
NextToken *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(&awsAwsjson10_serializeOpListTagsForResource{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_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
}
// ListTagsForResourceAPIClient is a client that implements the
// ListTagsForResource operation.
type ListTagsForResourceAPIClient interface {
ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error)
}
var _ ListTagsForResourceAPIClient = (*Client)(nil)
// ListTagsForResourcePaginatorOptions is the paginator options for
// ListTagsForResource
type ListTagsForResourcePaginatorOptions struct {
// The maximum number of tags to list.
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
}
// ListTagsForResourcePaginator is a paginator for ListTagsForResource
type ListTagsForResourcePaginator struct {
options ListTagsForResourcePaginatorOptions
client ListTagsForResourceAPIClient
params *ListTagsForResourceInput
nextToken *string
firstPage bool
}
// NewListTagsForResourcePaginator returns a new ListTagsForResourcePaginator
func NewListTagsForResourcePaginator(client ListTagsForResourceAPIClient, params *ListTagsForResourceInput, optFns ...func(*ListTagsForResourcePaginatorOptions)) *ListTagsForResourcePaginator {
if params == nil {
params = &ListTagsForResourceInput{}
}
options := ListTagsForResourcePaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListTagsForResourcePaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListTagsForResourcePaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListTagsForResource page.
func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListTagsForResourceOutput, 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.ListTagsForResource(ctx, ¶ms, 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_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "ListTagsForResource",
}
}
| 231 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Notify Proton of status changes to a provisioned resource when you use
// self-managed provisioning. For more information, see Self-managed provisioning (https://docs.aws.amazon.com/proton/latest/userguide/ag-works-prov-methods.html#ag-works-prov-methods-self)
// in the Proton User Guide.
func (c *Client) NotifyResourceDeploymentStatusChange(ctx context.Context, params *NotifyResourceDeploymentStatusChangeInput, optFns ...func(*Options)) (*NotifyResourceDeploymentStatusChangeOutput, error) {
if params == nil {
params = &NotifyResourceDeploymentStatusChangeInput{}
}
result, metadata, err := c.invokeOperation(ctx, "NotifyResourceDeploymentStatusChange", params, optFns, c.addOperationNotifyResourceDeploymentStatusChangeMiddlewares)
if err != nil {
return nil, err
}
out := result.(*NotifyResourceDeploymentStatusChangeOutput)
out.ResultMetadata = metadata
return out, nil
}
type NotifyResourceDeploymentStatusChangeInput struct {
// The provisioned resource Amazon Resource Name (ARN).
//
// This member is required.
ResourceArn *string
// The deployment ID for your provisioned resource.
DeploymentId *string
// The provisioned resource state change detail data that's returned by Proton.
Outputs []types.Output
// The status of your provisioned resource.
Status types.ResourceDeploymentStatus
// The deployment status message for your provisioned resource.
StatusMessage *string
noSmithyDocumentSerde
}
type NotifyResourceDeploymentStatusChangeOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationNotifyResourceDeploymentStatusChangeMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpNotifyResourceDeploymentStatusChange{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpNotifyResourceDeploymentStatusChange{}, 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 = addOpNotifyResourceDeploymentStatusChangeValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opNotifyResourceDeploymentStatusChange(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_opNotifyResourceDeploymentStatusChange(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "NotifyResourceDeploymentStatusChange",
}
}
| 135 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// In a management account, reject an environment account connection from another
// environment account. After you reject an environment account connection request,
// you can't accept or use the rejected environment account connection. You can’t
// reject an environment account connection that's connected to an environment. For
// more information, see Environment account connections (https://docs.aws.amazon.com/proton/latest/userguide/ag-env-account-connections.html)
// in the Proton User guide.
func (c *Client) RejectEnvironmentAccountConnection(ctx context.Context, params *RejectEnvironmentAccountConnectionInput, optFns ...func(*Options)) (*RejectEnvironmentAccountConnectionOutput, error) {
if params == nil {
params = &RejectEnvironmentAccountConnectionInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RejectEnvironmentAccountConnection", params, optFns, c.addOperationRejectEnvironmentAccountConnectionMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RejectEnvironmentAccountConnectionOutput)
out.ResultMetadata = metadata
return out, nil
}
type RejectEnvironmentAccountConnectionInput struct {
// The ID of the environment account connection to reject.
//
// This member is required.
Id *string
noSmithyDocumentSerde
}
type RejectEnvironmentAccountConnectionOutput struct {
// The environment connection account detail data that's returned by Proton.
//
// This member is required.
EnvironmentAccountConnection *types.EnvironmentAccountConnection
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRejectEnvironmentAccountConnectionMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpRejectEnvironmentAccountConnection{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpRejectEnvironmentAccountConnection{}, 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 = addOpRejectEnvironmentAccountConnectionValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRejectEnvironmentAccountConnection(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_opRejectEnvironmentAccountConnection(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "RejectEnvironmentAccountConnection",
}
}
| 132 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Tag a resource. A tag is a key-value pair of metadata that you associate with
// an Proton resource. For more information, see Proton resources and tagging (https://docs.aws.amazon.com/proton/latest/userguide/resources.html)
// in the Proton User Guide.
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) of the Proton resource to apply customer tags to.
//
// This member is required.
ResourceArn *string
// A list of customer tags to apply to the Proton resource.
//
// This member is required.
Tags []types.Tag
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(&awsAwsjson10_serializeOpTagResource{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_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: "proton",
OperationName: "TagResource",
}
}
| 128 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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"
)
// Remove a customer tag from a resource. A tag is a key-value pair of metadata
// associated with an Proton resource. For more information, see Proton resources
// and tagging (https://docs.aws.amazon.com/proton/latest/userguide/resources.html)
// in the Proton User Guide.
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) of the resource to remove customer tags from.
//
// This member is required.
ResourceArn *string
// A list of customer tag keys that indicate the customer tags to be removed 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(&awsAwsjson10_serializeOpUntagResource{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_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: "proton",
OperationName: "UntagResource",
}
}
| 129 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Update Proton settings that are used for multiple services in the Amazon Web
// Services account.
func (c *Client) UpdateAccountSettings(ctx context.Context, params *UpdateAccountSettingsInput, optFns ...func(*Options)) (*UpdateAccountSettingsOutput, error) {
if params == nil {
params = &UpdateAccountSettingsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateAccountSettings", params, optFns, c.addOperationUpdateAccountSettingsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateAccountSettingsOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateAccountSettingsInput struct {
// Set to true to remove a configured pipeline repository from the account
// settings. Don't set this field if you are updating the configured pipeline
// repository.
DeletePipelineProvisioningRepository *bool
// The Amazon Resource Name (ARN) of the service role you want to use for
// provisioning pipelines. Proton assumes this role for CodeBuild-based
// provisioning.
PipelineCodebuildRoleArn *string
// A linked repository for pipeline provisioning. Specify it if you have
// environments configured for self-managed provisioning with services that include
// pipelines. A linked repository is a repository that has been registered with
// Proton. For more information, see CreateRepository . To remove a previously
// configured repository, set deletePipelineProvisioningRepository to true , and
// don't set pipelineProvisioningRepository .
PipelineProvisioningRepository *types.RepositoryBranchInput
// The Amazon Resource Name (ARN) of the service role you want to use for
// provisioning pipelines. Assumed by Proton for Amazon Web Services-managed
// provisioning, and by customer-owned automation for self-managed provisioning. To
// remove a previously configured ARN, specify an empty string.
PipelineServiceRoleArn *string
noSmithyDocumentSerde
}
type UpdateAccountSettingsOutput struct {
// The Proton pipeline service role and repository data shared across the Amazon
// Web Services account.
//
// This member is required.
AccountSettings *types.AccountSettings
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateAccountSettingsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateAccountSettings{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateAccountSettings{}, 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 = addOpUpdateAccountSettingsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAccountSettings(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_opUpdateAccountSettings(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "UpdateAccountSettings",
}
}
| 148 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Update a component. There are a few modes for updating a component. The
// deploymentType field defines the mode. You can't update a component while its
// deployment status, or the deployment status of a service instance attached to
// it, is IN_PROGRESS . For more information about components, see Proton
// components (https://docs.aws.amazon.com/proton/latest/userguide/ag-components.html)
// in the Proton User Guide.
func (c *Client) UpdateComponent(ctx context.Context, params *UpdateComponentInput, optFns ...func(*Options)) (*UpdateComponentOutput, error) {
if params == nil {
params = &UpdateComponentInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateComponent", params, optFns, c.addOperationUpdateComponentMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateComponentOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateComponentInput struct {
// The deployment type. It defines the mode for updating a component, as follows:
// NONE In this mode, a deployment doesn't occur. Only the requested metadata
// parameters are updated. You can only specify description in this mode.
// CURRENT_VERSION In this mode, the component is deployed and updated with the new
// serviceSpec , templateSource , and/or type that you provide. Only requested
// parameters are updated.
//
// This member is required.
DeploymentType types.ComponentDeploymentUpdateType
// The name of the component to update.
//
// This member is required.
Name *string
// The client token for the updated component.
ClientToken *string
// An optional customer-provided description of the component.
Description *string
// The name of the service instance that you want to attach this component to.
// Don't specify to keep the component's current service instance attachment.
// Specify an empty string to detach the component from the service instance it's
// attached to. Specify non-empty values for both serviceInstanceName and
// serviceName or for neither of them.
ServiceInstanceName *string
// The name of the service that serviceInstanceName is associated with. Don't
// specify to keep the component's current service instance attachment. Specify an
// empty string to detach the component from the service instance it's attached to.
// Specify non-empty values for both serviceInstanceName and serviceName or for
// neither of them.
ServiceName *string
// The service spec that you want the component to use to access service inputs.
// Set this only when the component is attached to a service instance.
//
// This value conforms to the media type: application/yaml
ServiceSpec *string
// A path to the Infrastructure as Code (IaC) file describing infrastructure that
// a custom component provisions. Components support a single IaC file, even if you
// use Terraform as your template language.
//
// This value conforms to the media type: application/yaml
TemplateFile *string
noSmithyDocumentSerde
}
type UpdateComponentOutput struct {
// The detailed data of the updated component.
//
// This member is required.
Component *types.Component
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateComponentMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateComponent{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateComponent{}, 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_opUpdateComponentMiddleware(stack, options); err != nil {
return err
}
if err = addOpUpdateComponentValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateComponent(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_initializeOpUpdateComponent struct {
tokenProvider IdempotencyTokenProvider
}
func (*idempotencyToken_initializeOpUpdateComponent) ID() string {
return "OperationIdempotencyTokenAutoFill"
}
func (m *idempotencyToken_initializeOpUpdateComponent) 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.(*UpdateComponentInput)
if !ok {
return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateComponentInput ")
}
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_opUpdateComponentMiddleware(stack *middleware.Stack, cfg Options) error {
return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateComponent{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
}
func newServiceMetadataMiddleware_opUpdateComponent(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "UpdateComponent",
}
}
| 212 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Update an environment. If the environment is associated with an environment
// account connection, don't update or include the protonServiceRoleArn and
// provisioningRepository parameter to update or connect to an environment account
// connection. You can only update to a new environment account connection if that
// connection was created in the same environment account that the current
// environment account connection was created in. The account connection must also
// be associated with the current environment. If the environment isn't associated
// with an environment account connection, don't update or include the
// environmentAccountConnectionId parameter. You can't update or connect the
// environment to an environment account connection if it isn't already associated
// with an environment connection. You can update either the
// environmentAccountConnectionId or protonServiceRoleArn parameter and value. You
// can’t update both. If the environment was configured for Amazon Web
// Services-managed provisioning, omit the provisioningRepository parameter. If
// the environment was configured for self-managed provisioning, specify the
// provisioningRepository parameter and omit the protonServiceRoleArn and
// environmentAccountConnectionId parameters. For more information, see
// Environments (https://docs.aws.amazon.com/proton/latest/userguide/ag-environments.html)
// and Provisioning methods (https://docs.aws.amazon.com/proton/latest/userguide/ag-works-prov-methods.html)
// in the Proton User Guide. There are four modes for updating an environment. The
// deploymentType field defines the mode. NONE In this mode, a deployment doesn't
// occur. Only the requested metadata parameters are updated. CURRENT_VERSION In
// this mode, the environment is deployed and updated with the new spec that you
// provide. Only requested parameters are updated. Don’t include minor or major
// version parameters when you use this deployment-type . MINOR_VERSION In this
// mode, the environment is deployed and updated with the published, recommended
// (latest) minor version of the current major version in use, by default. You can
// also specify a different minor version of the current major version in use.
// MAJOR_VERSION In this mode, the environment is deployed and updated with the
// published, recommended (latest) major and minor version of the current template,
// by default. You can also specify a different major version that's higher than
// the major version in use and a minor version.
func (c *Client) UpdateEnvironment(ctx context.Context, params *UpdateEnvironmentInput, optFns ...func(*Options)) (*UpdateEnvironmentOutput, error) {
if params == nil {
params = &UpdateEnvironmentInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateEnvironment", params, optFns, c.addOperationUpdateEnvironmentMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateEnvironmentOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateEnvironmentInput struct {
// There are four modes for updating an environment. The deploymentType field
// defines the mode. NONE In this mode, a deployment doesn't occur. Only the
// requested metadata parameters are updated. CURRENT_VERSION In this mode, the
// environment is deployed and updated with the new spec that you provide. Only
// requested parameters are updated. Don’t include major or minor version
// parameters when you use this deployment-type . MINOR_VERSION In this mode, the
// environment is deployed and updated with the published, recommended (latest)
// minor version of the current major version in use, by default. You can also
// specify a different minor version of the current major version in use.
// MAJOR_VERSION In this mode, the environment is deployed and updated with the
// published, recommended (latest) major and minor version of the current template,
// by default. You can also specify a different major version that is higher than
// the major version in use and a minor version (optional).
//
// This member is required.
DeploymentType types.DeploymentUpdateType
// The name of the environment to update.
//
// This member is required.
Name *string
// The Amazon Resource Name (ARN) of the IAM service role that allows Proton to
// provision infrastructure using CodeBuild-based provisioning on your behalf.
CodebuildRoleArn *string
// The Amazon Resource Name (ARN) of the IAM service role that Proton uses when
// provisioning directly defined components in this environment. It determines the
// scope of infrastructure that a component can provision. The environment must
// have a componentRoleArn to allow directly defined components to be associated
// with the environment. For more information about components, see Proton
// components (https://docs.aws.amazon.com/proton/latest/userguide/ag-components.html)
// in the Proton User Guide.
ComponentRoleArn *string
// A description of the environment update.
Description *string
// The ID of the environment account connection. You can only update to a new
// environment account connection if it was created in the same environment account
// that the current environment account connection was created in and is associated
// with the current environment.
EnvironmentAccountConnectionId *string
// The Amazon Resource Name (ARN) of the Proton service role that allows Proton to
// make API calls to other services your behalf.
ProtonServiceRoleArn *string
// The linked repository that you use to host your rendered infrastructure
// templates for self-managed provisioning. A linked repository is a repository
// that has been registered with Proton. For more information, see CreateRepository
// .
ProvisioningRepository *types.RepositoryBranchInput
// The formatted specification that defines the update.
//
// This value conforms to the media type: application/yaml
Spec *string
// The major version of the environment to update.
TemplateMajorVersion *string
// The minor version of the environment to update.
TemplateMinorVersion *string
noSmithyDocumentSerde
}
type UpdateEnvironmentOutput struct {
// The environment detail data that's returned by Proton.
//
// This member is required.
Environment *types.Environment
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateEnvironmentMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateEnvironment{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateEnvironment{}, 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 = addOpUpdateEnvironmentValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateEnvironment(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_opUpdateEnvironment(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "UpdateEnvironment",
}
}
| 218 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// In an environment account, update an environment account connection to use a
// new IAM role. For more information, see Environment account connections (https://docs.aws.amazon.com/proton/latest/userguide/ag-env-account-connections.html)
// in the Proton User guide.
func (c *Client) UpdateEnvironmentAccountConnection(ctx context.Context, params *UpdateEnvironmentAccountConnectionInput, optFns ...func(*Options)) (*UpdateEnvironmentAccountConnectionOutput, error) {
if params == nil {
params = &UpdateEnvironmentAccountConnectionInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateEnvironmentAccountConnection", params, optFns, c.addOperationUpdateEnvironmentAccountConnectionMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateEnvironmentAccountConnectionOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateEnvironmentAccountConnectionInput struct {
// The ID of the environment account connection to update.
//
// This member is required.
Id *string
// The Amazon Resource Name (ARN) of an IAM service role in the environment
// account. Proton uses this role to provision infrastructure resources using
// CodeBuild-based provisioning in the associated environment account.
CodebuildRoleArn *string
// The Amazon Resource Name (ARN) of the IAM service role that Proton uses when
// provisioning directly defined components in the associated environment account.
// It determines the scope of infrastructure that a component can provision in the
// account. The environment account connection must have a componentRoleArn to
// allow directly defined components to be associated with any environments running
// in the account. For more information about components, see Proton components (https://docs.aws.amazon.com/proton/latest/userguide/ag-components.html)
// in the Proton User Guide.
ComponentRoleArn *string
// The Amazon Resource Name (ARN) of the IAM service role that's associated with
// the environment account connection to update.
RoleArn *string
noSmithyDocumentSerde
}
type UpdateEnvironmentAccountConnectionOutput struct {
// The environment account connection detail data that's returned by Proton.
//
// This member is required.
EnvironmentAccountConnection *types.EnvironmentAccountConnection
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateEnvironmentAccountConnectionMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateEnvironmentAccountConnection{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateEnvironmentAccountConnection{}, 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 = addOpUpdateEnvironmentAccountConnectionValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateEnvironmentAccountConnection(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_opUpdateEnvironmentAccountConnection(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "UpdateEnvironmentAccountConnection",
}
}
| 147 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Update an environment template.
func (c *Client) UpdateEnvironmentTemplate(ctx context.Context, params *UpdateEnvironmentTemplateInput, optFns ...func(*Options)) (*UpdateEnvironmentTemplateOutput, error) {
if params == nil {
params = &UpdateEnvironmentTemplateInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateEnvironmentTemplate", params, optFns, c.addOperationUpdateEnvironmentTemplateMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateEnvironmentTemplateOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateEnvironmentTemplateInput struct {
// The name of the environment template to update.
//
// This member is required.
Name *string
// A description of the environment template update.
Description *string
// The name of the environment template to update as displayed in the developer
// interface.
DisplayName *string
noSmithyDocumentSerde
}
type UpdateEnvironmentTemplateOutput struct {
// The environment template detail data that's returned by Proton.
//
// This member is required.
EnvironmentTemplate *types.EnvironmentTemplate
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateEnvironmentTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateEnvironmentTemplate{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateEnvironmentTemplate{}, 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 = addOpUpdateEnvironmentTemplateValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateEnvironmentTemplate(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_opUpdateEnvironmentTemplate(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "UpdateEnvironmentTemplate",
}
}
| 134 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Update a major or minor version of an environment template.
func (c *Client) UpdateEnvironmentTemplateVersion(ctx context.Context, params *UpdateEnvironmentTemplateVersionInput, optFns ...func(*Options)) (*UpdateEnvironmentTemplateVersionOutput, error) {
if params == nil {
params = &UpdateEnvironmentTemplateVersionInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateEnvironmentTemplateVersion", params, optFns, c.addOperationUpdateEnvironmentTemplateVersionMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateEnvironmentTemplateVersionOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateEnvironmentTemplateVersionInput struct {
// To update a major version of an environment template, include major Version .
//
// This member is required.
MajorVersion *string
// To update a minor version of an environment template, include minorVersion .
//
// This member is required.
MinorVersion *string
// The name of the environment template.
//
// This member is required.
TemplateName *string
// A description of environment template version to update.
Description *string
// The status of the environment template minor version to update.
Status types.TemplateVersionStatus
noSmithyDocumentSerde
}
type UpdateEnvironmentTemplateVersionOutput struct {
// The environment template version detail data that's returned by Proton.
//
// This member is required.
EnvironmentTemplateVersion *types.EnvironmentTemplateVersion
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateEnvironmentTemplateVersionMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateEnvironmentTemplateVersion{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateEnvironmentTemplateVersion{}, 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 = addOpUpdateEnvironmentTemplateVersionValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateEnvironmentTemplateVersion(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_opUpdateEnvironmentTemplateVersion(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "UpdateEnvironmentTemplateVersion",
}
}
| 143 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Edit a service description or use a spec to add and delete service instances.
// Existing service instances and the service pipeline can't be edited using this
// API. They can only be deleted. Use the description parameter to modify the
// description. Edit the spec parameter to add or delete instances. You can't
// delete a service instance (remove it from the spec) if it has an attached
// component. For more information about components, see Proton components (https://docs.aws.amazon.com/proton/latest/userguide/ag-components.html)
// in the Proton User Guide.
func (c *Client) UpdateService(ctx context.Context, params *UpdateServiceInput, optFns ...func(*Options)) (*UpdateServiceOutput, error) {
if params == nil {
params = &UpdateServiceInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateService", params, optFns, c.addOperationUpdateServiceMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateServiceOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateServiceInput struct {
// The name of the service to edit.
//
// This member is required.
Name *string
// The edited service description.
Description *string
// Lists the service instances to add and the existing service instances to
// remain. Omit the existing service instances to delete from the list. Don't
// include edits to the existing service instances or pipeline. For more
// information, see Edit a service (https://docs.aws.amazon.com/proton/latest/userguide/ag-svc-update.html)
// in the Proton User Guide.
//
// This value conforms to the media type: application/yaml
Spec *string
noSmithyDocumentSerde
}
type UpdateServiceOutput struct {
// The service detail data that's returned by Proton.
//
// This member is required.
Service *types.Service
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateServiceMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateService{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateService{}, 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 = addOpUpdateServiceValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateService(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_opUpdateService(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "UpdateService",
}
}
| 145 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Update a service instance. There are a few modes for updating a service
// instance. The deploymentType field defines the mode. You can't update a service
// instance while its deployment status, or the deployment status of a component
// attached to it, is IN_PROGRESS . For more information about components, see
// Proton components (https://docs.aws.amazon.com/proton/latest/userguide/ag-components.html)
// in the Proton User Guide.
func (c *Client) UpdateServiceInstance(ctx context.Context, params *UpdateServiceInstanceInput, optFns ...func(*Options)) (*UpdateServiceInstanceOutput, error) {
if params == nil {
params = &UpdateServiceInstanceInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateServiceInstance", params, optFns, c.addOperationUpdateServiceInstanceMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateServiceInstanceOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateServiceInstanceInput struct {
// The deployment type. It defines the mode for updating a service instance, as
// follows: NONE In this mode, a deployment doesn't occur. Only the requested
// metadata parameters are updated. CURRENT_VERSION In this mode, the service
// instance is deployed and updated with the new spec that you provide. Only
// requested parameters are updated. Don’t include major or minor version
// parameters when you use this deployment type. MINOR_VERSION In this mode, the
// service instance is deployed and updated with the published, recommended
// (latest) minor version of the current major version in use, by default. You can
// also specify a different minor version of the current major version in use.
// MAJOR_VERSION In this mode, the service instance is deployed and updated with
// the published, recommended (latest) major and minor version of the current
// template, by default. You can specify a different major version that's higher
// than the major version in use and a minor version.
//
// This member is required.
DeploymentType types.DeploymentUpdateType
// The name of the service instance to update.
//
// This member is required.
Name *string
// The name of the service that the service instance belongs to.
//
// This member is required.
ServiceName *string
// The client token of the service instance to update.
ClientToken *string
// The formatted specification that defines the service instance update.
//
// This value conforms to the media type: application/yaml
Spec *string
// The major version of the service template to update.
TemplateMajorVersion *string
// The minor version of the service template to update.
TemplateMinorVersion *string
noSmithyDocumentSerde
}
type UpdateServiceInstanceOutput struct {
// The service instance summary data that's returned by Proton.
//
// This member is required.
ServiceInstance *types.ServiceInstance
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateServiceInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateServiceInstance{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateServiceInstance{}, 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_opUpdateServiceInstanceMiddleware(stack, options); err != nil {
return err
}
if err = addOpUpdateServiceInstanceValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateServiceInstance(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_initializeOpUpdateServiceInstance struct {
tokenProvider IdempotencyTokenProvider
}
func (*idempotencyToken_initializeOpUpdateServiceInstance) ID() string {
return "OperationIdempotencyTokenAutoFill"
}
func (m *idempotencyToken_initializeOpUpdateServiceInstance) 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.(*UpdateServiceInstanceInput)
if !ok {
return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateServiceInstanceInput ")
}
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_opUpdateServiceInstanceMiddleware(stack *middleware.Stack, cfg Options) error {
return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateServiceInstance{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
}
func newServiceMetadataMiddleware_opUpdateServiceInstance(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "UpdateServiceInstance",
}
}
| 205 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Update the service pipeline. There are four modes for updating a service
// pipeline. The deploymentType field defines the mode. NONE In this mode, a
// deployment doesn't occur. Only the requested metadata parameters are updated.
// CURRENT_VERSION In this mode, the service pipeline is deployed and updated with
// the new spec that you provide. Only requested parameters are updated. Don’t
// include major or minor version parameters when you use this deployment-type .
// MINOR_VERSION In this mode, the service pipeline is deployed and updated with
// the published, recommended (latest) minor version of the current major version
// in use, by default. You can specify a different minor version of the current
// major version in use. MAJOR_VERSION In this mode, the service pipeline is
// deployed and updated with the published, recommended (latest) major and minor
// version of the current template by default. You can specify a different major
// version that's higher than the major version in use and a minor version.
func (c *Client) UpdateServicePipeline(ctx context.Context, params *UpdateServicePipelineInput, optFns ...func(*Options)) (*UpdateServicePipelineOutput, error) {
if params == nil {
params = &UpdateServicePipelineInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateServicePipeline", params, optFns, c.addOperationUpdateServicePipelineMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateServicePipelineOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateServicePipelineInput struct {
// The deployment type. There are four modes for updating a service pipeline. The
// deploymentType field defines the mode. NONE In this mode, a deployment doesn't
// occur. Only the requested metadata parameters are updated. CURRENT_VERSION In
// this mode, the service pipeline is deployed and updated with the new spec that
// you provide. Only requested parameters are updated. Don’t include major or minor
// version parameters when you use this deployment-type . MINOR_VERSION In this
// mode, the service pipeline is deployed and updated with the published,
// recommended (latest) minor version of the current major version in use, by
// default. You can specify a different minor version of the current major version
// in use. MAJOR_VERSION In this mode, the service pipeline is deployed and
// updated with the published, recommended (latest) major and minor version of the
// current template, by default. You can specify a different major version that's
// higher than the major version in use and a minor version.
//
// This member is required.
DeploymentType types.DeploymentUpdateType
// The name of the service to that the pipeline is associated with.
//
// This member is required.
ServiceName *string
// The spec for the service pipeline to update.
//
// This value conforms to the media type: application/yaml
//
// This member is required.
Spec *string
// The major version of the service template that was used to create the service
// that the pipeline is associated with.
TemplateMajorVersion *string
// The minor version of the service template that was used to create the service
// that the pipeline is associated with.
TemplateMinorVersion *string
noSmithyDocumentSerde
}
type UpdateServicePipelineOutput struct {
// The pipeline details that are returned by Proton.
//
// This member is required.
Pipeline *types.ServicePipeline
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateServicePipelineMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateServicePipeline{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateServicePipeline{}, 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 = addOpUpdateServicePipelineValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateServicePipeline(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_opUpdateServicePipeline(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "UpdateServicePipeline",
}
}
| 171 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Update the service sync blocker by resolving it.
func (c *Client) UpdateServiceSyncBlocker(ctx context.Context, params *UpdateServiceSyncBlockerInput, optFns ...func(*Options)) (*UpdateServiceSyncBlockerOutput, error) {
if params == nil {
params = &UpdateServiceSyncBlockerInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateServiceSyncBlocker", params, optFns, c.addOperationUpdateServiceSyncBlockerMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateServiceSyncBlockerOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateServiceSyncBlockerInput struct {
// The ID of the service sync blocker.
//
// This member is required.
Id *string
// The reason the service sync blocker was resolved.
//
// This member is required.
ResolvedReason *string
noSmithyDocumentSerde
}
type UpdateServiceSyncBlockerOutput struct {
// The name of the service that you want to update the service sync blocker for.
//
// This member is required.
ServiceName *string
// The detailed data on the service sync blocker that was updated.
//
// This member is required.
ServiceSyncBlocker *types.SyncBlocker
// The name of the service instance that you want to update the service sync
// blocker for.
ServiceInstanceName *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateServiceSyncBlockerMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateServiceSyncBlocker{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateServiceSyncBlocker{}, 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 = addOpUpdateServiceSyncBlockerValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateServiceSyncBlocker(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_opUpdateServiceSyncBlocker(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "UpdateServiceSyncBlocker",
}
}
| 141 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Update the Proton Ops config file.
func (c *Client) UpdateServiceSyncConfig(ctx context.Context, params *UpdateServiceSyncConfigInput, optFns ...func(*Options)) (*UpdateServiceSyncConfigOutput, error) {
if params == nil {
params = &UpdateServiceSyncConfigInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateServiceSyncConfig", params, optFns, c.addOperationUpdateServiceSyncConfigMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateServiceSyncConfigOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateServiceSyncConfigInput struct {
// The name of the code repository branch where the Proton Ops file is found.
//
// This member is required.
Branch *string
// The path to the Proton Ops file.
//
// This member is required.
FilePath *string
// The name of the repository where the Proton Ops file is found.
//
// This member is required.
RepositoryName *string
// The name of the repository provider where the Proton Ops file is found.
//
// This member is required.
RepositoryProvider types.RepositoryProvider
// The name of the service the Proton Ops file is for.
//
// This member is required.
ServiceName *string
noSmithyDocumentSerde
}
type UpdateServiceSyncConfigOutput struct {
// The detailed data of the Proton Ops file.
ServiceSyncConfig *types.ServiceSyncConfig
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateServiceSyncConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateServiceSyncConfig{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateServiceSyncConfig{}, 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 = addOpUpdateServiceSyncConfigValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateServiceSyncConfig(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_opUpdateServiceSyncConfig(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "UpdateServiceSyncConfig",
}
}
| 145 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Update a service template.
func (c *Client) UpdateServiceTemplate(ctx context.Context, params *UpdateServiceTemplateInput, optFns ...func(*Options)) (*UpdateServiceTemplateOutput, error) {
if params == nil {
params = &UpdateServiceTemplateInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateServiceTemplate", params, optFns, c.addOperationUpdateServiceTemplateMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateServiceTemplateOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateServiceTemplateInput struct {
// The name of the service template to update.
//
// This member is required.
Name *string
// A description of the service template update.
Description *string
// The name of the service template to update that's displayed in the developer
// interface.
DisplayName *string
noSmithyDocumentSerde
}
type UpdateServiceTemplateOutput struct {
// The service template detail data that's returned by Proton.
//
// This member is required.
ServiceTemplate *types.ServiceTemplate
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateServiceTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateServiceTemplate{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateServiceTemplate{}, 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 = addOpUpdateServiceTemplateValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateServiceTemplate(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_opUpdateServiceTemplate(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "UpdateServiceTemplate",
}
}
| 134 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Update a major or minor version of a service template.
func (c *Client) UpdateServiceTemplateVersion(ctx context.Context, params *UpdateServiceTemplateVersionInput, optFns ...func(*Options)) (*UpdateServiceTemplateVersionOutput, error) {
if params == nil {
params = &UpdateServiceTemplateVersionInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateServiceTemplateVersion", params, optFns, c.addOperationUpdateServiceTemplateVersionMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateServiceTemplateVersionOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateServiceTemplateVersionInput struct {
// To update a major version of a service template, include major Version .
//
// This member is required.
MajorVersion *string
// To update a minor version of a service template, include minorVersion .
//
// This member is required.
MinorVersion *string
// The name of the service template.
//
// This member is required.
TemplateName *string
// An array of environment template objects that are compatible with this service
// template version. A service instance based on this service template version can
// run in environments based on compatible templates.
CompatibleEnvironmentTemplates []types.CompatibleEnvironmentTemplateInput
// A description of a service template version to update.
Description *string
// The status of the service template minor version to update.
Status types.TemplateVersionStatus
// An array of supported component sources. Components with supported sources can
// be attached to service instances based on this service template version. A
// change to supportedComponentSources doesn't impact existing component
// attachments to instances based on this template version. A change only affects
// later associations. For more information about components, see Proton components (https://docs.aws.amazon.com/proton/latest/userguide/ag-components.html)
// in the Proton User Guide.
SupportedComponentSources []types.ServiceTemplateSupportedComponentSourceType
noSmithyDocumentSerde
}
type UpdateServiceTemplateVersionOutput struct {
// The service template version detail data that's returned by Proton.
//
// This member is required.
ServiceTemplateVersion *types.ServiceTemplateVersion
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateServiceTemplateVersionMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateServiceTemplateVersion{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateServiceTemplateVersion{}, 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 = addOpUpdateServiceTemplateVersionValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateServiceTemplateVersion(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_opUpdateServiceTemplateVersion(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "UpdateServiceTemplateVersion",
}
}
| 156 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Update template sync configuration parameters, except for the templateName and
// templateType . Repository details (branch, name, and provider) should be of a
// linked repository. A linked repository is a repository that has been registered
// with Proton. For more information, see CreateRepository .
func (c *Client) UpdateTemplateSyncConfig(ctx context.Context, params *UpdateTemplateSyncConfigInput, optFns ...func(*Options)) (*UpdateTemplateSyncConfigOutput, error) {
if params == nil {
params = &UpdateTemplateSyncConfigInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateTemplateSyncConfig", params, optFns, c.addOperationUpdateTemplateSyncConfigMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateTemplateSyncConfigOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateTemplateSyncConfigInput struct {
// The repository branch for your template.
//
// This member is required.
Branch *string
// The repository name (for example, myrepos/myrepo ).
//
// This member is required.
RepositoryName *string
// The repository provider.
//
// This member is required.
RepositoryProvider types.RepositoryProvider
// The synced template name.
//
// This member is required.
TemplateName *string
// The synced template type.
//
// This member is required.
TemplateType types.TemplateType
// A subdirectory path to your template bundle version. When included, limits the
// template bundle search to this repository directory.
Subdirectory *string
noSmithyDocumentSerde
}
type UpdateTemplateSyncConfigOutput struct {
// The template sync configuration detail data that's returned by Proton.
TemplateSyncConfig *types.TemplateSyncConfig
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateTemplateSyncConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateTemplateSyncConfig{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateTemplateSyncConfig{}, 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 = addOpUpdateTemplateSyncConfigValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateTemplateSyncConfig(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_opUpdateTemplateSyncConfig(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "proton",
OperationName: "UpdateTemplateSyncConfig",
}
}
| 152 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
// Package proton provides the API client, operations, and parameter types for AWS
// Proton.
//
// This is the Proton Service API Reference. It provides descriptions, syntax and
// usage examples for each of the actions (https://docs.aws.amazon.com/proton/latest/APIReference/API_Operations.html)
// and data types (https://docs.aws.amazon.com/proton/latest/APIReference/API_Types.html)
// for the Proton service. The documentation for each action shows the Query API
// request parameters and the XML response. Alternatively, you can use the Amazon
// Web Services CLI to access an API. For more information, see the Amazon Web
// Services Command Line Interface User Guide (https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html)
// . The Proton service is a two-pronged automation framework. Administrators
// create service templates to provide standardized infrastructure and deployment
// tooling for serverless and container based applications. Developers, in turn,
// select from the available service templates to automate their application or
// service deployments. Because administrators define the infrastructure and
// tooling that Proton deploys and manages, they need permissions to use all of the
// listed API operations. When developers select a specific infrastructure and
// tooling set, Proton deploys their applications. To monitor their applications
// that are running on Proton, developers need permissions to the service create,
// list, update and delete API operations and the service instance list and update
// API operations. To learn more about Proton, see the Proton User Guide (https://docs.aws.amazon.com/proton/latest/userguide/Welcome.html)
// . Ensuring Idempotency When you make a mutating API request, the request
// typically returns a result before the asynchronous workflows of the operation
// are complete. Operations might also time out or encounter other server issues
// before they're complete, even if the request already returned a result. This
// might make it difficult to determine whether the request succeeded. Moreover,
// you might need to retry the request multiple times to ensure that the operation
// completes successfully. However, if the original request and the subsequent
// retries are successful, the operation occurs multiple times. This means that you
// might create more resources than you intended. Idempotency ensures that an API
// request action completes no more than one time. With an idempotent request, if
// the original request action completes successfully, any subsequent retries
// complete successfully without performing any further actions. However, the
// result might contain updated information, such as the current creation status.
// The following lists of APIs are grouped according to methods that ensure
// idempotency. Idempotent create APIs with a client token The API actions in this
// list support idempotency with the use of a client token. The corresponding
// Amazon Web Services CLI commands also support idempotency using a client token.
// A client token is a unique, case-sensitive string of up to 64 ASCII characters.
// To make an idempotent API request using one of these actions, specify a client
// token in the request. We recommend that you don't reuse the same client token
// for other API requests. If you don’t provide a client token for these APIs, a
// default client token is automatically provided by SDKs. Given a request action
// that has succeeded: If you retry the request using the same client token and the
// same parameters, the retry succeeds without performing any further actions other
// than returning the original resource detail data in the response. If you retry
// the request using the same client token, but one or more of the parameters are
// different, the retry throws a ValidationException with an
// IdempotentParameterMismatch error. Client tokens expire eight hours after a
// request is made. If you retry the request with the expired token, a new resource
// is created. If the original resource is deleted and you retry the request, a new
// resource is created. Idempotent create APIs with a client token:
// - CreateEnvironmentTemplateVersion
// - CreateServiceTemplateVersion
// - CreateEnvironmentAccountConnection
//
// Idempotent create APIs Given a request action that has succeeded: If you retry
// the request with an API from this group, and the original resource hasn't been
// modified, the retry succeeds without performing any further actions other than
// returning the original resource detail data in the response. If the original
// resource has been modified, the retry throws a ConflictException . If you retry
// with different input parameters, the retry throws a ValidationException with an
// IdempotentParameterMismatch error. Idempotent create APIs:
// - CreateEnvironmentTemplate
// - CreateServiceTemplate
// - CreateEnvironment
// - CreateService
//
// Idempotent delete APIs Given a request action that has succeeded: When you
// retry the request with an API from this group and the resource was deleted, its
// metadata is returned in the response. If you retry and the resource doesn't
// exist, the response is empty. In both cases, the retry succeeds. Idempotent
// delete APIs:
// - DeleteEnvironmentTemplate
// - DeleteEnvironmentTemplateVersion
// - DeleteServiceTemplate
// - DeleteServiceTemplateVersion
// - DeleteEnvironmentAccountConnection
//
// Asynchronous idempotent delete APIs Given a request action that has succeeded:
// If you retry the request with an API from this group, if the original request
// delete operation status is DELETE_IN_PROGRESS , the retry returns the resource
// detail data in the response without performing any further actions. If the
// original request delete operation is complete, a retry returns an empty
// response. Asynchronous idempotent delete APIs:
// - DeleteEnvironment
// - DeleteService
package proton
| 91 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
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/proton/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 = "awsproton20200720"
}
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 proton
// goModuleVersion is the tagged release for this module
const goModuleVersion = "1.21.6"
| 7 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
| 4 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
import (
"bytes"
"context"
"fmt"
"github.com/aws/aws-sdk-go-v2/service/proton/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"
"path"
)
type awsAwsjson10_serializeOpAcceptEnvironmentAccountConnection struct {
}
func (*awsAwsjson10_serializeOpAcceptEnvironmentAccountConnection) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpAcceptEnvironmentAccountConnection) 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.(*AcceptEnvironmentAccountConnectionInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.AcceptEnvironmentAccountConnection")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentAcceptEnvironmentAccountConnectionInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpCancelComponentDeployment struct {
}
func (*awsAwsjson10_serializeOpCancelComponentDeployment) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpCancelComponentDeployment) 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.(*CancelComponentDeploymentInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.CancelComponentDeployment")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentCancelComponentDeploymentInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpCancelEnvironmentDeployment struct {
}
func (*awsAwsjson10_serializeOpCancelEnvironmentDeployment) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpCancelEnvironmentDeployment) 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.(*CancelEnvironmentDeploymentInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.CancelEnvironmentDeployment")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentCancelEnvironmentDeploymentInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpCancelServiceInstanceDeployment struct {
}
func (*awsAwsjson10_serializeOpCancelServiceInstanceDeployment) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpCancelServiceInstanceDeployment) 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.(*CancelServiceInstanceDeploymentInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.CancelServiceInstanceDeployment")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentCancelServiceInstanceDeploymentInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpCancelServicePipelineDeployment struct {
}
func (*awsAwsjson10_serializeOpCancelServicePipelineDeployment) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpCancelServicePipelineDeployment) 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.(*CancelServicePipelineDeploymentInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.CancelServicePipelineDeployment")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentCancelServicePipelineDeploymentInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpCreateComponent struct {
}
func (*awsAwsjson10_serializeOpCreateComponent) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpCreateComponent) 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.(*CreateComponentInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.CreateComponent")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentCreateComponentInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpCreateEnvironment struct {
}
func (*awsAwsjson10_serializeOpCreateEnvironment) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpCreateEnvironment) 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.(*CreateEnvironmentInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.CreateEnvironment")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentCreateEnvironmentInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpCreateEnvironmentAccountConnection struct {
}
func (*awsAwsjson10_serializeOpCreateEnvironmentAccountConnection) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpCreateEnvironmentAccountConnection) 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.(*CreateEnvironmentAccountConnectionInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.CreateEnvironmentAccountConnection")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentCreateEnvironmentAccountConnectionInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpCreateEnvironmentTemplate struct {
}
func (*awsAwsjson10_serializeOpCreateEnvironmentTemplate) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpCreateEnvironmentTemplate) 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.(*CreateEnvironmentTemplateInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.CreateEnvironmentTemplate")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentCreateEnvironmentTemplateInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpCreateEnvironmentTemplateVersion struct {
}
func (*awsAwsjson10_serializeOpCreateEnvironmentTemplateVersion) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpCreateEnvironmentTemplateVersion) 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.(*CreateEnvironmentTemplateVersionInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.CreateEnvironmentTemplateVersion")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentCreateEnvironmentTemplateVersionInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpCreateRepository struct {
}
func (*awsAwsjson10_serializeOpCreateRepository) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpCreateRepository) 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.(*CreateRepositoryInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.CreateRepository")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentCreateRepositoryInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpCreateService struct {
}
func (*awsAwsjson10_serializeOpCreateService) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpCreateService) 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.(*CreateServiceInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.CreateService")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentCreateServiceInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpCreateServiceInstance struct {
}
func (*awsAwsjson10_serializeOpCreateServiceInstance) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpCreateServiceInstance) 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.(*CreateServiceInstanceInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.CreateServiceInstance")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentCreateServiceInstanceInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpCreateServiceSyncConfig struct {
}
func (*awsAwsjson10_serializeOpCreateServiceSyncConfig) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpCreateServiceSyncConfig) 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.(*CreateServiceSyncConfigInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.CreateServiceSyncConfig")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentCreateServiceSyncConfigInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpCreateServiceTemplate struct {
}
func (*awsAwsjson10_serializeOpCreateServiceTemplate) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpCreateServiceTemplate) 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.(*CreateServiceTemplateInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.CreateServiceTemplate")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentCreateServiceTemplateInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpCreateServiceTemplateVersion struct {
}
func (*awsAwsjson10_serializeOpCreateServiceTemplateVersion) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpCreateServiceTemplateVersion) 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.(*CreateServiceTemplateVersionInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.CreateServiceTemplateVersion")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentCreateServiceTemplateVersionInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpCreateTemplateSyncConfig struct {
}
func (*awsAwsjson10_serializeOpCreateTemplateSyncConfig) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpCreateTemplateSyncConfig) 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.(*CreateTemplateSyncConfigInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.CreateTemplateSyncConfig")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentCreateTemplateSyncConfigInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpDeleteComponent struct {
}
func (*awsAwsjson10_serializeOpDeleteComponent) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpDeleteComponent) 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.(*DeleteComponentInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.DeleteComponent")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentDeleteComponentInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpDeleteEnvironment struct {
}
func (*awsAwsjson10_serializeOpDeleteEnvironment) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpDeleteEnvironment) 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.(*DeleteEnvironmentInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.DeleteEnvironment")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentDeleteEnvironmentInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpDeleteEnvironmentAccountConnection struct {
}
func (*awsAwsjson10_serializeOpDeleteEnvironmentAccountConnection) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpDeleteEnvironmentAccountConnection) 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.(*DeleteEnvironmentAccountConnectionInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.DeleteEnvironmentAccountConnection")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentDeleteEnvironmentAccountConnectionInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpDeleteEnvironmentTemplate struct {
}
func (*awsAwsjson10_serializeOpDeleteEnvironmentTemplate) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpDeleteEnvironmentTemplate) 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.(*DeleteEnvironmentTemplateInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.DeleteEnvironmentTemplate")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentDeleteEnvironmentTemplateInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpDeleteEnvironmentTemplateVersion struct {
}
func (*awsAwsjson10_serializeOpDeleteEnvironmentTemplateVersion) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpDeleteEnvironmentTemplateVersion) 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.(*DeleteEnvironmentTemplateVersionInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.DeleteEnvironmentTemplateVersion")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentDeleteEnvironmentTemplateVersionInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpDeleteRepository struct {
}
func (*awsAwsjson10_serializeOpDeleteRepository) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpDeleteRepository) 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.(*DeleteRepositoryInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.DeleteRepository")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentDeleteRepositoryInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpDeleteService struct {
}
func (*awsAwsjson10_serializeOpDeleteService) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpDeleteService) 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.(*DeleteServiceInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.DeleteService")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentDeleteServiceInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpDeleteServiceSyncConfig struct {
}
func (*awsAwsjson10_serializeOpDeleteServiceSyncConfig) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpDeleteServiceSyncConfig) 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.(*DeleteServiceSyncConfigInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.DeleteServiceSyncConfig")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentDeleteServiceSyncConfigInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpDeleteServiceTemplate struct {
}
func (*awsAwsjson10_serializeOpDeleteServiceTemplate) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpDeleteServiceTemplate) 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.(*DeleteServiceTemplateInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.DeleteServiceTemplate")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentDeleteServiceTemplateInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpDeleteServiceTemplateVersion struct {
}
func (*awsAwsjson10_serializeOpDeleteServiceTemplateVersion) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpDeleteServiceTemplateVersion) 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.(*DeleteServiceTemplateVersionInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.DeleteServiceTemplateVersion")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentDeleteServiceTemplateVersionInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpDeleteTemplateSyncConfig struct {
}
func (*awsAwsjson10_serializeOpDeleteTemplateSyncConfig) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpDeleteTemplateSyncConfig) 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.(*DeleteTemplateSyncConfigInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.DeleteTemplateSyncConfig")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentDeleteTemplateSyncConfigInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpGetAccountSettings struct {
}
func (*awsAwsjson10_serializeOpGetAccountSettings) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpGetAccountSettings) 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.(*GetAccountSettingsInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetAccountSettings")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentGetAccountSettingsInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpGetComponent struct {
}
func (*awsAwsjson10_serializeOpGetComponent) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpGetComponent) 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.(*GetComponentInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetComponent")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentGetComponentInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpGetEnvironment struct {
}
func (*awsAwsjson10_serializeOpGetEnvironment) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpGetEnvironment) 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.(*GetEnvironmentInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetEnvironment")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentGetEnvironmentInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpGetEnvironmentAccountConnection struct {
}
func (*awsAwsjson10_serializeOpGetEnvironmentAccountConnection) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpGetEnvironmentAccountConnection) 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.(*GetEnvironmentAccountConnectionInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetEnvironmentAccountConnection")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentGetEnvironmentAccountConnectionInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpGetEnvironmentTemplate struct {
}
func (*awsAwsjson10_serializeOpGetEnvironmentTemplate) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpGetEnvironmentTemplate) 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.(*GetEnvironmentTemplateInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetEnvironmentTemplate")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentGetEnvironmentTemplateInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpGetEnvironmentTemplateVersion struct {
}
func (*awsAwsjson10_serializeOpGetEnvironmentTemplateVersion) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpGetEnvironmentTemplateVersion) 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.(*GetEnvironmentTemplateVersionInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetEnvironmentTemplateVersion")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentGetEnvironmentTemplateVersionInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpGetRepository struct {
}
func (*awsAwsjson10_serializeOpGetRepository) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpGetRepository) 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.(*GetRepositoryInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetRepository")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentGetRepositoryInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpGetRepositorySyncStatus struct {
}
func (*awsAwsjson10_serializeOpGetRepositorySyncStatus) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpGetRepositorySyncStatus) 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.(*GetRepositorySyncStatusInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetRepositorySyncStatus")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentGetRepositorySyncStatusInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpGetResourcesSummary struct {
}
func (*awsAwsjson10_serializeOpGetResourcesSummary) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpGetResourcesSummary) 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.(*GetResourcesSummaryInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetResourcesSummary")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentGetResourcesSummaryInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpGetService struct {
}
func (*awsAwsjson10_serializeOpGetService) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpGetService) 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.(*GetServiceInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetService")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentGetServiceInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpGetServiceInstance struct {
}
func (*awsAwsjson10_serializeOpGetServiceInstance) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpGetServiceInstance) 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.(*GetServiceInstanceInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetServiceInstance")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentGetServiceInstanceInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpGetServiceInstanceSyncStatus struct {
}
func (*awsAwsjson10_serializeOpGetServiceInstanceSyncStatus) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpGetServiceInstanceSyncStatus) 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.(*GetServiceInstanceSyncStatusInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetServiceInstanceSyncStatus")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentGetServiceInstanceSyncStatusInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpGetServiceSyncBlockerSummary struct {
}
func (*awsAwsjson10_serializeOpGetServiceSyncBlockerSummary) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpGetServiceSyncBlockerSummary) 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.(*GetServiceSyncBlockerSummaryInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetServiceSyncBlockerSummary")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentGetServiceSyncBlockerSummaryInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpGetServiceSyncConfig struct {
}
func (*awsAwsjson10_serializeOpGetServiceSyncConfig) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpGetServiceSyncConfig) 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.(*GetServiceSyncConfigInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetServiceSyncConfig")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentGetServiceSyncConfigInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpGetServiceTemplate struct {
}
func (*awsAwsjson10_serializeOpGetServiceTemplate) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpGetServiceTemplate) 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.(*GetServiceTemplateInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetServiceTemplate")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentGetServiceTemplateInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpGetServiceTemplateVersion struct {
}
func (*awsAwsjson10_serializeOpGetServiceTemplateVersion) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpGetServiceTemplateVersion) 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.(*GetServiceTemplateVersionInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetServiceTemplateVersion")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentGetServiceTemplateVersionInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpGetTemplateSyncConfig struct {
}
func (*awsAwsjson10_serializeOpGetTemplateSyncConfig) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpGetTemplateSyncConfig) 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.(*GetTemplateSyncConfigInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetTemplateSyncConfig")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentGetTemplateSyncConfigInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpGetTemplateSyncStatus struct {
}
func (*awsAwsjson10_serializeOpGetTemplateSyncStatus) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpGetTemplateSyncStatus) 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.(*GetTemplateSyncStatusInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetTemplateSyncStatus")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentGetTemplateSyncStatusInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpListComponentOutputs struct {
}
func (*awsAwsjson10_serializeOpListComponentOutputs) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpListComponentOutputs) 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.(*ListComponentOutputsInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListComponentOutputs")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentListComponentOutputsInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpListComponentProvisionedResources struct {
}
func (*awsAwsjson10_serializeOpListComponentProvisionedResources) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpListComponentProvisionedResources) 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.(*ListComponentProvisionedResourcesInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListComponentProvisionedResources")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentListComponentProvisionedResourcesInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpListComponents struct {
}
func (*awsAwsjson10_serializeOpListComponents) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpListComponents) 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.(*ListComponentsInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListComponents")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentListComponentsInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpListEnvironmentAccountConnections struct {
}
func (*awsAwsjson10_serializeOpListEnvironmentAccountConnections) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpListEnvironmentAccountConnections) 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.(*ListEnvironmentAccountConnectionsInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListEnvironmentAccountConnections")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentListEnvironmentAccountConnectionsInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpListEnvironmentOutputs struct {
}
func (*awsAwsjson10_serializeOpListEnvironmentOutputs) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpListEnvironmentOutputs) 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.(*ListEnvironmentOutputsInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListEnvironmentOutputs")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentListEnvironmentOutputsInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpListEnvironmentProvisionedResources struct {
}
func (*awsAwsjson10_serializeOpListEnvironmentProvisionedResources) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpListEnvironmentProvisionedResources) 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.(*ListEnvironmentProvisionedResourcesInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListEnvironmentProvisionedResources")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentListEnvironmentProvisionedResourcesInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpListEnvironments struct {
}
func (*awsAwsjson10_serializeOpListEnvironments) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpListEnvironments) 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.(*ListEnvironmentsInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListEnvironments")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentListEnvironmentsInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpListEnvironmentTemplates struct {
}
func (*awsAwsjson10_serializeOpListEnvironmentTemplates) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpListEnvironmentTemplates) 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.(*ListEnvironmentTemplatesInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListEnvironmentTemplates")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentListEnvironmentTemplatesInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpListEnvironmentTemplateVersions struct {
}
func (*awsAwsjson10_serializeOpListEnvironmentTemplateVersions) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpListEnvironmentTemplateVersions) 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.(*ListEnvironmentTemplateVersionsInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListEnvironmentTemplateVersions")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentListEnvironmentTemplateVersionsInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpListRepositories struct {
}
func (*awsAwsjson10_serializeOpListRepositories) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpListRepositories) 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.(*ListRepositoriesInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListRepositories")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentListRepositoriesInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpListRepositorySyncDefinitions struct {
}
func (*awsAwsjson10_serializeOpListRepositorySyncDefinitions) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpListRepositorySyncDefinitions) 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.(*ListRepositorySyncDefinitionsInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListRepositorySyncDefinitions")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentListRepositorySyncDefinitionsInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpListServiceInstanceOutputs struct {
}
func (*awsAwsjson10_serializeOpListServiceInstanceOutputs) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpListServiceInstanceOutputs) 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.(*ListServiceInstanceOutputsInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListServiceInstanceOutputs")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentListServiceInstanceOutputsInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpListServiceInstanceProvisionedResources struct {
}
func (*awsAwsjson10_serializeOpListServiceInstanceProvisionedResources) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpListServiceInstanceProvisionedResources) 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.(*ListServiceInstanceProvisionedResourcesInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListServiceInstanceProvisionedResources")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentListServiceInstanceProvisionedResourcesInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpListServiceInstances struct {
}
func (*awsAwsjson10_serializeOpListServiceInstances) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpListServiceInstances) 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.(*ListServiceInstancesInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListServiceInstances")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentListServiceInstancesInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpListServicePipelineOutputs struct {
}
func (*awsAwsjson10_serializeOpListServicePipelineOutputs) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpListServicePipelineOutputs) 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.(*ListServicePipelineOutputsInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListServicePipelineOutputs")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentListServicePipelineOutputsInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpListServicePipelineProvisionedResources struct {
}
func (*awsAwsjson10_serializeOpListServicePipelineProvisionedResources) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpListServicePipelineProvisionedResources) 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.(*ListServicePipelineProvisionedResourcesInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListServicePipelineProvisionedResources")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentListServicePipelineProvisionedResourcesInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpListServices struct {
}
func (*awsAwsjson10_serializeOpListServices) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpListServices) 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.(*ListServicesInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListServices")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentListServicesInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpListServiceTemplates struct {
}
func (*awsAwsjson10_serializeOpListServiceTemplates) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpListServiceTemplates) 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.(*ListServiceTemplatesInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListServiceTemplates")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentListServiceTemplatesInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpListServiceTemplateVersions struct {
}
func (*awsAwsjson10_serializeOpListServiceTemplateVersions) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpListServiceTemplateVersions) 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.(*ListServiceTemplateVersionsInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListServiceTemplateVersions")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentListServiceTemplateVersionsInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpListTagsForResource struct {
}
func (*awsAwsjson10_serializeOpListTagsForResource) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_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)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListTagsForResource")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentListTagsForResourceInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpNotifyResourceDeploymentStatusChange struct {
}
func (*awsAwsjson10_serializeOpNotifyResourceDeploymentStatusChange) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpNotifyResourceDeploymentStatusChange) 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.(*NotifyResourceDeploymentStatusChangeInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.NotifyResourceDeploymentStatusChange")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentNotifyResourceDeploymentStatusChangeInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpRejectEnvironmentAccountConnection struct {
}
func (*awsAwsjson10_serializeOpRejectEnvironmentAccountConnection) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpRejectEnvironmentAccountConnection) 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.(*RejectEnvironmentAccountConnectionInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.RejectEnvironmentAccountConnection")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentRejectEnvironmentAccountConnectionInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpTagResource struct {
}
func (*awsAwsjson10_serializeOpTagResource) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_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)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.TagResource")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpUntagResource struct {
}
func (*awsAwsjson10_serializeOpUntagResource) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_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)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UntagResource")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentUntagResourceInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpUpdateAccountSettings struct {
}
func (*awsAwsjson10_serializeOpUpdateAccountSettings) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpUpdateAccountSettings) 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.(*UpdateAccountSettingsInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateAccountSettings")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentUpdateAccountSettingsInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpUpdateComponent struct {
}
func (*awsAwsjson10_serializeOpUpdateComponent) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpUpdateComponent) 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.(*UpdateComponentInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateComponent")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentUpdateComponentInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpUpdateEnvironment struct {
}
func (*awsAwsjson10_serializeOpUpdateEnvironment) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpUpdateEnvironment) 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.(*UpdateEnvironmentInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateEnvironment")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentUpdateEnvironmentInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpUpdateEnvironmentAccountConnection struct {
}
func (*awsAwsjson10_serializeOpUpdateEnvironmentAccountConnection) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpUpdateEnvironmentAccountConnection) 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.(*UpdateEnvironmentAccountConnectionInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateEnvironmentAccountConnection")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentUpdateEnvironmentAccountConnectionInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpUpdateEnvironmentTemplate struct {
}
func (*awsAwsjson10_serializeOpUpdateEnvironmentTemplate) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpUpdateEnvironmentTemplate) 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.(*UpdateEnvironmentTemplateInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateEnvironmentTemplate")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentUpdateEnvironmentTemplateInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpUpdateEnvironmentTemplateVersion struct {
}
func (*awsAwsjson10_serializeOpUpdateEnvironmentTemplateVersion) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpUpdateEnvironmentTemplateVersion) 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.(*UpdateEnvironmentTemplateVersionInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateEnvironmentTemplateVersion")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentUpdateEnvironmentTemplateVersionInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpUpdateService struct {
}
func (*awsAwsjson10_serializeOpUpdateService) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpUpdateService) 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.(*UpdateServiceInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateService")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentUpdateServiceInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpUpdateServiceInstance struct {
}
func (*awsAwsjson10_serializeOpUpdateServiceInstance) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpUpdateServiceInstance) 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.(*UpdateServiceInstanceInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateServiceInstance")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentUpdateServiceInstanceInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpUpdateServicePipeline struct {
}
func (*awsAwsjson10_serializeOpUpdateServicePipeline) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpUpdateServicePipeline) 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.(*UpdateServicePipelineInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateServicePipeline")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentUpdateServicePipelineInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpUpdateServiceSyncBlocker struct {
}
func (*awsAwsjson10_serializeOpUpdateServiceSyncBlocker) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpUpdateServiceSyncBlocker) 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.(*UpdateServiceSyncBlockerInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateServiceSyncBlocker")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentUpdateServiceSyncBlockerInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpUpdateServiceSyncConfig struct {
}
func (*awsAwsjson10_serializeOpUpdateServiceSyncConfig) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpUpdateServiceSyncConfig) 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.(*UpdateServiceSyncConfigInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateServiceSyncConfig")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentUpdateServiceSyncConfigInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpUpdateServiceTemplate struct {
}
func (*awsAwsjson10_serializeOpUpdateServiceTemplate) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpUpdateServiceTemplate) 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.(*UpdateServiceTemplateInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateServiceTemplate")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentUpdateServiceTemplateInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpUpdateServiceTemplateVersion struct {
}
func (*awsAwsjson10_serializeOpUpdateServiceTemplateVersion) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpUpdateServiceTemplateVersion) 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.(*UpdateServiceTemplateVersionInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateServiceTemplateVersion")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentUpdateServiceTemplateVersionInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsjson10_serializeOpUpdateTemplateSyncConfig struct {
}
func (*awsAwsjson10_serializeOpUpdateTemplateSyncConfig) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpUpdateTemplateSyncConfig) 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.(*UpdateTemplateSyncConfigInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateTemplateSyncConfig")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentUpdateTemplateSyncConfigInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsAwsjson10_serializeDocumentCompatibleEnvironmentTemplateInput(v *types.CompatibleEnvironmentTemplateInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.MajorVersion != nil {
ok := object.Key("majorVersion")
ok.String(*v.MajorVersion)
}
if v.TemplateName != nil {
ok := object.Key("templateName")
ok.String(*v.TemplateName)
}
return nil
}
func awsAwsjson10_serializeDocumentCompatibleEnvironmentTemplateInputList(v []types.CompatibleEnvironmentTemplateInput, value smithyjson.Value) error {
array := value.Array()
defer array.Close()
for i := range v {
av := array.Value()
if err := awsAwsjson10_serializeDocumentCompatibleEnvironmentTemplateInput(&v[i], av); err != nil {
return err
}
}
return nil
}
func awsAwsjson10_serializeDocumentEnvironmentAccountConnectionStatusList(v []types.EnvironmentAccountConnectionStatus, 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 awsAwsjson10_serializeDocumentEnvironmentTemplateFilter(v *types.EnvironmentTemplateFilter, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.MajorVersion != nil {
ok := object.Key("majorVersion")
ok.String(*v.MajorVersion)
}
if v.TemplateName != nil {
ok := object.Key("templateName")
ok.String(*v.TemplateName)
}
return nil
}
func awsAwsjson10_serializeDocumentEnvironmentTemplateFilterList(v []types.EnvironmentTemplateFilter, value smithyjson.Value) error {
array := value.Array()
defer array.Close()
for i := range v {
av := array.Value()
if err := awsAwsjson10_serializeDocumentEnvironmentTemplateFilter(&v[i], av); err != nil {
return err
}
}
return nil
}
func awsAwsjson10_serializeDocumentListServiceInstancesFilter(v *types.ListServiceInstancesFilter, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if len(v.Key) > 0 {
ok := object.Key("key")
ok.String(string(v.Key))
}
if v.Value != nil {
ok := object.Key("value")
ok.String(*v.Value)
}
return nil
}
func awsAwsjson10_serializeDocumentListServiceInstancesFilterList(v []types.ListServiceInstancesFilter, value smithyjson.Value) error {
array := value.Array()
defer array.Close()
for i := range v {
av := array.Value()
if err := awsAwsjson10_serializeDocumentListServiceInstancesFilter(&v[i], av); err != nil {
return err
}
}
return nil
}
func awsAwsjson10_serializeDocumentOutput(v *types.Output, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Key != nil {
ok := object.Key("key")
ok.String(*v.Key)
}
if v.ValueString != nil {
ok := object.Key("valueString")
ok.String(*v.ValueString)
}
return nil
}
func awsAwsjson10_serializeDocumentOutputsList(v []types.Output, value smithyjson.Value) error {
array := value.Array()
defer array.Close()
for i := range v {
av := array.Value()
if err := awsAwsjson10_serializeDocumentOutput(&v[i], av); err != nil {
return err
}
}
return nil
}
func awsAwsjson10_serializeDocumentRepositoryBranchInput(v *types.RepositoryBranchInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Branch != nil {
ok := object.Key("branch")
ok.String(*v.Branch)
}
if v.Name != nil {
ok := object.Key("name")
ok.String(*v.Name)
}
if len(v.Provider) > 0 {
ok := object.Key("provider")
ok.String(string(v.Provider))
}
return nil
}
func awsAwsjson10_serializeDocumentS3ObjectSource(v *types.S3ObjectSource, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Bucket != nil {
ok := object.Key("bucket")
ok.String(*v.Bucket)
}
if v.Key != nil {
ok := object.Key("key")
ok.String(*v.Key)
}
return nil
}
func awsAwsjson10_serializeDocumentServiceTemplateSupportedComponentSourceInputList(v []types.ServiceTemplateSupportedComponentSourceType, 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 awsAwsjson10_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Key != nil {
ok := object.Key("key")
ok.String(*v.Key)
}
if v.Value != nil {
ok := object.Key("value")
ok.String(*v.Value)
}
return nil
}
func awsAwsjson10_serializeDocumentTagKeyList(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 awsAwsjson10_serializeDocumentTagList(v []types.Tag, value smithyjson.Value) error {
array := value.Array()
defer array.Close()
for i := range v {
av := array.Value()
if err := awsAwsjson10_serializeDocumentTag(&v[i], av); err != nil {
return err
}
}
return nil
}
func awsAwsjson10_serializeDocumentTemplateVersionSourceInput(v types.TemplateVersionSourceInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
switch uv := v.(type) {
case *types.TemplateVersionSourceInputMemberS3:
av := object.Key("s3")
if err := awsAwsjson10_serializeDocumentS3ObjectSource(&uv.Value, av); err != nil {
return err
}
default:
return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v)
}
return nil
}
func awsAwsjson10_serializeOpDocumentAcceptEnvironmentAccountConnectionInput(v *AcceptEnvironmentAccountConnectionInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Id != nil {
ok := object.Key("id")
ok.String(*v.Id)
}
return nil
}
func awsAwsjson10_serializeOpDocumentCancelComponentDeploymentInput(v *CancelComponentDeploymentInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.ComponentName != nil {
ok := object.Key("componentName")
ok.String(*v.ComponentName)
}
return nil
}
func awsAwsjson10_serializeOpDocumentCancelEnvironmentDeploymentInput(v *CancelEnvironmentDeploymentInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.EnvironmentName != nil {
ok := object.Key("environmentName")
ok.String(*v.EnvironmentName)
}
return nil
}
func awsAwsjson10_serializeOpDocumentCancelServiceInstanceDeploymentInput(v *CancelServiceInstanceDeploymentInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.ServiceInstanceName != nil {
ok := object.Key("serviceInstanceName")
ok.String(*v.ServiceInstanceName)
}
if v.ServiceName != nil {
ok := object.Key("serviceName")
ok.String(*v.ServiceName)
}
return nil
}
func awsAwsjson10_serializeOpDocumentCancelServicePipelineDeploymentInput(v *CancelServicePipelineDeploymentInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.ServiceName != nil {
ok := object.Key("serviceName")
ok.String(*v.ServiceName)
}
return nil
}
func awsAwsjson10_serializeOpDocumentCreateComponentInput(v *CreateComponentInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.ClientToken != nil {
ok := object.Key("clientToken")
ok.String(*v.ClientToken)
}
if v.Description != nil {
ok := object.Key("description")
ok.String(*v.Description)
}
if v.EnvironmentName != nil {
ok := object.Key("environmentName")
ok.String(*v.EnvironmentName)
}
if v.Manifest != nil {
ok := object.Key("manifest")
ok.String(*v.Manifest)
}
if v.Name != nil {
ok := object.Key("name")
ok.String(*v.Name)
}
if v.ServiceInstanceName != nil {
ok := object.Key("serviceInstanceName")
ok.String(*v.ServiceInstanceName)
}
if v.ServiceName != nil {
ok := object.Key("serviceName")
ok.String(*v.ServiceName)
}
if v.ServiceSpec != nil {
ok := object.Key("serviceSpec")
ok.String(*v.ServiceSpec)
}
if v.Tags != nil {
ok := object.Key("tags")
if err := awsAwsjson10_serializeDocumentTagList(v.Tags, ok); err != nil {
return err
}
}
if v.TemplateFile != nil {
ok := object.Key("templateFile")
ok.String(*v.TemplateFile)
}
return nil
}
func awsAwsjson10_serializeOpDocumentCreateEnvironmentAccountConnectionInput(v *CreateEnvironmentAccountConnectionInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.ClientToken != nil {
ok := object.Key("clientToken")
ok.String(*v.ClientToken)
}
if v.CodebuildRoleArn != nil {
ok := object.Key("codebuildRoleArn")
ok.String(*v.CodebuildRoleArn)
}
if v.ComponentRoleArn != nil {
ok := object.Key("componentRoleArn")
ok.String(*v.ComponentRoleArn)
}
if v.EnvironmentName != nil {
ok := object.Key("environmentName")
ok.String(*v.EnvironmentName)
}
if v.ManagementAccountId != nil {
ok := object.Key("managementAccountId")
ok.String(*v.ManagementAccountId)
}
if v.RoleArn != nil {
ok := object.Key("roleArn")
ok.String(*v.RoleArn)
}
if v.Tags != nil {
ok := object.Key("tags")
if err := awsAwsjson10_serializeDocumentTagList(v.Tags, ok); err != nil {
return err
}
}
return nil
}
func awsAwsjson10_serializeOpDocumentCreateEnvironmentInput(v *CreateEnvironmentInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.CodebuildRoleArn != nil {
ok := object.Key("codebuildRoleArn")
ok.String(*v.CodebuildRoleArn)
}
if v.ComponentRoleArn != nil {
ok := object.Key("componentRoleArn")
ok.String(*v.ComponentRoleArn)
}
if v.Description != nil {
ok := object.Key("description")
ok.String(*v.Description)
}
if v.EnvironmentAccountConnectionId != nil {
ok := object.Key("environmentAccountConnectionId")
ok.String(*v.EnvironmentAccountConnectionId)
}
if v.Name != nil {
ok := object.Key("name")
ok.String(*v.Name)
}
if v.ProtonServiceRoleArn != nil {
ok := object.Key("protonServiceRoleArn")
ok.String(*v.ProtonServiceRoleArn)
}
if v.ProvisioningRepository != nil {
ok := object.Key("provisioningRepository")
if err := awsAwsjson10_serializeDocumentRepositoryBranchInput(v.ProvisioningRepository, ok); err != nil {
return err
}
}
if v.Spec != nil {
ok := object.Key("spec")
ok.String(*v.Spec)
}
if v.Tags != nil {
ok := object.Key("tags")
if err := awsAwsjson10_serializeDocumentTagList(v.Tags, ok); err != nil {
return err
}
}
if v.TemplateMajorVersion != nil {
ok := object.Key("templateMajorVersion")
ok.String(*v.TemplateMajorVersion)
}
if v.TemplateMinorVersion != nil {
ok := object.Key("templateMinorVersion")
ok.String(*v.TemplateMinorVersion)
}
if v.TemplateName != nil {
ok := object.Key("templateName")
ok.String(*v.TemplateName)
}
return nil
}
func awsAwsjson10_serializeOpDocumentCreateEnvironmentTemplateInput(v *CreateEnvironmentTemplateInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Description != nil {
ok := object.Key("description")
ok.String(*v.Description)
}
if v.DisplayName != nil {
ok := object.Key("displayName")
ok.String(*v.DisplayName)
}
if v.EncryptionKey != nil {
ok := object.Key("encryptionKey")
ok.String(*v.EncryptionKey)
}
if v.Name != nil {
ok := object.Key("name")
ok.String(*v.Name)
}
if len(v.Provisioning) > 0 {
ok := object.Key("provisioning")
ok.String(string(v.Provisioning))
}
if v.Tags != nil {
ok := object.Key("tags")
if err := awsAwsjson10_serializeDocumentTagList(v.Tags, ok); err != nil {
return err
}
}
return nil
}
func awsAwsjson10_serializeOpDocumentCreateEnvironmentTemplateVersionInput(v *CreateEnvironmentTemplateVersionInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.ClientToken != nil {
ok := object.Key("clientToken")
ok.String(*v.ClientToken)
}
if v.Description != nil {
ok := object.Key("description")
ok.String(*v.Description)
}
if v.MajorVersion != nil {
ok := object.Key("majorVersion")
ok.String(*v.MajorVersion)
}
if v.Source != nil {
ok := object.Key("source")
if err := awsAwsjson10_serializeDocumentTemplateVersionSourceInput(v.Source, ok); err != nil {
return err
}
}
if v.Tags != nil {
ok := object.Key("tags")
if err := awsAwsjson10_serializeDocumentTagList(v.Tags, ok); err != nil {
return err
}
}
if v.TemplateName != nil {
ok := object.Key("templateName")
ok.String(*v.TemplateName)
}
return nil
}
func awsAwsjson10_serializeOpDocumentCreateRepositoryInput(v *CreateRepositoryInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.ConnectionArn != nil {
ok := object.Key("connectionArn")
ok.String(*v.ConnectionArn)
}
if v.EncryptionKey != nil {
ok := object.Key("encryptionKey")
ok.String(*v.EncryptionKey)
}
if v.Name != nil {
ok := object.Key("name")
ok.String(*v.Name)
}
if len(v.Provider) > 0 {
ok := object.Key("provider")
ok.String(string(v.Provider))
}
if v.Tags != nil {
ok := object.Key("tags")
if err := awsAwsjson10_serializeDocumentTagList(v.Tags, ok); err != nil {
return err
}
}
return nil
}
func awsAwsjson10_serializeOpDocumentCreateServiceInput(v *CreateServiceInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.BranchName != nil {
ok := object.Key("branchName")
ok.String(*v.BranchName)
}
if v.Description != nil {
ok := object.Key("description")
ok.String(*v.Description)
}
if v.Name != nil {
ok := object.Key("name")
ok.String(*v.Name)
}
if v.RepositoryConnectionArn != nil {
ok := object.Key("repositoryConnectionArn")
ok.String(*v.RepositoryConnectionArn)
}
if v.RepositoryId != nil {
ok := object.Key("repositoryId")
ok.String(*v.RepositoryId)
}
if v.Spec != nil {
ok := object.Key("spec")
ok.String(*v.Spec)
}
if v.Tags != nil {
ok := object.Key("tags")
if err := awsAwsjson10_serializeDocumentTagList(v.Tags, ok); err != nil {
return err
}
}
if v.TemplateMajorVersion != nil {
ok := object.Key("templateMajorVersion")
ok.String(*v.TemplateMajorVersion)
}
if v.TemplateMinorVersion != nil {
ok := object.Key("templateMinorVersion")
ok.String(*v.TemplateMinorVersion)
}
if v.TemplateName != nil {
ok := object.Key("templateName")
ok.String(*v.TemplateName)
}
return nil
}
func awsAwsjson10_serializeOpDocumentCreateServiceInstanceInput(v *CreateServiceInstanceInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.ClientToken != nil {
ok := object.Key("clientToken")
ok.String(*v.ClientToken)
}
if v.Name != nil {
ok := object.Key("name")
ok.String(*v.Name)
}
if v.ServiceName != nil {
ok := object.Key("serviceName")
ok.String(*v.ServiceName)
}
if v.Spec != nil {
ok := object.Key("spec")
ok.String(*v.Spec)
}
if v.Tags != nil {
ok := object.Key("tags")
if err := awsAwsjson10_serializeDocumentTagList(v.Tags, ok); err != nil {
return err
}
}
if v.TemplateMajorVersion != nil {
ok := object.Key("templateMajorVersion")
ok.String(*v.TemplateMajorVersion)
}
if v.TemplateMinorVersion != nil {
ok := object.Key("templateMinorVersion")
ok.String(*v.TemplateMinorVersion)
}
return nil
}
func awsAwsjson10_serializeOpDocumentCreateServiceSyncConfigInput(v *CreateServiceSyncConfigInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Branch != nil {
ok := object.Key("branch")
ok.String(*v.Branch)
}
if v.FilePath != nil {
ok := object.Key("filePath")
ok.String(*v.FilePath)
}
if v.RepositoryName != nil {
ok := object.Key("repositoryName")
ok.String(*v.RepositoryName)
}
if len(v.RepositoryProvider) > 0 {
ok := object.Key("repositoryProvider")
ok.String(string(v.RepositoryProvider))
}
if v.ServiceName != nil {
ok := object.Key("serviceName")
ok.String(*v.ServiceName)
}
return nil
}
func awsAwsjson10_serializeOpDocumentCreateServiceTemplateInput(v *CreateServiceTemplateInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Description != nil {
ok := object.Key("description")
ok.String(*v.Description)
}
if v.DisplayName != nil {
ok := object.Key("displayName")
ok.String(*v.DisplayName)
}
if v.EncryptionKey != nil {
ok := object.Key("encryptionKey")
ok.String(*v.EncryptionKey)
}
if v.Name != nil {
ok := object.Key("name")
ok.String(*v.Name)
}
if len(v.PipelineProvisioning) > 0 {
ok := object.Key("pipelineProvisioning")
ok.String(string(v.PipelineProvisioning))
}
if v.Tags != nil {
ok := object.Key("tags")
if err := awsAwsjson10_serializeDocumentTagList(v.Tags, ok); err != nil {
return err
}
}
return nil
}
func awsAwsjson10_serializeOpDocumentCreateServiceTemplateVersionInput(v *CreateServiceTemplateVersionInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.ClientToken != nil {
ok := object.Key("clientToken")
ok.String(*v.ClientToken)
}
if v.CompatibleEnvironmentTemplates != nil {
ok := object.Key("compatibleEnvironmentTemplates")
if err := awsAwsjson10_serializeDocumentCompatibleEnvironmentTemplateInputList(v.CompatibleEnvironmentTemplates, ok); err != nil {
return err
}
}
if v.Description != nil {
ok := object.Key("description")
ok.String(*v.Description)
}
if v.MajorVersion != nil {
ok := object.Key("majorVersion")
ok.String(*v.MajorVersion)
}
if v.Source != nil {
ok := object.Key("source")
if err := awsAwsjson10_serializeDocumentTemplateVersionSourceInput(v.Source, ok); err != nil {
return err
}
}
if v.SupportedComponentSources != nil {
ok := object.Key("supportedComponentSources")
if err := awsAwsjson10_serializeDocumentServiceTemplateSupportedComponentSourceInputList(v.SupportedComponentSources, ok); err != nil {
return err
}
}
if v.Tags != nil {
ok := object.Key("tags")
if err := awsAwsjson10_serializeDocumentTagList(v.Tags, ok); err != nil {
return err
}
}
if v.TemplateName != nil {
ok := object.Key("templateName")
ok.String(*v.TemplateName)
}
return nil
}
func awsAwsjson10_serializeOpDocumentCreateTemplateSyncConfigInput(v *CreateTemplateSyncConfigInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Branch != nil {
ok := object.Key("branch")
ok.String(*v.Branch)
}
if v.RepositoryName != nil {
ok := object.Key("repositoryName")
ok.String(*v.RepositoryName)
}
if len(v.RepositoryProvider) > 0 {
ok := object.Key("repositoryProvider")
ok.String(string(v.RepositoryProvider))
}
if v.Subdirectory != nil {
ok := object.Key("subdirectory")
ok.String(*v.Subdirectory)
}
if v.TemplateName != nil {
ok := object.Key("templateName")
ok.String(*v.TemplateName)
}
if len(v.TemplateType) > 0 {
ok := object.Key("templateType")
ok.String(string(v.TemplateType))
}
return nil
}
func awsAwsjson10_serializeOpDocumentDeleteComponentInput(v *DeleteComponentInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Name != nil {
ok := object.Key("name")
ok.String(*v.Name)
}
return nil
}
func awsAwsjson10_serializeOpDocumentDeleteEnvironmentAccountConnectionInput(v *DeleteEnvironmentAccountConnectionInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Id != nil {
ok := object.Key("id")
ok.String(*v.Id)
}
return nil
}
func awsAwsjson10_serializeOpDocumentDeleteEnvironmentInput(v *DeleteEnvironmentInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Name != nil {
ok := object.Key("name")
ok.String(*v.Name)
}
return nil
}
func awsAwsjson10_serializeOpDocumentDeleteEnvironmentTemplateInput(v *DeleteEnvironmentTemplateInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Name != nil {
ok := object.Key("name")
ok.String(*v.Name)
}
return nil
}
func awsAwsjson10_serializeOpDocumentDeleteEnvironmentTemplateVersionInput(v *DeleteEnvironmentTemplateVersionInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.MajorVersion != nil {
ok := object.Key("majorVersion")
ok.String(*v.MajorVersion)
}
if v.MinorVersion != nil {
ok := object.Key("minorVersion")
ok.String(*v.MinorVersion)
}
if v.TemplateName != nil {
ok := object.Key("templateName")
ok.String(*v.TemplateName)
}
return nil
}
func awsAwsjson10_serializeOpDocumentDeleteRepositoryInput(v *DeleteRepositoryInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Name != nil {
ok := object.Key("name")
ok.String(*v.Name)
}
if len(v.Provider) > 0 {
ok := object.Key("provider")
ok.String(string(v.Provider))
}
return nil
}
func awsAwsjson10_serializeOpDocumentDeleteServiceInput(v *DeleteServiceInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Name != nil {
ok := object.Key("name")
ok.String(*v.Name)
}
return nil
}
func awsAwsjson10_serializeOpDocumentDeleteServiceSyncConfigInput(v *DeleteServiceSyncConfigInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.ServiceName != nil {
ok := object.Key("serviceName")
ok.String(*v.ServiceName)
}
return nil
}
func awsAwsjson10_serializeOpDocumentDeleteServiceTemplateInput(v *DeleteServiceTemplateInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Name != nil {
ok := object.Key("name")
ok.String(*v.Name)
}
return nil
}
func awsAwsjson10_serializeOpDocumentDeleteServiceTemplateVersionInput(v *DeleteServiceTemplateVersionInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.MajorVersion != nil {
ok := object.Key("majorVersion")
ok.String(*v.MajorVersion)
}
if v.MinorVersion != nil {
ok := object.Key("minorVersion")
ok.String(*v.MinorVersion)
}
if v.TemplateName != nil {
ok := object.Key("templateName")
ok.String(*v.TemplateName)
}
return nil
}
func awsAwsjson10_serializeOpDocumentDeleteTemplateSyncConfigInput(v *DeleteTemplateSyncConfigInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.TemplateName != nil {
ok := object.Key("templateName")
ok.String(*v.TemplateName)
}
if len(v.TemplateType) > 0 {
ok := object.Key("templateType")
ok.String(string(v.TemplateType))
}
return nil
}
func awsAwsjson10_serializeOpDocumentGetAccountSettingsInput(v *GetAccountSettingsInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
return nil
}
func awsAwsjson10_serializeOpDocumentGetComponentInput(v *GetComponentInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Name != nil {
ok := object.Key("name")
ok.String(*v.Name)
}
return nil
}
func awsAwsjson10_serializeOpDocumentGetEnvironmentAccountConnectionInput(v *GetEnvironmentAccountConnectionInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Id != nil {
ok := object.Key("id")
ok.String(*v.Id)
}
return nil
}
func awsAwsjson10_serializeOpDocumentGetEnvironmentInput(v *GetEnvironmentInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Name != nil {
ok := object.Key("name")
ok.String(*v.Name)
}
return nil
}
func awsAwsjson10_serializeOpDocumentGetEnvironmentTemplateInput(v *GetEnvironmentTemplateInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Name != nil {
ok := object.Key("name")
ok.String(*v.Name)
}
return nil
}
func awsAwsjson10_serializeOpDocumentGetEnvironmentTemplateVersionInput(v *GetEnvironmentTemplateVersionInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.MajorVersion != nil {
ok := object.Key("majorVersion")
ok.String(*v.MajorVersion)
}
if v.MinorVersion != nil {
ok := object.Key("minorVersion")
ok.String(*v.MinorVersion)
}
if v.TemplateName != nil {
ok := object.Key("templateName")
ok.String(*v.TemplateName)
}
return nil
}
func awsAwsjson10_serializeOpDocumentGetRepositoryInput(v *GetRepositoryInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Name != nil {
ok := object.Key("name")
ok.String(*v.Name)
}
if len(v.Provider) > 0 {
ok := object.Key("provider")
ok.String(string(v.Provider))
}
return nil
}
func awsAwsjson10_serializeOpDocumentGetRepositorySyncStatusInput(v *GetRepositorySyncStatusInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Branch != nil {
ok := object.Key("branch")
ok.String(*v.Branch)
}
if v.RepositoryName != nil {
ok := object.Key("repositoryName")
ok.String(*v.RepositoryName)
}
if len(v.RepositoryProvider) > 0 {
ok := object.Key("repositoryProvider")
ok.String(string(v.RepositoryProvider))
}
if len(v.SyncType) > 0 {
ok := object.Key("syncType")
ok.String(string(v.SyncType))
}
return nil
}
func awsAwsjson10_serializeOpDocumentGetResourcesSummaryInput(v *GetResourcesSummaryInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
return nil
}
func awsAwsjson10_serializeOpDocumentGetServiceInput(v *GetServiceInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Name != nil {
ok := object.Key("name")
ok.String(*v.Name)
}
return nil
}
func awsAwsjson10_serializeOpDocumentGetServiceInstanceInput(v *GetServiceInstanceInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Name != nil {
ok := object.Key("name")
ok.String(*v.Name)
}
if v.ServiceName != nil {
ok := object.Key("serviceName")
ok.String(*v.ServiceName)
}
return nil
}
func awsAwsjson10_serializeOpDocumentGetServiceInstanceSyncStatusInput(v *GetServiceInstanceSyncStatusInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.ServiceInstanceName != nil {
ok := object.Key("serviceInstanceName")
ok.String(*v.ServiceInstanceName)
}
if v.ServiceName != nil {
ok := object.Key("serviceName")
ok.String(*v.ServiceName)
}
return nil
}
func awsAwsjson10_serializeOpDocumentGetServiceSyncBlockerSummaryInput(v *GetServiceSyncBlockerSummaryInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.ServiceInstanceName != nil {
ok := object.Key("serviceInstanceName")
ok.String(*v.ServiceInstanceName)
}
if v.ServiceName != nil {
ok := object.Key("serviceName")
ok.String(*v.ServiceName)
}
return nil
}
func awsAwsjson10_serializeOpDocumentGetServiceSyncConfigInput(v *GetServiceSyncConfigInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.ServiceName != nil {
ok := object.Key("serviceName")
ok.String(*v.ServiceName)
}
return nil
}
func awsAwsjson10_serializeOpDocumentGetServiceTemplateInput(v *GetServiceTemplateInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Name != nil {
ok := object.Key("name")
ok.String(*v.Name)
}
return nil
}
func awsAwsjson10_serializeOpDocumentGetServiceTemplateVersionInput(v *GetServiceTemplateVersionInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.MajorVersion != nil {
ok := object.Key("majorVersion")
ok.String(*v.MajorVersion)
}
if v.MinorVersion != nil {
ok := object.Key("minorVersion")
ok.String(*v.MinorVersion)
}
if v.TemplateName != nil {
ok := object.Key("templateName")
ok.String(*v.TemplateName)
}
return nil
}
func awsAwsjson10_serializeOpDocumentGetTemplateSyncConfigInput(v *GetTemplateSyncConfigInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.TemplateName != nil {
ok := object.Key("templateName")
ok.String(*v.TemplateName)
}
if len(v.TemplateType) > 0 {
ok := object.Key("templateType")
ok.String(string(v.TemplateType))
}
return nil
}
func awsAwsjson10_serializeOpDocumentGetTemplateSyncStatusInput(v *GetTemplateSyncStatusInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.TemplateName != nil {
ok := object.Key("templateName")
ok.String(*v.TemplateName)
}
if len(v.TemplateType) > 0 {
ok := object.Key("templateType")
ok.String(string(v.TemplateType))
}
if v.TemplateVersion != nil {
ok := object.Key("templateVersion")
ok.String(*v.TemplateVersion)
}
return nil
}
func awsAwsjson10_serializeOpDocumentListComponentOutputsInput(v *ListComponentOutputsInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.ComponentName != nil {
ok := object.Key("componentName")
ok.String(*v.ComponentName)
}
if v.NextToken != nil {
ok := object.Key("nextToken")
ok.String(*v.NextToken)
}
return nil
}
func awsAwsjson10_serializeOpDocumentListComponentProvisionedResourcesInput(v *ListComponentProvisionedResourcesInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.ComponentName != nil {
ok := object.Key("componentName")
ok.String(*v.ComponentName)
}
if v.NextToken != nil {
ok := object.Key("nextToken")
ok.String(*v.NextToken)
}
return nil
}
func awsAwsjson10_serializeOpDocumentListComponentsInput(v *ListComponentsInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.EnvironmentName != nil {
ok := object.Key("environmentName")
ok.String(*v.EnvironmentName)
}
if v.MaxResults != nil {
ok := object.Key("maxResults")
ok.Integer(*v.MaxResults)
}
if v.NextToken != nil {
ok := object.Key("nextToken")
ok.String(*v.NextToken)
}
if v.ServiceInstanceName != nil {
ok := object.Key("serviceInstanceName")
ok.String(*v.ServiceInstanceName)
}
if v.ServiceName != nil {
ok := object.Key("serviceName")
ok.String(*v.ServiceName)
}
return nil
}
func awsAwsjson10_serializeOpDocumentListEnvironmentAccountConnectionsInput(v *ListEnvironmentAccountConnectionsInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.EnvironmentName != nil {
ok := object.Key("environmentName")
ok.String(*v.EnvironmentName)
}
if v.MaxResults != nil {
ok := object.Key("maxResults")
ok.Integer(*v.MaxResults)
}
if v.NextToken != nil {
ok := object.Key("nextToken")
ok.String(*v.NextToken)
}
if len(v.RequestedBy) > 0 {
ok := object.Key("requestedBy")
ok.String(string(v.RequestedBy))
}
if v.Statuses != nil {
ok := object.Key("statuses")
if err := awsAwsjson10_serializeDocumentEnvironmentAccountConnectionStatusList(v.Statuses, ok); err != nil {
return err
}
}
return nil
}
func awsAwsjson10_serializeOpDocumentListEnvironmentOutputsInput(v *ListEnvironmentOutputsInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.EnvironmentName != nil {
ok := object.Key("environmentName")
ok.String(*v.EnvironmentName)
}
if v.NextToken != nil {
ok := object.Key("nextToken")
ok.String(*v.NextToken)
}
return nil
}
func awsAwsjson10_serializeOpDocumentListEnvironmentProvisionedResourcesInput(v *ListEnvironmentProvisionedResourcesInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.EnvironmentName != nil {
ok := object.Key("environmentName")
ok.String(*v.EnvironmentName)
}
if v.NextToken != nil {
ok := object.Key("nextToken")
ok.String(*v.NextToken)
}
return nil
}
func awsAwsjson10_serializeOpDocumentListEnvironmentsInput(v *ListEnvironmentsInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.EnvironmentTemplates != nil {
ok := object.Key("environmentTemplates")
if err := awsAwsjson10_serializeDocumentEnvironmentTemplateFilterList(v.EnvironmentTemplates, ok); err != nil {
return err
}
}
if v.MaxResults != nil {
ok := object.Key("maxResults")
ok.Integer(*v.MaxResults)
}
if v.NextToken != nil {
ok := object.Key("nextToken")
ok.String(*v.NextToken)
}
return nil
}
func awsAwsjson10_serializeOpDocumentListEnvironmentTemplatesInput(v *ListEnvironmentTemplatesInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.MaxResults != nil {
ok := object.Key("maxResults")
ok.Integer(*v.MaxResults)
}
if v.NextToken != nil {
ok := object.Key("nextToken")
ok.String(*v.NextToken)
}
return nil
}
func awsAwsjson10_serializeOpDocumentListEnvironmentTemplateVersionsInput(v *ListEnvironmentTemplateVersionsInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.MajorVersion != nil {
ok := object.Key("majorVersion")
ok.String(*v.MajorVersion)
}
if v.MaxResults != nil {
ok := object.Key("maxResults")
ok.Integer(*v.MaxResults)
}
if v.NextToken != nil {
ok := object.Key("nextToken")
ok.String(*v.NextToken)
}
if v.TemplateName != nil {
ok := object.Key("templateName")
ok.String(*v.TemplateName)
}
return nil
}
func awsAwsjson10_serializeOpDocumentListRepositoriesInput(v *ListRepositoriesInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.MaxResults != nil {
ok := object.Key("maxResults")
ok.Integer(*v.MaxResults)
}
if v.NextToken != nil {
ok := object.Key("nextToken")
ok.String(*v.NextToken)
}
return nil
}
func awsAwsjson10_serializeOpDocumentListRepositorySyncDefinitionsInput(v *ListRepositorySyncDefinitionsInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.NextToken != nil {
ok := object.Key("nextToken")
ok.String(*v.NextToken)
}
if v.RepositoryName != nil {
ok := object.Key("repositoryName")
ok.String(*v.RepositoryName)
}
if len(v.RepositoryProvider) > 0 {
ok := object.Key("repositoryProvider")
ok.String(string(v.RepositoryProvider))
}
if len(v.SyncType) > 0 {
ok := object.Key("syncType")
ok.String(string(v.SyncType))
}
return nil
}
func awsAwsjson10_serializeOpDocumentListServiceInstanceOutputsInput(v *ListServiceInstanceOutputsInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.NextToken != nil {
ok := object.Key("nextToken")
ok.String(*v.NextToken)
}
if v.ServiceInstanceName != nil {
ok := object.Key("serviceInstanceName")
ok.String(*v.ServiceInstanceName)
}
if v.ServiceName != nil {
ok := object.Key("serviceName")
ok.String(*v.ServiceName)
}
return nil
}
func awsAwsjson10_serializeOpDocumentListServiceInstanceProvisionedResourcesInput(v *ListServiceInstanceProvisionedResourcesInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.NextToken != nil {
ok := object.Key("nextToken")
ok.String(*v.NextToken)
}
if v.ServiceInstanceName != nil {
ok := object.Key("serviceInstanceName")
ok.String(*v.ServiceInstanceName)
}
if v.ServiceName != nil {
ok := object.Key("serviceName")
ok.String(*v.ServiceName)
}
return nil
}
func awsAwsjson10_serializeOpDocumentListServiceInstancesInput(v *ListServiceInstancesInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Filters != nil {
ok := object.Key("filters")
if err := awsAwsjson10_serializeDocumentListServiceInstancesFilterList(v.Filters, ok); err != nil {
return err
}
}
if v.MaxResults != nil {
ok := object.Key("maxResults")
ok.Integer(*v.MaxResults)
}
if v.NextToken != nil {
ok := object.Key("nextToken")
ok.String(*v.NextToken)
}
if v.ServiceName != nil {
ok := object.Key("serviceName")
ok.String(*v.ServiceName)
}
if len(v.SortBy) > 0 {
ok := object.Key("sortBy")
ok.String(string(v.SortBy))
}
if len(v.SortOrder) > 0 {
ok := object.Key("sortOrder")
ok.String(string(v.SortOrder))
}
return nil
}
func awsAwsjson10_serializeOpDocumentListServicePipelineOutputsInput(v *ListServicePipelineOutputsInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.NextToken != nil {
ok := object.Key("nextToken")
ok.String(*v.NextToken)
}
if v.ServiceName != nil {
ok := object.Key("serviceName")
ok.String(*v.ServiceName)
}
return nil
}
func awsAwsjson10_serializeOpDocumentListServicePipelineProvisionedResourcesInput(v *ListServicePipelineProvisionedResourcesInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.NextToken != nil {
ok := object.Key("nextToken")
ok.String(*v.NextToken)
}
if v.ServiceName != nil {
ok := object.Key("serviceName")
ok.String(*v.ServiceName)
}
return nil
}
func awsAwsjson10_serializeOpDocumentListServicesInput(v *ListServicesInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.MaxResults != nil {
ok := object.Key("maxResults")
ok.Integer(*v.MaxResults)
}
if v.NextToken != nil {
ok := object.Key("nextToken")
ok.String(*v.NextToken)
}
return nil
}
func awsAwsjson10_serializeOpDocumentListServiceTemplatesInput(v *ListServiceTemplatesInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.MaxResults != nil {
ok := object.Key("maxResults")
ok.Integer(*v.MaxResults)
}
if v.NextToken != nil {
ok := object.Key("nextToken")
ok.String(*v.NextToken)
}
return nil
}
func awsAwsjson10_serializeOpDocumentListServiceTemplateVersionsInput(v *ListServiceTemplateVersionsInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.MajorVersion != nil {
ok := object.Key("majorVersion")
ok.String(*v.MajorVersion)
}
if v.MaxResults != nil {
ok := object.Key("maxResults")
ok.Integer(*v.MaxResults)
}
if v.NextToken != nil {
ok := object.Key("nextToken")
ok.String(*v.NextToken)
}
if v.TemplateName != nil {
ok := object.Key("templateName")
ok.String(*v.TemplateName)
}
return nil
}
func awsAwsjson10_serializeOpDocumentListTagsForResourceInput(v *ListTagsForResourceInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.MaxResults != nil {
ok := object.Key("maxResults")
ok.Integer(*v.MaxResults)
}
if v.NextToken != nil {
ok := object.Key("nextToken")
ok.String(*v.NextToken)
}
if v.ResourceArn != nil {
ok := object.Key("resourceArn")
ok.String(*v.ResourceArn)
}
return nil
}
func awsAwsjson10_serializeOpDocumentNotifyResourceDeploymentStatusChangeInput(v *NotifyResourceDeploymentStatusChangeInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.DeploymentId != nil {
ok := object.Key("deploymentId")
ok.String(*v.DeploymentId)
}
if v.Outputs != nil {
ok := object.Key("outputs")
if err := awsAwsjson10_serializeDocumentOutputsList(v.Outputs, ok); err != nil {
return err
}
}
if v.ResourceArn != nil {
ok := object.Key("resourceArn")
ok.String(*v.ResourceArn)
}
if len(v.Status) > 0 {
ok := object.Key("status")
ok.String(string(v.Status))
}
if v.StatusMessage != nil {
ok := object.Key("statusMessage")
ok.String(*v.StatusMessage)
}
return nil
}
func awsAwsjson10_serializeOpDocumentRejectEnvironmentAccountConnectionInput(v *RejectEnvironmentAccountConnectionInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Id != nil {
ok := object.Key("id")
ok.String(*v.Id)
}
return nil
}
func awsAwsjson10_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.ResourceArn != nil {
ok := object.Key("resourceArn")
ok.String(*v.ResourceArn)
}
if v.Tags != nil {
ok := object.Key("tags")
if err := awsAwsjson10_serializeDocumentTagList(v.Tags, ok); err != nil {
return err
}
}
return nil
}
func awsAwsjson10_serializeOpDocumentUntagResourceInput(v *UntagResourceInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.ResourceArn != nil {
ok := object.Key("resourceArn")
ok.String(*v.ResourceArn)
}
if v.TagKeys != nil {
ok := object.Key("tagKeys")
if err := awsAwsjson10_serializeDocumentTagKeyList(v.TagKeys, ok); err != nil {
return err
}
}
return nil
}
func awsAwsjson10_serializeOpDocumentUpdateAccountSettingsInput(v *UpdateAccountSettingsInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.DeletePipelineProvisioningRepository != nil {
ok := object.Key("deletePipelineProvisioningRepository")
ok.Boolean(*v.DeletePipelineProvisioningRepository)
}
if v.PipelineCodebuildRoleArn != nil {
ok := object.Key("pipelineCodebuildRoleArn")
ok.String(*v.PipelineCodebuildRoleArn)
}
if v.PipelineProvisioningRepository != nil {
ok := object.Key("pipelineProvisioningRepository")
if err := awsAwsjson10_serializeDocumentRepositoryBranchInput(v.PipelineProvisioningRepository, ok); err != nil {
return err
}
}
if v.PipelineServiceRoleArn != nil {
ok := object.Key("pipelineServiceRoleArn")
ok.String(*v.PipelineServiceRoleArn)
}
return nil
}
func awsAwsjson10_serializeOpDocumentUpdateComponentInput(v *UpdateComponentInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.ClientToken != nil {
ok := object.Key("clientToken")
ok.String(*v.ClientToken)
}
if len(v.DeploymentType) > 0 {
ok := object.Key("deploymentType")
ok.String(string(v.DeploymentType))
}
if v.Description != nil {
ok := object.Key("description")
ok.String(*v.Description)
}
if v.Name != nil {
ok := object.Key("name")
ok.String(*v.Name)
}
if v.ServiceInstanceName != nil {
ok := object.Key("serviceInstanceName")
ok.String(*v.ServiceInstanceName)
}
if v.ServiceName != nil {
ok := object.Key("serviceName")
ok.String(*v.ServiceName)
}
if v.ServiceSpec != nil {
ok := object.Key("serviceSpec")
ok.String(*v.ServiceSpec)
}
if v.TemplateFile != nil {
ok := object.Key("templateFile")
ok.String(*v.TemplateFile)
}
return nil
}
func awsAwsjson10_serializeOpDocumentUpdateEnvironmentAccountConnectionInput(v *UpdateEnvironmentAccountConnectionInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.CodebuildRoleArn != nil {
ok := object.Key("codebuildRoleArn")
ok.String(*v.CodebuildRoleArn)
}
if v.ComponentRoleArn != nil {
ok := object.Key("componentRoleArn")
ok.String(*v.ComponentRoleArn)
}
if v.Id != nil {
ok := object.Key("id")
ok.String(*v.Id)
}
if v.RoleArn != nil {
ok := object.Key("roleArn")
ok.String(*v.RoleArn)
}
return nil
}
func awsAwsjson10_serializeOpDocumentUpdateEnvironmentInput(v *UpdateEnvironmentInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.CodebuildRoleArn != nil {
ok := object.Key("codebuildRoleArn")
ok.String(*v.CodebuildRoleArn)
}
if v.ComponentRoleArn != nil {
ok := object.Key("componentRoleArn")
ok.String(*v.ComponentRoleArn)
}
if len(v.DeploymentType) > 0 {
ok := object.Key("deploymentType")
ok.String(string(v.DeploymentType))
}
if v.Description != nil {
ok := object.Key("description")
ok.String(*v.Description)
}
if v.EnvironmentAccountConnectionId != nil {
ok := object.Key("environmentAccountConnectionId")
ok.String(*v.EnvironmentAccountConnectionId)
}
if v.Name != nil {
ok := object.Key("name")
ok.String(*v.Name)
}
if v.ProtonServiceRoleArn != nil {
ok := object.Key("protonServiceRoleArn")
ok.String(*v.ProtonServiceRoleArn)
}
if v.ProvisioningRepository != nil {
ok := object.Key("provisioningRepository")
if err := awsAwsjson10_serializeDocumentRepositoryBranchInput(v.ProvisioningRepository, ok); err != nil {
return err
}
}
if v.Spec != nil {
ok := object.Key("spec")
ok.String(*v.Spec)
}
if v.TemplateMajorVersion != nil {
ok := object.Key("templateMajorVersion")
ok.String(*v.TemplateMajorVersion)
}
if v.TemplateMinorVersion != nil {
ok := object.Key("templateMinorVersion")
ok.String(*v.TemplateMinorVersion)
}
return nil
}
func awsAwsjson10_serializeOpDocumentUpdateEnvironmentTemplateInput(v *UpdateEnvironmentTemplateInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Description != nil {
ok := object.Key("description")
ok.String(*v.Description)
}
if v.DisplayName != nil {
ok := object.Key("displayName")
ok.String(*v.DisplayName)
}
if v.Name != nil {
ok := object.Key("name")
ok.String(*v.Name)
}
return nil
}
func awsAwsjson10_serializeOpDocumentUpdateEnvironmentTemplateVersionInput(v *UpdateEnvironmentTemplateVersionInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Description != nil {
ok := object.Key("description")
ok.String(*v.Description)
}
if v.MajorVersion != nil {
ok := object.Key("majorVersion")
ok.String(*v.MajorVersion)
}
if v.MinorVersion != nil {
ok := object.Key("minorVersion")
ok.String(*v.MinorVersion)
}
if len(v.Status) > 0 {
ok := object.Key("status")
ok.String(string(v.Status))
}
if v.TemplateName != nil {
ok := object.Key("templateName")
ok.String(*v.TemplateName)
}
return nil
}
func awsAwsjson10_serializeOpDocumentUpdateServiceInput(v *UpdateServiceInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Description != nil {
ok := object.Key("description")
ok.String(*v.Description)
}
if v.Name != nil {
ok := object.Key("name")
ok.String(*v.Name)
}
if v.Spec != nil {
ok := object.Key("spec")
ok.String(*v.Spec)
}
return nil
}
func awsAwsjson10_serializeOpDocumentUpdateServiceInstanceInput(v *UpdateServiceInstanceInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.ClientToken != nil {
ok := object.Key("clientToken")
ok.String(*v.ClientToken)
}
if len(v.DeploymentType) > 0 {
ok := object.Key("deploymentType")
ok.String(string(v.DeploymentType))
}
if v.Name != nil {
ok := object.Key("name")
ok.String(*v.Name)
}
if v.ServiceName != nil {
ok := object.Key("serviceName")
ok.String(*v.ServiceName)
}
if v.Spec != nil {
ok := object.Key("spec")
ok.String(*v.Spec)
}
if v.TemplateMajorVersion != nil {
ok := object.Key("templateMajorVersion")
ok.String(*v.TemplateMajorVersion)
}
if v.TemplateMinorVersion != nil {
ok := object.Key("templateMinorVersion")
ok.String(*v.TemplateMinorVersion)
}
return nil
}
func awsAwsjson10_serializeOpDocumentUpdateServicePipelineInput(v *UpdateServicePipelineInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if len(v.DeploymentType) > 0 {
ok := object.Key("deploymentType")
ok.String(string(v.DeploymentType))
}
if v.ServiceName != nil {
ok := object.Key("serviceName")
ok.String(*v.ServiceName)
}
if v.Spec != nil {
ok := object.Key("spec")
ok.String(*v.Spec)
}
if v.TemplateMajorVersion != nil {
ok := object.Key("templateMajorVersion")
ok.String(*v.TemplateMajorVersion)
}
if v.TemplateMinorVersion != nil {
ok := object.Key("templateMinorVersion")
ok.String(*v.TemplateMinorVersion)
}
return nil
}
func awsAwsjson10_serializeOpDocumentUpdateServiceSyncBlockerInput(v *UpdateServiceSyncBlockerInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Id != nil {
ok := object.Key("id")
ok.String(*v.Id)
}
if v.ResolvedReason != nil {
ok := object.Key("resolvedReason")
ok.String(*v.ResolvedReason)
}
return nil
}
func awsAwsjson10_serializeOpDocumentUpdateServiceSyncConfigInput(v *UpdateServiceSyncConfigInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Branch != nil {
ok := object.Key("branch")
ok.String(*v.Branch)
}
if v.FilePath != nil {
ok := object.Key("filePath")
ok.String(*v.FilePath)
}
if v.RepositoryName != nil {
ok := object.Key("repositoryName")
ok.String(*v.RepositoryName)
}
if len(v.RepositoryProvider) > 0 {
ok := object.Key("repositoryProvider")
ok.String(string(v.RepositoryProvider))
}
if v.ServiceName != nil {
ok := object.Key("serviceName")
ok.String(*v.ServiceName)
}
return nil
}
func awsAwsjson10_serializeOpDocumentUpdateServiceTemplateInput(v *UpdateServiceTemplateInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Description != nil {
ok := object.Key("description")
ok.String(*v.Description)
}
if v.DisplayName != nil {
ok := object.Key("displayName")
ok.String(*v.DisplayName)
}
if v.Name != nil {
ok := object.Key("name")
ok.String(*v.Name)
}
return nil
}
func awsAwsjson10_serializeOpDocumentUpdateServiceTemplateVersionInput(v *UpdateServiceTemplateVersionInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.CompatibleEnvironmentTemplates != nil {
ok := object.Key("compatibleEnvironmentTemplates")
if err := awsAwsjson10_serializeDocumentCompatibleEnvironmentTemplateInputList(v.CompatibleEnvironmentTemplates, ok); err != nil {
return err
}
}
if v.Description != nil {
ok := object.Key("description")
ok.String(*v.Description)
}
if v.MajorVersion != nil {
ok := object.Key("majorVersion")
ok.String(*v.MajorVersion)
}
if v.MinorVersion != nil {
ok := object.Key("minorVersion")
ok.String(*v.MinorVersion)
}
if len(v.Status) > 0 {
ok := object.Key("status")
ok.String(string(v.Status))
}
if v.SupportedComponentSources != nil {
ok := object.Key("supportedComponentSources")
if err := awsAwsjson10_serializeDocumentServiceTemplateSupportedComponentSourceInputList(v.SupportedComponentSources, ok); err != nil {
return err
}
}
if v.TemplateName != nil {
ok := object.Key("templateName")
ok.String(*v.TemplateName)
}
return nil
}
func awsAwsjson10_serializeOpDocumentUpdateTemplateSyncConfigInput(v *UpdateTemplateSyncConfigInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Branch != nil {
ok := object.Key("branch")
ok.String(*v.Branch)
}
if v.RepositoryName != nil {
ok := object.Key("repositoryName")
ok.String(*v.RepositoryName)
}
if len(v.RepositoryProvider) > 0 {
ok := object.Key("repositoryProvider")
ok.String(string(v.RepositoryProvider))
}
if v.Subdirectory != nil {
ok := object.Key("subdirectory")
ok.String(*v.Subdirectory)
}
if v.TemplateName != nil {
ok := object.Key("templateName")
ok.String(*v.TemplateName)
}
if len(v.TemplateType) > 0 {
ok := object.Key("templateType")
ok.String(string(v.TemplateType))
}
return nil
}
| 6,934 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package proton
import (
"context"
"fmt"
"github.com/aws/aws-sdk-go-v2/service/proton/types"
smithy "github.com/aws/smithy-go"
"github.com/aws/smithy-go/middleware"
)
type validateOpAcceptEnvironmentAccountConnection struct {
}
func (*validateOpAcceptEnvironmentAccountConnection) ID() string {
return "OperationInputValidation"
}
func (m *validateOpAcceptEnvironmentAccountConnection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*AcceptEnvironmentAccountConnectionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpAcceptEnvironmentAccountConnectionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCancelComponentDeployment struct {
}
func (*validateOpCancelComponentDeployment) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCancelComponentDeployment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CancelComponentDeploymentInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCancelComponentDeploymentInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCancelEnvironmentDeployment struct {
}
func (*validateOpCancelEnvironmentDeployment) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCancelEnvironmentDeployment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CancelEnvironmentDeploymentInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCancelEnvironmentDeploymentInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCancelServiceInstanceDeployment struct {
}
func (*validateOpCancelServiceInstanceDeployment) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCancelServiceInstanceDeployment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CancelServiceInstanceDeploymentInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCancelServiceInstanceDeploymentInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCancelServicePipelineDeployment struct {
}
func (*validateOpCancelServicePipelineDeployment) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCancelServicePipelineDeployment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CancelServicePipelineDeploymentInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCancelServicePipelineDeploymentInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateComponent struct {
}
func (*validateOpCreateComponent) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateComponent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateComponentInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateComponentInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateEnvironmentAccountConnection struct {
}
func (*validateOpCreateEnvironmentAccountConnection) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateEnvironmentAccountConnection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateEnvironmentAccountConnectionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateEnvironmentAccountConnectionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateEnvironment struct {
}
func (*validateOpCreateEnvironment) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateEnvironment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateEnvironmentInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateEnvironmentInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateEnvironmentTemplate struct {
}
func (*validateOpCreateEnvironmentTemplate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateEnvironmentTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateEnvironmentTemplateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateEnvironmentTemplateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateEnvironmentTemplateVersion struct {
}
func (*validateOpCreateEnvironmentTemplateVersion) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateEnvironmentTemplateVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateEnvironmentTemplateVersionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateEnvironmentTemplateVersionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateRepository struct {
}
func (*validateOpCreateRepository) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateRepository) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateRepositoryInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateRepositoryInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateService struct {
}
func (*validateOpCreateService) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateService) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateServiceInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateServiceInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateServiceInstance struct {
}
func (*validateOpCreateServiceInstance) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateServiceInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateServiceInstanceInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateServiceInstanceInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateServiceSyncConfig struct {
}
func (*validateOpCreateServiceSyncConfig) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateServiceSyncConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateServiceSyncConfigInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateServiceSyncConfigInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateServiceTemplate struct {
}
func (*validateOpCreateServiceTemplate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateServiceTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateServiceTemplateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateServiceTemplateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateServiceTemplateVersion struct {
}
func (*validateOpCreateServiceTemplateVersion) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateServiceTemplateVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateServiceTemplateVersionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateServiceTemplateVersionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateTemplateSyncConfig struct {
}
func (*validateOpCreateTemplateSyncConfig) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateTemplateSyncConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateTemplateSyncConfigInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateTemplateSyncConfigInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteComponent struct {
}
func (*validateOpDeleteComponent) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteComponent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteComponentInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteComponentInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteEnvironmentAccountConnection struct {
}
func (*validateOpDeleteEnvironmentAccountConnection) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteEnvironmentAccountConnection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteEnvironmentAccountConnectionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteEnvironmentAccountConnectionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteEnvironment struct {
}
func (*validateOpDeleteEnvironment) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteEnvironment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteEnvironmentInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteEnvironmentInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteEnvironmentTemplate struct {
}
func (*validateOpDeleteEnvironmentTemplate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteEnvironmentTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteEnvironmentTemplateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteEnvironmentTemplateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteEnvironmentTemplateVersion struct {
}
func (*validateOpDeleteEnvironmentTemplateVersion) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteEnvironmentTemplateVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteEnvironmentTemplateVersionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteEnvironmentTemplateVersionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteRepository struct {
}
func (*validateOpDeleteRepository) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteRepository) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteRepositoryInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteRepositoryInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteService struct {
}
func (*validateOpDeleteService) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteService) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteServiceInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteServiceInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteServiceSyncConfig struct {
}
func (*validateOpDeleteServiceSyncConfig) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteServiceSyncConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteServiceSyncConfigInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteServiceSyncConfigInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteServiceTemplate struct {
}
func (*validateOpDeleteServiceTemplate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteServiceTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteServiceTemplateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteServiceTemplateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteServiceTemplateVersion struct {
}
func (*validateOpDeleteServiceTemplateVersion) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteServiceTemplateVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteServiceTemplateVersionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteServiceTemplateVersionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteTemplateSyncConfig struct {
}
func (*validateOpDeleteTemplateSyncConfig) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteTemplateSyncConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteTemplateSyncConfigInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteTemplateSyncConfigInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetComponent struct {
}
func (*validateOpGetComponent) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetComponent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetComponentInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetComponentInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetEnvironmentAccountConnection struct {
}
func (*validateOpGetEnvironmentAccountConnection) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetEnvironmentAccountConnection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetEnvironmentAccountConnectionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetEnvironmentAccountConnectionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetEnvironment struct {
}
func (*validateOpGetEnvironment) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetEnvironment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetEnvironmentInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetEnvironmentInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetEnvironmentTemplate struct {
}
func (*validateOpGetEnvironmentTemplate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetEnvironmentTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetEnvironmentTemplateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetEnvironmentTemplateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetEnvironmentTemplateVersion struct {
}
func (*validateOpGetEnvironmentTemplateVersion) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetEnvironmentTemplateVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetEnvironmentTemplateVersionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetEnvironmentTemplateVersionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetRepository struct {
}
func (*validateOpGetRepository) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetRepository) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetRepositoryInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetRepositoryInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetRepositorySyncStatus struct {
}
func (*validateOpGetRepositorySyncStatus) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetRepositorySyncStatus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetRepositorySyncStatusInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetRepositorySyncStatusInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetService struct {
}
func (*validateOpGetService) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetService) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetServiceInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetServiceInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetServiceInstance struct {
}
func (*validateOpGetServiceInstance) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetServiceInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetServiceInstanceInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetServiceInstanceInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetServiceInstanceSyncStatus struct {
}
func (*validateOpGetServiceInstanceSyncStatus) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetServiceInstanceSyncStatus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetServiceInstanceSyncStatusInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetServiceInstanceSyncStatusInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetServiceSyncBlockerSummary struct {
}
func (*validateOpGetServiceSyncBlockerSummary) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetServiceSyncBlockerSummary) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetServiceSyncBlockerSummaryInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetServiceSyncBlockerSummaryInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetServiceSyncConfig struct {
}
func (*validateOpGetServiceSyncConfig) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetServiceSyncConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetServiceSyncConfigInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetServiceSyncConfigInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetServiceTemplate struct {
}
func (*validateOpGetServiceTemplate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetServiceTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetServiceTemplateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetServiceTemplateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetServiceTemplateVersion struct {
}
func (*validateOpGetServiceTemplateVersion) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetServiceTemplateVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetServiceTemplateVersionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetServiceTemplateVersionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetTemplateSyncConfig struct {
}
func (*validateOpGetTemplateSyncConfig) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetTemplateSyncConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetTemplateSyncConfigInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetTemplateSyncConfigInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetTemplateSyncStatus struct {
}
func (*validateOpGetTemplateSyncStatus) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetTemplateSyncStatus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetTemplateSyncStatusInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetTemplateSyncStatusInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListComponentOutputs struct {
}
func (*validateOpListComponentOutputs) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListComponentOutputs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListComponentOutputsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListComponentOutputsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListComponentProvisionedResources struct {
}
func (*validateOpListComponentProvisionedResources) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListComponentProvisionedResources) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListComponentProvisionedResourcesInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListComponentProvisionedResourcesInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListEnvironmentAccountConnections struct {
}
func (*validateOpListEnvironmentAccountConnections) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListEnvironmentAccountConnections) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListEnvironmentAccountConnectionsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListEnvironmentAccountConnectionsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListEnvironmentOutputs struct {
}
func (*validateOpListEnvironmentOutputs) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListEnvironmentOutputs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListEnvironmentOutputsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListEnvironmentOutputsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListEnvironmentProvisionedResources struct {
}
func (*validateOpListEnvironmentProvisionedResources) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListEnvironmentProvisionedResources) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListEnvironmentProvisionedResourcesInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListEnvironmentProvisionedResourcesInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListEnvironments struct {
}
func (*validateOpListEnvironments) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListEnvironments) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListEnvironmentsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListEnvironmentsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListEnvironmentTemplateVersions struct {
}
func (*validateOpListEnvironmentTemplateVersions) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListEnvironmentTemplateVersions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListEnvironmentTemplateVersionsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListEnvironmentTemplateVersionsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListRepositorySyncDefinitions struct {
}
func (*validateOpListRepositorySyncDefinitions) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListRepositorySyncDefinitions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListRepositorySyncDefinitionsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListRepositorySyncDefinitionsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListServiceInstanceOutputs struct {
}
func (*validateOpListServiceInstanceOutputs) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListServiceInstanceOutputs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListServiceInstanceOutputsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListServiceInstanceOutputsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListServiceInstanceProvisionedResources struct {
}
func (*validateOpListServiceInstanceProvisionedResources) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListServiceInstanceProvisionedResources) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListServiceInstanceProvisionedResourcesInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListServiceInstanceProvisionedResourcesInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListServicePipelineOutputs struct {
}
func (*validateOpListServicePipelineOutputs) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListServicePipelineOutputs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListServicePipelineOutputsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListServicePipelineOutputsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListServicePipelineProvisionedResources struct {
}
func (*validateOpListServicePipelineProvisionedResources) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListServicePipelineProvisionedResources) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListServicePipelineProvisionedResourcesInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListServicePipelineProvisionedResourcesInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListServiceTemplateVersions struct {
}
func (*validateOpListServiceTemplateVersions) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListServiceTemplateVersions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListServiceTemplateVersionsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListServiceTemplateVersionsInput(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 validateOpNotifyResourceDeploymentStatusChange struct {
}
func (*validateOpNotifyResourceDeploymentStatusChange) ID() string {
return "OperationInputValidation"
}
func (m *validateOpNotifyResourceDeploymentStatusChange) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*NotifyResourceDeploymentStatusChangeInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpNotifyResourceDeploymentStatusChangeInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpRejectEnvironmentAccountConnection struct {
}
func (*validateOpRejectEnvironmentAccountConnection) ID() string {
return "OperationInputValidation"
}
func (m *validateOpRejectEnvironmentAccountConnection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*RejectEnvironmentAccountConnectionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpRejectEnvironmentAccountConnectionInput(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 validateOpUpdateAccountSettings struct {
}
func (*validateOpUpdateAccountSettings) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateAccountSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateAccountSettingsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateAccountSettingsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateComponent struct {
}
func (*validateOpUpdateComponent) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateComponent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateComponentInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateComponentInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateEnvironmentAccountConnection struct {
}
func (*validateOpUpdateEnvironmentAccountConnection) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateEnvironmentAccountConnection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateEnvironmentAccountConnectionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateEnvironmentAccountConnectionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateEnvironment struct {
}
func (*validateOpUpdateEnvironment) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateEnvironment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateEnvironmentInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateEnvironmentInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateEnvironmentTemplate struct {
}
func (*validateOpUpdateEnvironmentTemplate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateEnvironmentTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateEnvironmentTemplateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateEnvironmentTemplateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateEnvironmentTemplateVersion struct {
}
func (*validateOpUpdateEnvironmentTemplateVersion) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateEnvironmentTemplateVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateEnvironmentTemplateVersionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateEnvironmentTemplateVersionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateService struct {
}
func (*validateOpUpdateService) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateService) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateServiceInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateServiceInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateServiceInstance struct {
}
func (*validateOpUpdateServiceInstance) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateServiceInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateServiceInstanceInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateServiceInstanceInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateServicePipeline struct {
}
func (*validateOpUpdateServicePipeline) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateServicePipeline) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateServicePipelineInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateServicePipelineInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateServiceSyncBlocker struct {
}
func (*validateOpUpdateServiceSyncBlocker) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateServiceSyncBlocker) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateServiceSyncBlockerInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateServiceSyncBlockerInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateServiceSyncConfig struct {
}
func (*validateOpUpdateServiceSyncConfig) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateServiceSyncConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateServiceSyncConfigInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateServiceSyncConfigInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateServiceTemplate struct {
}
func (*validateOpUpdateServiceTemplate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateServiceTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateServiceTemplateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateServiceTemplateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateServiceTemplateVersion struct {
}
func (*validateOpUpdateServiceTemplateVersion) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateServiceTemplateVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateServiceTemplateVersionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateServiceTemplateVersionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateTemplateSyncConfig struct {
}
func (*validateOpUpdateTemplateSyncConfig) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateTemplateSyncConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateTemplateSyncConfigInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateTemplateSyncConfigInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
func addOpAcceptEnvironmentAccountConnectionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpAcceptEnvironmentAccountConnection{}, middleware.After)
}
func addOpCancelComponentDeploymentValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCancelComponentDeployment{}, middleware.After)
}
func addOpCancelEnvironmentDeploymentValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCancelEnvironmentDeployment{}, middleware.After)
}
func addOpCancelServiceInstanceDeploymentValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCancelServiceInstanceDeployment{}, middleware.After)
}
func addOpCancelServicePipelineDeploymentValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCancelServicePipelineDeployment{}, middleware.After)
}
func addOpCreateComponentValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateComponent{}, middleware.After)
}
func addOpCreateEnvironmentAccountConnectionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateEnvironmentAccountConnection{}, middleware.After)
}
func addOpCreateEnvironmentValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateEnvironment{}, middleware.After)
}
func addOpCreateEnvironmentTemplateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateEnvironmentTemplate{}, middleware.After)
}
func addOpCreateEnvironmentTemplateVersionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateEnvironmentTemplateVersion{}, middleware.After)
}
func addOpCreateRepositoryValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateRepository{}, middleware.After)
}
func addOpCreateServiceValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateService{}, middleware.After)
}
func addOpCreateServiceInstanceValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateServiceInstance{}, middleware.After)
}
func addOpCreateServiceSyncConfigValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateServiceSyncConfig{}, middleware.After)
}
func addOpCreateServiceTemplateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateServiceTemplate{}, middleware.After)
}
func addOpCreateServiceTemplateVersionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateServiceTemplateVersion{}, middleware.After)
}
func addOpCreateTemplateSyncConfigValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateTemplateSyncConfig{}, middleware.After)
}
func addOpDeleteComponentValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteComponent{}, middleware.After)
}
func addOpDeleteEnvironmentAccountConnectionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteEnvironmentAccountConnection{}, middleware.After)
}
func addOpDeleteEnvironmentValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteEnvironment{}, middleware.After)
}
func addOpDeleteEnvironmentTemplateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteEnvironmentTemplate{}, middleware.After)
}
func addOpDeleteEnvironmentTemplateVersionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteEnvironmentTemplateVersion{}, middleware.After)
}
func addOpDeleteRepositoryValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteRepository{}, middleware.After)
}
func addOpDeleteServiceValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteService{}, middleware.After)
}
func addOpDeleteServiceSyncConfigValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteServiceSyncConfig{}, middleware.After)
}
func addOpDeleteServiceTemplateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteServiceTemplate{}, middleware.After)
}
func addOpDeleteServiceTemplateVersionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteServiceTemplateVersion{}, middleware.After)
}
func addOpDeleteTemplateSyncConfigValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteTemplateSyncConfig{}, middleware.After)
}
func addOpGetComponentValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetComponent{}, middleware.After)
}
func addOpGetEnvironmentAccountConnectionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetEnvironmentAccountConnection{}, middleware.After)
}
func addOpGetEnvironmentValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetEnvironment{}, middleware.After)
}
func addOpGetEnvironmentTemplateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetEnvironmentTemplate{}, middleware.After)
}
func addOpGetEnvironmentTemplateVersionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetEnvironmentTemplateVersion{}, middleware.After)
}
func addOpGetRepositoryValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetRepository{}, middleware.After)
}
func addOpGetRepositorySyncStatusValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetRepositorySyncStatus{}, middleware.After)
}
func addOpGetServiceValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetService{}, middleware.After)
}
func addOpGetServiceInstanceValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetServiceInstance{}, middleware.After)
}
func addOpGetServiceInstanceSyncStatusValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetServiceInstanceSyncStatus{}, middleware.After)
}
func addOpGetServiceSyncBlockerSummaryValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetServiceSyncBlockerSummary{}, middleware.After)
}
func addOpGetServiceSyncConfigValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetServiceSyncConfig{}, middleware.After)
}
func addOpGetServiceTemplateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetServiceTemplate{}, middleware.After)
}
func addOpGetServiceTemplateVersionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetServiceTemplateVersion{}, middleware.After)
}
func addOpGetTemplateSyncConfigValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetTemplateSyncConfig{}, middleware.After)
}
func addOpGetTemplateSyncStatusValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetTemplateSyncStatus{}, middleware.After)
}
func addOpListComponentOutputsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListComponentOutputs{}, middleware.After)
}
func addOpListComponentProvisionedResourcesValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListComponentProvisionedResources{}, middleware.After)
}
func addOpListEnvironmentAccountConnectionsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListEnvironmentAccountConnections{}, middleware.After)
}
func addOpListEnvironmentOutputsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListEnvironmentOutputs{}, middleware.After)
}
func addOpListEnvironmentProvisionedResourcesValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListEnvironmentProvisionedResources{}, middleware.After)
}
func addOpListEnvironmentsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListEnvironments{}, middleware.After)
}
func addOpListEnvironmentTemplateVersionsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListEnvironmentTemplateVersions{}, middleware.After)
}
func addOpListRepositorySyncDefinitionsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListRepositorySyncDefinitions{}, middleware.After)
}
func addOpListServiceInstanceOutputsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListServiceInstanceOutputs{}, middleware.After)
}
func addOpListServiceInstanceProvisionedResourcesValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListServiceInstanceProvisionedResources{}, middleware.After)
}
func addOpListServicePipelineOutputsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListServicePipelineOutputs{}, middleware.After)
}
func addOpListServicePipelineProvisionedResourcesValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListServicePipelineProvisionedResources{}, middleware.After)
}
func addOpListServiceTemplateVersionsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListServiceTemplateVersions{}, middleware.After)
}
func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After)
}
func addOpNotifyResourceDeploymentStatusChangeValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpNotifyResourceDeploymentStatusChange{}, middleware.After)
}
func addOpRejectEnvironmentAccountConnectionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpRejectEnvironmentAccountConnection{}, 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 addOpUpdateAccountSettingsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateAccountSettings{}, middleware.After)
}
func addOpUpdateComponentValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateComponent{}, middleware.After)
}
func addOpUpdateEnvironmentAccountConnectionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateEnvironmentAccountConnection{}, middleware.After)
}
func addOpUpdateEnvironmentValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateEnvironment{}, middleware.After)
}
func addOpUpdateEnvironmentTemplateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateEnvironmentTemplate{}, middleware.After)
}
func addOpUpdateEnvironmentTemplateVersionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateEnvironmentTemplateVersion{}, middleware.After)
}
func addOpUpdateServiceValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateService{}, middleware.After)
}
func addOpUpdateServiceInstanceValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateServiceInstance{}, middleware.After)
}
func addOpUpdateServicePipelineValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateServicePipeline{}, middleware.After)
}
func addOpUpdateServiceSyncBlockerValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateServiceSyncBlocker{}, middleware.After)
}
func addOpUpdateServiceSyncConfigValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateServiceSyncConfig{}, middleware.After)
}
func addOpUpdateServiceTemplateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateServiceTemplate{}, middleware.After)
}
func addOpUpdateServiceTemplateVersionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateServiceTemplateVersion{}, middleware.After)
}
func addOpUpdateTemplateSyncConfigValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateTemplateSyncConfig{}, middleware.After)
}
func validateCompatibleEnvironmentTemplateInput(v *types.CompatibleEnvironmentTemplateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CompatibleEnvironmentTemplateInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if v.MajorVersion == nil {
invalidParams.Add(smithy.NewErrParamRequired("MajorVersion"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateCompatibleEnvironmentTemplateInputList(v []types.CompatibleEnvironmentTemplateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CompatibleEnvironmentTemplateInputList"}
for i := range v {
if err := validateCompatibleEnvironmentTemplateInput(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateEnvironmentTemplateFilter(v *types.EnvironmentTemplateFilter) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "EnvironmentTemplateFilter"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if v.MajorVersion == nil {
invalidParams.Add(smithy.NewErrParamRequired("MajorVersion"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateEnvironmentTemplateFilterList(v []types.EnvironmentTemplateFilter) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "EnvironmentTemplateFilterList"}
for i := range v {
if err := validateEnvironmentTemplateFilter(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateRepositoryBranchInput(v *types.RepositoryBranchInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RepositoryBranchInput"}
if len(v.Provider) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("Provider"))
}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if v.Branch == nil {
invalidParams.Add(smithy.NewErrParamRequired("Branch"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateS3ObjectSource(v *types.S3ObjectSource) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "S3ObjectSource"}
if v.Bucket == nil {
invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
}
if v.Key == nil {
invalidParams.Add(smithy.NewErrParamRequired("Key"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateTag(v *types.Tag) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "Tag"}
if v.Key == nil {
invalidParams.Add(smithy.NewErrParamRequired("Key"))
}
if v.Value == nil {
invalidParams.Add(smithy.NewErrParamRequired("Value"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateTagList(v []types.Tag) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "TagList"}
for i := range v {
if err := validateTag(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateTemplateVersionSourceInput(v types.TemplateVersionSourceInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "TemplateVersionSourceInput"}
switch uv := v.(type) {
case *types.TemplateVersionSourceInputMemberS3:
if err := validateS3ObjectSource(&uv.Value); err != nil {
invalidParams.AddNested("[s3]", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpAcceptEnvironmentAccountConnectionInput(v *AcceptEnvironmentAccountConnectionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AcceptEnvironmentAccountConnectionInput"}
if v.Id == nil {
invalidParams.Add(smithy.NewErrParamRequired("Id"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCancelComponentDeploymentInput(v *CancelComponentDeploymentInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CancelComponentDeploymentInput"}
if v.ComponentName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ComponentName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCancelEnvironmentDeploymentInput(v *CancelEnvironmentDeploymentInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CancelEnvironmentDeploymentInput"}
if v.EnvironmentName == nil {
invalidParams.Add(smithy.NewErrParamRequired("EnvironmentName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCancelServiceInstanceDeploymentInput(v *CancelServiceInstanceDeploymentInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CancelServiceInstanceDeploymentInput"}
if v.ServiceInstanceName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ServiceInstanceName"))
}
if v.ServiceName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ServiceName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCancelServicePipelineDeploymentInput(v *CancelServicePipelineDeploymentInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CancelServicePipelineDeploymentInput"}
if v.ServiceName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ServiceName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateComponentInput(v *CreateComponentInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateComponentInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if v.TemplateFile == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateFile"))
}
if v.Manifest == nil {
invalidParams.Add(smithy.NewErrParamRequired("Manifest"))
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateEnvironmentAccountConnectionInput(v *CreateEnvironmentAccountConnectionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateEnvironmentAccountConnectionInput"}
if v.ManagementAccountId == nil {
invalidParams.Add(smithy.NewErrParamRequired("ManagementAccountId"))
}
if v.EnvironmentName == nil {
invalidParams.Add(smithy.NewErrParamRequired("EnvironmentName"))
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateEnvironmentInput(v *CreateEnvironmentInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateEnvironmentInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if v.TemplateMajorVersion == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateMajorVersion"))
}
if v.Spec == nil {
invalidParams.Add(smithy.NewErrParamRequired("Spec"))
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if v.ProvisioningRepository != nil {
if err := validateRepositoryBranchInput(v.ProvisioningRepository); err != nil {
invalidParams.AddNested("ProvisioningRepository", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateEnvironmentTemplateInput(v *CreateEnvironmentTemplateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateEnvironmentTemplateInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateEnvironmentTemplateVersionInput(v *CreateEnvironmentTemplateVersionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateEnvironmentTemplateVersionInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if v.Source == nil {
invalidParams.Add(smithy.NewErrParamRequired("Source"))
} else if v.Source != nil {
if err := validateTemplateVersionSourceInput(v.Source); err != nil {
invalidParams.AddNested("Source", err.(smithy.InvalidParamsError))
}
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateRepositoryInput(v *CreateRepositoryInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateRepositoryInput"}
if len(v.Provider) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("Provider"))
}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if v.ConnectionArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("ConnectionArn"))
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateServiceInput(v *CreateServiceInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateServiceInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if v.TemplateMajorVersion == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateMajorVersion"))
}
if v.Spec == nil {
invalidParams.Add(smithy.NewErrParamRequired("Spec"))
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateServiceInstanceInput(v *CreateServiceInstanceInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateServiceInstanceInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if v.ServiceName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ServiceName"))
}
if v.Spec == nil {
invalidParams.Add(smithy.NewErrParamRequired("Spec"))
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateServiceSyncConfigInput(v *CreateServiceSyncConfigInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateServiceSyncConfigInput"}
if v.ServiceName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ServiceName"))
}
if len(v.RepositoryProvider) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("RepositoryProvider"))
}
if v.RepositoryName == nil {
invalidParams.Add(smithy.NewErrParamRequired("RepositoryName"))
}
if v.Branch == nil {
invalidParams.Add(smithy.NewErrParamRequired("Branch"))
}
if v.FilePath == nil {
invalidParams.Add(smithy.NewErrParamRequired("FilePath"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateServiceTemplateInput(v *CreateServiceTemplateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateServiceTemplateInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateServiceTemplateVersionInput(v *CreateServiceTemplateVersionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateServiceTemplateVersionInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if v.Source == nil {
invalidParams.Add(smithy.NewErrParamRequired("Source"))
} else if v.Source != nil {
if err := validateTemplateVersionSourceInput(v.Source); err != nil {
invalidParams.AddNested("Source", err.(smithy.InvalidParamsError))
}
}
if v.CompatibleEnvironmentTemplates == nil {
invalidParams.Add(smithy.NewErrParamRequired("CompatibleEnvironmentTemplates"))
} else if v.CompatibleEnvironmentTemplates != nil {
if err := validateCompatibleEnvironmentTemplateInputList(v.CompatibleEnvironmentTemplates); err != nil {
invalidParams.AddNested("CompatibleEnvironmentTemplates", err.(smithy.InvalidParamsError))
}
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateTemplateSyncConfigInput(v *CreateTemplateSyncConfigInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateTemplateSyncConfigInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if len(v.TemplateType) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("TemplateType"))
}
if len(v.RepositoryProvider) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("RepositoryProvider"))
}
if v.RepositoryName == nil {
invalidParams.Add(smithy.NewErrParamRequired("RepositoryName"))
}
if v.Branch == nil {
invalidParams.Add(smithy.NewErrParamRequired("Branch"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteComponentInput(v *DeleteComponentInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteComponentInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteEnvironmentAccountConnectionInput(v *DeleteEnvironmentAccountConnectionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteEnvironmentAccountConnectionInput"}
if v.Id == nil {
invalidParams.Add(smithy.NewErrParamRequired("Id"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteEnvironmentInput(v *DeleteEnvironmentInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteEnvironmentInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteEnvironmentTemplateInput(v *DeleteEnvironmentTemplateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteEnvironmentTemplateInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteEnvironmentTemplateVersionInput(v *DeleteEnvironmentTemplateVersionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteEnvironmentTemplateVersionInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if v.MajorVersion == nil {
invalidParams.Add(smithy.NewErrParamRequired("MajorVersion"))
}
if v.MinorVersion == nil {
invalidParams.Add(smithy.NewErrParamRequired("MinorVersion"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteRepositoryInput(v *DeleteRepositoryInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteRepositoryInput"}
if len(v.Provider) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("Provider"))
}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteServiceInput(v *DeleteServiceInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteServiceInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteServiceSyncConfigInput(v *DeleteServiceSyncConfigInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteServiceSyncConfigInput"}
if v.ServiceName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ServiceName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteServiceTemplateInput(v *DeleteServiceTemplateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteServiceTemplateInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteServiceTemplateVersionInput(v *DeleteServiceTemplateVersionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteServiceTemplateVersionInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if v.MajorVersion == nil {
invalidParams.Add(smithy.NewErrParamRequired("MajorVersion"))
}
if v.MinorVersion == nil {
invalidParams.Add(smithy.NewErrParamRequired("MinorVersion"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteTemplateSyncConfigInput(v *DeleteTemplateSyncConfigInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteTemplateSyncConfigInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if len(v.TemplateType) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("TemplateType"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetComponentInput(v *GetComponentInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetComponentInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetEnvironmentAccountConnectionInput(v *GetEnvironmentAccountConnectionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetEnvironmentAccountConnectionInput"}
if v.Id == nil {
invalidParams.Add(smithy.NewErrParamRequired("Id"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetEnvironmentInput(v *GetEnvironmentInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetEnvironmentInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetEnvironmentTemplateInput(v *GetEnvironmentTemplateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetEnvironmentTemplateInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetEnvironmentTemplateVersionInput(v *GetEnvironmentTemplateVersionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetEnvironmentTemplateVersionInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if v.MajorVersion == nil {
invalidParams.Add(smithy.NewErrParamRequired("MajorVersion"))
}
if v.MinorVersion == nil {
invalidParams.Add(smithy.NewErrParamRequired("MinorVersion"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetRepositoryInput(v *GetRepositoryInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetRepositoryInput"}
if len(v.Provider) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("Provider"))
}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetRepositorySyncStatusInput(v *GetRepositorySyncStatusInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetRepositorySyncStatusInput"}
if v.RepositoryName == nil {
invalidParams.Add(smithy.NewErrParamRequired("RepositoryName"))
}
if len(v.RepositoryProvider) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("RepositoryProvider"))
}
if v.Branch == nil {
invalidParams.Add(smithy.NewErrParamRequired("Branch"))
}
if len(v.SyncType) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("SyncType"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetServiceInput(v *GetServiceInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetServiceInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetServiceInstanceInput(v *GetServiceInstanceInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetServiceInstanceInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if v.ServiceName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ServiceName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetServiceInstanceSyncStatusInput(v *GetServiceInstanceSyncStatusInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetServiceInstanceSyncStatusInput"}
if v.ServiceName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ServiceName"))
}
if v.ServiceInstanceName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ServiceInstanceName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetServiceSyncBlockerSummaryInput(v *GetServiceSyncBlockerSummaryInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetServiceSyncBlockerSummaryInput"}
if v.ServiceName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ServiceName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetServiceSyncConfigInput(v *GetServiceSyncConfigInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetServiceSyncConfigInput"}
if v.ServiceName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ServiceName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetServiceTemplateInput(v *GetServiceTemplateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetServiceTemplateInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetServiceTemplateVersionInput(v *GetServiceTemplateVersionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetServiceTemplateVersionInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if v.MajorVersion == nil {
invalidParams.Add(smithy.NewErrParamRequired("MajorVersion"))
}
if v.MinorVersion == nil {
invalidParams.Add(smithy.NewErrParamRequired("MinorVersion"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetTemplateSyncConfigInput(v *GetTemplateSyncConfigInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetTemplateSyncConfigInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if len(v.TemplateType) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("TemplateType"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetTemplateSyncStatusInput(v *GetTemplateSyncStatusInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetTemplateSyncStatusInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if len(v.TemplateType) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("TemplateType"))
}
if v.TemplateVersion == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateVersion"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListComponentOutputsInput(v *ListComponentOutputsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListComponentOutputsInput"}
if v.ComponentName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ComponentName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListComponentProvisionedResourcesInput(v *ListComponentProvisionedResourcesInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListComponentProvisionedResourcesInput"}
if v.ComponentName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ComponentName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListEnvironmentAccountConnectionsInput(v *ListEnvironmentAccountConnectionsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListEnvironmentAccountConnectionsInput"}
if len(v.RequestedBy) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("RequestedBy"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListEnvironmentOutputsInput(v *ListEnvironmentOutputsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListEnvironmentOutputsInput"}
if v.EnvironmentName == nil {
invalidParams.Add(smithy.NewErrParamRequired("EnvironmentName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListEnvironmentProvisionedResourcesInput(v *ListEnvironmentProvisionedResourcesInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListEnvironmentProvisionedResourcesInput"}
if v.EnvironmentName == nil {
invalidParams.Add(smithy.NewErrParamRequired("EnvironmentName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListEnvironmentsInput(v *ListEnvironmentsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListEnvironmentsInput"}
if v.EnvironmentTemplates != nil {
if err := validateEnvironmentTemplateFilterList(v.EnvironmentTemplates); err != nil {
invalidParams.AddNested("EnvironmentTemplates", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListEnvironmentTemplateVersionsInput(v *ListEnvironmentTemplateVersionsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListEnvironmentTemplateVersionsInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListRepositorySyncDefinitionsInput(v *ListRepositorySyncDefinitionsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListRepositorySyncDefinitionsInput"}
if v.RepositoryName == nil {
invalidParams.Add(smithy.NewErrParamRequired("RepositoryName"))
}
if len(v.RepositoryProvider) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("RepositoryProvider"))
}
if len(v.SyncType) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("SyncType"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListServiceInstanceOutputsInput(v *ListServiceInstanceOutputsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListServiceInstanceOutputsInput"}
if v.ServiceInstanceName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ServiceInstanceName"))
}
if v.ServiceName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ServiceName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListServiceInstanceProvisionedResourcesInput(v *ListServiceInstanceProvisionedResourcesInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListServiceInstanceProvisionedResourcesInput"}
if v.ServiceName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ServiceName"))
}
if v.ServiceInstanceName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ServiceInstanceName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListServicePipelineOutputsInput(v *ListServicePipelineOutputsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListServicePipelineOutputsInput"}
if v.ServiceName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ServiceName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListServicePipelineProvisionedResourcesInput(v *ListServicePipelineProvisionedResourcesInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListServicePipelineProvisionedResourcesInput"}
if v.ServiceName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ServiceName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListServiceTemplateVersionsInput(v *ListServiceTemplateVersionsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListServiceTemplateVersionsInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
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 validateOpNotifyResourceDeploymentStatusChangeInput(v *NotifyResourceDeploymentStatusChangeInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "NotifyResourceDeploymentStatusChangeInput"}
if v.ResourceArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("ResourceArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpRejectEnvironmentAccountConnectionInput(v *RejectEnvironmentAccountConnectionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RejectEnvironmentAccountConnectionInput"}
if v.Id == nil {
invalidParams.Add(smithy.NewErrParamRequired("Id"))
}
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"))
} else if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
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 validateOpUpdateAccountSettingsInput(v *UpdateAccountSettingsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateAccountSettingsInput"}
if v.PipelineProvisioningRepository != nil {
if err := validateRepositoryBranchInput(v.PipelineProvisioningRepository); err != nil {
invalidParams.AddNested("PipelineProvisioningRepository", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateComponentInput(v *UpdateComponentInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateComponentInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if len(v.DeploymentType) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("DeploymentType"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateEnvironmentAccountConnectionInput(v *UpdateEnvironmentAccountConnectionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateEnvironmentAccountConnectionInput"}
if v.Id == nil {
invalidParams.Add(smithy.NewErrParamRequired("Id"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateEnvironmentInput(v *UpdateEnvironmentInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateEnvironmentInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if len(v.DeploymentType) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("DeploymentType"))
}
if v.ProvisioningRepository != nil {
if err := validateRepositoryBranchInput(v.ProvisioningRepository); err != nil {
invalidParams.AddNested("ProvisioningRepository", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateEnvironmentTemplateInput(v *UpdateEnvironmentTemplateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateEnvironmentTemplateInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateEnvironmentTemplateVersionInput(v *UpdateEnvironmentTemplateVersionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateEnvironmentTemplateVersionInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if v.MajorVersion == nil {
invalidParams.Add(smithy.NewErrParamRequired("MajorVersion"))
}
if v.MinorVersion == nil {
invalidParams.Add(smithy.NewErrParamRequired("MinorVersion"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateServiceInput(v *UpdateServiceInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateServiceInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateServiceInstanceInput(v *UpdateServiceInstanceInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateServiceInstanceInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if v.ServiceName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ServiceName"))
}
if len(v.DeploymentType) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("DeploymentType"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateServicePipelineInput(v *UpdateServicePipelineInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateServicePipelineInput"}
if v.ServiceName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ServiceName"))
}
if v.Spec == nil {
invalidParams.Add(smithy.NewErrParamRequired("Spec"))
}
if len(v.DeploymentType) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("DeploymentType"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateServiceSyncBlockerInput(v *UpdateServiceSyncBlockerInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateServiceSyncBlockerInput"}
if v.Id == nil {
invalidParams.Add(smithy.NewErrParamRequired("Id"))
}
if v.ResolvedReason == nil {
invalidParams.Add(smithy.NewErrParamRequired("ResolvedReason"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateServiceSyncConfigInput(v *UpdateServiceSyncConfigInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateServiceSyncConfigInput"}
if v.ServiceName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ServiceName"))
}
if len(v.RepositoryProvider) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("RepositoryProvider"))
}
if v.RepositoryName == nil {
invalidParams.Add(smithy.NewErrParamRequired("RepositoryName"))
}
if v.Branch == nil {
invalidParams.Add(smithy.NewErrParamRequired("Branch"))
}
if v.FilePath == nil {
invalidParams.Add(smithy.NewErrParamRequired("FilePath"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateServiceTemplateInput(v *UpdateServiceTemplateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateServiceTemplateInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateServiceTemplateVersionInput(v *UpdateServiceTemplateVersionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateServiceTemplateVersionInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if v.MajorVersion == nil {
invalidParams.Add(smithy.NewErrParamRequired("MajorVersion"))
}
if v.MinorVersion == nil {
invalidParams.Add(smithy.NewErrParamRequired("MinorVersion"))
}
if v.CompatibleEnvironmentTemplates != nil {
if err := validateCompatibleEnvironmentTemplateInputList(v.CompatibleEnvironmentTemplates); err != nil {
invalidParams.AddNested("CompatibleEnvironmentTemplates", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateTemplateSyncConfigInput(v *UpdateTemplateSyncConfigInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateTemplateSyncConfigInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if len(v.TemplateType) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("TemplateType"))
}
if len(v.RepositoryProvider) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("RepositoryProvider"))
}
if v.RepositoryName == nil {
invalidParams.Add(smithy.NewErrParamRequired("RepositoryName"))
}
if v.Branch == nil {
invalidParams.Add(smithy.NewErrParamRequired("Branch"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
| 3,431 |
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 Proton 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: "proton.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "proton-fips.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "proton-fips.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "proton.{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-southeast-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ap-southeast-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ca-central-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-central-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-west-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-west-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-east-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-east-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-west-2",
}: endpoints.Endpoint{},
},
},
{
ID: "aws-cn",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.DualStackVariant,
}: {
Hostname: "proton.{region}.api.amazonwebservices.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "proton-fips.{region}.amazonaws.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "proton-fips.{region}.api.amazonwebservices.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "proton.{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: "proton-fips.{region}.c2s.ic.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "proton.{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: "proton-fips.{region}.sc2s.sgov.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "proton.{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: "proton-fips.{region}.cloud.adc-e.uk",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "proton.{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: "proton-fips.{region}.csp.hci.ic.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "proton.{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: "proton.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "proton-fips.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "proton-fips.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "proton.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.AwsUsGov,
IsRegionalized: true,
},
}
| 332 |
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 BlockerStatus string
// Enum values for BlockerStatus
const (
BlockerStatusActive BlockerStatus = "ACTIVE"
BlockerStatusResolved BlockerStatus = "RESOLVED"
)
// Values returns all known values for BlockerStatus. Note that this can be
// expanded in the future, and so it is only as up to date as the client. The
// ordering of this slice is not guaranteed to be stable across updates.
func (BlockerStatus) Values() []BlockerStatus {
return []BlockerStatus{
"ACTIVE",
"RESOLVED",
}
}
type BlockerType string
// Enum values for BlockerType
const (
BlockerTypeAutomated BlockerType = "AUTOMATED"
)
// Values returns all known values for BlockerType. Note that this can be expanded
// in the future, and so it is only as up to date as the client. The ordering of
// this slice is not guaranteed to be stable across updates.
func (BlockerType) Values() []BlockerType {
return []BlockerType{
"AUTOMATED",
}
}
type ComponentDeploymentUpdateType string
// Enum values for ComponentDeploymentUpdateType
const (
ComponentDeploymentUpdateTypeNone ComponentDeploymentUpdateType = "NONE"
ComponentDeploymentUpdateTypeCurrentVersion ComponentDeploymentUpdateType = "CURRENT_VERSION"
)
// Values returns all known values for ComponentDeploymentUpdateType. Note that
// this can be expanded in the future, and so it is only as up to date as the
// client. The ordering of this slice is not guaranteed to be stable across
// updates.
func (ComponentDeploymentUpdateType) Values() []ComponentDeploymentUpdateType {
return []ComponentDeploymentUpdateType{
"NONE",
"CURRENT_VERSION",
}
}
type DeploymentStatus string
// Enum values for DeploymentStatus
const (
DeploymentStatusInProgress DeploymentStatus = "IN_PROGRESS"
DeploymentStatusFailed DeploymentStatus = "FAILED"
DeploymentStatusSucceeded DeploymentStatus = "SUCCEEDED"
DeploymentStatusDeleteInProgress DeploymentStatus = "DELETE_IN_PROGRESS"
DeploymentStatusDeleteFailed DeploymentStatus = "DELETE_FAILED"
DeploymentStatusDeleteComplete DeploymentStatus = "DELETE_COMPLETE"
DeploymentStatusCancelling DeploymentStatus = "CANCELLING"
DeploymentStatusCancelled DeploymentStatus = "CANCELLED"
)
// Values returns all known values for DeploymentStatus. Note that this can be
// expanded in the future, and so it is only as up to date as the client. The
// ordering of this slice is not guaranteed to be stable across updates.
func (DeploymentStatus) Values() []DeploymentStatus {
return []DeploymentStatus{
"IN_PROGRESS",
"FAILED",
"SUCCEEDED",
"DELETE_IN_PROGRESS",
"DELETE_FAILED",
"DELETE_COMPLETE",
"CANCELLING",
"CANCELLED",
}
}
type DeploymentUpdateType string
// Enum values for DeploymentUpdateType
const (
DeploymentUpdateTypeNone DeploymentUpdateType = "NONE"
DeploymentUpdateTypeCurrentVersion DeploymentUpdateType = "CURRENT_VERSION"
DeploymentUpdateTypeMinorVersion DeploymentUpdateType = "MINOR_VERSION"
DeploymentUpdateTypeMajorVersion DeploymentUpdateType = "MAJOR_VERSION"
)
// Values returns all known values for DeploymentUpdateType. Note that this can be
// expanded in the future, and so it is only as up to date as the client. The
// ordering of this slice is not guaranteed to be stable across updates.
func (DeploymentUpdateType) Values() []DeploymentUpdateType {
return []DeploymentUpdateType{
"NONE",
"CURRENT_VERSION",
"MINOR_VERSION",
"MAJOR_VERSION",
}
}
type EnvironmentAccountConnectionRequesterAccountType string
// Enum values for EnvironmentAccountConnectionRequesterAccountType
const (
EnvironmentAccountConnectionRequesterAccountTypeManagementAccount EnvironmentAccountConnectionRequesterAccountType = "MANAGEMENT_ACCOUNT"
EnvironmentAccountConnectionRequesterAccountTypeEnvironmentAccount EnvironmentAccountConnectionRequesterAccountType = "ENVIRONMENT_ACCOUNT"
)
// Values returns all known values for
// EnvironmentAccountConnectionRequesterAccountType. Note that this can be expanded
// in the future, and so it is only as up to date as the client. The ordering of
// this slice is not guaranteed to be stable across updates.
func (EnvironmentAccountConnectionRequesterAccountType) Values() []EnvironmentAccountConnectionRequesterAccountType {
return []EnvironmentAccountConnectionRequesterAccountType{
"MANAGEMENT_ACCOUNT",
"ENVIRONMENT_ACCOUNT",
}
}
type EnvironmentAccountConnectionStatus string
// Enum values for EnvironmentAccountConnectionStatus
const (
EnvironmentAccountConnectionStatusPending EnvironmentAccountConnectionStatus = "PENDING"
EnvironmentAccountConnectionStatusConnected EnvironmentAccountConnectionStatus = "CONNECTED"
EnvironmentAccountConnectionStatusRejected EnvironmentAccountConnectionStatus = "REJECTED"
)
// Values returns all known values for EnvironmentAccountConnectionStatus. Note
// that this can be expanded in the future, and so it is only as up to date as the
// client. The ordering of this slice is not guaranteed to be stable across
// updates.
func (EnvironmentAccountConnectionStatus) Values() []EnvironmentAccountConnectionStatus {
return []EnvironmentAccountConnectionStatus{
"PENDING",
"CONNECTED",
"REJECTED",
}
}
type ListServiceInstancesFilterBy string
// Enum values for ListServiceInstancesFilterBy
const (
ListServiceInstancesFilterByName ListServiceInstancesFilterBy = "name"
ListServiceInstancesFilterByDeploymentStatus ListServiceInstancesFilterBy = "deploymentStatus"
ListServiceInstancesFilterByTemplateName ListServiceInstancesFilterBy = "templateName"
ListServiceInstancesFilterByServiceName ListServiceInstancesFilterBy = "serviceName"
ListServiceInstancesFilterByDeployedTemplateVersionStatus ListServiceInstancesFilterBy = "deployedTemplateVersionStatus"
ListServiceInstancesFilterByEnvironmentName ListServiceInstancesFilterBy = "environmentName"
ListServiceInstancesFilterByLastDeploymentAttemptedAtBefore ListServiceInstancesFilterBy = "lastDeploymentAttemptedAtBefore"
ListServiceInstancesFilterByLastDeploymentAttemptedAtAfter ListServiceInstancesFilterBy = "lastDeploymentAttemptedAtAfter"
ListServiceInstancesFilterByCreatedAtBefore ListServiceInstancesFilterBy = "createdAtBefore"
ListServiceInstancesFilterByCreatedAtAfter ListServiceInstancesFilterBy = "createdAtAfter"
)
// Values returns all known values for ListServiceInstancesFilterBy. Note that
// this can be expanded in the future, and so it is only as up to date as the
// client. The ordering of this slice is not guaranteed to be stable across
// updates.
func (ListServiceInstancesFilterBy) Values() []ListServiceInstancesFilterBy {
return []ListServiceInstancesFilterBy{
"name",
"deploymentStatus",
"templateName",
"serviceName",
"deployedTemplateVersionStatus",
"environmentName",
"lastDeploymentAttemptedAtBefore",
"lastDeploymentAttemptedAtAfter",
"createdAtBefore",
"createdAtAfter",
}
}
type ListServiceInstancesSortBy string
// Enum values for ListServiceInstancesSortBy
const (
ListServiceInstancesSortByName ListServiceInstancesSortBy = "name"
ListServiceInstancesSortByDeploymentStatus ListServiceInstancesSortBy = "deploymentStatus"
ListServiceInstancesSortByTemplateName ListServiceInstancesSortBy = "templateName"
ListServiceInstancesSortByServiceName ListServiceInstancesSortBy = "serviceName"
ListServiceInstancesSortByEnvironmentName ListServiceInstancesSortBy = "environmentName"
ListServiceInstancesSortByLastDeploymentAttemptedAt ListServiceInstancesSortBy = "lastDeploymentAttemptedAt"
ListServiceInstancesSortByCreatedAt ListServiceInstancesSortBy = "createdAt"
)
// Values returns all known values for ListServiceInstancesSortBy. Note that this
// can be expanded in the future, and so it is only as up to date as the client.
// The ordering of this slice is not guaranteed to be stable across updates.
func (ListServiceInstancesSortBy) Values() []ListServiceInstancesSortBy {
return []ListServiceInstancesSortBy{
"name",
"deploymentStatus",
"templateName",
"serviceName",
"environmentName",
"lastDeploymentAttemptedAt",
"createdAt",
}
}
type ProvisionedResourceEngine string
// Enum values for ProvisionedResourceEngine
const (
ProvisionedResourceEngineCloudformation ProvisionedResourceEngine = "CLOUDFORMATION"
ProvisionedResourceEngineTerraform ProvisionedResourceEngine = "TERRAFORM"
)
// Values returns all known values for ProvisionedResourceEngine. Note that this
// can be expanded in the future, and so it is only as up to date as the client.
// The ordering of this slice is not guaranteed to be stable across updates.
func (ProvisionedResourceEngine) Values() []ProvisionedResourceEngine {
return []ProvisionedResourceEngine{
"CLOUDFORMATION",
"TERRAFORM",
}
}
type Provisioning string
// Enum values for Provisioning
const (
ProvisioningCustomerManaged Provisioning = "CUSTOMER_MANAGED"
)
// Values returns all known values for Provisioning. Note that this can be
// expanded in the future, and so it is only as up to date as the client. The
// ordering of this slice is not guaranteed to be stable across updates.
func (Provisioning) Values() []Provisioning {
return []Provisioning{
"CUSTOMER_MANAGED",
}
}
type RepositoryProvider string
// Enum values for RepositoryProvider
const (
RepositoryProviderGithub RepositoryProvider = "GITHUB"
RepositoryProviderGithubEnterprise RepositoryProvider = "GITHUB_ENTERPRISE"
RepositoryProviderBitbucket RepositoryProvider = "BITBUCKET"
)
// Values returns all known values for RepositoryProvider. Note that this can be
// expanded in the future, and so it is only as up to date as the client. The
// ordering of this slice is not guaranteed to be stable across updates.
func (RepositoryProvider) Values() []RepositoryProvider {
return []RepositoryProvider{
"GITHUB",
"GITHUB_ENTERPRISE",
"BITBUCKET",
}
}
type RepositorySyncStatus string
// Enum values for RepositorySyncStatus
const (
// A repository sync attempt has been created and will begin soon.
RepositorySyncStatusInitiated RepositorySyncStatus = "INITIATED"
// A repository sync attempt has started and work is being done to reconcile the
// branch.
RepositorySyncStatusInProgress RepositorySyncStatus = "IN_PROGRESS"
// The repository sync attempt has completed successfully.
RepositorySyncStatusSucceeded RepositorySyncStatus = "SUCCEEDED"
// The repository sync attempt has failed.
RepositorySyncStatusFailed RepositorySyncStatus = "FAILED"
// The repository sync attempt didn't execute and was queued.
RepositorySyncStatusQueued RepositorySyncStatus = "QUEUED"
)
// Values returns all known values for RepositorySyncStatus. Note that this can be
// expanded in the future, and so it is only as up to date as the client. The
// ordering of this slice is not guaranteed to be stable across updates.
func (RepositorySyncStatus) Values() []RepositorySyncStatus {
return []RepositorySyncStatus{
"INITIATED",
"IN_PROGRESS",
"SUCCEEDED",
"FAILED",
"QUEUED",
}
}
type ResourceDeploymentStatus string
// Enum values for ResourceDeploymentStatus
const (
ResourceDeploymentStatusInProgress ResourceDeploymentStatus = "IN_PROGRESS"
ResourceDeploymentStatusFailed ResourceDeploymentStatus = "FAILED"
ResourceDeploymentStatusSucceeded ResourceDeploymentStatus = "SUCCEEDED"
)
// Values returns all known values for ResourceDeploymentStatus. Note that this
// can be expanded in the future, and so it is only as up to date as the client.
// The ordering of this slice is not guaranteed to be stable across updates.
func (ResourceDeploymentStatus) Values() []ResourceDeploymentStatus {
return []ResourceDeploymentStatus{
"IN_PROGRESS",
"FAILED",
"SUCCEEDED",
}
}
type ResourceSyncStatus string
// Enum values for ResourceSyncStatus
const (
// A sync attempt has been created and will begin soon.
ResourceSyncStatusInitiated ResourceSyncStatus = "INITIATED"
// Syncing has started and work is being done to reconcile state.
ResourceSyncStatusInProgress ResourceSyncStatus = "IN_PROGRESS"
// Syncing has completed successfully.
ResourceSyncStatusSucceeded ResourceSyncStatus = "SUCCEEDED"
// Syncing has failed.
ResourceSyncStatusFailed ResourceSyncStatus = "FAILED"
)
// Values returns all known values for ResourceSyncStatus. Note that this can be
// expanded in the future, and so it is only as up to date as the client. The
// ordering of this slice is not guaranteed to be stable across updates.
func (ResourceSyncStatus) Values() []ResourceSyncStatus {
return []ResourceSyncStatus{
"INITIATED",
"IN_PROGRESS",
"SUCCEEDED",
"FAILED",
}
}
type ServiceStatus string
// Enum values for ServiceStatus
const (
ServiceStatusCreateInProgress ServiceStatus = "CREATE_IN_PROGRESS"
ServiceStatusCreateFailedCleanupInProgress ServiceStatus = "CREATE_FAILED_CLEANUP_IN_PROGRESS"
ServiceStatusCreateFailedCleanupComplete ServiceStatus = "CREATE_FAILED_CLEANUP_COMPLETE"
ServiceStatusCreateFailedCleanupFailed ServiceStatus = "CREATE_FAILED_CLEANUP_FAILED"
ServiceStatusCreateFailed ServiceStatus = "CREATE_FAILED"
ServiceStatusActive ServiceStatus = "ACTIVE"
ServiceStatusDeleteInProgress ServiceStatus = "DELETE_IN_PROGRESS"
ServiceStatusDeleteFailed ServiceStatus = "DELETE_FAILED"
ServiceStatusUpdateInProgress ServiceStatus = "UPDATE_IN_PROGRESS"
ServiceStatusUpdateFailedCleanupInProgress ServiceStatus = "UPDATE_FAILED_CLEANUP_IN_PROGRESS"
ServiceStatusUpdateFailedCleanupComplete ServiceStatus = "UPDATE_FAILED_CLEANUP_COMPLETE"
ServiceStatusUpdateFailedCleanupFailed ServiceStatus = "UPDATE_FAILED_CLEANUP_FAILED"
ServiceStatusUpdateFailed ServiceStatus = "UPDATE_FAILED"
ServiceStatusUpdateCompleteCleanupFailed ServiceStatus = "UPDATE_COMPLETE_CLEANUP_FAILED"
)
// Values returns all known values for ServiceStatus. Note that this can be
// expanded in the future, and so it is only as up to date as the client. The
// ordering of this slice is not guaranteed to be stable across updates.
func (ServiceStatus) Values() []ServiceStatus {
return []ServiceStatus{
"CREATE_IN_PROGRESS",
"CREATE_FAILED_CLEANUP_IN_PROGRESS",
"CREATE_FAILED_CLEANUP_COMPLETE",
"CREATE_FAILED_CLEANUP_FAILED",
"CREATE_FAILED",
"ACTIVE",
"DELETE_IN_PROGRESS",
"DELETE_FAILED",
"UPDATE_IN_PROGRESS",
"UPDATE_FAILED_CLEANUP_IN_PROGRESS",
"UPDATE_FAILED_CLEANUP_COMPLETE",
"UPDATE_FAILED_CLEANUP_FAILED",
"UPDATE_FAILED",
"UPDATE_COMPLETE_CLEANUP_FAILED",
}
}
type ServiceTemplateSupportedComponentSourceType string
// Enum values for ServiceTemplateSupportedComponentSourceType
const (
ServiceTemplateSupportedComponentSourceTypeDirectlyDefined ServiceTemplateSupportedComponentSourceType = "DIRECTLY_DEFINED"
)
// Values returns all known values for
// ServiceTemplateSupportedComponentSourceType. Note that this can be expanded in
// the future, and so it is only as up to date as the client. The ordering of this
// slice is not guaranteed to be stable across updates.
func (ServiceTemplateSupportedComponentSourceType) Values() []ServiceTemplateSupportedComponentSourceType {
return []ServiceTemplateSupportedComponentSourceType{
"DIRECTLY_DEFINED",
}
}
type SortOrder string
// Enum values for SortOrder
const (
SortOrderAscending SortOrder = "ASCENDING"
SortOrderDescending SortOrder = "DESCENDING"
)
// Values returns all known values for SortOrder. Note that this can be expanded
// in the future, and so it is only as up to date as the client. The ordering of
// this slice is not guaranteed to be stable across updates.
func (SortOrder) Values() []SortOrder {
return []SortOrder{
"ASCENDING",
"DESCENDING",
}
}
type SyncType string
// Enum values for SyncType
const (
// Syncs environment and service templates to Proton.
SyncTypeTemplateSync SyncType = "TEMPLATE_SYNC"
// Syncs services and service instances to Proton.
SyncTypeServiceSync SyncType = "SERVICE_SYNC"
)
// Values returns all known values for SyncType. Note that this can be expanded in
// the future, and so it is only as up to date as the client. The ordering of this
// slice is not guaranteed to be stable across updates.
func (SyncType) Values() []SyncType {
return []SyncType{
"TEMPLATE_SYNC",
"SERVICE_SYNC",
}
}
type TemplateType string
// Enum values for TemplateType
const (
TemplateTypeEnvironment TemplateType = "ENVIRONMENT"
TemplateTypeService TemplateType = "SERVICE"
)
// Values returns all known values for TemplateType. Note that this can be
// expanded in the future, and so it is only as up to date as the client. The
// ordering of this slice is not guaranteed to be stable across updates.
func (TemplateType) Values() []TemplateType {
return []TemplateType{
"ENVIRONMENT",
"SERVICE",
}
}
type TemplateVersionStatus string
// Enum values for TemplateVersionStatus
const (
TemplateVersionStatusRegistrationInProgress TemplateVersionStatus = "REGISTRATION_IN_PROGRESS"
TemplateVersionStatusRegistrationFailed TemplateVersionStatus = "REGISTRATION_FAILED"
TemplateVersionStatusDraft TemplateVersionStatus = "DRAFT"
TemplateVersionStatusPublished TemplateVersionStatus = "PUBLISHED"
)
// Values returns all known values for TemplateVersionStatus. Note that this can
// be expanded in the future, and so it is only as up to date as the client. The
// ordering of this slice is not guaranteed to be stable across updates.
func (TemplateVersionStatus) Values() []TemplateVersionStatus {
return []TemplateVersionStatus{
"REGISTRATION_IN_PROGRESS",
"REGISTRATION_FAILED",
"DRAFT",
"PUBLISHED",
}
}
| 479 |
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"
)
// There isn't sufficient access for performing this action.
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 }
// The request couldn't be made due to a conflicting operation or resource.
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 }
// The request failed to register with the service.
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 requested resource wasn't found.
type ResourceNotFoundException struct {
Message *string
ErrorCodeOverride *string
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 }
// A quota was exceeded. For more information, see Proton Quotas (https://docs.aws.amazon.com/proton/latest/userguide/ag-limits.html)
// in the Proton User Guide.
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 was denied due to request throttling.
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 is invalid or an out-of-range value was supplied for the input
// parameter.
type ValidationException struct {
Message *string
ErrorCodeOverride *string
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 }
| 193 |
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"
)
// Proton settings that are used for multiple services in the Amazon Web Services
// account.
type AccountSettings struct {
// The Amazon Resource Name (ARN) of the service role that Proton uses for
// provisioning pipelines. Proton assumes this role for CodeBuild-based
// provisioning.
PipelineCodebuildRoleArn *string
// The linked repository for pipeline provisioning. Required if you have
// environments configured for self-managed provisioning with services that include
// pipelines. A linked repository is a repository that has been registered with
// Proton. For more information, see CreateRepository .
PipelineProvisioningRepository *RepositoryBranch
// The Amazon Resource Name (ARN) of the service role you want to use for
// provisioning pipelines. Assumed by Proton for Amazon Web Services-managed
// provisioning, and by customer-owned automation for self-managed provisioning.
PipelineServiceRoleArn *string
noSmithyDocumentSerde
}
// Compatible environment template data.
type CompatibleEnvironmentTemplate struct {
// The major version of the compatible environment template.
//
// This member is required.
MajorVersion *string
// The compatible environment template name.
//
// This member is required.
TemplateName *string
noSmithyDocumentSerde
}
// Compatible environment template data.
type CompatibleEnvironmentTemplateInput struct {
// The major version of the compatible environment template.
//
// This member is required.
MajorVersion *string
// The compatible environment template name.
//
// This member is required.
TemplateName *string
noSmithyDocumentSerde
}
// Detailed data of an Proton component resource. For more information about
// components, see Proton components (https://docs.aws.amazon.com/proton/latest/userguide/ag-components.html)
// in the Proton User Guide.
type Component struct {
// The Amazon Resource Name (ARN) of the component.
//
// This member is required.
Arn *string
// The time when the component was created.
//
// This member is required.
CreatedAt *time.Time
// The component deployment status.
//
// This member is required.
DeploymentStatus DeploymentStatus
// The name of the Proton environment that this component is associated with.
//
// This member is required.
EnvironmentName *string
// The time when the component was last modified.
//
// This member is required.
LastModifiedAt *time.Time
// The name of the component.
//
// This member is required.
Name *string
// The message associated with the component deployment status.
DeploymentStatusMessage *string
// A description of the component.
Description *string
// The last token the client requested.
LastClientRequestToken *string
// The time when a deployment of the component was last attempted.
LastDeploymentAttemptedAt *time.Time
// The time when the component was last deployed successfully.
LastDeploymentSucceededAt *time.Time
// The name of the service instance that this component is attached to. Provided
// when a component is attached to a service instance.
ServiceInstanceName *string
// The name of the service that serviceInstanceName is associated with. Provided
// when a component is attached to a service instance.
ServiceName *string
// The service spec that the component uses to access service inputs. Provided
// when a component is attached to a service instance.
//
// This value conforms to the media type: application/yaml
ServiceSpec *string
noSmithyDocumentSerde
}
// Summary data of an Proton component resource. For more information about
// components, see Proton components (https://docs.aws.amazon.com/proton/latest/userguide/ag-components.html)
// in the Proton User Guide.
type ComponentSummary struct {
// The Amazon Resource Name (ARN) of the component.
//
// This member is required.
Arn *string
// The time when the component was created.
//
// This member is required.
CreatedAt *time.Time
// The component deployment status.
//
// This member is required.
DeploymentStatus DeploymentStatus
// The name of the Proton environment that this component is associated with.
//
// This member is required.
EnvironmentName *string
// The time when the component was last modified.
//
// This member is required.
LastModifiedAt *time.Time
// The name of the component.
//
// This member is required.
Name *string
// The message associated with the component deployment status.
DeploymentStatusMessage *string
// The time when a deployment of the component was last attempted.
LastDeploymentAttemptedAt *time.Time
// The time when the component was last deployed successfully.
LastDeploymentSucceededAt *time.Time
// The name of the service instance that this component is attached to. Provided
// when a component is attached to a service instance.
ServiceInstanceName *string
// The name of the service that serviceInstanceName is associated with. Provided
// when a component is attached to a service instance.
ServiceName *string
noSmithyDocumentSerde
}
// Summary counts of each Proton resource type.
type CountsSummary struct {
// The total number of components in the Amazon Web Services account. The
// semantics of the components field are different from the semantics of results
// for other infrastructure-provisioning resources. That's because at this time
// components don't have associated templates, therefore they don't have the
// concept of staleness. The components object will only contain total and failed
// members.
Components *ResourceCountsSummary
// The total number of environment templates in the Amazon Web Services account.
// The environmentTemplates object will only contain total members.
EnvironmentTemplates *ResourceCountsSummary
// The staleness counts for Proton environments in the Amazon Web Services
// account. The environments object will only contain total members.
Environments *ResourceCountsSummary
// The staleness counts for Proton pipelines in the Amazon Web Services account.
Pipelines *ResourceCountsSummary
// The staleness counts for Proton service instances in the Amazon Web Services
// account.
ServiceInstances *ResourceCountsSummary
// The total number of service templates in the Amazon Web Services account. The
// serviceTemplates object will only contain total members.
ServiceTemplates *ResourceCountsSummary
// The staleness counts for Proton services in the Amazon Web Services account.
Services *ResourceCountsSummary
noSmithyDocumentSerde
}
// Detailed data of an Proton environment resource. An Proton environment is a set
// of resources shared across Proton services.
type Environment struct {
// The Amazon Resource Name (ARN) of the environment.
//
// This member is required.
Arn *string
// The time when the environment was created.
//
// This member is required.
CreatedAt *time.Time
// The environment deployment status.
//
// This member is required.
DeploymentStatus DeploymentStatus
// The time when a deployment of the environment was last attempted.
//
// This member is required.
LastDeploymentAttemptedAt *time.Time
// The time when the environment was last deployed successfully.
//
// This member is required.
LastDeploymentSucceededAt *time.Time
// The name of the environment.
//
// This member is required.
Name *string
// The major version of the environment template.
//
// This member is required.
TemplateMajorVersion *string
// The minor version of the environment template.
//
// This member is required.
TemplateMinorVersion *string
// The Amazon Resource Name (ARN) of the environment template.
//
// This member is required.
TemplateName *string
// The Amazon Resource Name (ARN) of the IAM service role that allows Proton to
// provision infrastructure using CodeBuild-based provisioning on your behalf.
CodebuildRoleArn *string
// The Amazon Resource Name (ARN) of the IAM service role that Proton uses when
// provisioning directly defined components in this environment. It determines the
// scope of infrastructure that a component can provision. The environment must
// have a componentRoleArn to allow directly defined components to be associated
// with the environment. For more information about components, see Proton
// components (https://docs.aws.amazon.com/proton/latest/userguide/ag-components.html)
// in the Proton User Guide.
ComponentRoleArn *string
// An environment deployment status message.
DeploymentStatusMessage *string
// The description of the environment.
Description *string
// The ID of the environment account connection that's used to provision
// infrastructure resources in an environment account.
EnvironmentAccountConnectionId *string
// The ID of the environment account that the environment infrastructure resources
// are provisioned in.
EnvironmentAccountId *string
// The Amazon Resource Name (ARN) of the Proton service role that allows Proton to
// make calls to other services on your behalf.
ProtonServiceRoleArn *string
// When included, indicates that the environment template is for customer
// provisioned and managed infrastructure.
Provisioning Provisioning
// The linked repository that you use to host your rendered infrastructure
// templates for self-managed provisioning. A linked repository is a repository
// that has been registered with Proton. For more information, see CreateRepository (https://docs.aws.amazon.com/proton/latest/APIReference/API_CreateRepository.html)
// .
ProvisioningRepository *RepositoryBranch
// The environment spec.
//
// This value conforms to the media type: application/yaml
Spec *string
noSmithyDocumentSerde
}
// Detailed data of an Proton environment account connection resource.
type EnvironmentAccountConnection struct {
// The Amazon Resource Name (ARN) of the environment account connection.
//
// This member is required.
Arn *string
// The environment account that's connected to the environment account connection.
//
// This member is required.
EnvironmentAccountId *string
// The name of the environment that's associated with the environment account
// connection.
//
// This member is required.
EnvironmentName *string
// The ID of the environment account connection.
//
// This member is required.
Id *string
// The time when the environment account connection was last modified.
//
// This member is required.
LastModifiedAt *time.Time
// The ID of the management account that's connected to the environment account
// connection.
//
// This member is required.
ManagementAccountId *string
// The time when the environment account connection request was made.
//
// This member is required.
RequestedAt *time.Time
// The IAM service role that's associated with the environment account connection.
//
// This member is required.
RoleArn *string
// The status of the environment account connection.
//
// This member is required.
Status EnvironmentAccountConnectionStatus
// The Amazon Resource Name (ARN) of an IAM service role in the environment
// account. Proton uses this role to provision infrastructure resources using
// CodeBuild-based provisioning in the associated environment account.
CodebuildRoleArn *string
// The Amazon Resource Name (ARN) of the IAM service role that Proton uses when
// provisioning directly defined components in the associated environment account.
// It determines the scope of infrastructure that a component can provision in the
// account. The environment account connection must have a componentRoleArn to
// allow directly defined components to be associated with any environments running
// in the account. For more information about components, see Proton components (https://docs.aws.amazon.com/proton/latest/userguide/ag-components.html)
// in the Proton User Guide.
ComponentRoleArn *string
noSmithyDocumentSerde
}
// Summary data of an Proton environment account connection resource.
type EnvironmentAccountConnectionSummary struct {
// The Amazon Resource Name (ARN) of the environment account connection.
//
// This member is required.
Arn *string
// The ID of the environment account that's connected to the environment account
// connection.
//
// This member is required.
EnvironmentAccountId *string
// The name of the environment that's associated with the environment account
// connection.
//
// This member is required.
EnvironmentName *string
// The ID of the environment account connection.
//
// This member is required.
Id *string
// The time when the environment account connection was last modified.
//
// This member is required.
LastModifiedAt *time.Time
// The ID of the management account that's connected to the environment account
// connection.
//
// This member is required.
ManagementAccountId *string
// The time when the environment account connection request was made.
//
// This member is required.
RequestedAt *time.Time
// The IAM service role that's associated with the environment account connection.
//
// This member is required.
RoleArn *string
// The status of the environment account connection.
//
// This member is required.
Status EnvironmentAccountConnectionStatus
// The Amazon Resource Name (ARN) of the IAM service role that Proton uses when
// provisioning directly defined components in the associated environment account.
// It determines the scope of infrastructure that a component can provision in the
// account. The environment account connection must have a componentRoleArn to
// allow directly defined components to be associated with any environments running
// in the account. For more information about components, see Proton components (https://docs.aws.amazon.com/proton/latest/userguide/ag-components.html)
// in the Proton User Guide.
ComponentRoleArn *string
noSmithyDocumentSerde
}
// Summary data of an Proton environment resource. An Proton environment is a set
// of resources shared across Proton services.
type EnvironmentSummary struct {
// The Amazon Resource Name (ARN) of the environment.
//
// This member is required.
Arn *string
// The time when the environment was created.
//
// This member is required.
CreatedAt *time.Time
// The environment deployment status.
//
// This member is required.
DeploymentStatus DeploymentStatus
// The time when a deployment of the environment was last attempted.
//
// This member is required.
LastDeploymentAttemptedAt *time.Time
// The time when the environment was last deployed successfully.
//
// This member is required.
LastDeploymentSucceededAt *time.Time
// The name of the environment.
//
// This member is required.
Name *string
// The major version of the environment template.
//
// This member is required.
TemplateMajorVersion *string
// The minor version of the environment template.
//
// This member is required.
TemplateMinorVersion *string
// The name of the environment template.
//
// This member is required.
TemplateName *string
// The Amazon Resource Name (ARN) of the IAM service role that Proton uses when
// provisioning directly defined components in this environment. It determines the
// scope of infrastructure that a component can provision. The environment must
// have a componentRoleArn to allow directly defined components to be associated
// with the environment. For more information about components, see Proton
// components (https://docs.aws.amazon.com/proton/latest/userguide/ag-components.html)
// in the Proton User Guide.
ComponentRoleArn *string
// An environment deployment status message.
DeploymentStatusMessage *string
// The description of the environment.
Description *string
// The ID of the environment account connection that the environment is associated
// with.
EnvironmentAccountConnectionId *string
// The ID of the environment account that the environment infrastructure resources
// are provisioned in.
EnvironmentAccountId *string
// The Amazon Resource Name (ARN) of the Proton service role that allows Proton to
// make calls to other services on your behalf.
ProtonServiceRoleArn *string
// When included, indicates that the environment template is for customer
// provisioned and managed infrastructure.
Provisioning Provisioning
noSmithyDocumentSerde
}
// The environment template data.
type EnvironmentTemplate struct {
// The Amazon Resource Name (ARN) of the environment template.
//
// This member is required.
Arn *string
// The time when the environment template was created.
//
// This member is required.
CreatedAt *time.Time
// The time when the environment template was last modified.
//
// This member is required.
LastModifiedAt *time.Time
// The name of the environment template.
//
// This member is required.
Name *string
// A description of the environment template.
Description *string
// The name of the environment template as displayed in the developer interface.
DisplayName *string
// The customer provided encryption key for the environment template.
EncryptionKey *string
// When included, indicates that the environment template is for customer
// provisioned and managed infrastructure.
Provisioning Provisioning
// The ID of the recommended version of the environment template.
RecommendedVersion *string
noSmithyDocumentSerde
}
// A search filter for environment templates.
type EnvironmentTemplateFilter struct {
// Include majorVersion to filter search for a major version.
//
// This member is required.
MajorVersion *string
// Include templateName to filter search for a template name.
//
// This member is required.
TemplateName *string
noSmithyDocumentSerde
}
// The environment template data.
type EnvironmentTemplateSummary struct {
// The Amazon Resource Name (ARN) of the environment template.
//
// This member is required.
Arn *string
// The time when the environment template was created.
//
// This member is required.
CreatedAt *time.Time
// The time when the environment template was last modified.
//
// This member is required.
LastModifiedAt *time.Time
// The name of the environment template.
//
// This member is required.
Name *string
// A description of the environment template.
Description *string
// The name of the environment template as displayed in the developer interface.
DisplayName *string
// When included, indicates that the environment template is for customer
// provisioned and managed infrastructure.
Provisioning Provisioning
// The recommended version of the environment template.
RecommendedVersion *string
noSmithyDocumentSerde
}
// The environment template version data.
type EnvironmentTemplateVersion struct {
// The Amazon Resource Name (ARN) of the version of an environment template.
//
// This member is required.
Arn *string
// The time when the version of an environment template was created.
//
// This member is required.
CreatedAt *time.Time
// The time when the version of an environment template was last modified.
//
// This member is required.
LastModifiedAt *time.Time
// The latest major version that's associated with the version of an environment
// template.
//
// This member is required.
MajorVersion *string
// The minor version of an environment template.
//
// This member is required.
MinorVersion *string
// The status of the version of an environment template.
//
// This member is required.
Status TemplateVersionStatus
// The name of the version of an environment template.
//
// This member is required.
TemplateName *string
// A description of the minor version of an environment template.
Description *string
// The recommended minor version of the environment template.
RecommendedMinorVersion *string
// The schema of the version of an environment template.
//
// This value conforms to the media type: application/yaml
Schema *string
// The status message of the version of an environment template.
StatusMessage *string
noSmithyDocumentSerde
}
// A summary of the version of an environment template detail data.
type EnvironmentTemplateVersionSummary struct {
// The Amazon Resource Name (ARN) of the version of an environment template.
//
// This member is required.
Arn *string
// The time when the version of an environment template was created.
//
// This member is required.
CreatedAt *time.Time
// The time when the version of an environment template was last modified.
//
// This member is required.
LastModifiedAt *time.Time
// The latest major version that's associated with the version of an environment
// template.
//
// This member is required.
MajorVersion *string
// The version of an environment template.
//
// This member is required.
MinorVersion *string
// The status of the version of an environment template.
//
// This member is required.
Status TemplateVersionStatus
// The name of the environment template.
//
// This member is required.
TemplateName *string
// A description of the version of an environment template.
Description *string
// The recommended minor version of the environment template.
RecommendedMinorVersion *string
// The status message of the version of an environment template.
StatusMessage *string
noSmithyDocumentSerde
}
// A filtering criterion to scope down the result list of the ListServiceInstances
// action.
type ListServiceInstancesFilter struct {
// The name of a filtering criterion.
Key ListServiceInstancesFilterBy
// A value to filter by. With the date/time keys ( *At{Before,After} ), the value
// is a valid RFC 3339 (https://datatracker.ietf.org/doc/html/rfc3339.html) string
// with no UTC offset and with an optional fractional precision (for example,
// 1985-04-12T23:20:50.52Z ).
Value *string
noSmithyDocumentSerde
}
// An infrastructure as code defined resource output.
type Output struct {
// The output key.
Key *string
// The output value.
ValueString *string
noSmithyDocumentSerde
}
// Detail data for a provisioned resource.
type ProvisionedResource struct {
// The provisioned resource identifier.
Identifier *string
// The provisioned resource name.
Name *string
// The resource provisioning engine. At this time, CLOUDFORMATION can be used for
// Amazon Web Services-managed provisioning, and TERRAFORM can be used for
// self-managed provisioning. For more information, see Self-managed provisioning (https://docs.aws.amazon.com/proton/latest/userguide/ag-works-prov-methods.html#ag-works-prov-methods-self)
// in the Proton User Guide.
ProvisioningEngine ProvisionedResourceEngine
noSmithyDocumentSerde
}
// Detailed data of a linked repository—a repository that has been registered with
// Proton.
type Repository struct {
// The Amazon Resource Name (ARN) of the linked repository.
//
// This member is required.
Arn *string
// The Amazon Resource Name (ARN) of your AWS CodeStar connection that connects
// Proton to your repository provider account.
//
// This member is required.
ConnectionArn *string
// The repository name.
//
// This member is required.
Name *string
// The repository provider.
//
// This member is required.
Provider RepositoryProvider
// Your customer Amazon Web Services KMS encryption key.
EncryptionKey *string
noSmithyDocumentSerde
}
// Detail data for a linked repository branch.
type RepositoryBranch struct {
// The Amazon Resource Name (ARN) of the linked repository.
//
// This member is required.
Arn *string
// The repository branch.
//
// This member is required.
Branch *string
// The repository name.
//
// This member is required.
Name *string
// The repository provider.
//
// This member is required.
Provider RepositoryProvider
noSmithyDocumentSerde
}
// Detail input data for a linked repository branch.
type RepositoryBranchInput struct {
// The repository branch.
//
// This member is required.
Branch *string
// The repository name.
//
// This member is required.
Name *string
// The repository provider.
//
// This member is required.
Provider RepositoryProvider
noSmithyDocumentSerde
}
// Summary data of a linked repository—a repository that has been registered with
// Proton.
type RepositorySummary struct {
// The Amazon Resource Name (ARN) of the linked repository.
//
// This member is required.
Arn *string
// The Amazon Resource Name (ARN) of the of your connection that connects Proton
// to your repository.
//
// This member is required.
ConnectionArn *string
// The repository name.
//
// This member is required.
Name *string
// The repository provider.
//
// This member is required.
Provider RepositoryProvider
noSmithyDocumentSerde
}
// Detail data for a repository sync attempt activated by a push to a repository.
type RepositorySyncAttempt struct {
// Detail data for sync attempt events.
//
// This member is required.
Events []RepositorySyncEvent
// The time when the sync attempt started.
//
// This member is required.
StartedAt *time.Time
// The sync attempt status.
//
// This member is required.
Status RepositorySyncStatus
noSmithyDocumentSerde
}
// A repository sync definition.
type RepositorySyncDefinition struct {
// The repository branch.
//
// This member is required.
Branch *string
// The directory in the repository.
//
// This member is required.
Directory *string
// The resource that is synced from.
//
// This member is required.
Parent *string
// The resource that is synced to.
//
// This member is required.
Target *string
noSmithyDocumentSerde
}
// Repository sync event detail data for a sync attempt.
type RepositorySyncEvent struct {
// Event detail for a repository sync attempt.
//
// This member is required.
Event *string
// The time that the sync event occurred.
//
// This member is required.
Time *time.Time
// The type of event.
//
// This member is required.
Type *string
// The external ID of the sync event.
ExternalId *string
noSmithyDocumentSerde
}
// Summary counts of each Proton resource types.
type ResourceCountsSummary struct {
// The total number of resources of this type in the Amazon Web Services account.
//
// This member is required.
Total *int32
// The number of resources of this type in the Amazon Web Services account that
// need a major template version update.
BehindMajor *int32
// The number of resources of this type in the Amazon Web Services account that
// need a minor template version update.
BehindMinor *int32
// The number of resources of this type in the Amazon Web Services account that
// failed to deploy.
Failed *int32
// The number of resources of this type in the Amazon Web Services account that
// are up-to-date with their template.
UpToDate *int32
noSmithyDocumentSerde
}
// Detail data for a resource sync attempt activated by a push to a repository.
type ResourceSyncAttempt struct {
// An array of events with detail data.
//
// This member is required.
Events []ResourceSyncEvent
// Detail data for the initial repository commit, path and push.
//
// This member is required.
InitialRevision *Revision
// The time when the sync attempt started.
//
// This member is required.
StartedAt *time.Time
// The status of the sync attempt.
//
// This member is required.
Status ResourceSyncStatus
// The resource that is synced to.
//
// This member is required.
Target *string
// Detail data for the target revision.
//
// This member is required.
TargetRevision *Revision
noSmithyDocumentSerde
}
// Detail data for a resource sync event.
type ResourceSyncEvent struct {
// A resource sync event.
//
// This member is required.
Event *string
// The time when the event occurred.
//
// This member is required.
Time *time.Time
// The type of event.
//
// This member is required.
Type *string
// The external ID for the event.
ExternalId *string
noSmithyDocumentSerde
}
// Revision detail data for a commit and push that activates a sync attempt
type Revision struct {
// The repository branch.
//
// This member is required.
Branch *string
// The repository directory changed by a commit and push that activated the sync
// attempt.
//
// This member is required.
Directory *string
// The repository name.
//
// This member is required.
RepositoryName *string
// The repository provider.
//
// This member is required.
RepositoryProvider RepositoryProvider
// The secure hash algorithm (SHA) hash for the revision.
//
// This member is required.
Sha *string
noSmithyDocumentSerde
}
// Template bundle S3 bucket data.
type S3ObjectSource struct {
// The name of the S3 bucket that contains a template bundle.
//
// This member is required.
Bucket *string
// The path to the S3 bucket that contains a template bundle.
//
// This member is required.
Key *string
noSmithyDocumentSerde
}
// Detailed data of an Proton service resource.
type Service struct {
// The Amazon Resource Name (ARN) of the service.
//
// This member is required.
Arn *string
// The time when the service was created.
//
// This member is required.
CreatedAt *time.Time
// The time when the service was last modified.
//
// This member is required.
LastModifiedAt *time.Time
// The name of the service.
//
// This member is required.
Name *string
// The formatted specification that defines the service.
//
// This value conforms to the media type: application/yaml
//
// This member is required.
Spec *string
// The status of the service.
//
// This member is required.
Status ServiceStatus
// The name of the service template.
//
// This member is required.
TemplateName *string
// The name of the code repository branch that holds the code that's deployed in
// Proton.
BranchName *string
// A description of the service.
Description *string
// The service pipeline detail data.
Pipeline *ServicePipeline
// The Amazon Resource Name (ARN) of the repository connection. For more
// information, see Setting up an AWS CodeStar connection (https://docs.aws.amazon.com/proton/latest/userguide/setting-up-for-service.html#setting-up-vcontrol)
// in the Proton User Guide.
RepositoryConnectionArn *string
// The ID of the source code repository.
RepositoryId *string
// A service status message.
StatusMessage *string
noSmithyDocumentSerde
}
// Detailed data of an Proton service instance resource.
type ServiceInstance struct {
// The Amazon Resource Name (ARN) of the service instance.
//
// This member is required.
Arn *string
// The time when the service instance was created.
//
// This member is required.
CreatedAt *time.Time
// The service instance deployment status.
//
// This member is required.
DeploymentStatus DeploymentStatus
// The name of the environment that the service instance was deployed into.
//
// This member is required.
EnvironmentName *string
// The time when a deployment of the service instance was last attempted.
//
// This member is required.
LastDeploymentAttemptedAt *time.Time
// The time when the service instance was last deployed successfully.
//
// This member is required.
LastDeploymentSucceededAt *time.Time
// The name of the service instance.
//
// This member is required.
Name *string
// The name of the service that the service instance belongs to.
//
// This member is required.
ServiceName *string
// The major version of the service template that was used to create the service
// instance.
//
// This member is required.
TemplateMajorVersion *string
// The minor version of the service template that was used to create the service
// instance.
//
// This member is required.
TemplateMinorVersion *string
// The name of the service template that was used to create the service instance.
//
// This member is required.
TemplateName *string
// The message associated with the service instance deployment status.
DeploymentStatusMessage *string
// The last client request token received.
LastClientRequestToken *string
// The service spec that was used to create the service instance.
//
// This value conforms to the media type: application/yaml
Spec *string
noSmithyDocumentSerde
}
// Summary data of an Proton service instance resource.
type ServiceInstanceSummary struct {
// The Amazon Resource Name (ARN) of the service instance.
//
// This member is required.
Arn *string
// The time when the service instance was created.
//
// This member is required.
CreatedAt *time.Time
// The service instance deployment status.
//
// This member is required.
DeploymentStatus DeploymentStatus
// The name of the environment that the service instance was deployed into.
//
// This member is required.
EnvironmentName *string
// The time when a deployment of the service was last attempted.
//
// This member is required.
LastDeploymentAttemptedAt *time.Time
// The time when the service was last deployed successfully.
//
// This member is required.
LastDeploymentSucceededAt *time.Time
// The name of the service instance.
//
// This member is required.
Name *string
// The name of the service that the service instance belongs to.
//
// This member is required.
ServiceName *string
// The service instance template major version.
//
// This member is required.
TemplateMajorVersion *string
// The service instance template minor version.
//
// This member is required.
TemplateMinorVersion *string
// The name of the service template.
//
// This member is required.
TemplateName *string
// A service instance deployment status message.
DeploymentStatusMessage *string
noSmithyDocumentSerde
}
// Detailed data of an Proton service instance pipeline resource.
type ServicePipeline struct {
// The Amazon Resource Name (ARN) of the service pipeline.
//
// This member is required.
Arn *string
// The time when the service pipeline was created.
//
// This member is required.
CreatedAt *time.Time
// The deployment status of the service pipeline.
//
// This member is required.
DeploymentStatus DeploymentStatus
// The time when a deployment of the service pipeline was last attempted.
//
// This member is required.
LastDeploymentAttemptedAt *time.Time
// The time when the service pipeline was last deployed successfully.
//
// This member is required.
LastDeploymentSucceededAt *time.Time
// The major version of the service template that was used to create the service
// pipeline.
//
// This member is required.
TemplateMajorVersion *string
// The minor version of the service template that was used to create the service
// pipeline.
//
// This member is required.
TemplateMinorVersion *string
// The name of the service template that was used to create the service pipeline.
//
// This member is required.
TemplateName *string
// A service pipeline deployment status message.
DeploymentStatusMessage *string
// The service spec that was used to create the service pipeline.
//
// This value conforms to the media type: application/yaml
Spec *string
noSmithyDocumentSerde
}
// Summary data of an Proton service resource.
type ServiceSummary struct {
// The Amazon Resource Name (ARN) of the service.
//
// This member is required.
Arn *string
// The time when the service was created.
//
// This member is required.
CreatedAt *time.Time
// The time when the service was last modified.
//
// This member is required.
LastModifiedAt *time.Time
// The name of the service.
//
// This member is required.
Name *string
// The status of the service.
//
// This member is required.
Status ServiceStatus
// The name of the service template.
//
// This member is required.
TemplateName *string
// A description of the service.
Description *string
// A service status message.
StatusMessage *string
noSmithyDocumentSerde
}
// If a service instance is manually updated, Proton wants to prevent accidentally
// overriding a manual change. A blocker is created because of the manual update or
// deletion of a service instance. The summary describes the blocker as being
// active or resolved.
type ServiceSyncBlockerSummary struct {
// The name of the service that you want to get the sync blocker summary for. If
// given a service instance name and a service name, it will return the blockers
// only applying to the instance that is blocked. If given only a service name, it
// will return the blockers that apply to all of the instances. In order to get the
// blockers for a single instance, you will need to make two distinct calls, one to
// get the sync blocker summary for the service and the other to get the sync
// blocker for the service instance.
//
// This member is required.
ServiceName *string
// The latest active blockers for the synced service.
LatestBlockers []SyncBlocker
// The name of the service instance that you want sync your service configuration
// with.
ServiceInstanceName *string
noSmithyDocumentSerde
}
// Detailed data of the service sync configuration.
type ServiceSyncConfig struct {
// The name of the code repository branch that holds the service code Proton will
// sync with.
//
// This member is required.
Branch *string
// The file path to the service sync configuration file.
//
// This member is required.
FilePath *string
// The name of the code repository that holds the service code Proton will sync
// with.
//
// This member is required.
RepositoryName *string
// The name of the repository provider that holds the repository Proton will sync
// with.
//
// This member is required.
RepositoryProvider RepositoryProvider
// The name of the service that the service instance is added to.
//
// This member is required.
ServiceName *string
noSmithyDocumentSerde
}
// Detailed data of an Proton service template resource.
type ServiceTemplate struct {
// The Amazon Resource Name (ARN) of the service template.
//
// This member is required.
Arn *string
// The time when the service template was created.
//
// This member is required.
CreatedAt *time.Time
// The time when the service template was last modified.
//
// This member is required.
LastModifiedAt *time.Time
// The name of the service template.
//
// This member is required.
Name *string
// A description of the service template.
Description *string
// The service template name as displayed in the developer interface.
DisplayName *string
// The customer provided service template encryption key that's used to encrypt
// data.
EncryptionKey *string
// If pipelineProvisioning is true , a service pipeline is included in the service
// template. Otherwise, a service pipeline isn't included in the service template.
PipelineProvisioning Provisioning
// The recommended version of the service template.
RecommendedVersion *string
noSmithyDocumentSerde
}
// Summary data of an Proton service template resource.
type ServiceTemplateSummary struct {
// The Amazon Resource Name (ARN) of the service template.
//
// This member is required.
Arn *string
// The time when the service template was created.
//
// This member is required.
CreatedAt *time.Time
// The time when the service template was last modified.
//
// This member is required.
LastModifiedAt *time.Time
// The name of the service template.
//
// This member is required.
Name *string
// A description of the service template.
Description *string
// The service template name as displayed in the developer interface.
DisplayName *string
// If pipelineProvisioning is true , a service pipeline is included in the service
// template, otherwise a service pipeline isn't included in the service template.
PipelineProvisioning Provisioning
// The recommended version of the service template.
RecommendedVersion *string
noSmithyDocumentSerde
}
// Detailed data of an Proton service template version resource.
type ServiceTemplateVersion struct {
// The Amazon Resource Name (ARN) of the version of a service template.
//
// This member is required.
Arn *string
// An array of compatible environment template names for the major version of a
// service template.
//
// This member is required.
CompatibleEnvironmentTemplates []CompatibleEnvironmentTemplate
// The time when the version of a service template was created.
//
// This member is required.
CreatedAt *time.Time
// The time when the version of a service template was last modified.
//
// This member is required.
LastModifiedAt *time.Time
// The latest major version that's associated with the version of a service
// template.
//
// This member is required.
MajorVersion *string
// The minor version of a service template.
//
// This member is required.
MinorVersion *string
// The service template version status.
//
// This member is required.
Status TemplateVersionStatus
// The name of the version of a service template.
//
// This member is required.
TemplateName *string
// A description of the version of a service template.
Description *string
// The recommended minor version of the service template.
RecommendedMinorVersion *string
// The schema of the version of a service template.
//
// This value conforms to the media type: application/yaml
Schema *string
// A service template version status message.
StatusMessage *string
// An array of supported component sources. Components with supported sources can
// be attached to service instances based on this service template version. For
// more information about components, see Proton components (https://docs.aws.amazon.com/proton/latest/userguide/ag-components.html)
// in the Proton User Guide.
SupportedComponentSources []ServiceTemplateSupportedComponentSourceType
noSmithyDocumentSerde
}
// Summary data of an Proton service template version resource.
type ServiceTemplateVersionSummary struct {
// The Amazon Resource Name (ARN) of the version of a service template.
//
// This member is required.
Arn *string
// The time when the version of a service template was created.
//
// This member is required.
CreatedAt *time.Time
// The time when the version of a service template was last modified.
//
// This member is required.
LastModifiedAt *time.Time
// The latest major version that's associated with the version of a service
// template.
//
// This member is required.
MajorVersion *string
// The minor version of a service template.
//
// This member is required.
MinorVersion *string
// The service template minor version status.
//
// This member is required.
Status TemplateVersionStatus
// The name of the service template.
//
// This member is required.
TemplateName *string
// A description of the version of a service template.
Description *string
// The recommended minor version of the service template.
RecommendedMinorVersion *string
// A service template minor version status message.
StatusMessage *string
noSmithyDocumentSerde
}
// Detailed data of the sync blocker.
type SyncBlocker struct {
// The time when the sync blocker was created.
//
// This member is required.
CreatedAt *time.Time
// The reason why the sync blocker was created.
//
// This member is required.
CreatedReason *string
// The ID of the sync blocker.
//
// This member is required.
Id *string
// The status of the sync blocker.
//
// This member is required.
Status BlockerStatus
// The type of the sync blocker.
//
// This member is required.
Type BlockerType
// The contexts for the sync blocker.
Contexts []SyncBlockerContext
// The time the sync blocker was resolved.
ResolvedAt *time.Time
// The reason the sync blocker was resolved.
ResolvedReason *string
noSmithyDocumentSerde
}
// Detailed data of the context of the sync blocker.
type SyncBlockerContext struct {
// The key for the sync blocker context.
//
// This member is required.
Key *string
// The value of the sync blocker context.
//
// This member is required.
Value *string
noSmithyDocumentSerde
}
// A description of a resource tag.
type Tag struct {
// The key of the resource tag.
//
// This member is required.
Key *string
// The value of the resource tag.
//
// This member is required.
Value *string
noSmithyDocumentSerde
}
// The detail data for a template sync configuration.
type TemplateSyncConfig struct {
// The repository branch.
//
// This member is required.
Branch *string
// The repository name (for example, myrepos/myrepo ).
//
// This member is required.
RepositoryName *string
// The repository provider.
//
// This member is required.
RepositoryProvider RepositoryProvider
// The template name.
//
// This member is required.
TemplateName *string
// The template type.
//
// This member is required.
TemplateType TemplateType
// A subdirectory path to your template bundle version.
Subdirectory *string
noSmithyDocumentSerde
}
// Template version source data.
//
// The following types satisfy this interface:
//
// TemplateVersionSourceInputMemberS3
type TemplateVersionSourceInput interface {
isTemplateVersionSourceInput()
}
// An S3 source object that includes the template bundle S3 path and name for a
// template minor version.
type TemplateVersionSourceInputMemberS3 struct {
Value S3ObjectSource
noSmithyDocumentSerde
}
func (*TemplateVersionSourceInputMemberS3) isTemplateVersionSourceInput() {}
type noSmithyDocumentSerde = smithydocument.NoSerde
// UnknownUnionMember is returned when a union member is returned over the wire,
// but has an unknown tag.
type UnknownUnionMember struct {
Tag string
Value []byte
noSmithyDocumentSerde
}
func (*UnknownUnionMember) isTemplateVersionSourceInput() {}
| 1,795 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package types_test
import (
"fmt"
"github.com/aws/aws-sdk-go-v2/service/proton/types"
)
func ExampleTemplateVersionSourceInput_outputUsage() {
var union types.TemplateVersionSourceInput
// type switches can be used to check the union value
switch v := union.(type) {
case *types.TemplateVersionSourceInputMemberS3:
_ = v.Value // Value is types.S3ObjectSource
case *types.UnknownUnionMember:
fmt.Println("unknown tag:", v.Tag)
default:
fmt.Println("union is nil or unknown type")
}
}
var _ *types.S3ObjectSource
| 27 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldb
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 = "QLDB"
const ServiceAPIVersion = "2019-01-02"
// Client provides the API client to make operations call for Amazon QLDB.
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, "qldb", 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)
}
| 434 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldb
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 qldb
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"
)
// Ends a given Amazon QLDB journal stream. Before a stream can be canceled, its
// current status must be ACTIVE . You can't restart a stream after you cancel it.
// Canceled QLDB stream resources are subject to a 7-day retention period, so they
// are automatically deleted after this limit expires.
func (c *Client) CancelJournalKinesisStream(ctx context.Context, params *CancelJournalKinesisStreamInput, optFns ...func(*Options)) (*CancelJournalKinesisStreamOutput, error) {
if params == nil {
params = &CancelJournalKinesisStreamInput{}
}
result, metadata, err := c.invokeOperation(ctx, "CancelJournalKinesisStream", params, optFns, c.addOperationCancelJournalKinesisStreamMiddlewares)
if err != nil {
return nil, err
}
out := result.(*CancelJournalKinesisStreamOutput)
out.ResultMetadata = metadata
return out, nil
}
type CancelJournalKinesisStreamInput struct {
// The name of the ledger.
//
// This member is required.
LedgerName *string
// The UUID (represented in Base62-encoded text) of the QLDB journal stream to be
// canceled.
//
// This member is required.
StreamId *string
noSmithyDocumentSerde
}
type CancelJournalKinesisStreamOutput struct {
// The UUID (Base62-encoded text) of the canceled QLDB journal stream.
StreamId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationCancelJournalKinesisStreamMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpCancelJournalKinesisStream{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCancelJournalKinesisStream{}, 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 = addOpCancelJournalKinesisStreamValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelJournalKinesisStream(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_opCancelJournalKinesisStream(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "qldb",
OperationName: "CancelJournalKinesisStream",
}
}
| 133 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldb
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/qldb/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
// Creates a new ledger in your Amazon Web Services account in the current Region.
func (c *Client) CreateLedger(ctx context.Context, params *CreateLedgerInput, optFns ...func(*Options)) (*CreateLedgerOutput, error) {
if params == nil {
params = &CreateLedgerInput{}
}
result, metadata, err := c.invokeOperation(ctx, "CreateLedger", params, optFns, c.addOperationCreateLedgerMiddlewares)
if err != nil {
return nil, err
}
out := result.(*CreateLedgerOutput)
out.ResultMetadata = metadata
return out, nil
}
type CreateLedgerInput struct {
// The name of the ledger that you want to create. The name must be unique among
// all of the ledgers in your Amazon Web Services account in the current Region.
// Naming constraints for ledger names are defined in Quotas in Amazon QLDB (https://docs.aws.amazon.com/qldb/latest/developerguide/limits.html#limits.naming)
// in the Amazon QLDB Developer Guide.
//
// This member is required.
Name *string
// The permissions mode to assign to the ledger that you want to create. This
// parameter can have one of the following values:
// - ALLOW_ALL : A legacy permissions mode that enables access control with
// API-level granularity for ledgers. This mode allows users who have the
// SendCommand API permission for this ledger to run all PartiQL commands (hence,
// ALLOW_ALL ) on any tables in the specified ledger. This mode disregards any
// table-level or command-level IAM permissions policies that you create for the
// ledger.
// - STANDARD : (Recommended) A permissions mode that enables access control with
// finer granularity for ledgers, tables, and PartiQL commands. By default, this
// mode denies all user requests to run any PartiQL commands on any tables in this
// ledger. To allow PartiQL commands to run, you must create IAM permissions
// policies for specific table resources and PartiQL actions, in addition to the
// SendCommand API permission for the ledger. For information, see Getting
// started with the standard permissions mode (https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started-standard-mode.html)
// in the Amazon QLDB Developer Guide.
// We strongly recommend using the STANDARD permissions mode to maximize the
// security of your ledger data.
//
// This member is required.
PermissionsMode types.PermissionsMode
// Specifies whether the ledger is protected from being deleted by any user. If
// not defined during ledger creation, this feature is enabled ( true ) by default.
// If deletion protection is enabled, you must first disable it before you can
// delete the ledger. You can disable it by calling the UpdateLedger operation to
// set this parameter to false .
DeletionProtection *bool
// The key in Key Management Service (KMS) to use for encryption of data at rest
// in the ledger. For more information, see Encryption at rest (https://docs.aws.amazon.com/qldb/latest/developerguide/encryption-at-rest.html)
// in the Amazon QLDB Developer Guide. Use one of the following options to specify
// this parameter:
// - AWS_OWNED_KMS_KEY : Use an KMS key that is owned and managed by Amazon Web
// Services on your behalf.
// - Undefined: By default, use an Amazon Web Services owned KMS key.
// - A valid symmetric customer managed KMS key: Use the specified symmetric
// encryption KMS key in your account that you create, own, and manage. Amazon QLDB
// does not support asymmetric keys. For more information, see Using symmetric
// and asymmetric keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html)
// in the Key Management Service Developer Guide.
// To specify a customer managed KMS key, you can use its key ID, Amazon Resource
// Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with
// "alias/" . To specify a key in a different Amazon Web Services account, you must
// use the key ARN or alias ARN. For example:
// - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
// - Key ARN:
// arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
// - Alias name: alias/ExampleAlias
// - Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
// For more information, see Key identifiers (KeyId) (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id)
// in the Key Management Service Developer Guide.
KmsKey *string
// The key-value pairs to add as tags to the ledger that you want to create. Tag
// keys are case sensitive. Tag values are case sensitive and can be null.
Tags map[string]*string
noSmithyDocumentSerde
}
type CreateLedgerOutput struct {
// The Amazon Resource Name (ARN) for the ledger.
Arn *string
// The date and time, in epoch time format, when the ledger was created. (Epoch
// time format is the number of seconds elapsed since 12:00:00 AM January 1, 1970
// UTC.)
CreationDateTime *time.Time
// Specifies whether the ledger is protected from being deleted by any user. If
// not defined during ledger creation, this feature is enabled ( true ) by default.
// If deletion protection is enabled, you must first disable it before you can
// delete the ledger. You can disable it by calling the UpdateLedger operation to
// set this parameter to false .
DeletionProtection *bool
// The ARN of the customer managed KMS key that the ledger uses for encryption at
// rest. If this parameter is undefined, the ledger uses an Amazon Web Services
// owned KMS key for encryption.
KmsKeyArn *string
// The name of the ledger.
Name *string
// The permissions mode of the ledger that you created.
PermissionsMode types.PermissionsMode
// The current status of the ledger.
State types.LedgerState
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationCreateLedgerMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateLedger{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateLedger{}, 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 = addOpCreateLedgerValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateLedger(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_opCreateLedger(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "qldb",
OperationName: "CreateLedger",
}
}
| 213 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldb
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 ledger and all of its contents. This action is irreversible. If
// deletion protection is enabled, you must first disable it before you can delete
// the ledger. You can disable it by calling the UpdateLedger operation to set
// this parameter to false .
func (c *Client) DeleteLedger(ctx context.Context, params *DeleteLedgerInput, optFns ...func(*Options)) (*DeleteLedgerOutput, error) {
if params == nil {
params = &DeleteLedgerInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteLedger", params, optFns, c.addOperationDeleteLedgerMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteLedgerOutput)
out.ResultMetadata = metadata
return out, nil
}
type DeleteLedgerInput struct {
// The name of the ledger that you want to delete.
//
// This member is required.
Name *string
noSmithyDocumentSerde
}
type DeleteLedgerOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteLedgerMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteLedger{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteLedger{}, 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 = addOpDeleteLedgerValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLedger(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_opDeleteLedger(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "qldb",
OperationName: "DeleteLedger",
}
}
| 123 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldb
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/qldb/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns detailed information about a given Amazon QLDB journal stream. The
// output includes the Amazon Resource Name (ARN), stream name, current status,
// creation time, and the parameters of the original stream creation request. This
// action does not return any expired journal streams. For more information, see
// Expiration for terminal streams (https://docs.aws.amazon.com/qldb/latest/developerguide/streams.create.html#streams.create.states.expiration)
// in the Amazon QLDB Developer Guide.
func (c *Client) DescribeJournalKinesisStream(ctx context.Context, params *DescribeJournalKinesisStreamInput, optFns ...func(*Options)) (*DescribeJournalKinesisStreamOutput, error) {
if params == nil {
params = &DescribeJournalKinesisStreamInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeJournalKinesisStream", params, optFns, c.addOperationDescribeJournalKinesisStreamMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeJournalKinesisStreamOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeJournalKinesisStreamInput struct {
// The name of the ledger.
//
// This member is required.
LedgerName *string
// The UUID (represented in Base62-encoded text) of the QLDB journal stream to
// describe.
//
// This member is required.
StreamId *string
noSmithyDocumentSerde
}
type DescribeJournalKinesisStreamOutput struct {
// Information about the QLDB journal stream returned by a DescribeJournalS3Export
// request.
Stream *types.JournalKinesisStreamDescription
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeJournalKinesisStreamMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeJournalKinesisStream{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeJournalKinesisStream{}, 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 = addOpDescribeJournalKinesisStreamValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeJournalKinesisStream(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_opDescribeJournalKinesisStream(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "qldb",
OperationName: "DescribeJournalKinesisStream",
}
}
| 137 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldb
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/qldb/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns information about a journal export job, including the ledger name,
// export ID, creation time, current status, and the parameters of the original
// export creation request. This action does not return any expired export jobs.
// For more information, see Export job expiration (https://docs.aws.amazon.com/qldb/latest/developerguide/export-journal.request.html#export-journal.request.expiration)
// in the Amazon QLDB Developer Guide. If the export job with the given ExportId
// doesn't exist, then throws ResourceNotFoundException . If the ledger with the
// given Name doesn't exist, then throws ResourceNotFoundException .
func (c *Client) DescribeJournalS3Export(ctx context.Context, params *DescribeJournalS3ExportInput, optFns ...func(*Options)) (*DescribeJournalS3ExportOutput, error) {
if params == nil {
params = &DescribeJournalS3ExportInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeJournalS3Export", params, optFns, c.addOperationDescribeJournalS3ExportMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeJournalS3ExportOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeJournalS3ExportInput struct {
// The UUID (represented in Base62-encoded text) of the journal export job to
// describe.
//
// This member is required.
ExportId *string
// The name of the ledger.
//
// This member is required.
Name *string
noSmithyDocumentSerde
}
type DescribeJournalS3ExportOutput struct {
// Information about the journal export job returned by a DescribeJournalS3Export
// request.
//
// This member is required.
ExportDescription *types.JournalS3ExportDescription
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeJournalS3ExportMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeJournalS3Export{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeJournalS3Export{}, 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 = addOpDescribeJournalS3ExportValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeJournalS3Export(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_opDescribeJournalS3Export(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "qldb",
OperationName: "DescribeJournalS3Export",
}
}
| 140 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldb
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/qldb/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
// Returns information about a ledger, including its state, permissions mode,
// encryption at rest settings, and when it was created.
func (c *Client) DescribeLedger(ctx context.Context, params *DescribeLedgerInput, optFns ...func(*Options)) (*DescribeLedgerOutput, error) {
if params == nil {
params = &DescribeLedgerInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeLedger", params, optFns, c.addOperationDescribeLedgerMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeLedgerOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeLedgerInput struct {
// The name of the ledger that you want to describe.
//
// This member is required.
Name *string
noSmithyDocumentSerde
}
type DescribeLedgerOutput struct {
// The Amazon Resource Name (ARN) for the ledger.
Arn *string
// The date and time, in epoch time format, when the ledger was created. (Epoch
// time format is the number of seconds elapsed since 12:00:00 AM January 1, 1970
// UTC.)
CreationDateTime *time.Time
// Specifies whether the ledger is protected from being deleted by any user. If
// not defined during ledger creation, this feature is enabled ( true ) by default.
// If deletion protection is enabled, you must first disable it before you can
// delete the ledger. You can disable it by calling the UpdateLedger operation to
// set this parameter to false .
DeletionProtection *bool
// Information about the encryption of data at rest in the ledger. This includes
// the current status, the KMS key, and when the key became inaccessible (in the
// case of an error).
EncryptionDescription *types.LedgerEncryptionDescription
// The name of the ledger.
Name *string
// The permissions mode of the ledger.
PermissionsMode types.PermissionsMode
// The current status of the ledger.
State types.LedgerState
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeLedgerMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeLedger{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeLedger{}, 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 = addOpDescribeLedgerValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLedger(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_opDescribeLedger(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "qldb",
OperationName: "DescribeLedger",
}
}
| 153 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldb
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/qldb/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
// Exports journal contents within a date and time range from a ledger into a
// specified Amazon Simple Storage Service (Amazon S3) bucket. A journal export job
// can write the data objects in either the text or binary representation of Amazon
// Ion format, or in JSON Lines text format. If the ledger with the given Name
// doesn't exist, then throws ResourceNotFoundException . If the ledger with the
// given Name is in CREATING status, then throws
// ResourcePreconditionNotMetException . You can initiate up to two concurrent
// journal export requests for each ledger. Beyond this limit, journal export
// requests throw LimitExceededException .
func (c *Client) ExportJournalToS3(ctx context.Context, params *ExportJournalToS3Input, optFns ...func(*Options)) (*ExportJournalToS3Output, error) {
if params == nil {
params = &ExportJournalToS3Input{}
}
result, metadata, err := c.invokeOperation(ctx, "ExportJournalToS3", params, optFns, c.addOperationExportJournalToS3Middlewares)
if err != nil {
return nil, err
}
out := result.(*ExportJournalToS3Output)
out.ResultMetadata = metadata
return out, nil
}
type ExportJournalToS3Input struct {
// The exclusive end date and time for the range of journal contents to export.
// The ExclusiveEndTime must be in ISO 8601 date and time format and in Universal
// Coordinated Time (UTC). For example: 2019-06-13T21:36:34Z . The ExclusiveEndTime
// must be less than or equal to the current UTC date and time.
//
// This member is required.
ExclusiveEndTime *time.Time
// The inclusive start date and time for the range of journal contents to export.
// The InclusiveStartTime must be in ISO 8601 date and time format and in
// Universal Coordinated Time (UTC). For example: 2019-06-13T21:36:34Z . The
// InclusiveStartTime must be before ExclusiveEndTime . If you provide an
// InclusiveStartTime that is before the ledger's CreationDateTime , Amazon QLDB
// defaults it to the ledger's CreationDateTime .
//
// This member is required.
InclusiveStartTime *time.Time
// The name of the ledger.
//
// This member is required.
Name *string
// The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for
// a journal export job to do the following:
// - Write objects into your Amazon S3 bucket.
// - (Optional) Use your customer managed key in Key Management Service (KMS)
// for server-side encryption of your exported data.
// To pass a role to QLDB when requesting a journal export, you must have
// permissions to perform the iam:PassRole action on the IAM role resource. This
// is required for all journal export requests.
//
// This member is required.
RoleArn *string
// The configuration settings of the Amazon S3 bucket destination for your export
// request.
//
// This member is required.
S3ExportConfiguration *types.S3ExportConfiguration
// The output format of your exported journal data. A journal export job can write
// the data objects in either the text or binary representation of Amazon Ion (https://docs.aws.amazon.com/qldb/latest/developerguide/ion.html)
// format, or in JSON Lines (https://jsonlines.org/) text format. Default: ION_TEXT
// In JSON Lines format, each journal block in an exported data object is a valid
// JSON object that is delimited by a newline. You can use this format to directly
// integrate JSON exports with analytics tools such as Amazon Athena and Glue
// because these services can parse newline-delimited JSON automatically.
OutputFormat types.OutputFormat
noSmithyDocumentSerde
}
type ExportJournalToS3Output struct {
// The UUID (represented in Base62-encoded text) that QLDB assigns to each journal
// export job. To describe your export request and check the status of the job, you
// can use ExportId to call DescribeJournalS3Export .
//
// This member is required.
ExportId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationExportJournalToS3Middlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpExportJournalToS3{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpExportJournalToS3{}, 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 = addOpExportJournalToS3ValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opExportJournalToS3(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_opExportJournalToS3(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "qldb",
OperationName: "ExportJournalToS3",
}
}
| 183 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldb
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/qldb/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns a block object at a specified address in a journal. Also returns a
// proof of the specified block for verification if DigestTipAddress is provided.
// For information about the data contents in a block, see Journal contents (https://docs.aws.amazon.com/qldb/latest/developerguide/journal-contents.html)
// in the Amazon QLDB Developer Guide. If the specified ledger doesn't exist or is
// in DELETING status, then throws ResourceNotFoundException . If the specified
// ledger is in CREATING status, then throws ResourcePreconditionNotMetException .
// If no block exists with the specified address, then throws
// InvalidParameterException .
func (c *Client) GetBlock(ctx context.Context, params *GetBlockInput, optFns ...func(*Options)) (*GetBlockOutput, error) {
if params == nil {
params = &GetBlockInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetBlock", params, optFns, c.addOperationGetBlockMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetBlockOutput)
out.ResultMetadata = metadata
return out, nil
}
type GetBlockInput struct {
// The location of the block that you want to request. An address is an Amazon Ion
// structure that has two fields: strandId and sequenceNo . For example:
// {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:14} .
//
// This member is required.
BlockAddress *types.ValueHolder
// The name of the ledger.
//
// This member is required.
Name *string
// The latest block location covered by the digest for which to request a proof.
// An address is an Amazon Ion structure that has two fields: strandId and
// sequenceNo . For example: {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:49} .
DigestTipAddress *types.ValueHolder
noSmithyDocumentSerde
}
type GetBlockOutput struct {
// The block data object in Amazon Ion format.
//
// This member is required.
Block *types.ValueHolder
// The proof object in Amazon Ion format returned by a GetBlock request. A proof
// contains the list of hash values required to recalculate the specified digest
// using a Merkle tree, starting with the specified block.
Proof *types.ValueHolder
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetBlockMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpGetBlock{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetBlock{}, 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 = addOpGetBlockValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBlock(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_opGetBlock(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "qldb",
OperationName: "GetBlock",
}
}
| 151 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldb
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/qldb/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns the digest of a ledger at the latest committed block in the journal.
// The response includes a 256-bit hash value and a block address.
func (c *Client) GetDigest(ctx context.Context, params *GetDigestInput, optFns ...func(*Options)) (*GetDigestOutput, error) {
if params == nil {
params = &GetDigestInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetDigest", params, optFns, c.addOperationGetDigestMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetDigestOutput)
out.ResultMetadata = metadata
return out, nil
}
type GetDigestInput struct {
// The name of the ledger.
//
// This member is required.
Name *string
noSmithyDocumentSerde
}
type GetDigestOutput struct {
// The 256-bit hash value representing the digest returned by a GetDigest request.
//
// This member is required.
Digest []byte
// The latest block location covered by the digest that you requested. An address
// is an Amazon Ion structure that has two fields: strandId and sequenceNo .
//
// This member is required.
DigestTipAddress *types.ValueHolder
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetDigestMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpGetDigest{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetDigest{}, 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 = addOpGetDigestValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDigest(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_opGetDigest(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "qldb",
OperationName: "GetDigest",
}
}
| 134 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldb
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/qldb/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns a revision data object for a specified document ID and block address.
// Also returns a proof of the specified revision for verification if
// DigestTipAddress is provided.
func (c *Client) GetRevision(ctx context.Context, params *GetRevisionInput, optFns ...func(*Options)) (*GetRevisionOutput, error) {
if params == nil {
params = &GetRevisionInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetRevision", params, optFns, c.addOperationGetRevisionMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetRevisionOutput)
out.ResultMetadata = metadata
return out, nil
}
type GetRevisionInput struct {
// The block location of the document revision to be verified. An address is an
// Amazon Ion structure that has two fields: strandId and sequenceNo . For example:
// {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:14} .
//
// This member is required.
BlockAddress *types.ValueHolder
// The UUID (represented in Base62-encoded text) of the document to be verified.
//
// This member is required.
DocumentId *string
// The name of the ledger.
//
// This member is required.
Name *string
// The latest block location covered by the digest for which to request a proof.
// An address is an Amazon Ion structure that has two fields: strandId and
// sequenceNo . For example: {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:49} .
DigestTipAddress *types.ValueHolder
noSmithyDocumentSerde
}
type GetRevisionOutput struct {
// The document revision data object in Amazon Ion format.
//
// This member is required.
Revision *types.ValueHolder
// The proof object in Amazon Ion format returned by a GetRevision request. A
// proof contains the list of hash values that are required to recalculate the
// specified digest using a Merkle tree, starting with the specified document
// revision.
Proof *types.ValueHolder
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetRevisionMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpGetRevision{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetRevision{}, 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 = addOpGetRevisionValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRevision(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_opGetRevision(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "qldb",
OperationName: "GetRevision",
}
}
| 152 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldb
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/qldb/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns all Amazon QLDB journal streams for a given ledger. This action does
// not return any expired journal streams. For more information, see Expiration
// for terminal streams (https://docs.aws.amazon.com/qldb/latest/developerguide/streams.create.html#streams.create.states.expiration)
// in the Amazon QLDB Developer Guide. This action returns a maximum of MaxResults
// items. It is paginated so that you can retrieve all the items by calling
// ListJournalKinesisStreamsForLedger multiple times.
func (c *Client) ListJournalKinesisStreamsForLedger(ctx context.Context, params *ListJournalKinesisStreamsForLedgerInput, optFns ...func(*Options)) (*ListJournalKinesisStreamsForLedgerOutput, error) {
if params == nil {
params = &ListJournalKinesisStreamsForLedgerInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListJournalKinesisStreamsForLedger", params, optFns, c.addOperationListJournalKinesisStreamsForLedgerMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListJournalKinesisStreamsForLedgerOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListJournalKinesisStreamsForLedgerInput struct {
// The name of the ledger.
//
// This member is required.
LedgerName *string
// The maximum number of results to return in a single
// ListJournalKinesisStreamsForLedger request. (The actual number of results
// returned might be fewer.)
MaxResults *int32
// A pagination token, indicating that you want to retrieve the next page of
// results. If you received a value for NextToken in the response from a previous
// ListJournalKinesisStreamsForLedger call, you should use that value as input here.
NextToken *string
noSmithyDocumentSerde
}
type ListJournalKinesisStreamsForLedgerOutput struct {
// - If NextToken is empty, the last page of results has been processed and there
// are no more results to be retrieved.
// - If NextToken is not empty, more results are available. To retrieve the next
// page of results, use the value of NextToken in a subsequent
// ListJournalKinesisStreamsForLedger call.
NextToken *string
// The QLDB journal streams that are currently associated with the given ledger.
Streams []types.JournalKinesisStreamDescription
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListJournalKinesisStreamsForLedgerMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpListJournalKinesisStreamsForLedger{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListJournalKinesisStreamsForLedger{}, 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 = addOpListJournalKinesisStreamsForLedgerValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListJournalKinesisStreamsForLedger(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
}
// ListJournalKinesisStreamsForLedgerAPIClient is a client that implements the
// ListJournalKinesisStreamsForLedger operation.
type ListJournalKinesisStreamsForLedgerAPIClient interface {
ListJournalKinesisStreamsForLedger(context.Context, *ListJournalKinesisStreamsForLedgerInput, ...func(*Options)) (*ListJournalKinesisStreamsForLedgerOutput, error)
}
var _ ListJournalKinesisStreamsForLedgerAPIClient = (*Client)(nil)
// ListJournalKinesisStreamsForLedgerPaginatorOptions is the paginator options for
// ListJournalKinesisStreamsForLedger
type ListJournalKinesisStreamsForLedgerPaginatorOptions struct {
// The maximum number of results to return in a single
// ListJournalKinesisStreamsForLedger request. (The actual number of results
// returned might be fewer.)
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
}
// ListJournalKinesisStreamsForLedgerPaginator is a paginator for
// ListJournalKinesisStreamsForLedger
type ListJournalKinesisStreamsForLedgerPaginator struct {
options ListJournalKinesisStreamsForLedgerPaginatorOptions
client ListJournalKinesisStreamsForLedgerAPIClient
params *ListJournalKinesisStreamsForLedgerInput
nextToken *string
firstPage bool
}
// NewListJournalKinesisStreamsForLedgerPaginator returns a new
// ListJournalKinesisStreamsForLedgerPaginator
func NewListJournalKinesisStreamsForLedgerPaginator(client ListJournalKinesisStreamsForLedgerAPIClient, params *ListJournalKinesisStreamsForLedgerInput, optFns ...func(*ListJournalKinesisStreamsForLedgerPaginatorOptions)) *ListJournalKinesisStreamsForLedgerPaginator {
if params == nil {
params = &ListJournalKinesisStreamsForLedgerInput{}
}
options := ListJournalKinesisStreamsForLedgerPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListJournalKinesisStreamsForLedgerPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListJournalKinesisStreamsForLedgerPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListJournalKinesisStreamsForLedger page.
func (p *ListJournalKinesisStreamsForLedgerPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListJournalKinesisStreamsForLedgerOutput, 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.ListJournalKinesisStreamsForLedger(ctx, ¶ms, 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_opListJournalKinesisStreamsForLedger(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "qldb",
OperationName: "ListJournalKinesisStreamsForLedger",
}
}
| 243 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldb
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/qldb/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns all journal export jobs for all ledgers that are associated with the
// current Amazon Web Services account and Region. This action returns a maximum of
// MaxResults items, and is paginated so that you can retrieve all the items by
// calling ListJournalS3Exports multiple times. This action does not return any
// expired export jobs. For more information, see Export job expiration (https://docs.aws.amazon.com/qldb/latest/developerguide/export-journal.request.html#export-journal.request.expiration)
// in the Amazon QLDB Developer Guide.
func (c *Client) ListJournalS3Exports(ctx context.Context, params *ListJournalS3ExportsInput, optFns ...func(*Options)) (*ListJournalS3ExportsOutput, error) {
if params == nil {
params = &ListJournalS3ExportsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListJournalS3Exports", params, optFns, c.addOperationListJournalS3ExportsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListJournalS3ExportsOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListJournalS3ExportsInput struct {
// The maximum number of results to return in a single ListJournalS3Exports
// request. (The actual number of results returned might be fewer.)
MaxResults *int32
// A pagination token, indicating that you want to retrieve the next page of
// results. If you received a value for NextToken in the response from a previous
// ListJournalS3Exports call, then you should use that value as input here.
NextToken *string
noSmithyDocumentSerde
}
type ListJournalS3ExportsOutput struct {
// The journal export jobs for all ledgers that are associated with the current
// Amazon Web Services account and Region.
JournalS3Exports []types.JournalS3ExportDescription
// - If NextToken is empty, then the last page of results has been processed and
// there are no more results to be retrieved.
// - If NextToken is not empty, then there are more results available. To
// retrieve the next page of results, use the value of NextToken in a subsequent
// ListJournalS3Exports call.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListJournalS3ExportsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpListJournalS3Exports{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListJournalS3Exports{}, 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_opListJournalS3Exports(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
}
// ListJournalS3ExportsAPIClient is a client that implements the
// ListJournalS3Exports operation.
type ListJournalS3ExportsAPIClient interface {
ListJournalS3Exports(context.Context, *ListJournalS3ExportsInput, ...func(*Options)) (*ListJournalS3ExportsOutput, error)
}
var _ ListJournalS3ExportsAPIClient = (*Client)(nil)
// ListJournalS3ExportsPaginatorOptions is the paginator options for
// ListJournalS3Exports
type ListJournalS3ExportsPaginatorOptions struct {
// The maximum number of results to return in a single ListJournalS3Exports
// request. (The actual number of results returned might be fewer.)
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
}
// ListJournalS3ExportsPaginator is a paginator for ListJournalS3Exports
type ListJournalS3ExportsPaginator struct {
options ListJournalS3ExportsPaginatorOptions
client ListJournalS3ExportsAPIClient
params *ListJournalS3ExportsInput
nextToken *string
firstPage bool
}
// NewListJournalS3ExportsPaginator returns a new ListJournalS3ExportsPaginator
func NewListJournalS3ExportsPaginator(client ListJournalS3ExportsAPIClient, params *ListJournalS3ExportsInput, optFns ...func(*ListJournalS3ExportsPaginatorOptions)) *ListJournalS3ExportsPaginator {
if params == nil {
params = &ListJournalS3ExportsInput{}
}
options := ListJournalS3ExportsPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListJournalS3ExportsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListJournalS3ExportsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListJournalS3Exports page.
func (p *ListJournalS3ExportsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListJournalS3ExportsOutput, 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.ListJournalS3Exports(ctx, ¶ms, 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_opListJournalS3Exports(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "qldb",
OperationName: "ListJournalS3Exports",
}
}
| 232 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldb
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/qldb/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns all journal export jobs for a specified ledger. This action returns a
// maximum of MaxResults items, and is paginated so that you can retrieve all the
// items by calling ListJournalS3ExportsForLedger multiple times. This action does
// not return any expired export jobs. For more information, see Export job
// expiration (https://docs.aws.amazon.com/qldb/latest/developerguide/export-journal.request.html#export-journal.request.expiration)
// in the Amazon QLDB Developer Guide.
func (c *Client) ListJournalS3ExportsForLedger(ctx context.Context, params *ListJournalS3ExportsForLedgerInput, optFns ...func(*Options)) (*ListJournalS3ExportsForLedgerOutput, error) {
if params == nil {
params = &ListJournalS3ExportsForLedgerInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListJournalS3ExportsForLedger", params, optFns, c.addOperationListJournalS3ExportsForLedgerMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListJournalS3ExportsForLedgerOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListJournalS3ExportsForLedgerInput struct {
// The name of the ledger.
//
// This member is required.
Name *string
// The maximum number of results to return in a single
// ListJournalS3ExportsForLedger request. (The actual number of results returned
// might be fewer.)
MaxResults *int32
// A pagination token, indicating that you want to retrieve the next page of
// results. If you received a value for NextToken in the response from a previous
// ListJournalS3ExportsForLedger call, then you should use that value as input here.
NextToken *string
noSmithyDocumentSerde
}
type ListJournalS3ExportsForLedgerOutput struct {
// The journal export jobs that are currently associated with the specified ledger.
JournalS3Exports []types.JournalS3ExportDescription
// - If NextToken is empty, then the last page of results has been processed and
// there are no more results to be retrieved.
// - If NextToken is not empty, then there are more results available. To
// retrieve the next page of results, use the value of NextToken in a subsequent
// ListJournalS3ExportsForLedger call.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListJournalS3ExportsForLedgerMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpListJournalS3ExportsForLedger{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListJournalS3ExportsForLedger{}, 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 = addOpListJournalS3ExportsForLedgerValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListJournalS3ExportsForLedger(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
}
// ListJournalS3ExportsForLedgerAPIClient is a client that implements the
// ListJournalS3ExportsForLedger operation.
type ListJournalS3ExportsForLedgerAPIClient interface {
ListJournalS3ExportsForLedger(context.Context, *ListJournalS3ExportsForLedgerInput, ...func(*Options)) (*ListJournalS3ExportsForLedgerOutput, error)
}
var _ ListJournalS3ExportsForLedgerAPIClient = (*Client)(nil)
// ListJournalS3ExportsForLedgerPaginatorOptions is the paginator options for
// ListJournalS3ExportsForLedger
type ListJournalS3ExportsForLedgerPaginatorOptions struct {
// The maximum number of results to return in a single
// ListJournalS3ExportsForLedger request. (The actual number of results returned
// might be fewer.)
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
}
// ListJournalS3ExportsForLedgerPaginator is a paginator for
// ListJournalS3ExportsForLedger
type ListJournalS3ExportsForLedgerPaginator struct {
options ListJournalS3ExportsForLedgerPaginatorOptions
client ListJournalS3ExportsForLedgerAPIClient
params *ListJournalS3ExportsForLedgerInput
nextToken *string
firstPage bool
}
// NewListJournalS3ExportsForLedgerPaginator returns a new
// ListJournalS3ExportsForLedgerPaginator
func NewListJournalS3ExportsForLedgerPaginator(client ListJournalS3ExportsForLedgerAPIClient, params *ListJournalS3ExportsForLedgerInput, optFns ...func(*ListJournalS3ExportsForLedgerPaginatorOptions)) *ListJournalS3ExportsForLedgerPaginator {
if params == nil {
params = &ListJournalS3ExportsForLedgerInput{}
}
options := ListJournalS3ExportsForLedgerPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListJournalS3ExportsForLedgerPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListJournalS3ExportsForLedgerPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListJournalS3ExportsForLedger page.
func (p *ListJournalS3ExportsForLedgerPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListJournalS3ExportsForLedgerOutput, 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.ListJournalS3ExportsForLedger(ctx, ¶ms, 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_opListJournalS3ExportsForLedger(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "qldb",
OperationName: "ListJournalS3ExportsForLedger",
}
}
| 243 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldb
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/qldb/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns all ledgers that are associated with the current Amazon Web Services
// account and Region. This action returns a maximum of MaxResults items and is
// paginated so that you can retrieve all the items by calling ListLedgers
// multiple times.
func (c *Client) ListLedgers(ctx context.Context, params *ListLedgersInput, optFns ...func(*Options)) (*ListLedgersOutput, error) {
if params == nil {
params = &ListLedgersInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListLedgers", params, optFns, c.addOperationListLedgersMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListLedgersOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListLedgersInput struct {
// The maximum number of results to return in a single ListLedgers request. (The
// actual number of results returned might be fewer.)
MaxResults *int32
// A pagination token, indicating that you want to retrieve the next page of
// results. If you received a value for NextToken in the response from a previous
// ListLedgers call, then you should use that value as input here.
NextToken *string
noSmithyDocumentSerde
}
type ListLedgersOutput struct {
// The ledgers that are associated with the current Amazon Web Services account
// and Region.
Ledgers []types.LedgerSummary
// A pagination token, indicating whether there are more results available:
// - If NextToken is empty, then the last page of results has been processed and
// there are no more results to be retrieved.
// - If NextToken is not empty, then there are more results available. To
// retrieve the next page of results, use the value of NextToken in a subsequent
// ListLedgers call.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListLedgersMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpListLedgers{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListLedgers{}, 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_opListLedgers(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
}
// ListLedgersAPIClient is a client that implements the ListLedgers operation.
type ListLedgersAPIClient interface {
ListLedgers(context.Context, *ListLedgersInput, ...func(*Options)) (*ListLedgersOutput, error)
}
var _ ListLedgersAPIClient = (*Client)(nil)
// ListLedgersPaginatorOptions is the paginator options for ListLedgers
type ListLedgersPaginatorOptions struct {
// The maximum number of results to return in a single ListLedgers request. (The
// actual number of results returned might be fewer.)
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
}
// ListLedgersPaginator is a paginator for ListLedgers
type ListLedgersPaginator struct {
options ListLedgersPaginatorOptions
client ListLedgersAPIClient
params *ListLedgersInput
nextToken *string
firstPage bool
}
// NewListLedgersPaginator returns a new ListLedgersPaginator
func NewListLedgersPaginator(client ListLedgersAPIClient, params *ListLedgersInput, optFns ...func(*ListLedgersPaginatorOptions)) *ListLedgersPaginator {
if params == nil {
params = &ListLedgersInput{}
}
options := ListLedgersPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListLedgersPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListLedgersPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListLedgers page.
func (p *ListLedgersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListLedgersOutput, 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.ListLedgers(ctx, ¶ms, 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_opListLedgers(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "qldb",
OperationName: "ListLedgers",
}
}
| 229 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldb
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 all tags for a specified Amazon QLDB 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 which to list the tags. For example:
// arn:aws:qldb:us-east-1:123456789012:ledger/exampleLedger
//
// This member is required.
ResourceArn *string
noSmithyDocumentSerde
}
type ListTagsForResourceOutput struct {
// The tags that are currently associated with the specified Amazon QLDB 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: "qldb",
OperationName: "ListTagsForResource",
}
}
| 125 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldb
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/qldb/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
// Creates a journal stream for a given Amazon QLDB ledger. The stream captures
// every document revision that is committed to the ledger's journal and delivers
// the data to a specified Amazon Kinesis Data Streams resource.
func (c *Client) StreamJournalToKinesis(ctx context.Context, params *StreamJournalToKinesisInput, optFns ...func(*Options)) (*StreamJournalToKinesisOutput, error) {
if params == nil {
params = &StreamJournalToKinesisInput{}
}
result, metadata, err := c.invokeOperation(ctx, "StreamJournalToKinesis", params, optFns, c.addOperationStreamJournalToKinesisMiddlewares)
if err != nil {
return nil, err
}
out := result.(*StreamJournalToKinesisOutput)
out.ResultMetadata = metadata
return out, nil
}
type StreamJournalToKinesisInput struct {
// The inclusive start date and time from which to start streaming journal data.
// This parameter must be in ISO 8601 date and time format and in Universal
// Coordinated Time (UTC). For example: 2019-06-13T21:36:34Z . The
// InclusiveStartTime cannot be in the future and must be before ExclusiveEndTime .
// If you provide an InclusiveStartTime that is before the ledger's
// CreationDateTime , QLDB effectively defaults it to the ledger's CreationDateTime
// .
//
// This member is required.
InclusiveStartTime *time.Time
// The configuration settings of the Kinesis Data Streams destination for your
// stream request.
//
// This member is required.
KinesisConfiguration *types.KinesisConfiguration
// The name of the ledger.
//
// This member is required.
LedgerName *string
// The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for
// a journal stream to write data records to a Kinesis Data Streams resource. To
// pass a role to QLDB when requesting a journal stream, you must have permissions
// to perform the iam:PassRole action on the IAM role resource. This is required
// for all journal stream requests.
//
// This member is required.
RoleArn *string
// The name that you want to assign to the QLDB journal stream. User-defined names
// can help identify and indicate the purpose of a stream. Your stream name must be
// unique among other active streams for a given ledger. Stream names have the same
// naming constraints as ledger names, as defined in Quotas in Amazon QLDB (https://docs.aws.amazon.com/qldb/latest/developerguide/limits.html#limits.naming)
// in the Amazon QLDB Developer Guide.
//
// This member is required.
StreamName *string
// The exclusive date and time that specifies when the stream ends. If you don't
// define this parameter, the stream runs indefinitely until you cancel it. The
// ExclusiveEndTime must be in ISO 8601 date and time format and in Universal
// Coordinated Time (UTC). For example: 2019-06-13T21:36:34Z .
ExclusiveEndTime *time.Time
// The key-value pairs to add as tags to the stream that you want to create. Tag
// keys are case sensitive. Tag values are case sensitive and can be null.
Tags map[string]*string
noSmithyDocumentSerde
}
type StreamJournalToKinesisOutput struct {
// The UUID (represented in Base62-encoded text) that QLDB assigns to each QLDB
// journal stream.
StreamId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationStreamJournalToKinesisMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpStreamJournalToKinesis{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStreamJournalToKinesis{}, 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 = addOpStreamJournalToKinesisValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStreamJournalToKinesis(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_opStreamJournalToKinesis(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "qldb",
OperationName: "StreamJournalToKinesis",
}
}
| 174 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldb
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 one or more tags to a specified Amazon QLDB resource. A resource can have
// up to 50 tags. If you try to create more than 50 tags for a resource, your
// request fails and returns an error.
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) to which you want to add the tags. For example:
// arn:aws:qldb:us-east-1:123456789012:ledger/exampleLedger
//
// This member is required.
ResourceArn *string
// The key-value pairs to add as tags to the specified QLDB resource. Tag keys are
// case sensitive. If you specify a key that already exists for the resource, your
// request fails and returns an error. Tag values are case sensitive and can be
// null.
//
// 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: "qldb",
OperationName: "TagResource",
}
}
| 131 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldb
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 a specified Amazon QLDB resource. You can specify
// up to 50 tag keys 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) from which to remove the tags. For example:
// arn:aws:qldb:us-east-1:123456789012:ledger/exampleLedger
//
// This member is required.
ResourceArn *string
// The list of tag keys to remove.
//
// 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: "qldb",
OperationName: "UntagResource",
}
}
| 127 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldb
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/qldb/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
// Updates properties on a ledger.
func (c *Client) UpdateLedger(ctx context.Context, params *UpdateLedgerInput, optFns ...func(*Options)) (*UpdateLedgerOutput, error) {
if params == nil {
params = &UpdateLedgerInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateLedger", params, optFns, c.addOperationUpdateLedgerMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateLedgerOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateLedgerInput struct {
// The name of the ledger.
//
// This member is required.
Name *string
// Specifies whether the ledger is protected from being deleted by any user. If
// not defined during ledger creation, this feature is enabled ( true ) by default.
// If deletion protection is enabled, you must first disable it before you can
// delete the ledger. You can disable it by calling the UpdateLedger operation to
// set this parameter to false .
DeletionProtection *bool
// The key in Key Management Service (KMS) to use for encryption of data at rest
// in the ledger. For more information, see Encryption at rest (https://docs.aws.amazon.com/qldb/latest/developerguide/encryption-at-rest.html)
// in the Amazon QLDB Developer Guide. Use one of the following options to specify
// this parameter:
// - AWS_OWNED_KMS_KEY : Use an KMS key that is owned and managed by Amazon Web
// Services on your behalf.
// - Undefined: Make no changes to the KMS key of the ledger.
// - A valid symmetric customer managed KMS key: Use the specified symmetric
// encryption KMS key in your account that you create, own, and manage. Amazon QLDB
// does not support asymmetric keys. For more information, see Using symmetric
// and asymmetric keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html)
// in the Key Management Service Developer Guide.
// To specify a customer managed KMS key, you can use its key ID, Amazon Resource
// Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with
// "alias/" . To specify a key in a different Amazon Web Services account, you must
// use the key ARN or alias ARN. For example:
// - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
// - Key ARN:
// arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
// - Alias name: alias/ExampleAlias
// - Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
// For more information, see Key identifiers (KeyId) (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id)
// in the Key Management Service Developer Guide.
KmsKey *string
noSmithyDocumentSerde
}
type UpdateLedgerOutput struct {
// The Amazon Resource Name (ARN) for the ledger.
Arn *string
// The date and time, in epoch time format, when the ledger was created. (Epoch
// time format is the number of seconds elapsed since 12:00:00 AM January 1, 1970
// UTC.)
CreationDateTime *time.Time
// Specifies whether the ledger is protected from being deleted by any user. If
// not defined during ledger creation, this feature is enabled ( true ) by default.
// If deletion protection is enabled, you must first disable it before you can
// delete the ledger. You can disable it by calling the UpdateLedger operation to
// set this parameter to false .
DeletionProtection *bool
// Information about the encryption of data at rest in the ledger. This includes
// the current status, the KMS key, and when the key became inaccessible (in the
// case of an error).
EncryptionDescription *types.LedgerEncryptionDescription
// The name of the ledger.
Name *string
// The current status of the ledger.
State types.LedgerState
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateLedgerMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateLedger{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateLedger{}, 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 = addOpUpdateLedgerValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateLedger(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_opUpdateLedger(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "qldb",
OperationName: "UpdateLedger",
}
}
| 181 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldb
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/qldb/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates the permissions mode of a ledger. Before you switch to the STANDARD
// permissions mode, you must first create all required IAM policies and table tags
// to avoid disruption to your users. To learn more, see Migrating to the standard
// permissions mode (https://docs.aws.amazon.com/qldb/latest/developerguide/ledger-management.basics.html#ledger-mgmt.basics.update-permissions.migrating)
// in the Amazon QLDB Developer Guide.
func (c *Client) UpdateLedgerPermissionsMode(ctx context.Context, params *UpdateLedgerPermissionsModeInput, optFns ...func(*Options)) (*UpdateLedgerPermissionsModeOutput, error) {
if params == nil {
params = &UpdateLedgerPermissionsModeInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateLedgerPermissionsMode", params, optFns, c.addOperationUpdateLedgerPermissionsModeMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateLedgerPermissionsModeOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateLedgerPermissionsModeInput struct {
// The name of the ledger.
//
// This member is required.
Name *string
// The permissions mode to assign to the ledger. This parameter can have one of
// the following values:
// - ALLOW_ALL : A legacy permissions mode that enables access control with
// API-level granularity for ledgers. This mode allows users who have the
// SendCommand API permission for this ledger to run all PartiQL commands (hence,
// ALLOW_ALL ) on any tables in the specified ledger. This mode disregards any
// table-level or command-level IAM permissions policies that you create for the
// ledger.
// - STANDARD : (Recommended) A permissions mode that enables access control with
// finer granularity for ledgers, tables, and PartiQL commands. By default, this
// mode denies all user requests to run any PartiQL commands on any tables in this
// ledger. To allow PartiQL commands to run, you must create IAM permissions
// policies for specific table resources and PartiQL actions, in addition to the
// SendCommand API permission for the ledger. For information, see Getting
// started with the standard permissions mode (https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started-standard-mode.html)
// in the Amazon QLDB Developer Guide.
// We strongly recommend using the STANDARD permissions mode to maximize the
// security of your ledger data.
//
// This member is required.
PermissionsMode types.PermissionsMode
noSmithyDocumentSerde
}
type UpdateLedgerPermissionsModeOutput struct {
// The Amazon Resource Name (ARN) for the ledger.
Arn *string
// The name of the ledger.
Name *string
// The current permissions mode of the ledger.
PermissionsMode types.PermissionsMode
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateLedgerPermissionsModeMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateLedgerPermissionsMode{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateLedgerPermissionsMode{}, 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 = addOpUpdateLedgerPermissionsModeValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateLedgerPermissionsMode(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_opUpdateLedgerPermissionsMode(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "qldb",
OperationName: "UpdateLedgerPermissionsMode",
}
}
| 157 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldb
import (
"bytes"
"context"
"encoding/base64"
"encoding/json"
"fmt"
"github.com/aws/aws-sdk-go-v2/aws/protocol/restjson"
"github.com/aws/aws-sdk-go-v2/service/qldb/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_deserializeOpCancelJournalKinesisStream struct {
}
func (*awsRestjson1_deserializeOpCancelJournalKinesisStream) ID() string {
return "OperationDeserializer"
}
func (m *awsRestjson1_deserializeOpCancelJournalKinesisStream) 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_deserializeOpErrorCancelJournalKinesisStream(response, &metadata)
}
output := &CancelJournalKinesisStreamOutput{}
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_deserializeOpDocumentCancelJournalKinesisStreamOutput(&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_deserializeOpErrorCancelJournalKinesisStream(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("InvalidParameterException", errorCode):
return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
case strings.EqualFold("ResourceNotFoundException", errorCode):
return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
case strings.EqualFold("ResourcePreconditionNotMetException", errorCode):
return awsRestjson1_deserializeErrorResourcePreconditionNotMetException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
func awsRestjson1_deserializeOpDocumentCancelJournalKinesisStreamOutput(v **CancelJournalKinesisStreamOutput, 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 *CancelJournalKinesisStreamOutput
if *v == nil {
sv = &CancelJournalKinesisStreamOutput{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "StreamId":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected UniqueId to be of type string, got %T instead", value)
}
sv.StreamId = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
type awsRestjson1_deserializeOpCreateLedger struct {
}
func (*awsRestjson1_deserializeOpCreateLedger) ID() string {
return "OperationDeserializer"
}
func (m *awsRestjson1_deserializeOpCreateLedger) 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_deserializeOpErrorCreateLedger(response, &metadata)
}
output := &CreateLedgerOutput{}
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_deserializeOpDocumentCreateLedgerOutput(&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_deserializeOpErrorCreateLedger(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("InvalidParameterException", errorCode):
return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
case strings.EqualFold("LimitExceededException", errorCode):
return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody)
case strings.EqualFold("ResourceAlreadyExistsException", errorCode):
return awsRestjson1_deserializeErrorResourceAlreadyExistsException(response, errorBody)
case strings.EqualFold("ResourceInUseException", errorCode):
return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
func awsRestjson1_deserializeOpDocumentCreateLedgerOutput(v **CreateLedgerOutput, 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 *CreateLedgerOutput
if *v == nil {
sv = &CreateLedgerOutput{}
} 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 Arn to be of type string, got %T instead", value)
}
sv.Arn = ptr.String(jtv)
}
case "CreationDateTime":
if value != nil {
switch jtv := value.(type) {
case json.Number:
f64, err := jtv.Float64()
if err != nil {
return err
}
sv.CreationDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
default:
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
}
}
case "DeletionProtection":
if value != nil {
jtv, ok := value.(bool)
if !ok {
return fmt.Errorf("expected DeletionProtection to be of type *bool, got %T instead", value)
}
sv.DeletionProtection = ptr.Bool(jtv)
}
case "KmsKeyArn":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
}
sv.KmsKeyArn = ptr.String(jtv)
}
case "Name":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected LedgerName to be of type string, got %T instead", value)
}
sv.Name = ptr.String(jtv)
}
case "PermissionsMode":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected PermissionsMode to be of type string, got %T instead", value)
}
sv.PermissionsMode = types.PermissionsMode(jtv)
}
case "State":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected LedgerState to be of type string, got %T instead", value)
}
sv.State = types.LedgerState(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
type awsRestjson1_deserializeOpDeleteLedger struct {
}
func (*awsRestjson1_deserializeOpDeleteLedger) ID() string {
return "OperationDeserializer"
}
func (m *awsRestjson1_deserializeOpDeleteLedger) 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_deserializeOpErrorDeleteLedger(response, &metadata)
}
output := &DeleteLedgerOutput{}
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_deserializeOpErrorDeleteLedger(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("InvalidParameterException", errorCode):
return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
case strings.EqualFold("ResourceInUseException", errorCode):
return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody)
case strings.EqualFold("ResourceNotFoundException", errorCode):
return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
case strings.EqualFold("ResourcePreconditionNotMetException", errorCode):
return awsRestjson1_deserializeErrorResourcePreconditionNotMetException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsRestjson1_deserializeOpDescribeJournalKinesisStream struct {
}
func (*awsRestjson1_deserializeOpDescribeJournalKinesisStream) ID() string {
return "OperationDeserializer"
}
func (m *awsRestjson1_deserializeOpDescribeJournalKinesisStream) 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_deserializeOpErrorDescribeJournalKinesisStream(response, &metadata)
}
output := &DescribeJournalKinesisStreamOutput{}
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_deserializeOpDocumentDescribeJournalKinesisStreamOutput(&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_deserializeOpErrorDescribeJournalKinesisStream(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("InvalidParameterException", errorCode):
return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
case strings.EqualFold("ResourceNotFoundException", errorCode):
return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
case strings.EqualFold("ResourcePreconditionNotMetException", errorCode):
return awsRestjson1_deserializeErrorResourcePreconditionNotMetException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
func awsRestjson1_deserializeOpDocumentDescribeJournalKinesisStreamOutput(v **DescribeJournalKinesisStreamOutput, 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 *DescribeJournalKinesisStreamOutput
if *v == nil {
sv = &DescribeJournalKinesisStreamOutput{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "Stream":
if err := awsRestjson1_deserializeDocumentJournalKinesisStreamDescription(&sv.Stream, value); err != nil {
return err
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
type awsRestjson1_deserializeOpDescribeJournalS3Export struct {
}
func (*awsRestjson1_deserializeOpDescribeJournalS3Export) ID() string {
return "OperationDeserializer"
}
func (m *awsRestjson1_deserializeOpDescribeJournalS3Export) 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_deserializeOpErrorDescribeJournalS3Export(response, &metadata)
}
output := &DescribeJournalS3ExportOutput{}
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_deserializeOpDocumentDescribeJournalS3ExportOutput(&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_deserializeOpErrorDescribeJournalS3Export(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("ResourceNotFoundException", errorCode):
return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
func awsRestjson1_deserializeOpDocumentDescribeJournalS3ExportOutput(v **DescribeJournalS3ExportOutput, 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 *DescribeJournalS3ExportOutput
if *v == nil {
sv = &DescribeJournalS3ExportOutput{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "ExportDescription":
if err := awsRestjson1_deserializeDocumentJournalS3ExportDescription(&sv.ExportDescription, value); err != nil {
return err
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
type awsRestjson1_deserializeOpDescribeLedger struct {
}
func (*awsRestjson1_deserializeOpDescribeLedger) ID() string {
return "OperationDeserializer"
}
func (m *awsRestjson1_deserializeOpDescribeLedger) 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_deserializeOpErrorDescribeLedger(response, &metadata)
}
output := &DescribeLedgerOutput{}
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_deserializeOpDocumentDescribeLedgerOutput(&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_deserializeOpErrorDescribeLedger(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("InvalidParameterException", errorCode):
return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
case strings.EqualFold("ResourceNotFoundException", errorCode):
return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
func awsRestjson1_deserializeOpDocumentDescribeLedgerOutput(v **DescribeLedgerOutput, 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 *DescribeLedgerOutput
if *v == nil {
sv = &DescribeLedgerOutput{}
} 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 Arn to be of type string, got %T instead", value)
}
sv.Arn = ptr.String(jtv)
}
case "CreationDateTime":
if value != nil {
switch jtv := value.(type) {
case json.Number:
f64, err := jtv.Float64()
if err != nil {
return err
}
sv.CreationDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
default:
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
}
}
case "DeletionProtection":
if value != nil {
jtv, ok := value.(bool)
if !ok {
return fmt.Errorf("expected DeletionProtection to be of type *bool, got %T instead", value)
}
sv.DeletionProtection = ptr.Bool(jtv)
}
case "EncryptionDescription":
if err := awsRestjson1_deserializeDocumentLedgerEncryptionDescription(&sv.EncryptionDescription, value); err != nil {
return err
}
case "Name":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected LedgerName to be of type string, got %T instead", value)
}
sv.Name = ptr.String(jtv)
}
case "PermissionsMode":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected PermissionsMode to be of type string, got %T instead", value)
}
sv.PermissionsMode = types.PermissionsMode(jtv)
}
case "State":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected LedgerState to be of type string, got %T instead", value)
}
sv.State = types.LedgerState(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
type awsRestjson1_deserializeOpExportJournalToS3 struct {
}
func (*awsRestjson1_deserializeOpExportJournalToS3) ID() string {
return "OperationDeserializer"
}
func (m *awsRestjson1_deserializeOpExportJournalToS3) 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_deserializeOpErrorExportJournalToS3(response, &metadata)
}
output := &ExportJournalToS3Output{}
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_deserializeOpDocumentExportJournalToS3Output(&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_deserializeOpErrorExportJournalToS3(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("ResourceNotFoundException", errorCode):
return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
case strings.EqualFold("ResourcePreconditionNotMetException", errorCode):
return awsRestjson1_deserializeErrorResourcePreconditionNotMetException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
func awsRestjson1_deserializeOpDocumentExportJournalToS3Output(v **ExportJournalToS3Output, 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 *ExportJournalToS3Output
if *v == nil {
sv = &ExportJournalToS3Output{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "ExportId":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected UniqueId to be of type string, got %T instead", value)
}
sv.ExportId = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
type awsRestjson1_deserializeOpGetBlock struct {
}
func (*awsRestjson1_deserializeOpGetBlock) ID() string {
return "OperationDeserializer"
}
func (m *awsRestjson1_deserializeOpGetBlock) 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_deserializeOpErrorGetBlock(response, &metadata)
}
output := &GetBlockOutput{}
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_deserializeOpDocumentGetBlockOutput(&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_deserializeOpErrorGetBlock(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("InvalidParameterException", errorCode):
return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
case strings.EqualFold("ResourceNotFoundException", errorCode):
return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
case strings.EqualFold("ResourcePreconditionNotMetException", errorCode):
return awsRestjson1_deserializeErrorResourcePreconditionNotMetException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
func awsRestjson1_deserializeOpDocumentGetBlockOutput(v **GetBlockOutput, 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 *GetBlockOutput
if *v == nil {
sv = &GetBlockOutput{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "Block":
if err := awsRestjson1_deserializeDocumentValueHolder(&sv.Block, value); err != nil {
return err
}
case "Proof":
if err := awsRestjson1_deserializeDocumentValueHolder(&sv.Proof, value); err != nil {
return err
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
type awsRestjson1_deserializeOpGetDigest struct {
}
func (*awsRestjson1_deserializeOpGetDigest) ID() string {
return "OperationDeserializer"
}
func (m *awsRestjson1_deserializeOpGetDigest) 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_deserializeOpErrorGetDigest(response, &metadata)
}
output := &GetDigestOutput{}
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_deserializeOpDocumentGetDigestOutput(&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_deserializeOpErrorGetDigest(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("InvalidParameterException", errorCode):
return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
case strings.EqualFold("ResourceNotFoundException", errorCode):
return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
case strings.EqualFold("ResourcePreconditionNotMetException", errorCode):
return awsRestjson1_deserializeErrorResourcePreconditionNotMetException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
func awsRestjson1_deserializeOpDocumentGetDigestOutput(v **GetDigestOutput, 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 *GetDigestOutput
if *v == nil {
sv = &GetDigestOutput{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "Digest":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected Digest to be []byte, got %T instead", value)
}
dv, err := base64.StdEncoding.DecodeString(jtv)
if err != nil {
return fmt.Errorf("failed to base64 decode Digest, %w", err)
}
sv.Digest = dv
}
case "DigestTipAddress":
if err := awsRestjson1_deserializeDocumentValueHolder(&sv.DigestTipAddress, value); err != nil {
return err
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
type awsRestjson1_deserializeOpGetRevision struct {
}
func (*awsRestjson1_deserializeOpGetRevision) ID() string {
return "OperationDeserializer"
}
func (m *awsRestjson1_deserializeOpGetRevision) 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_deserializeOpErrorGetRevision(response, &metadata)
}
output := &GetRevisionOutput{}
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_deserializeOpDocumentGetRevisionOutput(&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_deserializeOpErrorGetRevision(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("InvalidParameterException", errorCode):
return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
case strings.EqualFold("ResourceNotFoundException", errorCode):
return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
case strings.EqualFold("ResourcePreconditionNotMetException", errorCode):
return awsRestjson1_deserializeErrorResourcePreconditionNotMetException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
func awsRestjson1_deserializeOpDocumentGetRevisionOutput(v **GetRevisionOutput, 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 *GetRevisionOutput
if *v == nil {
sv = &GetRevisionOutput{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "Proof":
if err := awsRestjson1_deserializeDocumentValueHolder(&sv.Proof, value); err != nil {
return err
}
case "Revision":
if err := awsRestjson1_deserializeDocumentValueHolder(&sv.Revision, value); err != nil {
return err
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
type awsRestjson1_deserializeOpListJournalKinesisStreamsForLedger struct {
}
func (*awsRestjson1_deserializeOpListJournalKinesisStreamsForLedger) ID() string {
return "OperationDeserializer"
}
func (m *awsRestjson1_deserializeOpListJournalKinesisStreamsForLedger) 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_deserializeOpErrorListJournalKinesisStreamsForLedger(response, &metadata)
}
output := &ListJournalKinesisStreamsForLedgerOutput{}
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_deserializeOpDocumentListJournalKinesisStreamsForLedgerOutput(&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_deserializeOpErrorListJournalKinesisStreamsForLedger(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("InvalidParameterException", errorCode):
return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
case strings.EqualFold("ResourceNotFoundException", errorCode):
return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
case strings.EqualFold("ResourcePreconditionNotMetException", errorCode):
return awsRestjson1_deserializeErrorResourcePreconditionNotMetException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
func awsRestjson1_deserializeOpDocumentListJournalKinesisStreamsForLedgerOutput(v **ListJournalKinesisStreamsForLedgerOutput, 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 *ListJournalKinesisStreamsForLedgerOutput
if *v == nil {
sv = &ListJournalKinesisStreamsForLedgerOutput{}
} 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 NextToken to be of type string, got %T instead", value)
}
sv.NextToken = ptr.String(jtv)
}
case "Streams":
if err := awsRestjson1_deserializeDocumentJournalKinesisStreamDescriptionList(&sv.Streams, value); err != nil {
return err
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
type awsRestjson1_deserializeOpListJournalS3Exports struct {
}
func (*awsRestjson1_deserializeOpListJournalS3Exports) ID() string {
return "OperationDeserializer"
}
func (m *awsRestjson1_deserializeOpListJournalS3Exports) 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_deserializeOpErrorListJournalS3Exports(response, &metadata)
}
output := &ListJournalS3ExportsOutput{}
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_deserializeOpDocumentListJournalS3ExportsOutput(&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_deserializeOpErrorListJournalS3Exports(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_deserializeOpDocumentListJournalS3ExportsOutput(v **ListJournalS3ExportsOutput, 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 *ListJournalS3ExportsOutput
if *v == nil {
sv = &ListJournalS3ExportsOutput{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "JournalS3Exports":
if err := awsRestjson1_deserializeDocumentJournalS3ExportList(&sv.JournalS3Exports, value); err != nil {
return err
}
case "NextToken":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
}
sv.NextToken = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
type awsRestjson1_deserializeOpListJournalS3ExportsForLedger struct {
}
func (*awsRestjson1_deserializeOpListJournalS3ExportsForLedger) ID() string {
return "OperationDeserializer"
}
func (m *awsRestjson1_deserializeOpListJournalS3ExportsForLedger) 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_deserializeOpErrorListJournalS3ExportsForLedger(response, &metadata)
}
output := &ListJournalS3ExportsForLedgerOutput{}
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_deserializeOpDocumentListJournalS3ExportsForLedgerOutput(&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_deserializeOpErrorListJournalS3ExportsForLedger(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_deserializeOpDocumentListJournalS3ExportsForLedgerOutput(v **ListJournalS3ExportsForLedgerOutput, 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 *ListJournalS3ExportsForLedgerOutput
if *v == nil {
sv = &ListJournalS3ExportsForLedgerOutput{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "JournalS3Exports":
if err := awsRestjson1_deserializeDocumentJournalS3ExportList(&sv.JournalS3Exports, value); err != nil {
return err
}
case "NextToken":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
}
sv.NextToken = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
type awsRestjson1_deserializeOpListLedgers struct {
}
func (*awsRestjson1_deserializeOpListLedgers) ID() string {
return "OperationDeserializer"
}
func (m *awsRestjson1_deserializeOpListLedgers) 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_deserializeOpErrorListLedgers(response, &metadata)
}
output := &ListLedgersOutput{}
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_deserializeOpDocumentListLedgersOutput(&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_deserializeOpErrorListLedgers(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_deserializeOpDocumentListLedgersOutput(v **ListLedgersOutput, 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 *ListLedgersOutput
if *v == nil {
sv = &ListLedgersOutput{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "Ledgers":
if err := awsRestjson1_deserializeDocumentLedgerList(&sv.Ledgers, value); err != nil {
return err
}
case "NextToken":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected NextToken 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("InvalidParameterException", errorCode):
return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
case strings.EqualFold("ResourceNotFoundException", errorCode):
return awsRestjson1_deserializeErrorResourceNotFoundException(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_deserializeDocumentTags(&sv.Tags, value); err != nil {
return err
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
type awsRestjson1_deserializeOpStreamJournalToKinesis struct {
}
func (*awsRestjson1_deserializeOpStreamJournalToKinesis) ID() string {
return "OperationDeserializer"
}
func (m *awsRestjson1_deserializeOpStreamJournalToKinesis) 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_deserializeOpErrorStreamJournalToKinesis(response, &metadata)
}
output := &StreamJournalToKinesisOutput{}
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_deserializeOpDocumentStreamJournalToKinesisOutput(&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_deserializeOpErrorStreamJournalToKinesis(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("InvalidParameterException", errorCode):
return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
case strings.EqualFold("ResourceNotFoundException", errorCode):
return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
case strings.EqualFold("ResourcePreconditionNotMetException", errorCode):
return awsRestjson1_deserializeErrorResourcePreconditionNotMetException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
func awsRestjson1_deserializeOpDocumentStreamJournalToKinesisOutput(v **StreamJournalToKinesisOutput, 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 *StreamJournalToKinesisOutput
if *v == nil {
sv = &StreamJournalToKinesisOutput{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "StreamId":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected UniqueId to be of type string, got %T instead", value)
}
sv.StreamId = ptr.String(jtv)
}
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
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("InvalidParameterException", errorCode):
return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
case strings.EqualFold("ResourceNotFoundException", errorCode):
return awsRestjson1_deserializeErrorResourceNotFoundException(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
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("InvalidParameterException", errorCode):
return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
case strings.EqualFold("ResourceNotFoundException", errorCode):
return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsRestjson1_deserializeOpUpdateLedger struct {
}
func (*awsRestjson1_deserializeOpUpdateLedger) ID() string {
return "OperationDeserializer"
}
func (m *awsRestjson1_deserializeOpUpdateLedger) 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_deserializeOpErrorUpdateLedger(response, &metadata)
}
output := &UpdateLedgerOutput{}
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_deserializeOpDocumentUpdateLedgerOutput(&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_deserializeOpErrorUpdateLedger(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("InvalidParameterException", errorCode):
return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
case strings.EqualFold("ResourceNotFoundException", errorCode):
return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
func awsRestjson1_deserializeOpDocumentUpdateLedgerOutput(v **UpdateLedgerOutput, 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 *UpdateLedgerOutput
if *v == nil {
sv = &UpdateLedgerOutput{}
} 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 Arn to be of type string, got %T instead", value)
}
sv.Arn = ptr.String(jtv)
}
case "CreationDateTime":
if value != nil {
switch jtv := value.(type) {
case json.Number:
f64, err := jtv.Float64()
if err != nil {
return err
}
sv.CreationDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
default:
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
}
}
case "DeletionProtection":
if value != nil {
jtv, ok := value.(bool)
if !ok {
return fmt.Errorf("expected DeletionProtection to be of type *bool, got %T instead", value)
}
sv.DeletionProtection = ptr.Bool(jtv)
}
case "EncryptionDescription":
if err := awsRestjson1_deserializeDocumentLedgerEncryptionDescription(&sv.EncryptionDescription, value); err != nil {
return err
}
case "Name":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected LedgerName to be of type string, got %T instead", value)
}
sv.Name = ptr.String(jtv)
}
case "State":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected LedgerState to be of type string, got %T instead", value)
}
sv.State = types.LedgerState(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
type awsRestjson1_deserializeOpUpdateLedgerPermissionsMode struct {
}
func (*awsRestjson1_deserializeOpUpdateLedgerPermissionsMode) ID() string {
return "OperationDeserializer"
}
func (m *awsRestjson1_deserializeOpUpdateLedgerPermissionsMode) 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_deserializeOpErrorUpdateLedgerPermissionsMode(response, &metadata)
}
output := &UpdateLedgerPermissionsModeOutput{}
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_deserializeOpDocumentUpdateLedgerPermissionsModeOutput(&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_deserializeOpErrorUpdateLedgerPermissionsMode(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("InvalidParameterException", errorCode):
return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
case strings.EqualFold("ResourceNotFoundException", errorCode):
return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
func awsRestjson1_deserializeOpDocumentUpdateLedgerPermissionsModeOutput(v **UpdateLedgerPermissionsModeOutput, 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 *UpdateLedgerPermissionsModeOutput
if *v == nil {
sv = &UpdateLedgerPermissionsModeOutput{}
} 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 Arn to be of type string, got %T instead", value)
}
sv.Arn = ptr.String(jtv)
}
case "Name":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected LedgerName to be of type string, got %T instead", value)
}
sv.Name = ptr.String(jtv)
}
case "PermissionsMode":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected PermissionsMode to be of type string, got %T instead", value)
}
sv.PermissionsMode = types.PermissionsMode(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsRestjson1_deserializeErrorInvalidParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.InvalidParameterException{}
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_deserializeDocumentInvalidParameterException(&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_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.LimitExceededException{}
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_deserializeDocumentLimitExceededException(&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_deserializeErrorResourceAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.ResourceAlreadyExistsException{}
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_deserializeDocumentResourceAlreadyExistsException(&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_deserializeErrorResourceInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.ResourceInUseException{}
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_deserializeDocumentResourceInUseException(&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_deserializeErrorResourcePreconditionNotMetException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.ResourcePreconditionNotMetException{}
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_deserializeDocumentResourcePreconditionNotMetException(&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_deserializeDocumentInvalidParameterException(v **types.InvalidParameterException, 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.InvalidParameterException
if *v == nil {
sv = &types.InvalidParameterException{}
} 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 ErrorMessage to be of type string, got %T instead", value)
}
sv.Message = ptr.String(jtv)
}
case "ParameterName":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected ParameterName to be of type string, got %T instead", value)
}
sv.ParameterName = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsRestjson1_deserializeDocumentJournalKinesisStreamDescription(v **types.JournalKinesisStreamDescription, 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.JournalKinesisStreamDescription
if *v == nil {
sv = &types.JournalKinesisStreamDescription{}
} 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 Arn to be of type string, got %T instead", value)
}
sv.Arn = ptr.String(jtv)
}
case "CreationTime":
if value != nil {
switch jtv := value.(type) {
case json.Number:
f64, err := jtv.Float64()
if err != nil {
return err
}
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
default:
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
}
}
case "ErrorCause":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected ErrorCause to be of type string, got %T instead", value)
}
sv.ErrorCause = types.ErrorCause(jtv)
}
case "ExclusiveEndTime":
if value != nil {
switch jtv := value.(type) {
case json.Number:
f64, err := jtv.Float64()
if err != nil {
return err
}
sv.ExclusiveEndTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
default:
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
}
}
case "InclusiveStartTime":
if value != nil {
switch jtv := value.(type) {
case json.Number:
f64, err := jtv.Float64()
if err != nil {
return err
}
sv.InclusiveStartTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
default:
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
}
}
case "KinesisConfiguration":
if err := awsRestjson1_deserializeDocumentKinesisConfiguration(&sv.KinesisConfiguration, value); err != nil {
return err
}
case "LedgerName":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected LedgerName to be of type string, got %T instead", value)
}
sv.LedgerName = ptr.String(jtv)
}
case "RoleArn":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
}
sv.RoleArn = ptr.String(jtv)
}
case "Status":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected StreamStatus to be of type string, got %T instead", value)
}
sv.Status = types.StreamStatus(jtv)
}
case "StreamId":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected UniqueId to be of type string, got %T instead", value)
}
sv.StreamId = ptr.String(jtv)
}
case "StreamName":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected StreamName to be of type string, got %T instead", value)
}
sv.StreamName = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsRestjson1_deserializeDocumentJournalKinesisStreamDescriptionList(v *[]types.JournalKinesisStreamDescription, 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.JournalKinesisStreamDescription
if *v == nil {
cv = []types.JournalKinesisStreamDescription{}
} else {
cv = *v
}
for _, value := range shape {
var col types.JournalKinesisStreamDescription
destAddr := &col
if err := awsRestjson1_deserializeDocumentJournalKinesisStreamDescription(&destAddr, value); err != nil {
return err
}
col = *destAddr
cv = append(cv, col)
}
*v = cv
return nil
}
func awsRestjson1_deserializeDocumentJournalS3ExportDescription(v **types.JournalS3ExportDescription, 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.JournalS3ExportDescription
if *v == nil {
sv = &types.JournalS3ExportDescription{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "ExclusiveEndTime":
if value != nil {
switch jtv := value.(type) {
case json.Number:
f64, err := jtv.Float64()
if err != nil {
return err
}
sv.ExclusiveEndTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
default:
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
}
}
case "ExportCreationTime":
if value != nil {
switch jtv := value.(type) {
case json.Number:
f64, err := jtv.Float64()
if err != nil {
return err
}
sv.ExportCreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
default:
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
}
}
case "ExportId":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected UniqueId to be of type string, got %T instead", value)
}
sv.ExportId = ptr.String(jtv)
}
case "InclusiveStartTime":
if value != nil {
switch jtv := value.(type) {
case json.Number:
f64, err := jtv.Float64()
if err != nil {
return err
}
sv.InclusiveStartTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
default:
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
}
}
case "LedgerName":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected LedgerName to be of type string, got %T instead", value)
}
sv.LedgerName = ptr.String(jtv)
}
case "OutputFormat":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected OutputFormat to be of type string, got %T instead", value)
}
sv.OutputFormat = types.OutputFormat(jtv)
}
case "RoleArn":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
}
sv.RoleArn = ptr.String(jtv)
}
case "S3ExportConfiguration":
if err := awsRestjson1_deserializeDocumentS3ExportConfiguration(&sv.S3ExportConfiguration, value); err != nil {
return err
}
case "Status":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected ExportStatus to be of type string, got %T instead", value)
}
sv.Status = types.ExportStatus(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsRestjson1_deserializeDocumentJournalS3ExportList(v *[]types.JournalS3ExportDescription, 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.JournalS3ExportDescription
if *v == nil {
cv = []types.JournalS3ExportDescription{}
} else {
cv = *v
}
for _, value := range shape {
var col types.JournalS3ExportDescription
destAddr := &col
if err := awsRestjson1_deserializeDocumentJournalS3ExportDescription(&destAddr, value); err != nil {
return err
}
col = *destAddr
cv = append(cv, col)
}
*v = cv
return nil
}
func awsRestjson1_deserializeDocumentKinesisConfiguration(v **types.KinesisConfiguration, 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.KinesisConfiguration
if *v == nil {
sv = &types.KinesisConfiguration{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "AggregationEnabled":
if value != nil {
jtv, ok := value.(bool)
if !ok {
return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
}
sv.AggregationEnabled = ptr.Bool(jtv)
}
case "StreamArn":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
}
sv.StreamArn = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsRestjson1_deserializeDocumentLedgerEncryptionDescription(v **types.LedgerEncryptionDescription, 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.LedgerEncryptionDescription
if *v == nil {
sv = &types.LedgerEncryptionDescription{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "EncryptionStatus":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected EncryptionStatus to be of type string, got %T instead", value)
}
sv.EncryptionStatus = types.EncryptionStatus(jtv)
}
case "InaccessibleKmsKeyDateTime":
if value != nil {
switch jtv := value.(type) {
case json.Number:
f64, err := jtv.Float64()
if err != nil {
return err
}
sv.InaccessibleKmsKeyDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
default:
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
}
}
case "KmsKeyArn":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
}
sv.KmsKeyArn = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsRestjson1_deserializeDocumentLedgerList(v *[]types.LedgerSummary, 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.LedgerSummary
if *v == nil {
cv = []types.LedgerSummary{}
} else {
cv = *v
}
for _, value := range shape {
var col types.LedgerSummary
destAddr := &col
if err := awsRestjson1_deserializeDocumentLedgerSummary(&destAddr, value); err != nil {
return err
}
col = *destAddr
cv = append(cv, col)
}
*v = cv
return nil
}
func awsRestjson1_deserializeDocumentLedgerSummary(v **types.LedgerSummary, 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.LedgerSummary
if *v == nil {
sv = &types.LedgerSummary{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "CreationDateTime":
if value != nil {
switch jtv := value.(type) {
case json.Number:
f64, err := jtv.Float64()
if err != nil {
return err
}
sv.CreationDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
default:
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
}
}
case "Name":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected LedgerName to be of type string, got %T instead", value)
}
sv.Name = ptr.String(jtv)
}
case "State":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected LedgerState to be of type string, got %T instead", value)
}
sv.State = types.LedgerState(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsRestjson1_deserializeDocumentLimitExceededException(v **types.LimitExceededException, 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.LimitExceededException
if *v == nil {
sv = &types.LimitExceededException{}
} 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 ErrorMessage to be of type string, got %T instead", value)
}
sv.Message = ptr.String(jtv)
}
case "ResourceType":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value)
}
sv.ResourceType = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsRestjson1_deserializeDocumentResourceAlreadyExistsException(v **types.ResourceAlreadyExistsException, 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.ResourceAlreadyExistsException
if *v == nil {
sv = &types.ResourceAlreadyExistsException{}
} 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 ErrorMessage to be of type string, got %T instead", value)
}
sv.Message = ptr.String(jtv)
}
case "ResourceName":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value)
}
sv.ResourceName = ptr.String(jtv)
}
case "ResourceType":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value)
}
sv.ResourceType = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsRestjson1_deserializeDocumentResourceInUseException(v **types.ResourceInUseException, 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.ResourceInUseException
if *v == nil {
sv = &types.ResourceInUseException{}
} 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 ErrorMessage to be of type string, got %T instead", value)
}
sv.Message = ptr.String(jtv)
}
case "ResourceName":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value)
}
sv.ResourceName = ptr.String(jtv)
}
case "ResourceType":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value)
}
sv.ResourceType = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
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 ErrorMessage to be of type string, got %T instead", value)
}
sv.Message = ptr.String(jtv)
}
case "ResourceName":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value)
}
sv.ResourceName = ptr.String(jtv)
}
case "ResourceType":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value)
}
sv.ResourceType = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsRestjson1_deserializeDocumentResourcePreconditionNotMetException(v **types.ResourcePreconditionNotMetException, 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.ResourcePreconditionNotMetException
if *v == nil {
sv = &types.ResourcePreconditionNotMetException{}
} 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 ErrorMessage to be of type string, got %T instead", value)
}
sv.Message = ptr.String(jtv)
}
case "ResourceName":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value)
}
sv.ResourceName = ptr.String(jtv)
}
case "ResourceType":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value)
}
sv.ResourceType = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsRestjson1_deserializeDocumentS3EncryptionConfiguration(v **types.S3EncryptionConfiguration, 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.S3EncryptionConfiguration
if *v == nil {
sv = &types.S3EncryptionConfiguration{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "KmsKeyArn":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
}
sv.KmsKeyArn = ptr.String(jtv)
}
case "ObjectEncryptionType":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected S3ObjectEncryptionType to be of type string, got %T instead", value)
}
sv.ObjectEncryptionType = types.S3ObjectEncryptionType(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsRestjson1_deserializeDocumentS3ExportConfiguration(v **types.S3ExportConfiguration, 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.S3ExportConfiguration
if *v == nil {
sv = &types.S3ExportConfiguration{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "Bucket":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected S3Bucket to be of type string, got %T instead", value)
}
sv.Bucket = ptr.String(jtv)
}
case "EncryptionConfiguration":
if err := awsRestjson1_deserializeDocumentS3EncryptionConfiguration(&sv.EncryptionConfiguration, value); err != nil {
return err
}
case "Prefix":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected S3Prefix to be of type string, got %T instead", value)
}
sv.Prefix = ptr.String(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 TagValue to be of type string, got %T instead", value)
}
parsedVal = ptr.String(jtv)
}
mv[key] = parsedVal
}
*v = mv
return nil
}
func awsRestjson1_deserializeDocumentValueHolder(v **types.ValueHolder, 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.ValueHolder
if *v == nil {
sv = &types.ValueHolder{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "IonText":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected IonText to be of type string, got %T instead", value)
}
sv.IonText = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
| 4,402 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
// Package qldb provides the API client, operations, and parameter types for
// Amazon QLDB.
//
// The resource management API for Amazon QLDB
package qldb
| 8 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldb
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/qldb/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 = "qldb"
}
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 qldb
// goModuleVersion is the tagged release for this module
const goModuleVersion = "1.15.13"
| 7 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldb
| 4 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldb
import (
"bytes"
"context"
"fmt"
"github.com/aws/aws-sdk-go-v2/service/qldb/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"
smithytime "github.com/aws/smithy-go/time"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
type awsRestjson1_serializeOpCancelJournalKinesisStream struct {
}
func (*awsRestjson1_serializeOpCancelJournalKinesisStream) ID() string {
return "OperationSerializer"
}
func (m *awsRestjson1_serializeOpCancelJournalKinesisStream) 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.(*CancelJournalKinesisStreamInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/ledgers/{LedgerName}/journal-kinesis-streams/{StreamId}")
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_serializeOpHttpBindingsCancelJournalKinesisStreamInput(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_serializeOpHttpBindingsCancelJournalKinesisStreamInput(v *CancelJournalKinesisStreamInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.LedgerName == nil || len(*v.LedgerName) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member LedgerName must not be empty")}
}
if v.LedgerName != nil {
if err := encoder.SetURI("LedgerName").String(*v.LedgerName); err != nil {
return err
}
}
if v.StreamId == nil || len(*v.StreamId) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member StreamId must not be empty")}
}
if v.StreamId != nil {
if err := encoder.SetURI("StreamId").String(*v.StreamId); err != nil {
return err
}
}
return nil
}
type awsRestjson1_serializeOpCreateLedger struct {
}
func (*awsRestjson1_serializeOpCreateLedger) ID() string {
return "OperationSerializer"
}
func (m *awsRestjson1_serializeOpCreateLedger) 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.(*CreateLedgerInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/ledgers")
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_serializeOpDocumentCreateLedgerInput(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_serializeOpHttpBindingsCreateLedgerInput(v *CreateLedgerInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
return nil
}
func awsRestjson1_serializeOpDocumentCreateLedgerInput(v *CreateLedgerInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.DeletionProtection != nil {
ok := object.Key("DeletionProtection")
ok.Boolean(*v.DeletionProtection)
}
if v.KmsKey != nil {
ok := object.Key("KmsKey")
ok.String(*v.KmsKey)
}
if v.Name != nil {
ok := object.Key("Name")
ok.String(*v.Name)
}
if len(v.PermissionsMode) > 0 {
ok := object.Key("PermissionsMode")
ok.String(string(v.PermissionsMode))
}
if v.Tags != nil {
ok := object.Key("Tags")
if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil {
return err
}
}
return nil
}
type awsRestjson1_serializeOpDeleteLedger struct {
}
func (*awsRestjson1_serializeOpDeleteLedger) ID() string {
return "OperationSerializer"
}
func (m *awsRestjson1_serializeOpDeleteLedger) 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.(*DeleteLedgerInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/ledgers/{Name}")
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_serializeOpHttpBindingsDeleteLedgerInput(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_serializeOpHttpBindingsDeleteLedgerInput(v *DeleteLedgerInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.Name == nil || len(*v.Name) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
}
if v.Name != nil {
if err := encoder.SetURI("Name").String(*v.Name); err != nil {
return err
}
}
return nil
}
type awsRestjson1_serializeOpDescribeJournalKinesisStream struct {
}
func (*awsRestjson1_serializeOpDescribeJournalKinesisStream) ID() string {
return "OperationSerializer"
}
func (m *awsRestjson1_serializeOpDescribeJournalKinesisStream) 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.(*DescribeJournalKinesisStreamInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/ledgers/{LedgerName}/journal-kinesis-streams/{StreamId}")
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_serializeOpHttpBindingsDescribeJournalKinesisStreamInput(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_serializeOpHttpBindingsDescribeJournalKinesisStreamInput(v *DescribeJournalKinesisStreamInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.LedgerName == nil || len(*v.LedgerName) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member LedgerName must not be empty")}
}
if v.LedgerName != nil {
if err := encoder.SetURI("LedgerName").String(*v.LedgerName); err != nil {
return err
}
}
if v.StreamId == nil || len(*v.StreamId) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member StreamId must not be empty")}
}
if v.StreamId != nil {
if err := encoder.SetURI("StreamId").String(*v.StreamId); err != nil {
return err
}
}
return nil
}
type awsRestjson1_serializeOpDescribeJournalS3Export struct {
}
func (*awsRestjson1_serializeOpDescribeJournalS3Export) ID() string {
return "OperationSerializer"
}
func (m *awsRestjson1_serializeOpDescribeJournalS3Export) 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.(*DescribeJournalS3ExportInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/ledgers/{Name}/journal-s3-exports/{ExportId}")
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_serializeOpHttpBindingsDescribeJournalS3ExportInput(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_serializeOpHttpBindingsDescribeJournalS3ExportInput(v *DescribeJournalS3ExportInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.ExportId == nil || len(*v.ExportId) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member ExportId must not be empty")}
}
if v.ExportId != nil {
if err := encoder.SetURI("ExportId").String(*v.ExportId); err != nil {
return err
}
}
if v.Name == nil || len(*v.Name) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
}
if v.Name != nil {
if err := encoder.SetURI("Name").String(*v.Name); err != nil {
return err
}
}
return nil
}
type awsRestjson1_serializeOpDescribeLedger struct {
}
func (*awsRestjson1_serializeOpDescribeLedger) ID() string {
return "OperationSerializer"
}
func (m *awsRestjson1_serializeOpDescribeLedger) 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.(*DescribeLedgerInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/ledgers/{Name}")
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_serializeOpHttpBindingsDescribeLedgerInput(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_serializeOpHttpBindingsDescribeLedgerInput(v *DescribeLedgerInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.Name == nil || len(*v.Name) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
}
if v.Name != nil {
if err := encoder.SetURI("Name").String(*v.Name); err != nil {
return err
}
}
return nil
}
type awsRestjson1_serializeOpExportJournalToS3 struct {
}
func (*awsRestjson1_serializeOpExportJournalToS3) ID() string {
return "OperationSerializer"
}
func (m *awsRestjson1_serializeOpExportJournalToS3) 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.(*ExportJournalToS3Input)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/ledgers/{Name}/journal-s3-exports")
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_serializeOpHttpBindingsExportJournalToS3Input(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
restEncoder.SetHeader("Content-Type").String("application/json")
jsonEncoder := smithyjson.NewEncoder()
if err := awsRestjson1_serializeOpDocumentExportJournalToS3Input(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_serializeOpHttpBindingsExportJournalToS3Input(v *ExportJournalToS3Input, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.Name == nil || len(*v.Name) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
}
if v.Name != nil {
if err := encoder.SetURI("Name").String(*v.Name); err != nil {
return err
}
}
return nil
}
func awsRestjson1_serializeOpDocumentExportJournalToS3Input(v *ExportJournalToS3Input, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.ExclusiveEndTime != nil {
ok := object.Key("ExclusiveEndTime")
ok.Double(smithytime.FormatEpochSeconds(*v.ExclusiveEndTime))
}
if v.InclusiveStartTime != nil {
ok := object.Key("InclusiveStartTime")
ok.Double(smithytime.FormatEpochSeconds(*v.InclusiveStartTime))
}
if len(v.OutputFormat) > 0 {
ok := object.Key("OutputFormat")
ok.String(string(v.OutputFormat))
}
if v.RoleArn != nil {
ok := object.Key("RoleArn")
ok.String(*v.RoleArn)
}
if v.S3ExportConfiguration != nil {
ok := object.Key("S3ExportConfiguration")
if err := awsRestjson1_serializeDocumentS3ExportConfiguration(v.S3ExportConfiguration, ok); err != nil {
return err
}
}
return nil
}
type awsRestjson1_serializeOpGetBlock struct {
}
func (*awsRestjson1_serializeOpGetBlock) ID() string {
return "OperationSerializer"
}
func (m *awsRestjson1_serializeOpGetBlock) 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.(*GetBlockInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/ledgers/{Name}/block")
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_serializeOpHttpBindingsGetBlockInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
restEncoder.SetHeader("Content-Type").String("application/json")
jsonEncoder := smithyjson.NewEncoder()
if err := awsRestjson1_serializeOpDocumentGetBlockInput(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_serializeOpHttpBindingsGetBlockInput(v *GetBlockInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.Name == nil || len(*v.Name) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
}
if v.Name != nil {
if err := encoder.SetURI("Name").String(*v.Name); err != nil {
return err
}
}
return nil
}
func awsRestjson1_serializeOpDocumentGetBlockInput(v *GetBlockInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.BlockAddress != nil {
ok := object.Key("BlockAddress")
if err := awsRestjson1_serializeDocumentValueHolder(v.BlockAddress, ok); err != nil {
return err
}
}
if v.DigestTipAddress != nil {
ok := object.Key("DigestTipAddress")
if err := awsRestjson1_serializeDocumentValueHolder(v.DigestTipAddress, ok); err != nil {
return err
}
}
return nil
}
type awsRestjson1_serializeOpGetDigest struct {
}
func (*awsRestjson1_serializeOpGetDigest) ID() string {
return "OperationSerializer"
}
func (m *awsRestjson1_serializeOpGetDigest) 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.(*GetDigestInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/ledgers/{Name}/digest")
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_serializeOpHttpBindingsGetDigestInput(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_serializeOpHttpBindingsGetDigestInput(v *GetDigestInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.Name == nil || len(*v.Name) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
}
if v.Name != nil {
if err := encoder.SetURI("Name").String(*v.Name); err != nil {
return err
}
}
return nil
}
type awsRestjson1_serializeOpGetRevision struct {
}
func (*awsRestjson1_serializeOpGetRevision) ID() string {
return "OperationSerializer"
}
func (m *awsRestjson1_serializeOpGetRevision) 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.(*GetRevisionInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/ledgers/{Name}/revision")
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_serializeOpHttpBindingsGetRevisionInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
restEncoder.SetHeader("Content-Type").String("application/json")
jsonEncoder := smithyjson.NewEncoder()
if err := awsRestjson1_serializeOpDocumentGetRevisionInput(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_serializeOpHttpBindingsGetRevisionInput(v *GetRevisionInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.Name == nil || len(*v.Name) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
}
if v.Name != nil {
if err := encoder.SetURI("Name").String(*v.Name); err != nil {
return err
}
}
return nil
}
func awsRestjson1_serializeOpDocumentGetRevisionInput(v *GetRevisionInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.BlockAddress != nil {
ok := object.Key("BlockAddress")
if err := awsRestjson1_serializeDocumentValueHolder(v.BlockAddress, ok); err != nil {
return err
}
}
if v.DigestTipAddress != nil {
ok := object.Key("DigestTipAddress")
if err := awsRestjson1_serializeDocumentValueHolder(v.DigestTipAddress, ok); err != nil {
return err
}
}
if v.DocumentId != nil {
ok := object.Key("DocumentId")
ok.String(*v.DocumentId)
}
return nil
}
type awsRestjson1_serializeOpListJournalKinesisStreamsForLedger struct {
}
func (*awsRestjson1_serializeOpListJournalKinesisStreamsForLedger) ID() string {
return "OperationSerializer"
}
func (m *awsRestjson1_serializeOpListJournalKinesisStreamsForLedger) 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.(*ListJournalKinesisStreamsForLedgerInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/ledgers/{LedgerName}/journal-kinesis-streams")
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_serializeOpHttpBindingsListJournalKinesisStreamsForLedgerInput(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_serializeOpHttpBindingsListJournalKinesisStreamsForLedgerInput(v *ListJournalKinesisStreamsForLedgerInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.LedgerName == nil || len(*v.LedgerName) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member LedgerName must not be empty")}
}
if v.LedgerName != nil {
if err := encoder.SetURI("LedgerName").String(*v.LedgerName); err != nil {
return err
}
}
if v.MaxResults != nil {
encoder.SetQuery("max_results").Integer(*v.MaxResults)
}
if v.NextToken != nil {
encoder.SetQuery("next_token").String(*v.NextToken)
}
return nil
}
type awsRestjson1_serializeOpListJournalS3Exports struct {
}
func (*awsRestjson1_serializeOpListJournalS3Exports) ID() string {
return "OperationSerializer"
}
func (m *awsRestjson1_serializeOpListJournalS3Exports) 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.(*ListJournalS3ExportsInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/journal-s3-exports")
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_serializeOpHttpBindingsListJournalS3ExportsInput(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_serializeOpHttpBindingsListJournalS3ExportsInput(v *ListJournalS3ExportsInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.MaxResults != nil {
encoder.SetQuery("max_results").Integer(*v.MaxResults)
}
if v.NextToken != nil {
encoder.SetQuery("next_token").String(*v.NextToken)
}
return nil
}
type awsRestjson1_serializeOpListJournalS3ExportsForLedger struct {
}
func (*awsRestjson1_serializeOpListJournalS3ExportsForLedger) ID() string {
return "OperationSerializer"
}
func (m *awsRestjson1_serializeOpListJournalS3ExportsForLedger) 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.(*ListJournalS3ExportsForLedgerInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/ledgers/{Name}/journal-s3-exports")
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_serializeOpHttpBindingsListJournalS3ExportsForLedgerInput(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_serializeOpHttpBindingsListJournalS3ExportsForLedgerInput(v *ListJournalS3ExportsForLedgerInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.MaxResults != nil {
encoder.SetQuery("max_results").Integer(*v.MaxResults)
}
if v.Name == nil || len(*v.Name) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
}
if v.Name != nil {
if err := encoder.SetURI("Name").String(*v.Name); err != nil {
return err
}
}
if v.NextToken != nil {
encoder.SetQuery("next_token").String(*v.NextToken)
}
return nil
}
type awsRestjson1_serializeOpListLedgers struct {
}
func (*awsRestjson1_serializeOpListLedgers) ID() string {
return "OperationSerializer"
}
func (m *awsRestjson1_serializeOpListLedgers) 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.(*ListLedgersInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/ledgers")
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_serializeOpHttpBindingsListLedgersInput(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_serializeOpHttpBindingsListLedgersInput(v *ListLedgersInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.MaxResults != nil {
encoder.SetQuery("max_results").Integer(*v.MaxResults)
}
if v.NextToken != nil {
encoder.SetQuery("next_token").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_serializeOpStreamJournalToKinesis struct {
}
func (*awsRestjson1_serializeOpStreamJournalToKinesis) ID() string {
return "OperationSerializer"
}
func (m *awsRestjson1_serializeOpStreamJournalToKinesis) 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.(*StreamJournalToKinesisInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/ledgers/{LedgerName}/journal-kinesis-streams")
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_serializeOpHttpBindingsStreamJournalToKinesisInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
restEncoder.SetHeader("Content-Type").String("application/json")
jsonEncoder := smithyjson.NewEncoder()
if err := awsRestjson1_serializeOpDocumentStreamJournalToKinesisInput(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_serializeOpHttpBindingsStreamJournalToKinesisInput(v *StreamJournalToKinesisInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.LedgerName == nil || len(*v.LedgerName) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member LedgerName must not be empty")}
}
if v.LedgerName != nil {
if err := encoder.SetURI("LedgerName").String(*v.LedgerName); err != nil {
return err
}
}
return nil
}
func awsRestjson1_serializeOpDocumentStreamJournalToKinesisInput(v *StreamJournalToKinesisInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.ExclusiveEndTime != nil {
ok := object.Key("ExclusiveEndTime")
ok.Double(smithytime.FormatEpochSeconds(*v.ExclusiveEndTime))
}
if v.InclusiveStartTime != nil {
ok := object.Key("InclusiveStartTime")
ok.Double(smithytime.FormatEpochSeconds(*v.InclusiveStartTime))
}
if v.KinesisConfiguration != nil {
ok := object.Key("KinesisConfiguration")
if err := awsRestjson1_serializeDocumentKinesisConfiguration(v.KinesisConfiguration, ok); err != nil {
return err
}
}
if v.RoleArn != nil {
ok := object.Key("RoleArn")
ok.String(*v.RoleArn)
}
if v.StreamName != nil {
ok := object.Key("StreamName")
ok.String(*v.StreamName)
}
if v.Tags != nil {
ok := object.Key("Tags")
if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); 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_serializeDocumentTags(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_serializeOpUpdateLedger struct {
}
func (*awsRestjson1_serializeOpUpdateLedger) ID() string {
return "OperationSerializer"
}
func (m *awsRestjson1_serializeOpUpdateLedger) 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.(*UpdateLedgerInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/ledgers/{Name}")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PATCH"
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_serializeOpHttpBindingsUpdateLedgerInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
restEncoder.SetHeader("Content-Type").String("application/json")
jsonEncoder := smithyjson.NewEncoder()
if err := awsRestjson1_serializeOpDocumentUpdateLedgerInput(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_serializeOpHttpBindingsUpdateLedgerInput(v *UpdateLedgerInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.Name == nil || len(*v.Name) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
}
if v.Name != nil {
if err := encoder.SetURI("Name").String(*v.Name); err != nil {
return err
}
}
return nil
}
func awsRestjson1_serializeOpDocumentUpdateLedgerInput(v *UpdateLedgerInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.DeletionProtection != nil {
ok := object.Key("DeletionProtection")
ok.Boolean(*v.DeletionProtection)
}
if v.KmsKey != nil {
ok := object.Key("KmsKey")
ok.String(*v.KmsKey)
}
return nil
}
type awsRestjson1_serializeOpUpdateLedgerPermissionsMode struct {
}
func (*awsRestjson1_serializeOpUpdateLedgerPermissionsMode) ID() string {
return "OperationSerializer"
}
func (m *awsRestjson1_serializeOpUpdateLedgerPermissionsMode) 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.(*UpdateLedgerPermissionsModeInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/ledgers/{Name}/permissions-mode")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "PATCH"
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_serializeOpHttpBindingsUpdateLedgerPermissionsModeInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
restEncoder.SetHeader("Content-Type").String("application/json")
jsonEncoder := smithyjson.NewEncoder()
if err := awsRestjson1_serializeOpDocumentUpdateLedgerPermissionsModeInput(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_serializeOpHttpBindingsUpdateLedgerPermissionsModeInput(v *UpdateLedgerPermissionsModeInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.Name == nil || len(*v.Name) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
}
if v.Name != nil {
if err := encoder.SetURI("Name").String(*v.Name); err != nil {
return err
}
}
return nil
}
func awsRestjson1_serializeOpDocumentUpdateLedgerPermissionsModeInput(v *UpdateLedgerPermissionsModeInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if len(v.PermissionsMode) > 0 {
ok := object.Key("PermissionsMode")
ok.String(string(v.PermissionsMode))
}
return nil
}
func awsRestjson1_serializeDocumentKinesisConfiguration(v *types.KinesisConfiguration, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.AggregationEnabled != nil {
ok := object.Key("AggregationEnabled")
ok.Boolean(*v.AggregationEnabled)
}
if v.StreamArn != nil {
ok := object.Key("StreamArn")
ok.String(*v.StreamArn)
}
return nil
}
func awsRestjson1_serializeDocumentS3EncryptionConfiguration(v *types.S3EncryptionConfiguration, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.KmsKeyArn != nil {
ok := object.Key("KmsKeyArn")
ok.String(*v.KmsKeyArn)
}
if len(v.ObjectEncryptionType) > 0 {
ok := object.Key("ObjectEncryptionType")
ok.String(string(v.ObjectEncryptionType))
}
return nil
}
func awsRestjson1_serializeDocumentS3ExportConfiguration(v *types.S3ExportConfiguration, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Bucket != nil {
ok := object.Key("Bucket")
ok.String(*v.Bucket)
}
if v.EncryptionConfiguration != nil {
ok := object.Key("EncryptionConfiguration")
if err := awsRestjson1_serializeDocumentS3EncryptionConfiguration(v.EncryptionConfiguration, ok); err != nil {
return err
}
}
if v.Prefix != nil {
ok := object.Key("Prefix")
ok.String(*v.Prefix)
}
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)
if vv := v[key]; vv == nil {
om.Null()
continue
}
om.String(*v[key])
}
return nil
}
func awsRestjson1_serializeDocumentValueHolder(v *types.ValueHolder, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.IonText != nil {
ok := object.Key("IonText")
ok.String(*v.IonText)
}
return nil
}
| 1,583 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldb
import (
"context"
"fmt"
"github.com/aws/aws-sdk-go-v2/service/qldb/types"
smithy "github.com/aws/smithy-go"
"github.com/aws/smithy-go/middleware"
)
type validateOpCancelJournalKinesisStream struct {
}
func (*validateOpCancelJournalKinesisStream) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCancelJournalKinesisStream) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CancelJournalKinesisStreamInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCancelJournalKinesisStreamInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateLedger struct {
}
func (*validateOpCreateLedger) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateLedger) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateLedgerInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateLedgerInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteLedger struct {
}
func (*validateOpDeleteLedger) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteLedger) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteLedgerInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteLedgerInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeJournalKinesisStream struct {
}
func (*validateOpDescribeJournalKinesisStream) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeJournalKinesisStream) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeJournalKinesisStreamInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeJournalKinesisStreamInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeJournalS3Export struct {
}
func (*validateOpDescribeJournalS3Export) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeJournalS3Export) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeJournalS3ExportInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeJournalS3ExportInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeLedger struct {
}
func (*validateOpDescribeLedger) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeLedger) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeLedgerInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeLedgerInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpExportJournalToS3 struct {
}
func (*validateOpExportJournalToS3) ID() string {
return "OperationInputValidation"
}
func (m *validateOpExportJournalToS3) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ExportJournalToS3Input)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpExportJournalToS3Input(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetBlock struct {
}
func (*validateOpGetBlock) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetBlock) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetBlockInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetBlockInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetDigest struct {
}
func (*validateOpGetDigest) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetDigest) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetDigestInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetDigestInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetRevision struct {
}
func (*validateOpGetRevision) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetRevision) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetRevisionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetRevisionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListJournalKinesisStreamsForLedger struct {
}
func (*validateOpListJournalKinesisStreamsForLedger) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListJournalKinesisStreamsForLedger) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListJournalKinesisStreamsForLedgerInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListJournalKinesisStreamsForLedgerInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListJournalS3ExportsForLedger struct {
}
func (*validateOpListJournalS3ExportsForLedger) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListJournalS3ExportsForLedger) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListJournalS3ExportsForLedgerInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListJournalS3ExportsForLedgerInput(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 validateOpStreamJournalToKinesis struct {
}
func (*validateOpStreamJournalToKinesis) ID() string {
return "OperationInputValidation"
}
func (m *validateOpStreamJournalToKinesis) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*StreamJournalToKinesisInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpStreamJournalToKinesisInput(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 validateOpUpdateLedger struct {
}
func (*validateOpUpdateLedger) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateLedger) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateLedgerInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateLedgerInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateLedgerPermissionsMode struct {
}
func (*validateOpUpdateLedgerPermissionsMode) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateLedgerPermissionsMode) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateLedgerPermissionsModeInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateLedgerPermissionsModeInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
func addOpCancelJournalKinesisStreamValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCancelJournalKinesisStream{}, middleware.After)
}
func addOpCreateLedgerValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateLedger{}, middleware.After)
}
func addOpDeleteLedgerValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteLedger{}, middleware.After)
}
func addOpDescribeJournalKinesisStreamValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeJournalKinesisStream{}, middleware.After)
}
func addOpDescribeJournalS3ExportValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeJournalS3Export{}, middleware.After)
}
func addOpDescribeLedgerValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeLedger{}, middleware.After)
}
func addOpExportJournalToS3ValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpExportJournalToS3{}, middleware.After)
}
func addOpGetBlockValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetBlock{}, middleware.After)
}
func addOpGetDigestValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetDigest{}, middleware.After)
}
func addOpGetRevisionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetRevision{}, middleware.After)
}
func addOpListJournalKinesisStreamsForLedgerValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListJournalKinesisStreamsForLedger{}, middleware.After)
}
func addOpListJournalS3ExportsForLedgerValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListJournalS3ExportsForLedger{}, middleware.After)
}
func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After)
}
func addOpStreamJournalToKinesisValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpStreamJournalToKinesis{}, 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 addOpUpdateLedgerValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateLedger{}, middleware.After)
}
func addOpUpdateLedgerPermissionsModeValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateLedgerPermissionsMode{}, middleware.After)
}
func validateKinesisConfiguration(v *types.KinesisConfiguration) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "KinesisConfiguration"}
if v.StreamArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("StreamArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateS3EncryptionConfiguration(v *types.S3EncryptionConfiguration) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "S3EncryptionConfiguration"}
if len(v.ObjectEncryptionType) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("ObjectEncryptionType"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateS3ExportConfiguration(v *types.S3ExportConfiguration) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "S3ExportConfiguration"}
if v.Bucket == nil {
invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
}
if v.Prefix == nil {
invalidParams.Add(smithy.NewErrParamRequired("Prefix"))
}
if v.EncryptionConfiguration == nil {
invalidParams.Add(smithy.NewErrParamRequired("EncryptionConfiguration"))
} else if v.EncryptionConfiguration != nil {
if err := validateS3EncryptionConfiguration(v.EncryptionConfiguration); err != nil {
invalidParams.AddNested("EncryptionConfiguration", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCancelJournalKinesisStreamInput(v *CancelJournalKinesisStreamInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CancelJournalKinesisStreamInput"}
if v.LedgerName == nil {
invalidParams.Add(smithy.NewErrParamRequired("LedgerName"))
}
if v.StreamId == nil {
invalidParams.Add(smithy.NewErrParamRequired("StreamId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateLedgerInput(v *CreateLedgerInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateLedgerInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if len(v.PermissionsMode) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("PermissionsMode"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteLedgerInput(v *DeleteLedgerInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteLedgerInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeJournalKinesisStreamInput(v *DescribeJournalKinesisStreamInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeJournalKinesisStreamInput"}
if v.LedgerName == nil {
invalidParams.Add(smithy.NewErrParamRequired("LedgerName"))
}
if v.StreamId == nil {
invalidParams.Add(smithy.NewErrParamRequired("StreamId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeJournalS3ExportInput(v *DescribeJournalS3ExportInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeJournalS3ExportInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if v.ExportId == nil {
invalidParams.Add(smithy.NewErrParamRequired("ExportId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeLedgerInput(v *DescribeLedgerInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeLedgerInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpExportJournalToS3Input(v *ExportJournalToS3Input) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ExportJournalToS3Input"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if v.InclusiveStartTime == nil {
invalidParams.Add(smithy.NewErrParamRequired("InclusiveStartTime"))
}
if v.ExclusiveEndTime == nil {
invalidParams.Add(smithy.NewErrParamRequired("ExclusiveEndTime"))
}
if v.S3ExportConfiguration == nil {
invalidParams.Add(smithy.NewErrParamRequired("S3ExportConfiguration"))
} else if v.S3ExportConfiguration != nil {
if err := validateS3ExportConfiguration(v.S3ExportConfiguration); err != nil {
invalidParams.AddNested("S3ExportConfiguration", err.(smithy.InvalidParamsError))
}
}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetBlockInput(v *GetBlockInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetBlockInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if v.BlockAddress == nil {
invalidParams.Add(smithy.NewErrParamRequired("BlockAddress"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetDigestInput(v *GetDigestInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetDigestInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetRevisionInput(v *GetRevisionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetRevisionInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if v.BlockAddress == nil {
invalidParams.Add(smithy.NewErrParamRequired("BlockAddress"))
}
if v.DocumentId == nil {
invalidParams.Add(smithy.NewErrParamRequired("DocumentId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListJournalKinesisStreamsForLedgerInput(v *ListJournalKinesisStreamsForLedgerInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListJournalKinesisStreamsForLedgerInput"}
if v.LedgerName == nil {
invalidParams.Add(smithy.NewErrParamRequired("LedgerName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListJournalS3ExportsForLedgerInput(v *ListJournalS3ExportsForLedgerInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListJournalS3ExportsForLedgerInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
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 validateOpStreamJournalToKinesisInput(v *StreamJournalToKinesisInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "StreamJournalToKinesisInput"}
if v.LedgerName == nil {
invalidParams.Add(smithy.NewErrParamRequired("LedgerName"))
}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if v.InclusiveStartTime == nil {
invalidParams.Add(smithy.NewErrParamRequired("InclusiveStartTime"))
}
if v.KinesisConfiguration == nil {
invalidParams.Add(smithy.NewErrParamRequired("KinesisConfiguration"))
} else if v.KinesisConfiguration != nil {
if err := validateKinesisConfiguration(v.KinesisConfiguration); err != nil {
invalidParams.AddNested("KinesisConfiguration", err.(smithy.InvalidParamsError))
}
}
if v.StreamName == nil {
invalidParams.Add(smithy.NewErrParamRequired("StreamName"))
}
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 validateOpUpdateLedgerInput(v *UpdateLedgerInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateLedgerInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateLedgerPermissionsModeInput(v *UpdateLedgerPermissionsModeInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateLedgerPermissionsModeInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if len(v.PermissionsMode) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("PermissionsMode"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
| 831 |
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 QLDB 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: "qldb.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "qldb-fips.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "qldb-fips.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "qldb.{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-southeast-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ap-southeast-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ca-central-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ca-central-1",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "qldb-fips.ca-central-1.amazonaws.com",
},
endpoints.EndpointKey{
Region: "eu-central-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-west-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-west-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "fips-ca-central-1",
}: endpoints.Endpoint{
Hostname: "qldb-fips.ca-central-1.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "ca-central-1",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "fips-us-east-1",
}: endpoints.Endpoint{
Hostname: "qldb-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: "qldb-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: "qldb-fips.us-west-2.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-west-2",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "us-east-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-east-1",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "qldb-fips.us-east-1.amazonaws.com",
},
endpoints.EndpointKey{
Region: "us-east-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-east-2",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "qldb-fips.us-east-2.amazonaws.com",
},
endpoints.EndpointKey{
Region: "us-west-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-west-2",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "qldb-fips.us-west-2.amazonaws.com",
},
},
},
{
ID: "aws-cn",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.DualStackVariant,
}: {
Hostname: "qldb.{region}.api.amazonwebservices.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "qldb-fips.{region}.amazonaws.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "qldb-fips.{region}.api.amazonwebservices.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "qldb.{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: "qldb-fips.{region}.c2s.ic.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "qldb.{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: "qldb-fips.{region}.sc2s.sgov.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "qldb.{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: "qldb-fips.{region}.cloud.adc-e.uk",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "qldb.{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: "qldb-fips.{region}.csp.hci.ic.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "qldb.{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: "qldb.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "qldb-fips.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "qldb-fips.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "qldb.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.AwsUsGov,
IsRegionalized: true,
},
}
| 392 |
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 EncryptionStatus string
// Enum values for EncryptionStatus
const (
EncryptionStatusEnabled EncryptionStatus = "ENABLED"
EncryptionStatusUpdating EncryptionStatus = "UPDATING"
EncryptionStatusKmsKeyInaccessible EncryptionStatus = "KMS_KEY_INACCESSIBLE"
)
// Values returns all known values for EncryptionStatus. Note that this can be
// expanded in the future, and so it is only as up to date as the client. The
// ordering of this slice is not guaranteed to be stable across updates.
func (EncryptionStatus) Values() []EncryptionStatus {
return []EncryptionStatus{
"ENABLED",
"UPDATING",
"KMS_KEY_INACCESSIBLE",
}
}
type ErrorCause string
// Enum values for ErrorCause
const (
ErrorCauseKinesisStreamNotFound ErrorCause = "KINESIS_STREAM_NOT_FOUND"
ErrorCauseIamPermissionRevoked ErrorCause = "IAM_PERMISSION_REVOKED"
)
// Values returns all known values for ErrorCause. Note that this can be expanded
// in the future, and so it is only as up to date as the client. The ordering of
// this slice is not guaranteed to be stable across updates.
func (ErrorCause) Values() []ErrorCause {
return []ErrorCause{
"KINESIS_STREAM_NOT_FOUND",
"IAM_PERMISSION_REVOKED",
}
}
type ExportStatus string
// Enum values for ExportStatus
const (
ExportStatusInProgress ExportStatus = "IN_PROGRESS"
ExportStatusCompleted ExportStatus = "COMPLETED"
ExportStatusCancelled ExportStatus = "CANCELLED"
)
// Values returns all known values for ExportStatus. Note that this can be
// expanded in the future, and so it is only as up to date as the client. The
// ordering of this slice is not guaranteed to be stable across updates.
func (ExportStatus) Values() []ExportStatus {
return []ExportStatus{
"IN_PROGRESS",
"COMPLETED",
"CANCELLED",
}
}
type LedgerState string
// Enum values for LedgerState
const (
LedgerStateCreating LedgerState = "CREATING"
LedgerStateActive LedgerState = "ACTIVE"
LedgerStateDeleting LedgerState = "DELETING"
LedgerStateDeleted LedgerState = "DELETED"
)
// Values returns all known values for LedgerState. Note that this can be expanded
// in the future, and so it is only as up to date as the client. The ordering of
// this slice is not guaranteed to be stable across updates.
func (LedgerState) Values() []LedgerState {
return []LedgerState{
"CREATING",
"ACTIVE",
"DELETING",
"DELETED",
}
}
type OutputFormat string
// Enum values for OutputFormat
const (
OutputFormatIonBinary OutputFormat = "ION_BINARY"
OutputFormatIonText OutputFormat = "ION_TEXT"
OutputFormatJson OutputFormat = "JSON"
)
// Values returns all known values for OutputFormat. Note that this can be
// expanded in the future, and so it is only as up to date as the client. The
// ordering of this slice is not guaranteed to be stable across updates.
func (OutputFormat) Values() []OutputFormat {
return []OutputFormat{
"ION_BINARY",
"ION_TEXT",
"JSON",
}
}
type PermissionsMode string
// Enum values for PermissionsMode
const (
PermissionsModeAllowAll PermissionsMode = "ALLOW_ALL"
PermissionsModeStandard PermissionsMode = "STANDARD"
)
// Values returns all known values for PermissionsMode. Note that this can be
// expanded in the future, and so it is only as up to date as the client. The
// ordering of this slice is not guaranteed to be stable across updates.
func (PermissionsMode) Values() []PermissionsMode {
return []PermissionsMode{
"ALLOW_ALL",
"STANDARD",
}
}
type S3ObjectEncryptionType string
// Enum values for S3ObjectEncryptionType
const (
S3ObjectEncryptionTypeSseKms S3ObjectEncryptionType = "SSE_KMS"
S3ObjectEncryptionTypeSseS3 S3ObjectEncryptionType = "SSE_S3"
S3ObjectEncryptionTypeNoEncryption S3ObjectEncryptionType = "NO_ENCRYPTION"
)
// Values returns all known values for S3ObjectEncryptionType. Note that this can
// be expanded in the future, and so it is only as up to date as the client. The
// ordering of this slice is not guaranteed to be stable across updates.
func (S3ObjectEncryptionType) Values() []S3ObjectEncryptionType {
return []S3ObjectEncryptionType{
"SSE_KMS",
"SSE_S3",
"NO_ENCRYPTION",
}
}
type StreamStatus string
// Enum values for StreamStatus
const (
StreamStatusActive StreamStatus = "ACTIVE"
StreamStatusCompleted StreamStatus = "COMPLETED"
StreamStatusCanceled StreamStatus = "CANCELED"
StreamStatusFailed StreamStatus = "FAILED"
StreamStatusImpaired StreamStatus = "IMPAIRED"
)
// Values returns all known values for StreamStatus. Note that this can be
// expanded in the future, and so it is only as up to date as the client. The
// ordering of this slice is not guaranteed to be stable across updates.
func (StreamStatus) Values() []StreamStatus {
return []StreamStatus{
"ACTIVE",
"COMPLETED",
"CANCELED",
"FAILED",
"IMPAIRED",
}
}
| 166 |
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"
)
// One or more parameters in the request aren't valid.
type InvalidParameterException struct {
Message *string
ErrorCodeOverride *string
ParameterName *string
noSmithyDocumentSerde
}
func (e *InvalidParameterException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidParameterException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidParameterException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidParameterException"
}
return *e.ErrorCodeOverride
}
func (e *InvalidParameterException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// You have reached the limit on the maximum number of resources allowed.
type LimitExceededException struct {
Message *string
ErrorCodeOverride *string
ResourceType *string
noSmithyDocumentSerde
}
func (e *LimitExceededException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *LimitExceededException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *LimitExceededException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "LimitExceededException"
}
return *e.ErrorCodeOverride
}
func (e *LimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified resource already exists.
type ResourceAlreadyExistsException struct {
Message *string
ErrorCodeOverride *string
ResourceType *string
ResourceName *string
noSmithyDocumentSerde
}
func (e *ResourceAlreadyExistsException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ResourceAlreadyExistsException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ResourceAlreadyExistsException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ResourceAlreadyExistsException"
}
return *e.ErrorCodeOverride
}
func (e *ResourceAlreadyExistsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified resource can't be modified at this time.
type ResourceInUseException struct {
Message *string
ErrorCodeOverride *string
ResourceType *string
ResourceName *string
noSmithyDocumentSerde
}
func (e *ResourceInUseException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ResourceInUseException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ResourceInUseException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ResourceInUseException"
}
return *e.ErrorCodeOverride
}
func (e *ResourceInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified resource doesn't exist.
type ResourceNotFoundException struct {
Message *string
ErrorCodeOverride *string
ResourceType *string
ResourceName *string
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 operation failed because a condition wasn't satisfied in advance.
type ResourcePreconditionNotMetException struct {
Message *string
ErrorCodeOverride *string
ResourceType *string
ResourceName *string
noSmithyDocumentSerde
}
func (e *ResourcePreconditionNotMetException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ResourcePreconditionNotMetException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ResourcePreconditionNotMetException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ResourcePreconditionNotMetException"
}
return *e.ErrorCodeOverride
}
func (e *ResourcePreconditionNotMetException) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
| 183 |
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"
)
// Information about an Amazon QLDB journal stream, including the Amazon Resource
// Name (ARN), stream name, creation time, current status, and the parameters of
// the original stream creation request.
type JournalKinesisStreamDescription struct {
// The configuration settings of the Amazon Kinesis Data Streams destination for a
// QLDB journal stream.
//
// This member is required.
KinesisConfiguration *KinesisConfiguration
// The name of the ledger.
//
// This member is required.
LedgerName *string
// The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for
// a journal stream to write data records to a Kinesis Data Streams resource.
//
// This member is required.
RoleArn *string
// The current state of the QLDB journal stream.
//
// This member is required.
Status StreamStatus
// The UUID (represented in Base62-encoded text) of the QLDB journal stream.
//
// This member is required.
StreamId *string
// The user-defined name of the QLDB journal stream.
//
// This member is required.
StreamName *string
// The Amazon Resource Name (ARN) of the QLDB journal stream.
Arn *string
// The date and time, in epoch time format, when the QLDB journal stream was
// created. (Epoch time format is the number of seconds elapsed since 12:00:00 AM
// January 1, 1970 UTC.)
CreationTime *time.Time
// The error message that describes the reason that a stream has a status of
// IMPAIRED or FAILED . This is not applicable to streams that have other status
// values.
ErrorCause ErrorCause
// The exclusive date and time that specifies when the stream ends. If this
// parameter is undefined, the stream runs indefinitely until you cancel it.
ExclusiveEndTime *time.Time
// The inclusive start date and time from which to start streaming journal data.
InclusiveStartTime *time.Time
noSmithyDocumentSerde
}
// Information about a journal export job, including the ledger name, export ID,
// creation time, current status, and the parameters of the original export
// creation request.
type JournalS3ExportDescription struct {
// The exclusive end date and time for the range of journal contents that was
// specified in the original export request.
//
// This member is required.
ExclusiveEndTime *time.Time
// The date and time, in epoch time format, when the export job was created.
// (Epoch time format is the number of seconds elapsed since 12:00:00 AM January 1,
// 1970 UTC.)
//
// This member is required.
ExportCreationTime *time.Time
// The UUID (represented in Base62-encoded text) of the journal export job.
//
// This member is required.
ExportId *string
// The inclusive start date and time for the range of journal contents that was
// specified in the original export request.
//
// This member is required.
InclusiveStartTime *time.Time
// The name of the ledger.
//
// This member is required.
LedgerName *string
// The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for
// a journal export job to do the following:
// - Write objects into your Amazon Simple Storage Service (Amazon S3) bucket.
// - (Optional) Use your customer managed key in Key Management Service (KMS)
// for server-side encryption of your exported data.
//
// This member is required.
RoleArn *string
// The Amazon Simple Storage Service (Amazon S3) bucket location in which a
// journal export job writes the journal contents.
//
// This member is required.
S3ExportConfiguration *S3ExportConfiguration
// The current state of the journal export job.
//
// This member is required.
Status ExportStatus
// The output format of the exported journal data.
OutputFormat OutputFormat
noSmithyDocumentSerde
}
// The configuration settings of the Amazon Kinesis Data Streams destination for
// an Amazon QLDB journal stream.
type KinesisConfiguration struct {
// The Amazon Resource Name (ARN) of the Kinesis Data Streams resource.
//
// This member is required.
StreamArn *string
// Enables QLDB to publish multiple data records in a single Kinesis Data Streams
// record, increasing the number of records sent per API call. Default: True
// Record aggregation has important implications for processing records and
// requires de-aggregation in your stream consumer. To learn more, see KPL Key
// Concepts (https://docs.aws.amazon.com/streams/latest/dev/kinesis-kpl-concepts.html)
// and Consumer De-aggregation (https://docs.aws.amazon.com/streams/latest/dev/kinesis-kpl-consumer-deaggregation.html)
// in the Amazon Kinesis Data Streams Developer Guide.
AggregationEnabled *bool
noSmithyDocumentSerde
}
// Information about the encryption of data at rest in an Amazon QLDB ledger. This
// includes the current status, the key in Key Management Service (KMS), and when
// the key became inaccessible (in the case of an error). For more information, see
// Encryption at rest (https://docs.aws.amazon.com/qldb/latest/developerguide/encryption-at-rest.html)
// in the Amazon QLDB Developer Guide.
type LedgerEncryptionDescription struct {
// The current state of encryption at rest for the ledger. This can be one of the
// following values:
// - ENABLED : Encryption is fully enabled using the specified key.
// - UPDATING : The ledger is actively processing the specified key change. Key
// changes in QLDB are asynchronous. The ledger is fully accessible without any
// performance impact while the key change is being processed. The amount of time
// it takes to update a key varies depending on the ledger size.
// - KMS_KEY_INACCESSIBLE : The specified customer managed KMS key is not
// accessible, and the ledger is impaired. Either the key was disabled or deleted,
// or the grants on the key were revoked. When a ledger is impaired, it is not
// accessible and does not accept any read or write requests. An impaired ledger
// automatically returns to an active state after you restore the grants on the
// key, or re-enable the key that was disabled. However, deleting a customer
// managed KMS key is irreversible. After a key is deleted, you can no longer
// access the ledgers that are protected with that key, and the data becomes
// unrecoverable permanently.
//
// This member is required.
EncryptionStatus EncryptionStatus
// The Amazon Resource Name (ARN) of the customer managed KMS key that the ledger
// uses for encryption at rest. If this parameter is undefined, the ledger uses an
// Amazon Web Services owned KMS key for encryption.
//
// This member is required.
KmsKeyArn *string
// The date and time, in epoch time format, when the KMS key first became
// inaccessible, in the case of an error. (Epoch time format is the number of
// seconds that have elapsed since 12:00:00 AM January 1, 1970 UTC.) This parameter
// is undefined if the KMS key is accessible.
InaccessibleKmsKeyDateTime *time.Time
noSmithyDocumentSerde
}
// Information about a ledger, including its name, state, and when it was created.
type LedgerSummary struct {
// The date and time, in epoch time format, when the ledger was created. (Epoch
// time format is the number of seconds elapsed since 12:00:00 AM January 1, 1970
// UTC.)
CreationDateTime *time.Time
// The name of the ledger.
Name *string
// The current status of the ledger.
State LedgerState
noSmithyDocumentSerde
}
// The encryption settings that are used by a journal export job to write data in
// an Amazon Simple Storage Service (Amazon S3) bucket.
type S3EncryptionConfiguration struct {
// The Amazon S3 object encryption type. To learn more about server-side
// encryption options in Amazon S3, see Protecting Data Using Server-Side
// Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html)
// in the Amazon S3 Developer Guide.
//
// This member is required.
ObjectEncryptionType S3ObjectEncryptionType
// The Amazon Resource Name (ARN) of a symmetric encryption key in Key Management
// Service (KMS). Amazon S3 does not support asymmetric KMS keys. You must provide
// a KmsKeyArn if you specify SSE_KMS as the ObjectEncryptionType . KmsKeyArn is
// not required if you specify SSE_S3 as the ObjectEncryptionType .
KmsKeyArn *string
noSmithyDocumentSerde
}
// The Amazon Simple Storage Service (Amazon S3) bucket location in which a
// journal export job writes the journal contents.
type S3ExportConfiguration struct {
// The Amazon S3 bucket name in which a journal export job writes the journal
// contents. The bucket name must comply with the Amazon S3 bucket naming
// conventions. For more information, see Bucket Restrictions and Limitations (https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html)
// in the Amazon S3 Developer Guide.
//
// This member is required.
Bucket *string
// The encryption settings that are used by a journal export job to write data in
// an Amazon S3 bucket.
//
// This member is required.
EncryptionConfiguration *S3EncryptionConfiguration
// The prefix for the Amazon S3 bucket in which a journal export job writes the
// journal contents. The prefix must comply with Amazon S3 key naming rules and
// restrictions. For more information, see Object Key and Metadata (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html)
// in the Amazon S3 Developer Guide. The following are examples of valid Prefix
// values:
// - JournalExports-ForMyLedger/Testing/
// - JournalExports
// - My:Tests/
//
// This member is required.
Prefix *string
noSmithyDocumentSerde
}
// A structure that can contain a value in multiple encoding formats.
type ValueHolder struct {
// An Amazon Ion plaintext value contained in a ValueHolder structure.
IonText *string
noSmithyDocumentSerde
}
type noSmithyDocumentSerde = smithydocument.NoSerde
| 275 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldbsession
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 = "QLDB Session"
const ServiceAPIVersion = "2019-07-11"
// Client provides the API client to make operations call for Amazon QLDB Session.
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, "qldbsession", 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)
}
| 434 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldbsession
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 qldbsession
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/qldbsession/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Sends a command to an Amazon QLDB ledger. Instead of interacting directly with
// this API, we recommend using the QLDB driver or the QLDB shell to execute data
// transactions on a ledger.
// - If you are working with an AWS SDK, use the QLDB driver. The driver
// provides a high-level abstraction layer above this QLDB Session data plane and
// manages SendCommand API calls for you. For information and a list of supported
// programming languages, see Getting started with the driver (https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started-driver.html)
// in the Amazon QLDB Developer Guide.
// - If you are working with the AWS Command Line Interface (AWS CLI), use the
// QLDB shell. The shell is a command line interface that uses the QLDB driver to
// interact with a ledger. For information, see Accessing Amazon QLDB using the
// QLDB shell (https://docs.aws.amazon.com/qldb/latest/developerguide/data-shell.html)
// .
func (c *Client) SendCommand(ctx context.Context, params *SendCommandInput, optFns ...func(*Options)) (*SendCommandOutput, error) {
if params == nil {
params = &SendCommandInput{}
}
result, metadata, err := c.invokeOperation(ctx, "SendCommand", params, optFns, c.addOperationSendCommandMiddlewares)
if err != nil {
return nil, err
}
out := result.(*SendCommandOutput)
out.ResultMetadata = metadata
return out, nil
}
type SendCommandInput struct {
// Command to abort the current transaction.
AbortTransaction *types.AbortTransactionRequest
// Command to commit the specified transaction.
CommitTransaction *types.CommitTransactionRequest
// Command to end the current session.
EndSession *types.EndSessionRequest
// Command to execute a statement in the specified transaction.
ExecuteStatement *types.ExecuteStatementRequest
// Command to fetch a page.
FetchPage *types.FetchPageRequest
// Specifies the session token for the current command. A session token is
// constant throughout the life of the session. To obtain a session token, run the
// StartSession command. This SessionToken is required for every subsequent
// command that is issued during the current session.
SessionToken *string
// Command to start a new session. A session token is obtained as part of the
// response.
StartSession *types.StartSessionRequest
// Command to start a new transaction.
StartTransaction *types.StartTransactionRequest
noSmithyDocumentSerde
}
type SendCommandOutput struct {
// Contains the details of the aborted transaction.
AbortTransaction *types.AbortTransactionResult
// Contains the details of the committed transaction.
CommitTransaction *types.CommitTransactionResult
// Contains the details of the ended session.
EndSession *types.EndSessionResult
// Contains the details of the executed statement.
ExecuteStatement *types.ExecuteStatementResult
// Contains the details of the fetched page.
FetchPage *types.FetchPageResult
// Contains the details of the started session that includes a session token. This
// SessionToken is required for every subsequent command that is issued during the
// current session.
StartSession *types.StartSessionResult
// Contains the details of the started transaction.
StartTransaction *types.StartTransactionResult
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationSendCommandMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson10_serializeOpSendCommand{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpSendCommand{}, 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 = addOpSendCommandValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSendCommand(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_opSendCommand(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "qldb",
OperationName: "SendCommand",
}
}
| 180 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldbsession
import (
"bytes"
"context"
"encoding/base64"
"encoding/json"
"fmt"
"github.com/aws/aws-sdk-go-v2/aws/protocol/restjson"
"github.com/aws/aws-sdk-go-v2/service/qldbsession/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"
"strings"
)
type awsAwsjson10_deserializeOpSendCommand struct {
}
func (*awsAwsjson10_deserializeOpSendCommand) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsjson10_deserializeOpSendCommand) 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, awsAwsjson10_deserializeOpErrorSendCommand(response, &metadata)
}
output := &SendCommandOutput{}
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 = awsAwsjson10_deserializeOpDocumentSendCommandOutput(&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 out, metadata, err
}
return out, metadata, err
}
func awsAwsjson10_deserializeOpErrorSendCommand(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("BadRequestException", errorCode):
return awsAwsjson10_deserializeErrorBadRequestException(response, errorBody)
case strings.EqualFold("CapacityExceededException", errorCode):
return awsAwsjson10_deserializeErrorCapacityExceededException(response, errorBody)
case strings.EqualFold("InvalidSessionException", errorCode):
return awsAwsjson10_deserializeErrorInvalidSessionException(response, errorBody)
case strings.EqualFold("LimitExceededException", errorCode):
return awsAwsjson10_deserializeErrorLimitExceededException(response, errorBody)
case strings.EqualFold("OccConflictException", errorCode):
return awsAwsjson10_deserializeErrorOccConflictException(response, errorBody)
case strings.EqualFold("RateExceededException", errorCode):
return awsAwsjson10_deserializeErrorRateExceededException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
func awsAwsjson10_deserializeErrorBadRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
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
}
output := &types.BadRequestException{}
err := awsAwsjson10_deserializeDocumentBadRequestException(&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 awsAwsjson10_deserializeErrorCapacityExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
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
}
output := &types.CapacityExceededException{}
err := awsAwsjson10_deserializeDocumentCapacityExceededException(&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 awsAwsjson10_deserializeErrorInvalidSessionException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
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
}
output := &types.InvalidSessionException{}
err := awsAwsjson10_deserializeDocumentInvalidSessionException(&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 awsAwsjson10_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
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
}
output := &types.LimitExceededException{}
err := awsAwsjson10_deserializeDocumentLimitExceededException(&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 awsAwsjson10_deserializeErrorOccConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
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
}
output := &types.OccConflictException{}
err := awsAwsjson10_deserializeDocumentOccConflictException(&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 awsAwsjson10_deserializeErrorRateExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
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
}
output := &types.RateExceededException{}
err := awsAwsjson10_deserializeDocumentRateExceededException(&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 awsAwsjson10_deserializeDocumentAbortTransactionResult(v **types.AbortTransactionResult, 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.AbortTransactionResult
if *v == nil {
sv = &types.AbortTransactionResult{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "TimingInformation":
if err := awsAwsjson10_deserializeDocumentTimingInformation(&sv.TimingInformation, value); err != nil {
return err
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson10_deserializeDocumentBadRequestException(v **types.BadRequestException, 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.BadRequestException
if *v == nil {
sv = &types.BadRequestException{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "Code":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value)
}
sv.Code = ptr.String(jtv)
}
case "Message":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value)
}
sv.Message = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson10_deserializeDocumentCapacityExceededException(v **types.CapacityExceededException, 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.CapacityExceededException
if *v == nil {
sv = &types.CapacityExceededException{}
} 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 ErrorMessage to be of type string, got %T instead", value)
}
sv.Message = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson10_deserializeDocumentCommitTransactionResult(v **types.CommitTransactionResult, 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.CommitTransactionResult
if *v == nil {
sv = &types.CommitTransactionResult{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "CommitDigest":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected CommitDigest to be []byte, got %T instead", value)
}
dv, err := base64.StdEncoding.DecodeString(jtv)
if err != nil {
return fmt.Errorf("failed to base64 decode CommitDigest, %w", err)
}
sv.CommitDigest = dv
}
case "ConsumedIOs":
if err := awsAwsjson10_deserializeDocumentIOUsage(&sv.ConsumedIOs, value); err != nil {
return err
}
case "TimingInformation":
if err := awsAwsjson10_deserializeDocumentTimingInformation(&sv.TimingInformation, value); err != nil {
return err
}
case "TransactionId":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected TransactionId to be of type string, got %T instead", value)
}
sv.TransactionId = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson10_deserializeDocumentEndSessionResult(v **types.EndSessionResult, 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.EndSessionResult
if *v == nil {
sv = &types.EndSessionResult{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "TimingInformation":
if err := awsAwsjson10_deserializeDocumentTimingInformation(&sv.TimingInformation, value); err != nil {
return err
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson10_deserializeDocumentExecuteStatementResult(v **types.ExecuteStatementResult, 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.ExecuteStatementResult
if *v == nil {
sv = &types.ExecuteStatementResult{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "ConsumedIOs":
if err := awsAwsjson10_deserializeDocumentIOUsage(&sv.ConsumedIOs, value); err != nil {
return err
}
case "FirstPage":
if err := awsAwsjson10_deserializeDocumentPage(&sv.FirstPage, value); err != nil {
return err
}
case "TimingInformation":
if err := awsAwsjson10_deserializeDocumentTimingInformation(&sv.TimingInformation, value); err != nil {
return err
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson10_deserializeDocumentFetchPageResult(v **types.FetchPageResult, 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.FetchPageResult
if *v == nil {
sv = &types.FetchPageResult{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "ConsumedIOs":
if err := awsAwsjson10_deserializeDocumentIOUsage(&sv.ConsumedIOs, value); err != nil {
return err
}
case "Page":
if err := awsAwsjson10_deserializeDocumentPage(&sv.Page, value); err != nil {
return err
}
case "TimingInformation":
if err := awsAwsjson10_deserializeDocumentTimingInformation(&sv.TimingInformation, value); err != nil {
return err
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson10_deserializeDocumentInvalidSessionException(v **types.InvalidSessionException, 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.InvalidSessionException
if *v == nil {
sv = &types.InvalidSessionException{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "Code":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value)
}
sv.Code = ptr.String(jtv)
}
case "Message":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value)
}
sv.Message = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson10_deserializeDocumentIOUsage(v **types.IOUsage, 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.IOUsage
if *v == nil {
sv = &types.IOUsage{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "ReadIOs":
if value != nil {
jtv, ok := value.(json.Number)
if !ok {
return fmt.Errorf("expected ReadIOs to be json.Number, got %T instead", value)
}
i64, err := jtv.Int64()
if err != nil {
return err
}
sv.ReadIOs = i64
}
case "WriteIOs":
if value != nil {
jtv, ok := value.(json.Number)
if !ok {
return fmt.Errorf("expected WriteIOs to be json.Number, got %T instead", value)
}
i64, err := jtv.Int64()
if err != nil {
return err
}
sv.WriteIOs = i64
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson10_deserializeDocumentLimitExceededException(v **types.LimitExceededException, 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.LimitExceededException
if *v == nil {
sv = &types.LimitExceededException{}
} 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 ErrorMessage to be of type string, got %T instead", value)
}
sv.Message = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson10_deserializeDocumentOccConflictException(v **types.OccConflictException, 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.OccConflictException
if *v == nil {
sv = &types.OccConflictException{}
} 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 ErrorMessage to be of type string, got %T instead", value)
}
sv.Message = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson10_deserializeDocumentPage(v **types.Page, 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.Page
if *v == nil {
sv = &types.Page{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "NextPageToken":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected PageToken to be of type string, got %T instead", value)
}
sv.NextPageToken = ptr.String(jtv)
}
case "Values":
if err := awsAwsjson10_deserializeDocumentValueHolders(&sv.Values, value); err != nil {
return err
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson10_deserializeDocumentRateExceededException(v **types.RateExceededException, 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.RateExceededException
if *v == nil {
sv = &types.RateExceededException{}
} 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 ErrorMessage to be of type string, got %T instead", value)
}
sv.Message = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson10_deserializeDocumentStartSessionResult(v **types.StartSessionResult, 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.StartSessionResult
if *v == nil {
sv = &types.StartSessionResult{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "SessionToken":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected SessionToken to be of type string, got %T instead", value)
}
sv.SessionToken = ptr.String(jtv)
}
case "TimingInformation":
if err := awsAwsjson10_deserializeDocumentTimingInformation(&sv.TimingInformation, value); err != nil {
return err
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson10_deserializeDocumentStartTransactionResult(v **types.StartTransactionResult, 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.StartTransactionResult
if *v == nil {
sv = &types.StartTransactionResult{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "TimingInformation":
if err := awsAwsjson10_deserializeDocumentTimingInformation(&sv.TimingInformation, value); err != nil {
return err
}
case "TransactionId":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected TransactionId to be of type string, got %T instead", value)
}
sv.TransactionId = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson10_deserializeDocumentTimingInformation(v **types.TimingInformation, 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.TimingInformation
if *v == nil {
sv = &types.TimingInformation{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "ProcessingTimeMilliseconds":
if value != nil {
jtv, ok := value.(json.Number)
if !ok {
return fmt.Errorf("expected ProcessingTimeMilliseconds to be json.Number, got %T instead", value)
}
i64, err := jtv.Int64()
if err != nil {
return err
}
sv.ProcessingTimeMilliseconds = i64
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson10_deserializeDocumentValueHolder(v **types.ValueHolder, 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.ValueHolder
if *v == nil {
sv = &types.ValueHolder{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "IonBinary":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected IonBinary to be []byte, got %T instead", value)
}
dv, err := base64.StdEncoding.DecodeString(jtv)
if err != nil {
return fmt.Errorf("failed to base64 decode IonBinary, %w", err)
}
sv.IonBinary = dv
}
case "IonText":
if value != nil {
jtv, ok := value.(string)
if !ok {
return fmt.Errorf("expected IonText to be of type string, got %T instead", value)
}
sv.IonText = ptr.String(jtv)
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
func awsAwsjson10_deserializeDocumentValueHolders(v *[]types.ValueHolder, 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.ValueHolder
if *v == nil {
cv = []types.ValueHolder{}
} else {
cv = *v
}
for _, value := range shape {
var col types.ValueHolder
destAddr := &col
if err := awsAwsjson10_deserializeDocumentValueHolder(&destAddr, value); err != nil {
return err
}
col = *destAddr
cv = append(cv, col)
}
*v = cv
return nil
}
func awsAwsjson10_deserializeOpDocumentSendCommandOutput(v **SendCommandOutput, 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 *SendCommandOutput
if *v == nil {
sv = &SendCommandOutput{}
} else {
sv = *v
}
for key, value := range shape {
switch key {
case "AbortTransaction":
if err := awsAwsjson10_deserializeDocumentAbortTransactionResult(&sv.AbortTransaction, value); err != nil {
return err
}
case "CommitTransaction":
if err := awsAwsjson10_deserializeDocumentCommitTransactionResult(&sv.CommitTransaction, value); err != nil {
return err
}
case "EndSession":
if err := awsAwsjson10_deserializeDocumentEndSessionResult(&sv.EndSession, value); err != nil {
return err
}
case "ExecuteStatement":
if err := awsAwsjson10_deserializeDocumentExecuteStatementResult(&sv.ExecuteStatement, value); err != nil {
return err
}
case "FetchPage":
if err := awsAwsjson10_deserializeDocumentFetchPageResult(&sv.FetchPage, value); err != nil {
return err
}
case "StartSession":
if err := awsAwsjson10_deserializeDocumentStartSessionResult(&sv.StartSession, value); err != nil {
return err
}
case "StartTransaction":
if err := awsAwsjson10_deserializeDocumentStartTransactionResult(&sv.StartTransaction, value); err != nil {
return err
}
default:
_, _ = key, value
}
}
*v = sv
return nil
}
| 1,231 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
// Package qldbsession provides the API client, operations, and parameter types
// for Amazon QLDB Session.
//
// The transactional data APIs for Amazon QLDB Instead of interacting directly
// with this API, we recommend using the QLDB driver or the QLDB shell to execute
// data transactions on a ledger.
// - If you are working with an AWS SDK, use the QLDB driver. The driver
// provides a high-level abstraction layer above this QLDB Session data plane and
// manages SendCommand API calls for you. For information and a list of supported
// programming languages, see Getting started with the driver (https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started-driver.html)
// in the Amazon QLDB Developer Guide.
// - If you are working with the AWS Command Line Interface (AWS CLI), use the
// QLDB shell. The shell is a command line interface that uses the QLDB driver to
// interact with a ledger. For information, see Accessing Amazon QLDB using the
// QLDB shell (https://docs.aws.amazon.com/qldb/latest/developerguide/data-shell.html)
// .
package qldbsession
| 20 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldbsession
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/qldbsession/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 = "qldb"
}
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 qldbsession
// goModuleVersion is the tagged release for this module
const goModuleVersion = "1.14.12"
| 7 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldbsession
| 4 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldbsession
import (
"bytes"
"context"
"fmt"
"github.com/aws/aws-sdk-go-v2/service/qldbsession/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"
"path"
)
type awsAwsjson10_serializeOpSendCommand struct {
}
func (*awsAwsjson10_serializeOpSendCommand) ID() string {
return "OperationSerializer"
}
func (m *awsAwsjson10_serializeOpSendCommand) 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.(*SendCommandInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0")
httpBindingEncoder.SetHeader("X-Amz-Target").String("QLDBSession.SendCommand")
jsonEncoder := smithyjson.NewEncoder()
if err := awsAwsjson10_serializeOpDocumentSendCommandInput(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 = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsAwsjson10_serializeDocumentAbortTransactionRequest(v *types.AbortTransactionRequest, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
return nil
}
func awsAwsjson10_serializeDocumentCommitTransactionRequest(v *types.CommitTransactionRequest, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.CommitDigest != nil {
ok := object.Key("CommitDigest")
ok.Base64EncodeBytes(v.CommitDigest)
}
if v.TransactionId != nil {
ok := object.Key("TransactionId")
ok.String(*v.TransactionId)
}
return nil
}
func awsAwsjson10_serializeDocumentEndSessionRequest(v *types.EndSessionRequest, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
return nil
}
func awsAwsjson10_serializeDocumentExecuteStatementRequest(v *types.ExecuteStatementRequest, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.Parameters != nil {
ok := object.Key("Parameters")
if err := awsAwsjson10_serializeDocumentStatementParameters(v.Parameters, ok); err != nil {
return err
}
}
if v.Statement != nil {
ok := object.Key("Statement")
ok.String(*v.Statement)
}
if v.TransactionId != nil {
ok := object.Key("TransactionId")
ok.String(*v.TransactionId)
}
return nil
}
func awsAwsjson10_serializeDocumentFetchPageRequest(v *types.FetchPageRequest, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.NextPageToken != nil {
ok := object.Key("NextPageToken")
ok.String(*v.NextPageToken)
}
if v.TransactionId != nil {
ok := object.Key("TransactionId")
ok.String(*v.TransactionId)
}
return nil
}
func awsAwsjson10_serializeDocumentStartSessionRequest(v *types.StartSessionRequest, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.LedgerName != nil {
ok := object.Key("LedgerName")
ok.String(*v.LedgerName)
}
return nil
}
func awsAwsjson10_serializeDocumentStartTransactionRequest(v *types.StartTransactionRequest, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
return nil
}
func awsAwsjson10_serializeDocumentStatementParameters(v []types.ValueHolder, value smithyjson.Value) error {
array := value.Array()
defer array.Close()
for i := range v {
av := array.Value()
if err := awsAwsjson10_serializeDocumentValueHolder(&v[i], av); err != nil {
return err
}
}
return nil
}
func awsAwsjson10_serializeDocumentValueHolder(v *types.ValueHolder, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.IonBinary != nil {
ok := object.Key("IonBinary")
ok.Base64EncodeBytes(v.IonBinary)
}
if v.IonText != nil {
ok := object.Key("IonText")
ok.String(*v.IonText)
}
return nil
}
func awsAwsjson10_serializeOpDocumentSendCommandInput(v *SendCommandInput, value smithyjson.Value) error {
object := value.Object()
defer object.Close()
if v.AbortTransaction != nil {
ok := object.Key("AbortTransaction")
if err := awsAwsjson10_serializeDocumentAbortTransactionRequest(v.AbortTransaction, ok); err != nil {
return err
}
}
if v.CommitTransaction != nil {
ok := object.Key("CommitTransaction")
if err := awsAwsjson10_serializeDocumentCommitTransactionRequest(v.CommitTransaction, ok); err != nil {
return err
}
}
if v.EndSession != nil {
ok := object.Key("EndSession")
if err := awsAwsjson10_serializeDocumentEndSessionRequest(v.EndSession, ok); err != nil {
return err
}
}
if v.ExecuteStatement != nil {
ok := object.Key("ExecuteStatement")
if err := awsAwsjson10_serializeDocumentExecuteStatementRequest(v.ExecuteStatement, ok); err != nil {
return err
}
}
if v.FetchPage != nil {
ok := object.Key("FetchPage")
if err := awsAwsjson10_serializeDocumentFetchPageRequest(v.FetchPage, ok); err != nil {
return err
}
}
if v.SessionToken != nil {
ok := object.Key("SessionToken")
ok.String(*v.SessionToken)
}
if v.StartSession != nil {
ok := object.Key("StartSession")
if err := awsAwsjson10_serializeDocumentStartSessionRequest(v.StartSession, ok); err != nil {
return err
}
}
if v.StartTransaction != nil {
ok := object.Key("StartTransaction")
if err := awsAwsjson10_serializeDocumentStartTransactionRequest(v.StartTransaction, ok); err != nil {
return err
}
}
return nil
}
| 253 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package qldbsession
import (
"context"
"fmt"
"github.com/aws/aws-sdk-go-v2/service/qldbsession/types"
smithy "github.com/aws/smithy-go"
"github.com/aws/smithy-go/middleware"
)
type validateOpSendCommand struct {
}
func (*validateOpSendCommand) ID() string {
return "OperationInputValidation"
}
func (m *validateOpSendCommand) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*SendCommandInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpSendCommandInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
func addOpSendCommandValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpSendCommand{}, middleware.After)
}
func validateCommitTransactionRequest(v *types.CommitTransactionRequest) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CommitTransactionRequest"}
if v.TransactionId == nil {
invalidParams.Add(smithy.NewErrParamRequired("TransactionId"))
}
if v.CommitDigest == nil {
invalidParams.Add(smithy.NewErrParamRequired("CommitDigest"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateExecuteStatementRequest(v *types.ExecuteStatementRequest) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ExecuteStatementRequest"}
if v.TransactionId == nil {
invalidParams.Add(smithy.NewErrParamRequired("TransactionId"))
}
if v.Statement == nil {
invalidParams.Add(smithy.NewErrParamRequired("Statement"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateFetchPageRequest(v *types.FetchPageRequest) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "FetchPageRequest"}
if v.TransactionId == nil {
invalidParams.Add(smithy.NewErrParamRequired("TransactionId"))
}
if v.NextPageToken == nil {
invalidParams.Add(smithy.NewErrParamRequired("NextPageToken"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateStartSessionRequest(v *types.StartSessionRequest) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "StartSessionRequest"}
if v.LedgerName == nil {
invalidParams.Add(smithy.NewErrParamRequired("LedgerName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpSendCommandInput(v *SendCommandInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SendCommandInput"}
if v.StartSession != nil {
if err := validateStartSessionRequest(v.StartSession); err != nil {
invalidParams.AddNested("StartSession", err.(smithy.InvalidParamsError))
}
}
if v.CommitTransaction != nil {
if err := validateCommitTransactionRequest(v.CommitTransaction); err != nil {
invalidParams.AddNested("CommitTransaction", err.(smithy.InvalidParamsError))
}
}
if v.ExecuteStatement != nil {
if err := validateExecuteStatementRequest(v.ExecuteStatement); err != nil {
invalidParams.AddNested("ExecuteStatement", err.(smithy.InvalidParamsError))
}
}
if v.FetchPage != nil {
if err := validateFetchPageRequest(v.FetchPage); err != nil {
invalidParams.AddNested("FetchPage", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
| 137 |
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 QLDB Session 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: "session.qldb.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "session.qldb-fips.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "session.qldb-fips.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "session.qldb.{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-southeast-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ap-southeast-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ca-central-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-central-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-west-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-west-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "fips-us-east-1",
}: endpoints.Endpoint{
Hostname: "session.qldb-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: "session.qldb-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: "session.qldb-fips.us-west-2.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-west-2",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "us-east-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-east-1",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "session.qldb-fips.us-east-1.amazonaws.com",
},
endpoints.EndpointKey{
Region: "us-east-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-east-2",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "session.qldb-fips.us-east-2.amazonaws.com",
},
endpoints.EndpointKey{
Region: "us-west-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-west-2",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "session.qldb-fips.us-west-2.amazonaws.com",
},
},
},
{
ID: "aws-cn",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.DualStackVariant,
}: {
Hostname: "session.qldb.{region}.api.amazonwebservices.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "session.qldb-fips.{region}.amazonaws.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "session.qldb-fips.{region}.api.amazonwebservices.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "session.qldb.{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: "session.qldb-fips.{region}.c2s.ic.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "session.qldb.{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: "session.qldb-fips.{region}.sc2s.sgov.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "session.qldb.{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: "session.qldb-fips.{region}.cloud.adc-e.uk",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "session.qldb.{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: "session.qldb-fips.{region}.csp.hci.ic.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "session.qldb.{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: "session.qldb.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "session.qldb-fips.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "session.qldb-fips.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "session.qldb.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.AwsUsGov,
IsRegionalized: true,
},
}
| 377 |
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
import (
"fmt"
smithy "github.com/aws/smithy-go"
)
// Returned if the request is malformed or contains an error such as an invalid
// parameter value or a missing required parameter.
type BadRequestException struct {
Message *string
ErrorCodeOverride *string
Code *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 }
// Returned when the request exceeds the processing capacity of the ledger.
type CapacityExceededException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *CapacityExceededException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *CapacityExceededException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *CapacityExceededException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "CapacityExceededException"
}
return *e.ErrorCodeOverride
}
func (e *CapacityExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
// Returned if the session doesn't exist anymore because it timed out or expired.
type InvalidSessionException struct {
Message *string
ErrorCodeOverride *string
Code *string
noSmithyDocumentSerde
}
func (e *InvalidSessionException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidSessionException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidSessionException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidSessionException"
}
return *e.ErrorCodeOverride
}
func (e *InvalidSessionException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Returned if a resource limit such as number of active sessions is exceeded.
type LimitExceededException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *LimitExceededException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *LimitExceededException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *LimitExceededException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "LimitExceededException"
}
return *e.ErrorCodeOverride
}
func (e *LimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Returned when a transaction cannot be written to the journal due to a failure
// in the verification phase of optimistic concurrency control (OCC).
type OccConflictException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *OccConflictException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *OccConflictException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *OccConflictException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "OccConflictException"
}
return *e.ErrorCodeOverride
}
func (e *OccConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Returned when the rate of requests exceeds the allowed throughput.
type RateExceededException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *RateExceededException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *RateExceededException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *RateExceededException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "RateExceededException"
}
return *e.ErrorCodeOverride
}
func (e *RateExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
| 171 |
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"
)
// Contains the details of the transaction to abort.
type AbortTransactionRequest struct {
noSmithyDocumentSerde
}
// Contains the details of the aborted transaction.
type AbortTransactionResult struct {
// Contains server-side performance information for the command.
TimingInformation *TimingInformation
noSmithyDocumentSerde
}
// Contains the details of the transaction to commit.
type CommitTransactionRequest struct {
// Specifies the commit digest for the transaction to commit. For every active
// transaction, the commit digest must be passed. QLDB validates CommitDigest and
// rejects the commit with an error if the digest computed on the client does not
// match the digest computed by QLDB. The purpose of the CommitDigest parameter is
// to ensure that QLDB commits a transaction if and only if the server has
// processed the exact set of statements sent by the client, in the same order that
// client sent them, and with no duplicates.
//
// This member is required.
CommitDigest []byte
// Specifies the transaction ID of the transaction to commit.
//
// This member is required.
TransactionId *string
noSmithyDocumentSerde
}
// Contains the details of the committed transaction.
type CommitTransactionResult struct {
// The commit digest of the committed transaction.
CommitDigest []byte
// Contains metrics about the number of I/O requests that were consumed.
ConsumedIOs *IOUsage
// Contains server-side performance information for the command.
TimingInformation *TimingInformation
// The transaction ID of the committed transaction.
TransactionId *string
noSmithyDocumentSerde
}
// Specifies a request to end the session.
type EndSessionRequest struct {
noSmithyDocumentSerde
}
// Contains the details of the ended session.
type EndSessionResult struct {
// Contains server-side performance information for the command.
TimingInformation *TimingInformation
noSmithyDocumentSerde
}
// Specifies a request to execute a statement.
type ExecuteStatementRequest struct {
// Specifies the statement of the request.
//
// This member is required.
Statement *string
// Specifies the transaction ID of the request.
//
// This member is required.
TransactionId *string
// Specifies the parameters for the parameterized statement in the request.
Parameters []ValueHolder
noSmithyDocumentSerde
}
// Contains the details of the executed statement.
type ExecuteStatementResult struct {
// Contains metrics about the number of I/O requests that were consumed.
ConsumedIOs *IOUsage
// Contains the details of the first fetched page.
FirstPage *Page
// Contains server-side performance information for the command.
TimingInformation *TimingInformation
noSmithyDocumentSerde
}
// Specifies the details of the page to be fetched.
type FetchPageRequest struct {
// Specifies the next page token of the page to be fetched.
//
// This member is required.
NextPageToken *string
// Specifies the transaction ID of the page to be fetched.
//
// This member is required.
TransactionId *string
noSmithyDocumentSerde
}
// Contains the page that was fetched.
type FetchPageResult struct {
// Contains metrics about the number of I/O requests that were consumed.
ConsumedIOs *IOUsage
// Contains details of the fetched page.
Page *Page
// Contains server-side performance information for the command.
TimingInformation *TimingInformation
noSmithyDocumentSerde
}
// Contains I/O usage metrics for a command that was invoked.
type IOUsage struct {
// The number of read I/O requests that the command made.
ReadIOs int64
// The number of write I/O requests that the command made.
WriteIOs int64
noSmithyDocumentSerde
}
// Contains details of the fetched page.
type Page struct {
// The token of the next page.
NextPageToken *string
// A structure that contains values in multiple encoding formats.
Values []ValueHolder
noSmithyDocumentSerde
}
// Specifies a request to start a new session.
type StartSessionRequest struct {
// The name of the ledger to start a new session against.
//
// This member is required.
LedgerName *string
noSmithyDocumentSerde
}
// Contains the details of the started session.
type StartSessionResult struct {
// Session token of the started session. This SessionToken is required for every
// subsequent command that is issued during the current session.
SessionToken *string
// Contains server-side performance information for the command.
TimingInformation *TimingInformation
noSmithyDocumentSerde
}
// Specifies a request to start a transaction.
type StartTransactionRequest struct {
noSmithyDocumentSerde
}
// Contains the details of the started transaction.
type StartTransactionResult struct {
// Contains server-side performance information for the command.
TimingInformation *TimingInformation
// The transaction ID of the started transaction.
TransactionId *string
noSmithyDocumentSerde
}
// Contains server-side performance information for a command. Amazon QLDB
// captures timing information between the times when it receives the request and
// when it sends the corresponding response.
type TimingInformation struct {
// The amount of time that QLDB spent on processing the command, measured in
// milliseconds.
ProcessingTimeMilliseconds int64
noSmithyDocumentSerde
}
// A structure that can contain a value in multiple encoding formats.
type ValueHolder struct {
// An Amazon Ion binary value contained in a ValueHolder structure.
IonBinary []byte
// An Amazon Ion plaintext value contained in a ValueHolder structure.
IonText *string
noSmithyDocumentSerde
}
type noSmithyDocumentSerde = smithydocument.NoSerde
| 232 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package quicksight
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 = "QuickSight"
const ServiceAPIVersion = "2018-04-01"
// Client provides the API client to make operations call for Amazon QuickSight.
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, "quicksight", 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)
}
| 434 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package quicksight
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 quicksight
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"
)
// Cancels an ongoing ingestion of data into SPICE.
func (c *Client) CancelIngestion(ctx context.Context, params *CancelIngestionInput, optFns ...func(*Options)) (*CancelIngestionOutput, error) {
if params == nil {
params = &CancelIngestionInput{}
}
result, metadata, err := c.invokeOperation(ctx, "CancelIngestion", params, optFns, c.addOperationCancelIngestionMiddlewares)
if err != nil {
return nil, err
}
out := result.(*CancelIngestionOutput)
out.ResultMetadata = metadata
return out, nil
}
type CancelIngestionInput struct {
// The Amazon Web Services account ID.
//
// This member is required.
AwsAccountId *string
// The ID of the dataset used in the ingestion.
//
// This member is required.
DataSetId *string
// An ID for the ingestion.
//
// This member is required.
IngestionId *string
noSmithyDocumentSerde
}
type CancelIngestionOutput struct {
// The Amazon Resource Name (ARN) for the data ingestion.
Arn *string
// An ID for the ingestion.
IngestionId *string
// The Amazon Web Services request ID for this operation.
RequestId *string
// The HTTP status of the request.
Status int32
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationCancelIngestionMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpCancelIngestion{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCancelIngestion{}, 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 = addOpCancelIngestionValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelIngestion(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_opCancelIngestion(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "quicksight",
OperationName: "CancelIngestion",
}
}
| 143 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.