From 892405199ed915c39f87554b69ba319e05896c2b Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Thu, 5 Dec 2024 01:37:16 +0000 Subject: [PATCH] Regenerated Clients --- .../3e9bb874b1754bca9c93a51eb1b7f79a.json | 8 + .../c87a598e71534020818990564c4d1605.json | 8 + .../api_op_AcceptEngagementInvitation.go | 165 + .../api_op_AssignOpportunity.go | 7 +- .../api_op_AssociateOpportunity.go | 5 +- .../api_op_CreateEngagement.go | 234 + .../api_op_CreateEngagementInvitation.go | 226 + .../api_op_CreateOpportunity.go | 21 +- .../api_op_CreateResourceSnapshot.go | 238 + .../api_op_CreateResourceSnapshotJob.go | 231 + .../api_op_DeleteResourceSnapshotJob.go | 160 + .../api_op_DisassociateOpportunity.go | 9 +- .../api_op_GetAwsOpportunitySummary.go | 31 +- .../api_op_GetEngagement.go | 196 + .../api_op_GetEngagementInvitation.go | 19 + .../api_op_GetOpportunity.go | 15 +- .../api_op_GetResourceSnapshot.go | 236 + .../api_op_GetResourceSnapshotJob.go | 222 + .../api_op_GetSellingSystemSettings.go | 164 + ...istEngagementByAcceptingInvitationTasks.go | 299 + ...i_op_ListEngagementFromOpportunityTasks.go | 300 + .../api_op_ListEngagementInvitations.go | 13 + .../api_op_ListEngagementMembers.go | 275 + ...i_op_ListEngagementResourceAssociations.go | 289 + .../api_op_ListEngagements.go | 281 + .../api_op_ListOpportunities.go | 25 +- .../api_op_ListResourceSnapshotJobs.go | 280 + .../api_op_ListResourceSnapshots.go | 282 + .../api_op_ListSolutions.go | 9 +- .../api_op_PutSellingSystemSettings.go | 167 + ...tartEngagementByAcceptingInvitationTask.go | 3 + ...i_op_StartEngagementFromOpportunityTask.go | 12 + .../api_op_StartResourceSnapshotJob.go | 157 + .../api_op_StopResourceSnapshotJob.go | 157 + .../api_op_SubmitOpportunity.go | 172 + .../api_op_UpdateOpportunity.go | 15 +- .../partnercentralselling/deserializers.go | 8737 +++++++++++++---- service/partnercentralselling/generated.json | 21 + service/partnercentralselling/serializers.go | 3436 ++++++- .../api_op_AcceptEngagementInvitation.go.snap | 41 + .../snapshot/api_op_CreateEngagement.go.snap | 42 + .../api_op_CreateEngagementInvitation.go.snap | 42 + .../api_op_CreateResourceSnapshot.go.snap | 42 + .../api_op_CreateResourceSnapshotJob.go.snap | 42 + .../api_op_DeleteResourceSnapshotJob.go.snap | 41 + .../snapshot/api_op_GetEngagement.go.snap | 41 + .../api_op_GetResourceSnapshot.go.snap | 41 + .../api_op_GetResourceSnapshotJob.go.snap | 41 + .../api_op_GetSellingSystemSettings.go.snap | 41 + ...gagementByAcceptingInvitationTasks.go.snap | 41 + ...ListEngagementFromOpportunityTasks.go.snap | 41 + .../api_op_ListEngagementMembers.go.snap | 41 + ...ListEngagementResourceAssociations.go.snap | 41 + .../snapshot/api_op_ListEngagements.go.snap | 41 + .../api_op_ListResourceSnapshotJobs.go.snap | 41 + .../api_op_ListResourceSnapshots.go.snap | 41 + .../api_op_PutSellingSystemSettings.go.snap | 41 + .../api_op_StartResourceSnapshotJob.go.snap | 41 + .../api_op_StopResourceSnapshotJob.go.snap | 41 + .../snapshot/api_op_SubmitOpportunity.go.snap | 41 + .../partnercentralselling/snapshot_test.go | 504 + service/partnercentralselling/types/enums.go | 146 +- service/partnercentralselling/types/types.go | 632 +- .../types/types_exported_test.go | 36 + service/partnercentralselling/validators.go | 1792 +++- .../qbusiness/api_op_SearchRelevantContent.go | 16 +- service/qbusiness/serializers.go | 10 - 67 files changed, 18307 insertions(+), 2819 deletions(-) create mode 100644 .changelog/3e9bb874b1754bca9c93a51eb1b7f79a.json create mode 100644 .changelog/c87a598e71534020818990564c4d1605.json create mode 100644 service/partnercentralselling/api_op_AcceptEngagementInvitation.go create mode 100644 service/partnercentralselling/api_op_CreateEngagement.go create mode 100644 service/partnercentralselling/api_op_CreateEngagementInvitation.go create mode 100644 service/partnercentralselling/api_op_CreateResourceSnapshot.go create mode 100644 service/partnercentralselling/api_op_CreateResourceSnapshotJob.go create mode 100644 service/partnercentralselling/api_op_DeleteResourceSnapshotJob.go create mode 100644 service/partnercentralselling/api_op_GetEngagement.go create mode 100644 service/partnercentralselling/api_op_GetResourceSnapshot.go create mode 100644 service/partnercentralselling/api_op_GetResourceSnapshotJob.go create mode 100644 service/partnercentralselling/api_op_GetSellingSystemSettings.go create mode 100644 service/partnercentralselling/api_op_ListEngagementByAcceptingInvitationTasks.go create mode 100644 service/partnercentralselling/api_op_ListEngagementFromOpportunityTasks.go create mode 100644 service/partnercentralselling/api_op_ListEngagementMembers.go create mode 100644 service/partnercentralselling/api_op_ListEngagementResourceAssociations.go create mode 100644 service/partnercentralselling/api_op_ListEngagements.go create mode 100644 service/partnercentralselling/api_op_ListResourceSnapshotJobs.go create mode 100644 service/partnercentralselling/api_op_ListResourceSnapshots.go create mode 100644 service/partnercentralselling/api_op_PutSellingSystemSettings.go create mode 100644 service/partnercentralselling/api_op_StartResourceSnapshotJob.go create mode 100644 service/partnercentralselling/api_op_StopResourceSnapshotJob.go create mode 100644 service/partnercentralselling/api_op_SubmitOpportunity.go create mode 100644 service/partnercentralselling/snapshot/api_op_AcceptEngagementInvitation.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_CreateEngagement.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_CreateEngagementInvitation.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_CreateResourceSnapshot.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_CreateResourceSnapshotJob.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_DeleteResourceSnapshotJob.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_GetEngagement.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_GetResourceSnapshot.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_GetResourceSnapshotJob.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_GetSellingSystemSettings.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_ListEngagementByAcceptingInvitationTasks.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_ListEngagementFromOpportunityTasks.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_ListEngagementMembers.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_ListEngagementResourceAssociations.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_ListEngagements.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_ListResourceSnapshotJobs.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_ListResourceSnapshots.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_PutSellingSystemSettings.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_StartResourceSnapshotJob.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_StopResourceSnapshotJob.go.snap create mode 100644 service/partnercentralselling/snapshot/api_op_SubmitOpportunity.go.snap diff --git a/.changelog/3e9bb874b1754bca9c93a51eb1b7f79a.json b/.changelog/3e9bb874b1754bca9c93a51eb1b7f79a.json new file mode 100644 index 00000000000..380564bd2f1 --- /dev/null +++ b/.changelog/3e9bb874b1754bca9c93a51eb1b7f79a.json @@ -0,0 +1,8 @@ +{ + "id": "3e9bb874-b175-4bca-9c93-a51eb1b7f79a", + "type": "feature", + "description": "This release removes the deprecated UserId and UserGroups fields from SearchRelevantContent api's request parameters.", + "modules": [ + "service/qbusiness" + ] +} \ No newline at end of file diff --git a/.changelog/c87a598e71534020818990564c4d1605.json b/.changelog/c87a598e71534020818990564c4d1605.json new file mode 100644 index 00000000000..d73e3f83911 --- /dev/null +++ b/.changelog/c87a598e71534020818990564c4d1605.json @@ -0,0 +1,8 @@ +{ + "id": "c87a598e-7153-4020-8189-90564c4d1605", + "type": "feature", + "description": "Introducing the preview of new partner central selling APIs designed to transform how AWS partners collaborate and co-sell with multiple partners. This enables multiple partners to seamlessly engage and jointly pursue customer opportunities, fostering a new era of collaborative selling.", + "modules": [ + "service/partnercentralselling" + ] +} \ No newline at end of file diff --git a/service/partnercentralselling/api_op_AcceptEngagementInvitation.go b/service/partnercentralselling/api_op_AcceptEngagementInvitation.go new file mode 100644 index 00000000000..ecc33350815 --- /dev/null +++ b/service/partnercentralselling/api_op_AcceptEngagementInvitation.go @@ -0,0 +1,165 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Use the AcceptEngagementInvitation action to accept an engagement invitation +// +// shared by AWS. Accepting the invitation indicates your willingness to +// participate in the engagement, granting you access to all engagement-related +// data. +func (c *Client) AcceptEngagementInvitation(ctx context.Context, params *AcceptEngagementInvitationInput, optFns ...func(*Options)) (*AcceptEngagementInvitationOutput, error) { + if params == nil { + params = &AcceptEngagementInvitationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AcceptEngagementInvitation", params, optFns, c.addOperationAcceptEngagementInvitationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AcceptEngagementInvitationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AcceptEngagementInvitationInput struct { + + // The CatalogType parameter specifies the catalog associated with the engagement + // invitation. Accepted values are AWS and Sandbox , which determine the + // environment in which the engagement invitation is managed. + // + // This member is required. + Catalog *string + + // The Identifier parameter in the AcceptEngagementInvitationRequest specifies + // the unique identifier of the EngagementInvitation to be accepted. Providing the + // correct identifier ensures that the intended invitation is accepted. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +type AcceptEngagementInvitationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAcceptEngagementInvitationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpAcceptEngagementInvitation{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpAcceptEngagementInvitation{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "AcceptEngagementInvitation"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpAcceptEngagementInvitationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAcceptEngagementInvitation(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opAcceptEngagementInvitation(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "AcceptEngagementInvitation", + } +} diff --git a/service/partnercentralselling/api_op_AssignOpportunity.go b/service/partnercentralselling/api_op_AssignOpportunity.go index a836ae52ddb..a6b4bcd0ac3 100644 --- a/service/partnercentralselling/api_op_AssignOpportunity.go +++ b/service/partnercentralselling/api_op_AssignOpportunity.go @@ -11,8 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Enables you to reassign an existing Opportunity to another user within your -// +// Enables you to reassign an existing Opportunity to another user within your // Partner Central account. The specified user receives the opportunity, and it // appears on their Partner Central dashboard, allowing them to take necessary // actions or proceed with the opportunity. @@ -46,7 +45,7 @@ type AssignOpportunityInput struct { // This member is required. Assignee *types.AssigneeContact - // Specifies the catalog associated with the request. This field takes a string + // Specifies the catalog associated with the request. This field takes a string // value from a predefined list: AWS or Sandbox . The catalog determines which // environment the opportunity is assigned in. Use AWS to assign real // opportunities in the Amazon Web Services catalog, and Sandbox for testing in @@ -55,7 +54,7 @@ type AssignOpportunityInput struct { // This member is required. Catalog *string - // Requires the Opportunity 's unique identifier when you want to assign it to + // Requires the Opportunity 's unique identifier when you want to assign it to // another user. Provide the correct identifier so the intended opportunity is // reassigned. // diff --git a/service/partnercentralselling/api_op_AssociateOpportunity.go b/service/partnercentralselling/api_op_AssociateOpportunity.go index 6a7698c7d7e..4fd9e5a8491 100644 --- a/service/partnercentralselling/api_op_AssociateOpportunity.go +++ b/service/partnercentralselling/api_op_AssociateOpportunity.go @@ -11,8 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Enables you to create a formal association between an Opportunity and various -// +// Enables you to create a formal association between an Opportunity and various // related entities, enriching the context and details of the opportunity for // better collaboration and decision making. You can associate an opportunity with // the following entity types: @@ -64,7 +63,7 @@ func (c *Client) AssociateOpportunity(ctx context.Context, params *AssociateOppo type AssociateOpportunityInput struct { - // Specifies the catalog associated with the request. This field takes a string + // Specifies the catalog associated with the request. This field takes a string // value from a predefined list: AWS or Sandbox . The catalog determines which // environment the opportunity association is made in. Use AWS to associate // opportunities in the Amazon Web Services catalog, and Sandbox for testing in diff --git a/service/partnercentralselling/api_op_CreateEngagement.go b/service/partnercentralselling/api_op_CreateEngagement.go new file mode 100644 index 00000000000..29b87163637 --- /dev/null +++ b/service/partnercentralselling/api_op_CreateEngagement.go @@ -0,0 +1,234 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// The CreateEngagement action allows you to create an Engagement , which serves +// +// as a collaborative space between different parties such as AWS Partners and AWS +// Sellers. This action automatically adds the caller's AWS account as an active +// member of the newly created Engagement . +func (c *Client) CreateEngagement(ctx context.Context, params *CreateEngagementInput, optFns ...func(*Options)) (*CreateEngagementOutput, error) { + if params == nil { + params = &CreateEngagementInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateEngagement", params, optFns, c.addOperationCreateEngagementMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateEngagementOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateEngagementInput struct { + + // The CreateEngagementRequest$Catalog parameter specifies the catalog related to + // the engagement. Accepted values are AWS and Sandbox , which determine the + // environment in which the engagement is managed. + // + // This member is required. + Catalog *string + + // The CreateEngagementRequest$ClientToken parameter specifies a unique, + // case-sensitive identifier to ensure that the request is handled exactly once. + // The value must not exceed sixty-four alphanumeric characters. + // + // This member is required. + ClientToken *string + + // Provides a description of the Engagement . + // + // This member is required. + Description *string + + // Specifies the title of the Engagement . + // + // This member is required. + Title *string + + // The Contexts field is a required array of objects, with a maximum of 5 + // contexts allowed, specifying detailed information about customer projects + // associated with the Engagement. Each context object contains a Type field + // indicating the context type, which must be CustomerProject in this version, and + // a Payload field containing the CustomerProject details. The CustomerProject + // object is composed of two main components: Customer and Project . The Customer + // object includes information such as CompanyName , WebsiteUrl , Industry , and + // CountryCode , providing essential details about the customer. The Project + // object contains Title , BusinessProblem , and TargetCompletionDate , offering + // insights into the specific project associated with the customer. This structure + // allows comprehensive context to be included within the Engagement, facilitating + // effective collaboration between parties by providing relevant customer and + // project information. + Contexts []types.EngagementContextDetails + + noSmithyDocumentSerde +} + +type CreateEngagementOutput struct { + + // The Amazon Resource Name (ARN) that identifies the engagement. + Arn *string + + // Unique identifier assigned to the newly created engagement. + Id *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateEngagementMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpCreateEngagement{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpCreateEngagement{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateEngagement"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIdempotencyToken_opCreateEngagementMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateEngagementValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateEngagement(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateEngagement struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateEngagement) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateEngagement) 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.(*CreateEngagementInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateEngagementInput ") + } + + 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_opCreateEngagementMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateEngagement{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateEngagement(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateEngagement", + } +} diff --git a/service/partnercentralselling/api_op_CreateEngagementInvitation.go b/service/partnercentralselling/api_op_CreateEngagementInvitation.go new file mode 100644 index 00000000000..9ef5b7e125d --- /dev/null +++ b/service/partnercentralselling/api_op_CreateEngagementInvitation.go @@ -0,0 +1,226 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// This action creates an invitation from a sender to a single receiver to join +// +// an engagement. +func (c *Client) CreateEngagementInvitation(ctx context.Context, params *CreateEngagementInvitationInput, optFns ...func(*Options)) (*CreateEngagementInvitationOutput, error) { + if params == nil { + params = &CreateEngagementInvitationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateEngagementInvitation", params, optFns, c.addOperationCreateEngagementInvitationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateEngagementInvitationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateEngagementInvitationInput struct { + + // Specifies the catalog related to the engagement. Accepted values are AWS and + // Sandbox , which determine the environment in which the engagement is managed. + // + // This member is required. + Catalog *string + + // Specifies a unique, client-generated UUID to ensure that the request is + // handled exactly once. This token helps prevent duplicate invitation creations. + // + // This member is required. + ClientToken *string + + // The unique identifier of the Engagement associated with the invitation. This + // parameter ensures the invitation is created within the correct Engagement + // context. + // + // This member is required. + EngagementIdentifier *string + + // The Invitation object all information necessary to initiate an engagement + // invitation to a partner. It contains a personalized message from the sender, the + // invitation's receiver, and a payload. The Payload can be the + // OpportunityInvitation , which includes detailed structures for sender contacts, + // partner responsibilities, customer information, and project details. + // + // This member is required. + Invitation *types.Invitation + + noSmithyDocumentSerde +} + +type CreateEngagementInvitationOutput struct { + + // The Amazon Resource Name (ARN) that uniquely identifies the engagement + // invitation. + // + // This member is required. + Arn *string + + // Unique identifier assigned to the newly created engagement invitation. + // + // This member is required. + Id *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateEngagementInvitationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpCreateEngagementInvitation{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpCreateEngagementInvitation{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateEngagementInvitation"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIdempotencyToken_opCreateEngagementInvitationMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateEngagementInvitationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateEngagementInvitation(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateEngagementInvitation struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateEngagementInvitation) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateEngagementInvitation) 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.(*CreateEngagementInvitationInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateEngagementInvitationInput ") + } + + 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_opCreateEngagementInvitationMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateEngagementInvitation{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateEngagementInvitation(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateEngagementInvitation", + } +} diff --git a/service/partnercentralselling/api_op_CreateOpportunity.go b/service/partnercentralselling/api_op_CreateOpportunity.go index 34737f9131a..ea39cca3291 100644 --- a/service/partnercentralselling/api_op_CreateOpportunity.go +++ b/service/partnercentralselling/api_op_CreateOpportunity.go @@ -12,8 +12,7 @@ import ( "time" ) -// Creates an Opportunity record in Partner Central. Use this operation to create -// +// Creates an Opportunity record in Partner Central. Use this operation to create // a potential business opportunity for submission to Amazon Web Services. Creating // an opportunity sets Lifecycle.ReviewStatus to Pending Submission . // @@ -48,7 +47,7 @@ func (c *Client) CreateOpportunity(ctx context.Context, params *CreateOpportunit type CreateOpportunityInput struct { - // Specifies the catalog associated with the request. This field takes a string + // Specifies the catalog associated with the request. This field takes a string // value from a predefined list: AWS or Sandbox . The catalog determines which // environment the opportunity is created in. Use AWS to create opportunities in // the Amazon Web Services catalog, and Sandbox for testing in secure, isolated @@ -57,7 +56,7 @@ type CreateOpportunityInput struct { // This member is required. Catalog *string - // Required to be unique, and should be unchanging, it can be randomly generated + // Required to be unique, and should be unchanging, it can be randomly generated // or a meaningful string. // // Default: None @@ -90,7 +89,7 @@ type CreateOpportunityInput struct { // members of this opportunity who are within the partner's organization. OpportunityTeam []types.Contact - // Specifies the opportunity type as a renewal, new, or expansion. + // Specifies the opportunity type as a renewal, new, or expansion. // // Opportunity types: // @@ -106,7 +105,7 @@ type CreateOpportunityInput struct { // the volume of existing services for a current customer. OpportunityType types.OpportunityType - // Specifies the origin of the opportunity, indicating if it was sourced from + // Specifies the origin of the opportunity, indicating if it was sourced from // Amazon Web Services or the partner. For all opportunities created with Catalog: // AWS , this field must only be Partner Referral . However, when using Catalog: // Sandbox , you can set this field to AWS Referral to simulate Amazon Web @@ -114,16 +113,16 @@ type CreateOpportunityInput struct { // testing in the sandbox catalog. Origin types.OpportunityOrigin - // Specifies the opportunity's unique identifier in the partner's CRM system. - // This value is essential to track and reconcile because it's included in the - // outbound payload to the partner. + // Specifies the opportunity's unique identifier in the partner's CRM system. This + // value is essential to track and reconcile because it's included in the outbound + // payload to the partner. // // This field allows partners to link an opportunity to their CRM, which helps to // ensure seamless integration and accurate synchronization between the Partner // Central API and the partner's internal systems. PartnerOpportunityIdentifier *string - // Identifies the type of support the partner needs from Amazon Web Services. + // Identifies the type of support the partner needs from Amazon Web Services. // // Valid values: // @@ -175,7 +174,7 @@ type CreateOpportunityInput struct { type CreateOpportunityOutput struct { - // Read-only, system-generated Opportunity unique identifier. Amazon Web Services + // Read-only, system-generated Opportunity unique identifier. Amazon Web Services // creates this identifier, and it's used for all subsequent opportunity actions, // such as updates, associations, and submissions. It helps to ensure that each // opportunity is accurately tracked and managed. diff --git a/service/partnercentralselling/api_op_CreateResourceSnapshot.go b/service/partnercentralselling/api_op_CreateResourceSnapshot.go new file mode 100644 index 00000000000..30ff9eff151 --- /dev/null +++ b/service/partnercentralselling/api_op_CreateResourceSnapshot.go @@ -0,0 +1,238 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// This action allows you to create an immutable snapshot of a specific resource, +// +// such as an opportunity, within the context of an engagement. The snapshot +// captures a subset of the resource's data based on the schema defined by the +// provided template. +func (c *Client) CreateResourceSnapshot(ctx context.Context, params *CreateResourceSnapshotInput, optFns ...func(*Options)) (*CreateResourceSnapshotOutput, error) { + if params == nil { + params = &CreateResourceSnapshotInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateResourceSnapshot", params, optFns, c.addOperationCreateResourceSnapshotMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateResourceSnapshotOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateResourceSnapshotInput struct { + + // Specifies the catalog where the snapshot is created. Valid values are AWS and + // Sandbox . + // + // This member is required. + Catalog *string + + // Specifies a unique, client-generated UUID to ensure that the request is + // handled exactly once. This token helps prevent duplicate snapshot creations. + // + // This member is required. + ClientToken *string + + // The unique identifier of the engagement associated with this snapshot. This + // field links the snapshot to a specific engagement context. + // + // This member is required. + EngagementIdentifier *string + + // The unique identifier of the specific resource to be snapshotted. The format + // and constraints of this identifier depend on the ResourceType specified. For + // example: For Opportunity type, it will be an opportunity ID. + // + // This member is required. + ResourceIdentifier *string + + // The name of the template that defines the schema for the snapshot. This + // template determines which subset of the resource data will be included in the + // snapshot. Must correspond to an existing and valid template for the specified + // ResourceType . + // + // This member is required. + ResourceSnapshotTemplateIdentifier *string + + // Specifies the type of resource for which the snapshot is being created. This + // field determines the structure and content of the snapshot. Must be one of the + // supported resource types, such as: Opportunity . + // + // This member is required. + ResourceType types.ResourceType + + noSmithyDocumentSerde +} + +type CreateResourceSnapshotOutput struct { + + // Specifies the Amazon Resource Name (ARN) that uniquely identifies the snapshot + // created. + Arn *string + + // Specifies the revision number of the created snapshot. This field provides + // important information about the snapshot's place in the sequence of snapshots + // for the given resource. + Revision *int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateResourceSnapshotMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpCreateResourceSnapshot{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpCreateResourceSnapshot{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateResourceSnapshot"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIdempotencyToken_opCreateResourceSnapshotMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateResourceSnapshotValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateResourceSnapshot(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateResourceSnapshot struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateResourceSnapshot) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateResourceSnapshot) 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.(*CreateResourceSnapshotInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateResourceSnapshotInput ") + } + + 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_opCreateResourceSnapshotMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateResourceSnapshot{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateResourceSnapshot(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateResourceSnapshot", + } +} diff --git a/service/partnercentralselling/api_op_CreateResourceSnapshotJob.go b/service/partnercentralselling/api_op_CreateResourceSnapshotJob.go new file mode 100644 index 00000000000..90860ffbbcb --- /dev/null +++ b/service/partnercentralselling/api_op_CreateResourceSnapshotJob.go @@ -0,0 +1,231 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Use this action to create a job to generate a snapshot of the specified +// +// resource within an engagement. It initiates an asynchronous process to create a +// resource snapshot. The job creates a new snapshot only if the resource state has +// changed, adhering to the same access control and immutability rules as direct +// snapshot creation. +func (c *Client) CreateResourceSnapshotJob(ctx context.Context, params *CreateResourceSnapshotJobInput, optFns ...func(*Options)) (*CreateResourceSnapshotJobOutput, error) { + if params == nil { + params = &CreateResourceSnapshotJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateResourceSnapshotJob", params, optFns, c.addOperationCreateResourceSnapshotJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateResourceSnapshotJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateResourceSnapshotJobInput struct { + + // Specifies the catalog in which to create the snapshot job. Valid values are AWS + // and Sandbox . + // + // This member is required. + Catalog *string + + // Specifies a unique, client-generated UUID to ensure that the request is + // handled exactly once. This token helps prevent duplicate snapshot job creations. + // + // This member is required. + ClientToken *string + + // Specifies the identifier of the engagement associated with the resource to be + // snapshotted. + // + // This member is required. + EngagementIdentifier *string + + // Specifies the identifier of the specific resource to be snapshotted. The + // format depends on the ResourceType . + // + // This member is required. + ResourceIdentifier *string + + // Specifies the name of the template that defines the schema for the snapshot. + // + // This member is required. + ResourceSnapshotTemplateIdentifier *string + + // The type of resource for which the snapshot job is being created. Must be one + // of the supported resource types Opportunity . + // + // This member is required. + ResourceType types.ResourceType + + noSmithyDocumentSerde +} + +type CreateResourceSnapshotJobOutput struct { + + // The Amazon Resource Name (ARN) of the created snapshot job. + Arn *string + + // The unique identifier for the created snapshot job. + Id *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateResourceSnapshotJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpCreateResourceSnapshotJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpCreateResourceSnapshotJob{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateResourceSnapshotJob"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIdempotencyToken_opCreateResourceSnapshotJobMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateResourceSnapshotJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateResourceSnapshotJob(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateResourceSnapshotJob struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateResourceSnapshotJob) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateResourceSnapshotJob) 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.(*CreateResourceSnapshotJobInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateResourceSnapshotJobInput ") + } + + 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_opCreateResourceSnapshotJobMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateResourceSnapshotJob{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateResourceSnapshotJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateResourceSnapshotJob", + } +} diff --git a/service/partnercentralselling/api_op_DeleteResourceSnapshotJob.go b/service/partnercentralselling/api_op_DeleteResourceSnapshotJob.go new file mode 100644 index 00000000000..957a47acf84 --- /dev/null +++ b/service/partnercentralselling/api_op_DeleteResourceSnapshotJob.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Use this action to deletes a previously created resource snapshot job. The job +// +// must be in a stopped state before it can be deleted. +func (c *Client) DeleteResourceSnapshotJob(ctx context.Context, params *DeleteResourceSnapshotJobInput, optFns ...func(*Options)) (*DeleteResourceSnapshotJobOutput, error) { + if params == nil { + params = &DeleteResourceSnapshotJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteResourceSnapshotJob", params, optFns, c.addOperationDeleteResourceSnapshotJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteResourceSnapshotJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteResourceSnapshotJobInput struct { + + // Specifies the catalog from which to delete the snapshot job. Valid values are + // AWS and Sandbox . + // + // This member is required. + Catalog *string + + // The unique identifier of the resource snapshot job to be deleted. + // + // This member is required. + ResourceSnapshotJobIdentifier *string + + noSmithyDocumentSerde +} + +type DeleteResourceSnapshotJobOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteResourceSnapshotJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpDeleteResourceSnapshotJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDeleteResourceSnapshotJob{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteResourceSnapshotJob"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpDeleteResourceSnapshotJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteResourceSnapshotJob(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteResourceSnapshotJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteResourceSnapshotJob", + } +} diff --git a/service/partnercentralselling/api_op_DisassociateOpportunity.go b/service/partnercentralselling/api_op_DisassociateOpportunity.go index 19c642a9fd2..559d0cb3453 100644 --- a/service/partnercentralselling/api_op_DisassociateOpportunity.go +++ b/service/partnercentralselling/api_op_DisassociateOpportunity.go @@ -11,10 +11,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Allows you to remove an existing association between an Opportunity and -// -// related entities, such as a Partner Solution, Amazon Web Services product, or an -// Amazon Web Services Marketplace offer. This operation is the counterpart to +// Allows you to remove an existing association between an Opportunity and related +// entities, such as a Partner Solution, Amazon Web Services product, or an Amazon +// Web Services Marketplace offer. This operation is the counterpart to // AssociateOpportunity , and it provides flexibility to manage associations as // business needs change. // @@ -41,7 +40,7 @@ func (c *Client) DisassociateOpportunity(ctx context.Context, params *Disassocia type DisassociateOpportunityInput struct { - // Specifies the catalog associated with the request. This field takes a string + // Specifies the catalog associated with the request. This field takes a string // value from a predefined list: AWS or Sandbox . The catalog determines which // environment the opportunity disassociation is made in. Use AWS to disassociate // opportunities in the Amazon Web Services catalog, and Sandbox for testing in diff --git a/service/partnercentralselling/api_op_GetAwsOpportunitySummary.go b/service/partnercentralselling/api_op_GetAwsOpportunitySummary.go index e8db72ece39..ccf41ed73ca 100644 --- a/service/partnercentralselling/api_op_GetAwsOpportunitySummary.go +++ b/service/partnercentralselling/api_op_GetAwsOpportunitySummary.go @@ -11,8 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves a summary of an AWS Opportunity. This summary includes high-level -// +// Retrieves a summary of an AWS Opportunity. This summary includes high-level // details about the opportunity sourced from AWS, such as lifecycle information, // customer details, and involvement type. It is useful for tracking updates on the // AWS opportunity corresponding to an opportunity in the partner's account. @@ -33,14 +32,14 @@ func (c *Client) GetAwsOpportunitySummary(ctx context.Context, params *GetAwsOpp type GetAwsOpportunitySummaryInput struct { - // Specifies the catalog in which the AWS Opportunity is located. Accepted values + // Specifies the catalog in which the AWS Opportunity is located. Accepted values // include AWS for production opportunities or Sandbox for testing purposes. The // catalog determines which environment the opportunity data is pulled from. // // This member is required. Catalog *string - // The unique identifier for the related partner opportunity. Use this field to + // The unique identifier for the related partner opportunity. Use this field to // correlate an AWS opportunity with its corresponding partner opportunity. // // This member is required. @@ -51,63 +50,63 @@ type GetAwsOpportunitySummaryInput struct { type GetAwsOpportunitySummaryOutput struct { - // Specifies the catalog in which the AWS Opportunity exists. This is the + // Specifies the catalog in which the AWS Opportunity exists. This is the // environment (e.g., AWS or Sandbox ) where the opportunity is being managed. // // This member is required. Catalog *string - // Provides details about the customer associated with the AWS Opportunity, + // Provides details about the customer associated with the AWS Opportunity, // including account information, industry, and other customer data. These details // help partners understand the business context of the opportunity. Customer *types.AwsOpportunityCustomer - // Provides insights into the AWS Opportunity, including engagement score and + // Provides insights into the AWS Opportunity, including engagement score and // recommended actions that AWS suggests for the partner. Insights *types.AwsOpportunityInsights - // Specifies the type of involvement AWS has in the opportunity, such as direct + // Specifies the type of involvement AWS has in the opportunity, such as direct // cosell or advisory support. This field helps partners understand the role AWS // plays in advancing the opportunity. InvolvementType types.SalesInvolvementType - // Provides a reason for any changes in the involvement type of AWS in the + // Provides a reason for any changes in the involvement type of AWS in the // opportunity. This field is used to track why the level of AWS engagement has // changed from For Visibility Only to Co-sell offering transparency into the // partnership dynamics. InvolvementTypeChangeReason types.InvolvementTypeChangeReason - // Contains lifecycle information for the AWS Opportunity, including review + // Contains lifecycle information for the AWS Opportunity, including review // status, stage, and target close date. This field is crucial for partners to // monitor the progression of the opportunity. LifeCycle *types.AwsOpportunityLifeCycle - // Details the AWS opportunity team, including members involved. This information + // Details the AWS opportunity team, including members involved. This information // helps partners know who from AWS is engaged and what their role is. OpportunityTeam []types.AwsTeamMember - // Specifies whether the AWS Opportunity originated from AWS or the partner. This + // Specifies whether the AWS Opportunity originated from AWS or the partner. This // helps distinguish between opportunities that were sourced by AWS and those // referred by the partner. Origin types.OpportunityOrigin - // Provides details about the project associated with the AWS Opportunity, + // Provides details about the project associated with the AWS Opportunity, // including the customer’s business problem, expected outcomes, and project scope. // This information is crucial for understanding the broader context of the // opportunity. Project *types.AwsOpportunityProject - // Lists related entity identifiers, such as AWS products or partner solutions, + // Lists related entity identifiers, such as AWS products or partner solutions, // associated with the AWS Opportunity. These identifiers provide additional // context and help partners understand which AWS services are involved. RelatedEntityIds *types.AwsOpportunityRelatedEntities - // Provides the unique identifier of the related partner opportunity, allowing + // Provides the unique identifier of the related partner opportunity, allowing // partners to link the AWS Opportunity to their corresponding opportunity in their // CRM system. RelatedOpportunityId *string - // Defines the visibility level for the AWS Opportunity. Use Full visibility for + // Defines the visibility level for the AWS Opportunity. Use Full visibility for // most cases, while Limited visibility is reserved for special programs or // sensitive opportunities. Visibility types.Visibility diff --git a/service/partnercentralselling/api_op_GetEngagement.go b/service/partnercentralselling/api_op_GetEngagement.go new file mode 100644 index 00000000000..cd272d663c1 --- /dev/null +++ b/service/partnercentralselling/api_op_GetEngagement.go @@ -0,0 +1,196 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Use this action to retrieve the engagement record for a given +// +// EngagementIdentifier . +func (c *Client) GetEngagement(ctx context.Context, params *GetEngagementInput, optFns ...func(*Options)) (*GetEngagementOutput, error) { + if params == nil { + params = &GetEngagementInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetEngagement", params, optFns, c.addOperationGetEngagementMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetEngagementOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetEngagementInput struct { + + // Specifies the catalog related to the engagement request. Valid values are AWS + // and Sandbox . + // + // This member is required. + Catalog *string + + // Specifies the identifier of the Engagement record to retrieve. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +type GetEngagementOutput struct { + + // The Amazon Resource Name (ARN) of the engagement retrieved. + Arn *string + + // A list of context objects associated with the engagement. Each context + // provides additional information related to the Engagement, such as customer + // projects or documents. + Contexts []types.EngagementContextDetails + + // The date and time when the Engagement was created, presented in ISO 8601 + // format (UTC). For example: "2023-05-01T20:37:46Z". This timestamp helps track + // the lifecycle of the Engagement. + CreatedAt *time.Time + + // The AWS account ID of the user who originally created the engagement. This + // field helps in tracking the origin of the engagement. + CreatedBy *string + + // A more detailed description of the engagement. This provides additional + // context or information about the engagement's purpose or scope. + Description *string + + // The unique resource identifier of the engagement retrieved. + Id *string + + // Specifies the current count of members participating in the Engagement. This + // count includes all active members regardless of their roles or permissions + // within the Engagement. + MemberCount *int32 + + // The title of the engagement. It provides a brief, descriptive name for the + // engagement that is meaningful and easily recognizable. + Title *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetEngagementMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpGetEngagement{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpGetEngagement{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetEngagement"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpGetEngagementValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetEngagement(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetEngagement(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetEngagement", + } +} diff --git a/service/partnercentralselling/api_op_GetEngagementInvitation.go b/service/partnercentralselling/api_op_GetEngagementInvitation.go index b2d6b317e9f..2006844bfa3 100644 --- a/service/partnercentralselling/api_op_GetEngagementInvitation.go +++ b/service/partnercentralselling/api_op_GetEngagementInvitation.go @@ -65,10 +65,26 @@ type GetEngagementInvitationOutput struct { // The Amazon Resource Name (ARN) that identifies the engagement invitation. Arn *string + // The description of the engagement associated with this invitation. + EngagementDescription *string + + // The identifier of the engagement associated with this invitation.This ID links + // the invitation to its corresponding engagement. + EngagementId *string + // The title of the engagement invitation, summarizing the purpose or objectives // of the opportunity shared by AWS. EngagementTitle *string + // A list of active members currently part of the Engagement. This array contains + // a maximum of 10 members, each represented by an object with the following + // properties. + // + // - CompanyName: The name of the member's company. + // + // - WebsiteUrl: The website URL of the member's company. + ExistingMembers []types.EngagementMemberSummary + // Indicates the date on which the engagement invitation will expire if not // accepted by the partner. ExpirationDate *time.Time @@ -76,6 +92,9 @@ type GetEngagementInvitationOutput struct { // The date when the engagement invitation was sent to the partner. InvitationDate *time.Time + // The message sent to the invited partner when the invitation was created. + InvitationMessage *string + // Details of the engagement invitation payload, including specific data relevant // to the invitation's contents, such as customer information and opportunity // insights. diff --git a/service/partnercentralselling/api_op_GetOpportunity.go b/service/partnercentralselling/api_op_GetOpportunity.go index 8ad90bbf5ac..e8942fc1abd 100644 --- a/service/partnercentralselling/api_op_GetOpportunity.go +++ b/service/partnercentralselling/api_op_GetOpportunity.go @@ -12,7 +12,7 @@ import ( "time" ) -// Fetches the Opportunity record from Partner Central by a given Identifier . +// Fetches the Opportunity record from Partner Central by a given Identifier . // // Use the ListOpportunities action or the event notification (from Amazon // EventBridge) to obtain this identifier. @@ -33,7 +33,7 @@ func (c *Client) GetOpportunity(ctx context.Context, params *GetOpportunityInput type GetOpportunityInput struct { - // Specifies the catalog associated with the request. This field takes a string + // Specifies the catalog associated with the request. This field takes a string // value from a predefined list: AWS or Sandbox . The catalog determines which // environment the opportunity is fetched from. Use AWS to retrieve opportunities // in the Amazon Web Services catalog, and Sandbox to retrieve opportunities in a @@ -52,7 +52,7 @@ type GetOpportunityInput struct { type GetOpportunityOutput struct { - // Specifies the catalog associated with the request. This field takes a string + // Specifies the catalog associated with the request. This field takes a string // value from a predefined list: AWS or Sandbox . The catalog determines which // environment the opportunity information is retrieved from. Use AWS to retrieve // opportunities in the Amazon Web Services catalog, and Sandbox to retrieve @@ -76,13 +76,16 @@ type GetOpportunityOutput struct { // This member is required. LastModifiedDate *time.Time - // Provides information about the associations of other entities with the + // Provides information about the associations of other entities with the // opportunity. These entities include identifiers for AWSProducts , Partner // Solutions , and AWSMarketplaceOffers . // // This member is required. RelatedEntityIdentifiers *types.RelatedEntityIdentifiers + // The Amazon Resource Name (ARN) that uniquely identifies the opportunity. + Arn *string + // Specifies details of the customer associated with the Opportunity . Customer *types.Customer @@ -102,7 +105,7 @@ type GetOpportunityOutput struct { // involved in collaborating on this opportunity within the partner's organization. OpportunityTeam []types.Contact - // Specifies the opportunity type as renewal, new, or expansion. + // Specifies the opportunity type as renewal, new, or expansion. // // Opportunity types: // @@ -123,7 +126,7 @@ type GetOpportunityOutput struct { // payload sent back to the partner. PartnerOpportunityIdentifier *string - // Identifies the type of support the partner needs from Amazon Web Services. + // Identifies the type of support the partner needs from Amazon Web Services. // // Valid values: // diff --git a/service/partnercentralselling/api_op_GetResourceSnapshot.go b/service/partnercentralselling/api_op_GetResourceSnapshot.go new file mode 100644 index 00000000000..d9f523033bd --- /dev/null +++ b/service/partnercentralselling/api_op_GetResourceSnapshot.go @@ -0,0 +1,236 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Use this action to retrieve a specific snapshot record. +func (c *Client) GetResourceSnapshot(ctx context.Context, params *GetResourceSnapshotInput, optFns ...func(*Options)) (*GetResourceSnapshotOutput, error) { + if params == nil { + params = &GetResourceSnapshotInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetResourceSnapshot", params, optFns, c.addOperationGetResourceSnapshotMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetResourceSnapshotOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetResourceSnapshotInput struct { + + // Specifies the catalog related to the request. Valid values are: + // + // - AWS: Retrieves the snapshot from the production AWS environment. + // + // - Sandbox: Retrieves the snapshot from a sandbox environment used for testing + // or development purposes. + // + // This member is required. + Catalog *string + + // The unique identifier of the engagement associated with the snapshot. This + // field links the snapshot to a specific engagement context. + // + // This member is required. + EngagementIdentifier *string + + // The unique identifier of the specific resource that was snapshotted. The format + // and constraints of this identifier depend on the ResourceType specified. For + // Opportunity type, it will be an opportunity ID + // + // This member is required. + ResourceIdentifier *string + + // he name of the template that defines the schema for the snapshot. This template + // determines which subset of the resource data is included in the snapshot and + // must correspond to an existing and valid template for the specified ResourceType + // . + // + // This member is required. + ResourceSnapshotTemplateIdentifier *string + + // Specifies the type of resource that was snapshotted. This field determines the + // structure and content of the snapshot payload. Valid value includes: Opportunity + // : For opportunity-related data. + // + // This member is required. + ResourceType types.ResourceType + + // Specifies which revision of the snapshot to retrieve. If omitted returns the + // latest revision. + Revision *int32 + + noSmithyDocumentSerde +} + +type GetResourceSnapshotOutput struct { + + // The catalog in which the snapshot was created. Matches the Catalog specified in + // the request. + // + // This member is required. + Catalog *string + + // The Amazon Resource Name (ARN) of the snapshot. This globally unique + // identifier can be used for resource-specific operations across AWS services. + Arn *string + + // The timestamp when the snapshot was created, in ISO 8601 format (e.g., + // "2023-06-01T14:30:00Z"). This allows for precise tracking of when the snapshot + // was taken. + CreatedAt *time.Time + + // The AWS account ID of the principal (user or role) who created the snapshot. + // This helps in tracking the origin of the snapshot. + CreatedBy *string + + // The identifier of the engagement associated with this snapshot. Matches the + // EngagementIdentifier specified in the request. + EngagementId *string + + // Represents the payload of a resource snapshot. This structure is designed to + // accommodate different types of resource snapshots, currently supporting + // opportunity summaries. + Payload types.ResourceSnapshotPayload + + // The identifier of the specific resource that was snapshotted. Matches the + // ResourceIdentifier specified in the request. + ResourceId *string + + // The name of the view used for this snapshot. This is the same as the template + // name. + ResourceSnapshotTemplateName *string + + // The type of the resource that was snapshotted. Matches the ResourceType + // specified in the request. + ResourceType types.ResourceType + + // The revision number of this snapshot. This is a positive integer that is + // sequential and unique within the context of a resource view. + Revision *int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetResourceSnapshotMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpGetResourceSnapshot{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpGetResourceSnapshot{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetResourceSnapshot"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpGetResourceSnapshotValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetResourceSnapshot(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetResourceSnapshot(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetResourceSnapshot", + } +} diff --git a/service/partnercentralselling/api_op_GetResourceSnapshotJob.go b/service/partnercentralselling/api_op_GetResourceSnapshotJob.go new file mode 100644 index 00000000000..874eddd341c --- /dev/null +++ b/service/partnercentralselling/api_op_GetResourceSnapshotJob.go @@ -0,0 +1,222 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Use this action to retrieves information about a specific resource snapshot +// +// job. +func (c *Client) GetResourceSnapshotJob(ctx context.Context, params *GetResourceSnapshotJobInput, optFns ...func(*Options)) (*GetResourceSnapshotJobOutput, error) { + if params == nil { + params = &GetResourceSnapshotJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetResourceSnapshotJob", params, optFns, c.addOperationGetResourceSnapshotJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetResourceSnapshotJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetResourceSnapshotJobInput struct { + + // Specifies the catalog related to the request. Valid values are: + // + // - AWS: Retrieves the snapshot job from the production AWS environment. + // + // - Sandbox: Retrieves the snapshot job from a sandbox environment used for + // testing or development purposes. + // + // This member is required. + Catalog *string + + // The unique identifier of the resource snapshot job to be retrieved. This + // identifier is crucial for pinpointing the specific job you want to query. + // + // This member is required. + ResourceSnapshotJobIdentifier *string + + noSmithyDocumentSerde +} + +type GetResourceSnapshotJobOutput struct { + + // The catalog in which the snapshot job was created. This will match the catalog + // specified in the request. + // + // This member is required. + Catalog *string + + // he Amazon Resource Name (ARN) of the snapshot job. This globally unique + // identifier can be used for resource-specific operations across AWS services. + Arn *string + + // The date and time when the snapshot job was created, in ISO 8601 format (UTC). + // Example: "2023-05-01T20:37:46Z" + CreatedAt *time.Time + + // The identifier of the engagement associated with this snapshot job. This links + // the job to a specific engagement context. + EngagementId *string + + // The unique identifier of the snapshot job. This matches the + // ResourceSnapshotJobIdentifier provided in the request. + Id *string + + // If the job has encountered any failures, this field contains the error message + // from the most recent failure. This can be useful for troubleshooting issues with + // the job. + LastFailure *string + + // The date and time of the last successful execution of the job, in ISO 8601 + // format (UTC). Example: "2023-05-01T20:37:46Z" + LastSuccessfulExecutionDate *time.Time + + // The Amazon Resource Name (ARN) of the resource being snapshotted. This + // provides a globally unique identifier for the resource across AWS. + ResourceArn *string + + // The identifier of the specific resource being snapshotted. The format may vary + // depending on the ResourceType . + ResourceId *string + + // The name of the template used for creating the snapshot. This is the same as + // the template name. It defines the structure and content of the snapshot. + ResourceSnapshotTemplateName *string + + // The type of resource being snapshotted. This would have Opportunity as a value + // as it is dependent on the supported resource type. + ResourceType types.ResourceType + + // The current status of the snapshot job. Valid values: + // + // - STOPPED: The job is not currently running. + // + // - RUNNING: The job is actively executing. + Status types.ResourceSnapshotJobStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetResourceSnapshotJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpGetResourceSnapshotJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpGetResourceSnapshotJob{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetResourceSnapshotJob"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpGetResourceSnapshotJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetResourceSnapshotJob(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetResourceSnapshotJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetResourceSnapshotJob", + } +} diff --git a/service/partnercentralselling/api_op_GetSellingSystemSettings.go b/service/partnercentralselling/api_op_GetSellingSystemSettings.go new file mode 100644 index 00000000000..e6bbf166536 --- /dev/null +++ b/service/partnercentralselling/api_op_GetSellingSystemSettings.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the currently set system settings, which include the IAM Role used +// for resource snapshot jobs. +func (c *Client) GetSellingSystemSettings(ctx context.Context, params *GetSellingSystemSettingsInput, optFns ...func(*Options)) (*GetSellingSystemSettingsOutput, error) { + if params == nil { + params = &GetSellingSystemSettingsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetSellingSystemSettings", params, optFns, c.addOperationGetSellingSystemSettingsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetSellingSystemSettingsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetSellingSystemSettingsInput struct { + + // Specifies the catalog in which the settings are defined. Acceptable values + // include AWS for production and Sandbox for testing environments. + // + // This member is required. + Catalog *string + + noSmithyDocumentSerde +} + +type GetSellingSystemSettingsOutput struct { + + // Specifies the catalog in which the settings are defined. Acceptable values + // include AWS for production and Sandbox for testing environments. + // + // This member is required. + Catalog *string + + // Specifies the ARN of the IAM Role used for resource snapshot job executions. + ResourceSnapshotJobRoleArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetSellingSystemSettingsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpGetSellingSystemSettings{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpGetSellingSystemSettings{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetSellingSystemSettings"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpGetSellingSystemSettingsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSellingSystemSettings(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetSellingSystemSettings(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetSellingSystemSettings", + } +} diff --git a/service/partnercentralselling/api_op_ListEngagementByAcceptingInvitationTasks.go b/service/partnercentralselling/api_op_ListEngagementByAcceptingInvitationTasks.go new file mode 100644 index 00000000000..929f6c5a89d --- /dev/null +++ b/service/partnercentralselling/api_op_ListEngagementByAcceptingInvitationTasks.go @@ -0,0 +1,299 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all in-progress, completed, or failed +// +// StartEngagementByAcceptingInvitationTask tasks that were initiated by the +// caller's account. +func (c *Client) ListEngagementByAcceptingInvitationTasks(ctx context.Context, params *ListEngagementByAcceptingInvitationTasksInput, optFns ...func(*Options)) (*ListEngagementByAcceptingInvitationTasksOutput, error) { + if params == nil { + params = &ListEngagementByAcceptingInvitationTasksInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListEngagementByAcceptingInvitationTasks", params, optFns, c.addOperationListEngagementByAcceptingInvitationTasksMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListEngagementByAcceptingInvitationTasksOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListEngagementByAcceptingInvitationTasksInput struct { + + // Specifies the catalog related to the request. Valid values are: + // + // - AWS: Retrieves the request from the production AWS environment. + // + // - Sandbox: Retrieves the request from a sandbox environment used for testing + // or development purposes. + // + // This member is required. + Catalog *string + + // Filters tasks by the identifiers of the engagement invitations they are + // processing. + EngagementInvitationIdentifier []string + + // Use this parameter to control the number of items returned in each request, + // which can be useful for performance tuning and managing large result sets. + MaxResults *int32 + + // Use this parameter for pagination when the result set spans multiple pages. + // This value is obtained from the NextToken field in the response of a previous + // call to this API. + NextToken *string + + // Filters tasks by the identifiers of the opportunities they created or are + // associated with. + OpportunityIdentifier []string + + // Specifies the sorting criteria for the returned results. This allows you to + // order the tasks based on specific attributes. + Sort *types.ListTasksSortBase + + // Filters tasks by their unique identifiers. Use this when you want to retrieve + // information about specific tasks. + TaskIdentifier []string + + // Filters the tasks based on their current status. This allows you to focus on + // tasks in specific states. + TaskStatus []types.TaskStatus + + noSmithyDocumentSerde +} + +type ListEngagementByAcceptingInvitationTasksOutput struct { + + // A token used for pagination to retrieve the next page of results.If there are + // more results available, this field will contain a token that can be used in a + // subsequent API call to retrieve the next page. If there are no more results, + // this field will be null or an empty string. + NextToken *string + + // An array of EngagementByAcceptingInvitationTaskSummary objects, each + // representing a task that matches the specified filters. The array may be empty + // if no tasks match the criteria. + TaskSummaries []types.ListEngagementByAcceptingInvitationTaskSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListEngagementByAcceptingInvitationTasksMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListEngagementByAcceptingInvitationTasks{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListEngagementByAcceptingInvitationTasks{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListEngagementByAcceptingInvitationTasks"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpListEngagementByAcceptingInvitationTasksValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEngagementByAcceptingInvitationTasks(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListEngagementByAcceptingInvitationTasksPaginatorOptions is the paginator +// options for ListEngagementByAcceptingInvitationTasks +type ListEngagementByAcceptingInvitationTasksPaginatorOptions struct { + // Use this parameter to control the number of items returned in each request, + // which can be useful for performance tuning and managing large result sets. + 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 +} + +// ListEngagementByAcceptingInvitationTasksPaginator is a paginator for +// ListEngagementByAcceptingInvitationTasks +type ListEngagementByAcceptingInvitationTasksPaginator struct { + options ListEngagementByAcceptingInvitationTasksPaginatorOptions + client ListEngagementByAcceptingInvitationTasksAPIClient + params *ListEngagementByAcceptingInvitationTasksInput + nextToken *string + firstPage bool +} + +// NewListEngagementByAcceptingInvitationTasksPaginator returns a new +// ListEngagementByAcceptingInvitationTasksPaginator +func NewListEngagementByAcceptingInvitationTasksPaginator(client ListEngagementByAcceptingInvitationTasksAPIClient, params *ListEngagementByAcceptingInvitationTasksInput, optFns ...func(*ListEngagementByAcceptingInvitationTasksPaginatorOptions)) *ListEngagementByAcceptingInvitationTasksPaginator { + if params == nil { + params = &ListEngagementByAcceptingInvitationTasksInput{} + } + + options := ListEngagementByAcceptingInvitationTasksPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListEngagementByAcceptingInvitationTasksPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListEngagementByAcceptingInvitationTasksPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListEngagementByAcceptingInvitationTasks page. +func (p *ListEngagementByAcceptingInvitationTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEngagementByAcceptingInvitationTasksOutput, 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 + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListEngagementByAcceptingInvitationTasks(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 +} + +// ListEngagementByAcceptingInvitationTasksAPIClient is a client that implements +// the ListEngagementByAcceptingInvitationTasks operation. +type ListEngagementByAcceptingInvitationTasksAPIClient interface { + ListEngagementByAcceptingInvitationTasks(context.Context, *ListEngagementByAcceptingInvitationTasksInput, ...func(*Options)) (*ListEngagementByAcceptingInvitationTasksOutput, error) +} + +var _ ListEngagementByAcceptingInvitationTasksAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListEngagementByAcceptingInvitationTasks(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListEngagementByAcceptingInvitationTasks", + } +} diff --git a/service/partnercentralselling/api_op_ListEngagementFromOpportunityTasks.go b/service/partnercentralselling/api_op_ListEngagementFromOpportunityTasks.go new file mode 100644 index 00000000000..6f63213497c --- /dev/null +++ b/service/partnercentralselling/api_op_ListEngagementFromOpportunityTasks.go @@ -0,0 +1,300 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all in-progress, completed, or failed EngagementFromOpportunity tasks +// +// that were initiated by the caller's account. +func (c *Client) ListEngagementFromOpportunityTasks(ctx context.Context, params *ListEngagementFromOpportunityTasksInput, optFns ...func(*Options)) (*ListEngagementFromOpportunityTasksOutput, error) { + if params == nil { + params = &ListEngagementFromOpportunityTasksInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListEngagementFromOpportunityTasks", params, optFns, c.addOperationListEngagementFromOpportunityTasksMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListEngagementFromOpportunityTasksOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListEngagementFromOpportunityTasksInput struct { + + // Specifies the catalog related to the request. Valid values are: + // + // - AWS: Retrieves the request from the production AWS environment. + // + // - Sandbox: Retrieves the request from a sandbox environment used for testing + // or development purposes. + // + // This member is required. + Catalog *string + + // Filters tasks by the identifiers of the engagements they created or are + // associated with. + EngagementIdentifier []string + + // Specifies the maximum number of results to return in a single page of the + // response.Use this parameter to control the number of items returned in each + // request, which can be useful for performance tuning and managing large result + // sets. + MaxResults *int32 + + // The token for requesting the next page of results. This value is obtained from + // the NextToken field in the response of a previous call to this API. Use this + // parameter for pagination when the result set spans multiple pages. + NextToken *string + + // The identifier of the original opportunity associated with this task. + OpportunityIdentifier []string + + // Specifies the sorting criteria for the returned results. This allows you to + // order the tasks based on specific attributes. + Sort *types.ListTasksSortBase + + // Filters tasks by their unique identifiers. Use this when you want to retrieve + // information about specific tasks. + TaskIdentifier []string + + // Filters the tasks based on their current status. This allows you to focus on + // tasks in specific states. + TaskStatus []types.TaskStatus + + noSmithyDocumentSerde +} + +type ListEngagementFromOpportunityTasksOutput struct { + + // A token used for pagination to retrieve the next page of results. If there are + // more results available, this field will contain a token that can be used in a + // subsequent API call to retrieve the next page. If there are no more results, + // this field will be null or an empty string. + NextToken *string + + // TaskSummaries An array of TaskSummary objects containing details about each + // task. + TaskSummaries []types.ListEngagementFromOpportunityTaskSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListEngagementFromOpportunityTasksMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListEngagementFromOpportunityTasks{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListEngagementFromOpportunityTasks{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListEngagementFromOpportunityTasks"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpListEngagementFromOpportunityTasksValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEngagementFromOpportunityTasks(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListEngagementFromOpportunityTasksPaginatorOptions is the paginator options for +// ListEngagementFromOpportunityTasks +type ListEngagementFromOpportunityTasksPaginatorOptions struct { + // Specifies the maximum number of results to return in a single page of the + // response.Use this parameter to control the number of items returned in each + // request, which can be useful for performance tuning and managing large result + // sets. + 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 +} + +// ListEngagementFromOpportunityTasksPaginator is a paginator for +// ListEngagementFromOpportunityTasks +type ListEngagementFromOpportunityTasksPaginator struct { + options ListEngagementFromOpportunityTasksPaginatorOptions + client ListEngagementFromOpportunityTasksAPIClient + params *ListEngagementFromOpportunityTasksInput + nextToken *string + firstPage bool +} + +// NewListEngagementFromOpportunityTasksPaginator returns a new +// ListEngagementFromOpportunityTasksPaginator +func NewListEngagementFromOpportunityTasksPaginator(client ListEngagementFromOpportunityTasksAPIClient, params *ListEngagementFromOpportunityTasksInput, optFns ...func(*ListEngagementFromOpportunityTasksPaginatorOptions)) *ListEngagementFromOpportunityTasksPaginator { + if params == nil { + params = &ListEngagementFromOpportunityTasksInput{} + } + + options := ListEngagementFromOpportunityTasksPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListEngagementFromOpportunityTasksPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListEngagementFromOpportunityTasksPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListEngagementFromOpportunityTasks page. +func (p *ListEngagementFromOpportunityTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEngagementFromOpportunityTasksOutput, 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 + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListEngagementFromOpportunityTasks(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 +} + +// ListEngagementFromOpportunityTasksAPIClient is a client that implements the +// ListEngagementFromOpportunityTasks operation. +type ListEngagementFromOpportunityTasksAPIClient interface { + ListEngagementFromOpportunityTasks(context.Context, *ListEngagementFromOpportunityTasksInput, ...func(*Options)) (*ListEngagementFromOpportunityTasksOutput, error) +} + +var _ ListEngagementFromOpportunityTasksAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListEngagementFromOpportunityTasks(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListEngagementFromOpportunityTasks", + } +} diff --git a/service/partnercentralselling/api_op_ListEngagementInvitations.go b/service/partnercentralselling/api_op_ListEngagementInvitations.go index dd3f417467a..e188ec0aeb0 100644 --- a/service/partnercentralselling/api_op_ListEngagementInvitations.go +++ b/service/partnercentralselling/api_op_ListEngagementInvitations.go @@ -43,6 +43,13 @@ type ListEngagementInvitationsInput struct { // This member is required. ParticipantType types.ParticipantType + // Retrieves a list of engagement invitation summaries based on specified + // filters. The ListEngagementInvitations operation allows you to view all + // invitations that you have sent or received. You must specify the ParticipantType + // to filter invitations where you are either the SENDER or the RECEIVER. + // Invitations will automatically expire if not accepted within 15 days. + EngagementIdentifier []string + // Specifies the maximum number of engagement invitations to return in the // response. If more results are available, a pagination token will be provided. MaxResults *int32 @@ -57,11 +64,17 @@ type ListEngagementInvitationsInput struct { // the invitation. PayloadType []types.EngagementInvitationPayloadType + // List of sender AWS account IDs to filter the invitations. + SenderAwsAccountId []string + // Specifies the sorting options for listing engagement invitations. Invitations // can be sorted by fields such as InvitationDate or Status to help partners view // results in their preferred order. Sort *types.OpportunityEngagementInvitationSort + // Status values to filter the invitations. + Status []types.InvitationStatus + noSmithyDocumentSerde } diff --git a/service/partnercentralselling/api_op_ListEngagementMembers.go b/service/partnercentralselling/api_op_ListEngagementMembers.go new file mode 100644 index 00000000000..f9b3f80ef98 --- /dev/null +++ b/service/partnercentralselling/api_op_ListEngagementMembers.go @@ -0,0 +1,275 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the details of member partners in an engagement. This operation can +// +// only be invoked by members of the engagement. The ListEngagementMembers +// operation allows you to fetch information about the members of a specific +// engagement. This action is restricted to members of the engagement being +// queried. +func (c *Client) ListEngagementMembers(ctx context.Context, params *ListEngagementMembersInput, optFns ...func(*Options)) (*ListEngagementMembersOutput, error) { + if params == nil { + params = &ListEngagementMembersInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListEngagementMembers", params, optFns, c.addOperationListEngagementMembersMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListEngagementMembersOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListEngagementMembersInput struct { + + // The catalog related to the request. + // + // This member is required. + Catalog *string + + // Identifier of the engagement record to retrieve members from. + // + // This member is required. + Identifier *string + + // The maximum number of results to return in a single call. + MaxResults *int32 + + // The token for the next set of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListEngagementMembersOutput struct { + + // Provides a list of engagement members. + // + // This member is required. + EngagementMemberList []types.EngagementMember + + // A pagination token used to retrieve the next set of results. If there are more + // results available than can be returned in a single response, this token will be + // present. Use this token in a subsequent request to retrieve the next page of + // results. If there are no more results, this value will be null. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListEngagementMembersMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListEngagementMembers{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListEngagementMembers{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListEngagementMembers"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpListEngagementMembersValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEngagementMembers(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListEngagementMembersPaginatorOptions is the paginator options for +// ListEngagementMembers +type ListEngagementMembersPaginatorOptions struct { + // The maximum number of results to return in a single call. + 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 +} + +// ListEngagementMembersPaginator is a paginator for ListEngagementMembers +type ListEngagementMembersPaginator struct { + options ListEngagementMembersPaginatorOptions + client ListEngagementMembersAPIClient + params *ListEngagementMembersInput + nextToken *string + firstPage bool +} + +// NewListEngagementMembersPaginator returns a new ListEngagementMembersPaginator +func NewListEngagementMembersPaginator(client ListEngagementMembersAPIClient, params *ListEngagementMembersInput, optFns ...func(*ListEngagementMembersPaginatorOptions)) *ListEngagementMembersPaginator { + if params == nil { + params = &ListEngagementMembersInput{} + } + + options := ListEngagementMembersPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListEngagementMembersPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListEngagementMembersPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListEngagementMembers page. +func (p *ListEngagementMembersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEngagementMembersOutput, 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 + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListEngagementMembers(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 +} + +// ListEngagementMembersAPIClient is a client that implements the +// ListEngagementMembers operation. +type ListEngagementMembersAPIClient interface { + ListEngagementMembers(context.Context, *ListEngagementMembersInput, ...func(*Options)) (*ListEngagementMembersOutput, error) +} + +var _ ListEngagementMembersAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListEngagementMembers(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListEngagementMembers", + } +} diff --git a/service/partnercentralselling/api_op_ListEngagementResourceAssociations.go b/service/partnercentralselling/api_op_ListEngagementResourceAssociations.go new file mode 100644 index 00000000000..4a8efa6f87f --- /dev/null +++ b/service/partnercentralselling/api_op_ListEngagementResourceAssociations.go @@ -0,0 +1,289 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the associations between resources and engagements where the caller is a +// +// member and has at least one snapshot in the engagement. +func (c *Client) ListEngagementResourceAssociations(ctx context.Context, params *ListEngagementResourceAssociationsInput, optFns ...func(*Options)) (*ListEngagementResourceAssociationsOutput, error) { + if params == nil { + params = &ListEngagementResourceAssociationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListEngagementResourceAssociations", params, optFns, c.addOperationListEngagementResourceAssociationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListEngagementResourceAssociationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListEngagementResourceAssociationsInput struct { + + // Specifies the catalog in which to search for engagement-resource associations. + // + // This member is required. + Catalog *string + + // Filters the results to include only associations with resources owned by the + // specified AWS account. Use this when you want to find associations related to + // resources owned by a particular account. + CreatedBy *string + + // Filters the results to include only associations related to the specified + // engagement. Use this when you want to find all resources associated with a + // specific engagement. + EngagementIdentifier *string + + // Limits the number of results returned in a single call. Use this to control + // the number of results returned, especially useful for pagination. + MaxResults *int32 + + // A token used for pagination of results. Include this token in subsequent + // requests to retrieve the next set of results. + NextToken *string + + // Filters the results to include only associations with the specified resource. + // Varies depending on the resource type. Use this when you want to find all + // engagements associated with a specific resource. + ResourceIdentifier *string + + // Filters the results to include only associations with resources of the + // specified type. + ResourceType types.ResourceType + + noSmithyDocumentSerde +} + +type ListEngagementResourceAssociationsOutput struct { + + // A list of engagement-resource association summaries. + // + // This member is required. + EngagementResourceAssociationSummaries []types.EngagementResourceAssociationSummary + + // A token to retrieve the next set of results. Use this token in a subsequent + // request to retrieve additional results if the response was truncated. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListEngagementResourceAssociationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListEngagementResourceAssociations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListEngagementResourceAssociations{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListEngagementResourceAssociations"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpListEngagementResourceAssociationsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEngagementResourceAssociations(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListEngagementResourceAssociationsPaginatorOptions is the paginator options for +// ListEngagementResourceAssociations +type ListEngagementResourceAssociationsPaginatorOptions struct { + // Limits the number of results returned in a single call. Use this to control + // the number of results returned, especially useful for pagination. + 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 +} + +// ListEngagementResourceAssociationsPaginator is a paginator for +// ListEngagementResourceAssociations +type ListEngagementResourceAssociationsPaginator struct { + options ListEngagementResourceAssociationsPaginatorOptions + client ListEngagementResourceAssociationsAPIClient + params *ListEngagementResourceAssociationsInput + nextToken *string + firstPage bool +} + +// NewListEngagementResourceAssociationsPaginator returns a new +// ListEngagementResourceAssociationsPaginator +func NewListEngagementResourceAssociationsPaginator(client ListEngagementResourceAssociationsAPIClient, params *ListEngagementResourceAssociationsInput, optFns ...func(*ListEngagementResourceAssociationsPaginatorOptions)) *ListEngagementResourceAssociationsPaginator { + if params == nil { + params = &ListEngagementResourceAssociationsInput{} + } + + options := ListEngagementResourceAssociationsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListEngagementResourceAssociationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListEngagementResourceAssociationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListEngagementResourceAssociations page. +func (p *ListEngagementResourceAssociationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEngagementResourceAssociationsOutput, 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 + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListEngagementResourceAssociations(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 +} + +// ListEngagementResourceAssociationsAPIClient is a client that implements the +// ListEngagementResourceAssociations operation. +type ListEngagementResourceAssociationsAPIClient interface { + ListEngagementResourceAssociations(context.Context, *ListEngagementResourceAssociationsInput, ...func(*Options)) (*ListEngagementResourceAssociationsOutput, error) +} + +var _ ListEngagementResourceAssociationsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListEngagementResourceAssociations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListEngagementResourceAssociations", + } +} diff --git a/service/partnercentralselling/api_op_ListEngagements.go b/service/partnercentralselling/api_op_ListEngagements.go new file mode 100644 index 00000000000..3d39d87d6bc --- /dev/null +++ b/service/partnercentralselling/api_op_ListEngagements.go @@ -0,0 +1,281 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// This action allows users to retrieve a list of engagement records from Partner +// +// Central. This action can be used to manage and track various engagements across +// different stages of the partner selling process. +func (c *Client) ListEngagements(ctx context.Context, params *ListEngagementsInput, optFns ...func(*Options)) (*ListEngagementsOutput, error) { + if params == nil { + params = &ListEngagementsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListEngagements", params, optFns, c.addOperationListEngagementsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListEngagementsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListEngagementsInput struct { + + // Specifies the catalog related to the request. + // + // This member is required. + Catalog *string + + // A list of AWS account IDs. When specified, the response includes engagements + // created by these accounts. This filter is useful for finding engagements created + // by specific team members. + CreatedBy []string + + // An array of strings representing engagement identifiers to retrieve. + EngagementIdentifier []string + + // An array of strings representing AWS Account IDs. Use this to exclude + // engagements created by specific users. + ExcludeCreatedBy []string + + // The maximum number of results to return in a single call. + MaxResults *int32 + + // The token for the next set of results. This value is returned from a previous + // call. + NextToken *string + + // An object that specifies the sort order of the results. + Sort *types.EngagementSort + + noSmithyDocumentSerde +} + +type ListEngagementsOutput struct { + + // An array of engagement summary objects. + // + // This member is required. + EngagementSummaryList []types.EngagementSummary + + // The token to retrieve the next set of results. This field will be null if + // there are no more results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListEngagementsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListEngagements{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListEngagements{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListEngagements"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpListEngagementsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEngagements(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListEngagementsPaginatorOptions is the paginator options for ListEngagements +type ListEngagementsPaginatorOptions struct { + // The maximum number of results to return in a single call. + 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 +} + +// ListEngagementsPaginator is a paginator for ListEngagements +type ListEngagementsPaginator struct { + options ListEngagementsPaginatorOptions + client ListEngagementsAPIClient + params *ListEngagementsInput + nextToken *string + firstPage bool +} + +// NewListEngagementsPaginator returns a new ListEngagementsPaginator +func NewListEngagementsPaginator(client ListEngagementsAPIClient, params *ListEngagementsInput, optFns ...func(*ListEngagementsPaginatorOptions)) *ListEngagementsPaginator { + if params == nil { + params = &ListEngagementsInput{} + } + + options := ListEngagementsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListEngagementsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListEngagementsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListEngagements page. +func (p *ListEngagementsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEngagementsOutput, 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 + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListEngagements(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 +} + +// ListEngagementsAPIClient is a client that implements the ListEngagements +// operation. +type ListEngagementsAPIClient interface { + ListEngagements(context.Context, *ListEngagementsInput, ...func(*Options)) (*ListEngagementsOutput, error) +} + +var _ ListEngagementsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListEngagements(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListEngagements", + } +} diff --git a/service/partnercentralselling/api_op_ListOpportunities.go b/service/partnercentralselling/api_op_ListOpportunities.go index f17fabda449..f1937c844b8 100644 --- a/service/partnercentralselling/api_op_ListOpportunities.go +++ b/service/partnercentralselling/api_op_ListOpportunities.go @@ -49,7 +49,7 @@ func (c *Client) ListOpportunities(ctx context.Context, params *ListOpportunitie type ListOpportunitiesInput struct { - // Specifies the catalog associated with the request. This field takes a string + // Specifies the catalog associated with the request. This field takes a string // value from a predefined list: AWS or Sandbox . The catalog determines which // environment the opportunities are listed in. Use AWS for listing real // opportunities in the Amazon Web Services catalog, and Sandbox for testing in @@ -83,19 +83,19 @@ type ListOpportunitiesInput struct { // Qualified , Technical Validation , Business Validation , or Closed Won . LifeCycleStage []types.Stage - // Specifies the maximum number of results to return in a single call. This - // limits the number of opportunities returned in the response to avoid providing - // too many results at once. + // Specifies the maximum number of results to return in a single call. This limits + // the number of opportunities returned in the response to avoid providing too many + // results at once. // // Default: 20 MaxResults *int32 - // A pagination token used to retrieve the next set of results in subsequent + // A pagination token used to retrieve the next set of results in subsequent // calls. This token is included in the response only if there are additional // result pages available. NextToken *string - // An object that specifies how the response is sorted. The default Sort.SortBy + // An object that specifies how the response is sorted. The default Sort.SortBy // value is LastModifiedDate . Sort *types.OpportunitySort @@ -104,14 +104,13 @@ type ListOpportunitiesInput struct { type ListOpportunitiesOutput struct { - // An array that contains minimal details for opportunities that match the - // request criteria. This summary view provides a quick overview of relevant - // opportunities. + // An array that contains minimal details for opportunities that match the request + // criteria. This summary view provides a quick overview of relevant opportunities. // // This member is required. OpportunitySummaries []types.OpportunitySummary - // A pagination token used to retrieve the next set of results in subsequent + // A pagination token used to retrieve the next set of results in subsequent // calls. This token is included in the response only if there are additional // result pages available. NextToken *string @@ -224,9 +223,9 @@ func (c *Client) addOperationListOpportunitiesMiddlewares(stack *middleware.Stac // ListOpportunitiesPaginatorOptions is the paginator options for ListOpportunities type ListOpportunitiesPaginatorOptions struct { - // Specifies the maximum number of results to return in a single call. This - // limits the number of opportunities returned in the response to avoid providing - // too many results at once. + // Specifies the maximum number of results to return in a single call. This limits + // the number of opportunities returned in the response to avoid providing too many + // results at once. // // Default: 20 Limit int32 diff --git a/service/partnercentralselling/api_op_ListResourceSnapshotJobs.go b/service/partnercentralselling/api_op_ListResourceSnapshotJobs.go new file mode 100644 index 00000000000..a3c4e7a4ad9 --- /dev/null +++ b/service/partnercentralselling/api_op_ListResourceSnapshotJobs.go @@ -0,0 +1,280 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists resource snapshot jobs owned by the customer. This operation supports +// +// various filtering scenarios, including listing all jobs owned by the caller, +// jobs for a specific engagement, jobs with a specific status, or any combination +// of these filters. +func (c *Client) ListResourceSnapshotJobs(ctx context.Context, params *ListResourceSnapshotJobsInput, optFns ...func(*Options)) (*ListResourceSnapshotJobsOutput, error) { + if params == nil { + params = &ListResourceSnapshotJobsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListResourceSnapshotJobs", params, optFns, c.addOperationListResourceSnapshotJobsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListResourceSnapshotJobsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListResourceSnapshotJobsInput struct { + + // Specifies the catalog related to the request. + // + // This member is required. + Catalog *string + + // The identifier of the engagement to filter the response. + EngagementIdentifier *string + + // The maximum number of results to return in a single call. If omitted, defaults + // to 50. + MaxResults *int32 + + // The token for the next set of results. + NextToken *string + + // Configures the sorting of the response. If omitted, results are sorted by + // CreatedDate in descending order. + Sort *types.SortObject + + // The status of the jobs to filter the response. + Status types.ResourceSnapshotJobStatus + + noSmithyDocumentSerde +} + +type ListResourceSnapshotJobsOutput struct { + + // An array of resource snapshot job summary objects. + // + // This member is required. + ResourceSnapshotJobSummaries []types.ResourceSnapshotJobSummary + + // The token to retrieve the next set of results. If there are no additional + // results, this value is null. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListResourceSnapshotJobsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListResourceSnapshotJobs{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListResourceSnapshotJobs{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListResourceSnapshotJobs"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpListResourceSnapshotJobsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResourceSnapshotJobs(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListResourceSnapshotJobsPaginatorOptions is the paginator options for +// ListResourceSnapshotJobs +type ListResourceSnapshotJobsPaginatorOptions struct { + // The maximum number of results to return in a single call. If omitted, defaults + // to 50. + 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 +} + +// ListResourceSnapshotJobsPaginator is a paginator for ListResourceSnapshotJobs +type ListResourceSnapshotJobsPaginator struct { + options ListResourceSnapshotJobsPaginatorOptions + client ListResourceSnapshotJobsAPIClient + params *ListResourceSnapshotJobsInput + nextToken *string + firstPage bool +} + +// NewListResourceSnapshotJobsPaginator returns a new +// ListResourceSnapshotJobsPaginator +func NewListResourceSnapshotJobsPaginator(client ListResourceSnapshotJobsAPIClient, params *ListResourceSnapshotJobsInput, optFns ...func(*ListResourceSnapshotJobsPaginatorOptions)) *ListResourceSnapshotJobsPaginator { + if params == nil { + params = &ListResourceSnapshotJobsInput{} + } + + options := ListResourceSnapshotJobsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListResourceSnapshotJobsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListResourceSnapshotJobsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListResourceSnapshotJobs page. +func (p *ListResourceSnapshotJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListResourceSnapshotJobsOutput, 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 + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListResourceSnapshotJobs(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 +} + +// ListResourceSnapshotJobsAPIClient is a client that implements the +// ListResourceSnapshotJobs operation. +type ListResourceSnapshotJobsAPIClient interface { + ListResourceSnapshotJobs(context.Context, *ListResourceSnapshotJobsInput, ...func(*Options)) (*ListResourceSnapshotJobsOutput, error) +} + +var _ ListResourceSnapshotJobsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListResourceSnapshotJobs(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListResourceSnapshotJobs", + } +} diff --git a/service/partnercentralselling/api_op_ListResourceSnapshots.go b/service/partnercentralselling/api_op_ListResourceSnapshots.go new file mode 100644 index 00000000000..278a62086e8 --- /dev/null +++ b/service/partnercentralselling/api_op_ListResourceSnapshots.go @@ -0,0 +1,282 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves a list of resource view snapshots based on specified criteria. +func (c *Client) ListResourceSnapshots(ctx context.Context, params *ListResourceSnapshotsInput, optFns ...func(*Options)) (*ListResourceSnapshotsOutput, error) { + if params == nil { + params = &ListResourceSnapshotsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListResourceSnapshots", params, optFns, c.addOperationListResourceSnapshotsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListResourceSnapshotsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListResourceSnapshotsInput struct { + + // Specifies the catalog related to the request. + // + // This member is required. + Catalog *string + + // The unique identifier of the engagement associated with the snapshots. + // + // This member is required. + EngagementIdentifier *string + + // Filters the response to include only snapshots of resources created by the + // specified AWS account. + CreatedBy *string + + // The maximum number of results to return in a single call. + MaxResults *int32 + + // The token for the next set of results. + NextToken *string + + // Filters the response to include only snapshots of the specified resource. + ResourceIdentifier *string + + // Filters the response to include only snapshots created using the specified + // template. + ResourceSnapshotTemplateIdentifier *string + + // Filters the response to include only snapshots of the specified resource type. + ResourceType types.ResourceType + + noSmithyDocumentSerde +} + +type ListResourceSnapshotsOutput struct { + + // An array of resource snapshot summary objects. + // + // This member is required. + ResourceSnapshotSummaries []types.ResourceSnapshotSummary + + // The token to retrieve the next set of results. If there are no additional + // results, this value is null. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListResourceSnapshotsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListResourceSnapshots{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListResourceSnapshots{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListResourceSnapshots"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpListResourceSnapshotsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResourceSnapshots(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListResourceSnapshotsPaginatorOptions is the paginator options for +// ListResourceSnapshots +type ListResourceSnapshotsPaginatorOptions struct { + // The maximum number of results to return in a single call. + 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 +} + +// ListResourceSnapshotsPaginator is a paginator for ListResourceSnapshots +type ListResourceSnapshotsPaginator struct { + options ListResourceSnapshotsPaginatorOptions + client ListResourceSnapshotsAPIClient + params *ListResourceSnapshotsInput + nextToken *string + firstPage bool +} + +// NewListResourceSnapshotsPaginator returns a new ListResourceSnapshotsPaginator +func NewListResourceSnapshotsPaginator(client ListResourceSnapshotsAPIClient, params *ListResourceSnapshotsInput, optFns ...func(*ListResourceSnapshotsPaginatorOptions)) *ListResourceSnapshotsPaginator { + if params == nil { + params = &ListResourceSnapshotsInput{} + } + + options := ListResourceSnapshotsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListResourceSnapshotsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListResourceSnapshotsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListResourceSnapshots page. +func (p *ListResourceSnapshotsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListResourceSnapshotsOutput, 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 + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListResourceSnapshots(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 +} + +// ListResourceSnapshotsAPIClient is a client that implements the +// ListResourceSnapshots operation. +type ListResourceSnapshotsAPIClient interface { + ListResourceSnapshots(context.Context, *ListResourceSnapshotsInput, ...func(*Options)) (*ListResourceSnapshotsOutput, error) +} + +var _ ListResourceSnapshotsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListResourceSnapshots(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListResourceSnapshots", + } +} diff --git a/service/partnercentralselling/api_op_ListSolutions.go b/service/partnercentralselling/api_op_ListSolutions.go index fad9f31dac4..1beffc19cc6 100644 --- a/service/partnercentralselling/api_op_ListSolutions.go +++ b/service/partnercentralselling/api_op_ListSolutions.go @@ -11,8 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves a list of Partner Solutions that the partner registered on Partner -// +// Retrieves a list of Partner Solutions that the partner registered on Partner // Central. This API is used to generate a list of solutions that an end user // selects from for association with an opportunity. func (c *Client) ListSolutions(ctx context.Context, params *ListSolutionsInput, optFns ...func(*Options)) (*ListSolutionsOutput, error) { @@ -32,7 +31,7 @@ func (c *Client) ListSolutions(ctx context.Context, params *ListSolutionsInput, type ListSolutionsInput struct { - // Specifies the catalog associated with the request. This field takes a string + // Specifies the catalog associated with the request. This field takes a string // value from a predefined list: AWS or Sandbox . The catalog determines which // environment the solutions are listed in. Use AWS to list solutions in the // Amazon Web Services catalog, and Sandbox to list solutions in a secure and @@ -57,7 +56,7 @@ type ListSolutionsInput struct { // Default: 20 MaxResults *int32 - // A pagination token used to retrieve the next set of results in subsequent + // A pagination token used to retrieve the next set of results in subsequent // calls. This token is included in the response only if there are additional // result pages available. NextToken *string @@ -80,7 +79,7 @@ type ListSolutionsOutput struct { // This member is required. SolutionSummaries []types.SolutionBase - // A pagination token used to retrieve the next set of results in subsequent + // A pagination token used to retrieve the next set of results in subsequent // calls. This token is included in the response only if there are additional // result pages available. NextToken *string diff --git a/service/partnercentralselling/api_op_PutSellingSystemSettings.go b/service/partnercentralselling/api_op_PutSellingSystemSettings.go new file mode 100644 index 00000000000..600db2e85f7 --- /dev/null +++ b/service/partnercentralselling/api_op_PutSellingSystemSettings.go @@ -0,0 +1,167 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the currently set system settings, which include the IAM Role used for +// resource snapshot jobs. +func (c *Client) PutSellingSystemSettings(ctx context.Context, params *PutSellingSystemSettingsInput, optFns ...func(*Options)) (*PutSellingSystemSettingsOutput, error) { + if params == nil { + params = &PutSellingSystemSettingsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutSellingSystemSettings", params, optFns, c.addOperationPutSellingSystemSettingsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutSellingSystemSettingsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutSellingSystemSettingsInput struct { + + // Specifies the catalog in which the settings will be updated. Acceptable values + // include AWS for production and Sandbox for testing environments. + // + // This member is required. + Catalog *string + + // Specifies the ARN of the IAM Role used for resource snapshot job executions. + ResourceSnapshotJobRoleIdentifier *string + + noSmithyDocumentSerde +} + +type PutSellingSystemSettingsOutput struct { + + // Specifies the catalog in which the settings are defined. Acceptable values + // include AWS for production and Sandbox for testing environments. + // + // This member is required. + Catalog *string + + // Specifies the ARN of the IAM Role used for resource snapshot job executions. + ResourceSnapshotJobRoleArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutSellingSystemSettingsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpPutSellingSystemSettings{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpPutSellingSystemSettings{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutSellingSystemSettings"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpPutSellingSystemSettingsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutSellingSystemSettings(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutSellingSystemSettings(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutSellingSystemSettings", + } +} diff --git a/service/partnercentralselling/api_op_StartEngagementByAcceptingInvitationTask.go b/service/partnercentralselling/api_op_StartEngagementByAcceptingInvitationTask.go index 1b4558cd723..77bba836742 100644 --- a/service/partnercentralselling/api_op_StartEngagementByAcceptingInvitationTask.go +++ b/service/partnercentralselling/api_op_StartEngagementByAcceptingInvitationTask.go @@ -75,6 +75,9 @@ type StartEngagementByAcceptingInvitationTaskOutput struct { // Indicates the reason for task failure using an enumerated code. ReasonCode types.ReasonCode + // The identifier of the resource snapshot job created as part of this task. + ResourceSnapshotJobId *string + // The timestamp indicating when the task was initiated. The format follows RFC // 3339 section 5.6. StartTime *time.Time diff --git a/service/partnercentralselling/api_op_StartEngagementFromOpportunityTask.go b/service/partnercentralselling/api_op_StartEngagementFromOpportunityTask.go index e866e982ee4..fe02c7e0d41 100644 --- a/service/partnercentralselling/api_op_StartEngagementFromOpportunityTask.go +++ b/service/partnercentralselling/api_op_StartEngagementFromOpportunityTask.go @@ -64,6 +64,14 @@ type StartEngagementFromOpportunityTaskInput struct { type StartEngagementFromOpportunityTaskOutput struct { + // The identifier of the newly created engagement. Only populated if TaskStatus + // is COMPLETE. + EngagementId *string + + // The identifier of the new engagement invitation. Only populated if TaskStatus + // is COMPLETE. + EngagementInvitationId *string + // If the task fails, this field contains a detailed message describing the // failure and possible recovery steps. Message *string @@ -75,6 +83,10 @@ type StartEngagementFromOpportunityTaskOutput struct { // Indicates the reason for task failure using an enumerated code. ReasonCode types.ReasonCode + // The identifier of the resource snapshot job created to add the opportunity + // resource snapshot to the Engagement. Only populated if TaskStatus is COMPLETE. + ResourceSnapshotJobId *string + // The timestamp indicating when the task was initiated. The format follows RFC // 3339 section 5.6. StartTime *time.Time diff --git a/service/partnercentralselling/api_op_StartResourceSnapshotJob.go b/service/partnercentralselling/api_op_StartResourceSnapshotJob.go new file mode 100644 index 00000000000..2d7d6e9d832 --- /dev/null +++ b/service/partnercentralselling/api_op_StartResourceSnapshotJob.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Starts a resource snapshot job that has been previously created. +func (c *Client) StartResourceSnapshotJob(ctx context.Context, params *StartResourceSnapshotJobInput, optFns ...func(*Options)) (*StartResourceSnapshotJobOutput, error) { + if params == nil { + params = &StartResourceSnapshotJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartResourceSnapshotJob", params, optFns, c.addOperationStartResourceSnapshotJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartResourceSnapshotJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartResourceSnapshotJobInput struct { + + // Specifies the catalog related to the request. + // + // This member is required. + Catalog *string + + // The identifier of the resource snapshot job to start. + // + // This member is required. + ResourceSnapshotJobIdentifier *string + + noSmithyDocumentSerde +} + +type StartResourceSnapshotJobOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartResourceSnapshotJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpStartResourceSnapshotJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpStartResourceSnapshotJob{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StartResourceSnapshotJob"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpStartResourceSnapshotJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartResourceSnapshotJob(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStartResourceSnapshotJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StartResourceSnapshotJob", + } +} diff --git a/service/partnercentralselling/api_op_StopResourceSnapshotJob.go b/service/partnercentralselling/api_op_StopResourceSnapshotJob.go new file mode 100644 index 00000000000..f3f4e103bc9 --- /dev/null +++ b/service/partnercentralselling/api_op_StopResourceSnapshotJob.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Stops a resource snapshot job. The job must be started prior to being stopped. +func (c *Client) StopResourceSnapshotJob(ctx context.Context, params *StopResourceSnapshotJobInput, optFns ...func(*Options)) (*StopResourceSnapshotJobOutput, error) { + if params == nil { + params = &StopResourceSnapshotJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StopResourceSnapshotJob", params, optFns, c.addOperationStopResourceSnapshotJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StopResourceSnapshotJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StopResourceSnapshotJobInput struct { + + // Specifies the catalog related to the request. + // + // This member is required. + Catalog *string + + // The identifier of the job to stop. + // + // This member is required. + ResourceSnapshotJobIdentifier *string + + noSmithyDocumentSerde +} + +type StopResourceSnapshotJobOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStopResourceSnapshotJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpStopResourceSnapshotJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpStopResourceSnapshotJob{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StopResourceSnapshotJob"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpStopResourceSnapshotJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStopResourceSnapshotJob(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStopResourceSnapshotJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StopResourceSnapshotJob", + } +} diff --git a/service/partnercentralselling/api_op_SubmitOpportunity.go b/service/partnercentralselling/api_op_SubmitOpportunity.go new file mode 100644 index 00000000000..982b3987a4a --- /dev/null +++ b/service/partnercentralselling/api_op_SubmitOpportunity.go @@ -0,0 +1,172 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package partnercentralselling + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Use this action to submit an opportunity that was previously created by +// +// partner for AWS review. After you perform this action, the opportunity becomes +// non-editable until it is reviewed by AWS and has LifeCycle.ReviewStatus as +// either Approved or Action Required . +func (c *Client) SubmitOpportunity(ctx context.Context, params *SubmitOpportunityInput, optFns ...func(*Options)) (*SubmitOpportunityOutput, error) { + if params == nil { + params = &SubmitOpportunityInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SubmitOpportunity", params, optFns, c.addOperationSubmitOpportunityMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SubmitOpportunityOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SubmitOpportunityInput struct { + + // Specifies the catalog related to the request. + // + // This member is required. + Catalog *string + + // The identifier of the opportunity previously created by partner and needs to + // be submitted. + // + // This member is required. + Identifier *string + + // Specifies the level of AWS sellers' involvement on the opportunity. + // + // This member is required. + InvolvementType types.SalesInvolvementType + + // Determines whether to restrict visibility of the opportunity from AWS sales. + // Default value is Full. + Visibility types.Visibility + + noSmithyDocumentSerde +} + +type SubmitOpportunityOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSubmitOpportunityMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpSubmitOpportunity{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpSubmitOpportunity{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "SubmitOpportunity"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpSubmitOpportunityValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSubmitOpportunity(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opSubmitOpportunity(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "SubmitOpportunity", + } +} diff --git a/service/partnercentralselling/api_op_UpdateOpportunity.go b/service/partnercentralselling/api_op_UpdateOpportunity.go index 9f195c97119..de252e76e7d 100644 --- a/service/partnercentralselling/api_op_UpdateOpportunity.go +++ b/service/partnercentralselling/api_op_UpdateOpportunity.go @@ -12,11 +12,10 @@ import ( "time" ) -// Updates the Opportunity record identified by a given Identifier . This -// -// operation allows you to modify the details of an existing opportunity to reflect -// the latest information and progress. Use this action to keep the opportunity -// record up-to-date and accurate. +// Updates the Opportunity record identified by a given Identifier . This operation +// allows you to modify the details of an existing opportunity to reflect the +// latest information and progress. Use this action to keep the opportunity record +// up-to-date and accurate. // // When you perform updates, include the entire payload with each request. If any // field is omitted, the API assumes that the field is set to null . The best @@ -39,7 +38,7 @@ func (c *Client) UpdateOpportunity(ctx context.Context, params *UpdateOpportunit type UpdateOpportunityInput struct { - // Specifies the catalog associated with the request. This field takes a string + // Specifies the catalog associated with the request. This field takes a string // value from a predefined list: AWS or Sandbox . The catalog determines which // environment the opportunity is updated in. Use AWS to update real opportunities // in the production environment, and Sandbox for testing in secure, isolated @@ -75,7 +74,7 @@ type UpdateOpportunityInput struct { // apply, impacting the opportunity's visibility and processing. NationalSecurity types.NationalSecurity - // Specifies the opportunity type as a renewal, new, or expansion. + // Specifies the opportunity type as a renewal, new, or expansion. // // Opportunity types: // @@ -96,7 +95,7 @@ type UpdateOpportunityInput struct { // payload sent back to the partner. PartnerOpportunityIdentifier *string - // Identifies the type of support the partner needs from Amazon Web Services. + // Identifies the type of support the partner needs from Amazon Web Services. // // Valid values: // diff --git a/service/partnercentralselling/deserializers.go b/service/partnercentralselling/deserializers.go index 82802ef5f1a..efdcac83f98 100644 --- a/service/partnercentralselling/deserializers.go +++ b/service/partnercentralselling/deserializers.go @@ -30,14 +30,14 @@ func deserializeS3Expires(v string) (*time.Time, error) { return &t, nil } -type awsAwsjson10_deserializeOpAssignOpportunity struct { +type awsAwsjson10_deserializeOpAcceptEngagementInvitation struct { } -func (*awsAwsjson10_deserializeOpAssignOpportunity) ID() string { +func (*awsAwsjson10_deserializeOpAcceptEngagementInvitation) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpAssignOpportunity) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpAcceptEngagementInvitation) 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) @@ -55,9 +55,9 @@ func (m *awsAwsjson10_deserializeOpAssignOpportunity) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorAssignOpportunity(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorAcceptEngagementInvitation(response, &metadata) } - output := &AssignOpportunityOutput{} + output := &AcceptEngagementInvitationOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -69,7 +69,7 @@ func (m *awsAwsjson10_deserializeOpAssignOpportunity) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson10_deserializeOpErrorAssignOpportunity(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorAcceptEngagementInvitation(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)} @@ -131,14 +131,14 @@ func awsAwsjson10_deserializeOpErrorAssignOpportunity(response *smithyhttp.Respo } } -type awsAwsjson10_deserializeOpAssociateOpportunity struct { +type awsAwsjson10_deserializeOpAssignOpportunity struct { } -func (*awsAwsjson10_deserializeOpAssociateOpportunity) ID() string { +func (*awsAwsjson10_deserializeOpAssignOpportunity) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpAssociateOpportunity) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpAssignOpportunity) 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) @@ -156,9 +156,9 @@ func (m *awsAwsjson10_deserializeOpAssociateOpportunity) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorAssociateOpportunity(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorAssignOpportunity(response, &metadata) } - output := &AssociateOpportunityOutput{} + output := &AssignOpportunityOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -170,7 +170,7 @@ func (m *awsAwsjson10_deserializeOpAssociateOpportunity) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson10_deserializeOpErrorAssociateOpportunity(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorAssignOpportunity(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)} @@ -232,14 +232,14 @@ func awsAwsjson10_deserializeOpErrorAssociateOpportunity(response *smithyhttp.Re } } -type awsAwsjson10_deserializeOpCreateOpportunity struct { +type awsAwsjson10_deserializeOpAssociateOpportunity struct { } -func (*awsAwsjson10_deserializeOpCreateOpportunity) ID() string { +func (*awsAwsjson10_deserializeOpAssociateOpportunity) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpCreateOpportunity) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpAssociateOpportunity) 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) @@ -257,43 +257,21 @@ func (m *awsAwsjson10_deserializeOpCreateOpportunity) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorCreateOpportunity(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorAssociateOpportunity(response, &metadata) } - output := &CreateOpportunityOutput{} + output := &AssociateOpportunityOutput{} 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_deserializeOpDocumentCreateOpportunityOutput(&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(), + 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 } return out, metadata, err } -func awsAwsjson10_deserializeOpErrorCreateOpportunity(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorAssociateOpportunity(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)} @@ -333,9 +311,6 @@ func awsAwsjson10_deserializeOpErrorCreateOpportunity(response *smithyhttp.Respo case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -358,14 +333,14 @@ func awsAwsjson10_deserializeOpErrorCreateOpportunity(response *smithyhttp.Respo } } -type awsAwsjson10_deserializeOpDisassociateOpportunity struct { +type awsAwsjson10_deserializeOpCreateEngagement struct { } -func (*awsAwsjson10_deserializeOpDisassociateOpportunity) ID() string { +func (*awsAwsjson10_deserializeOpCreateEngagement) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDisassociateOpportunity) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateEngagement) 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) @@ -383,21 +358,43 @@ func (m *awsAwsjson10_deserializeOpDisassociateOpportunity) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDisassociateOpportunity(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateEngagement(response, &metadata) } - output := &DisassociateOpportunityOutput{} + output := &CreateEngagementOutput{} 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), + 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_deserializeOpDocumentCreateEngagementOutput(&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_deserializeOpErrorDisassociateOpportunity(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateEngagement(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)} @@ -437,12 +434,15 @@ func awsAwsjson10_deserializeOpErrorDisassociateOpportunity(response *smithyhttp case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): - return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -459,14 +459,14 @@ func awsAwsjson10_deserializeOpErrorDisassociateOpportunity(response *smithyhttp } } -type awsAwsjson10_deserializeOpGetAwsOpportunitySummary struct { +type awsAwsjson10_deserializeOpCreateEngagementInvitation struct { } -func (*awsAwsjson10_deserializeOpGetAwsOpportunitySummary) ID() string { +func (*awsAwsjson10_deserializeOpCreateEngagementInvitation) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetAwsOpportunitySummary) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateEngagementInvitation) 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) @@ -484,9 +484,9 @@ func (m *awsAwsjson10_deserializeOpGetAwsOpportunitySummary) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetAwsOpportunitySummary(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateEngagementInvitation(response, &metadata) } - output := &GetAwsOpportunitySummaryOutput{} + output := &CreateEngagementInvitationOutput{} out.Result = output var buff [1024]byte @@ -506,7 +506,7 @@ func (m *awsAwsjson10_deserializeOpGetAwsOpportunitySummary) HandleDeserialize(c return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetAwsOpportunitySummaryOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateEngagementInvitationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -520,7 +520,7 @@ func (m *awsAwsjson10_deserializeOpGetAwsOpportunitySummary) HandleDeserialize(c return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetAwsOpportunitySummary(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateEngagementInvitation(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)} @@ -560,12 +560,15 @@ func awsAwsjson10_deserializeOpErrorGetAwsOpportunitySummary(response *smithyhtt case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): - return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -582,14 +585,14 @@ func awsAwsjson10_deserializeOpErrorGetAwsOpportunitySummary(response *smithyhtt } } -type awsAwsjson10_deserializeOpGetEngagementInvitation struct { +type awsAwsjson10_deserializeOpCreateOpportunity struct { } -func (*awsAwsjson10_deserializeOpGetEngagementInvitation) ID() string { +func (*awsAwsjson10_deserializeOpCreateOpportunity) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetEngagementInvitation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateOpportunity) 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) @@ -607,9 +610,9 @@ func (m *awsAwsjson10_deserializeOpGetEngagementInvitation) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetEngagementInvitation(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateOpportunity(response, &metadata) } - output := &GetEngagementInvitationOutput{} + output := &CreateOpportunityOutput{} out.Result = output var buff [1024]byte @@ -629,7 +632,7 @@ func (m *awsAwsjson10_deserializeOpGetEngagementInvitation) HandleDeserialize(ct return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetEngagementInvitationOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateOpportunityOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -643,7 +646,7 @@ func (m *awsAwsjson10_deserializeOpGetEngagementInvitation) HandleDeserialize(ct return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetEngagementInvitation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateOpportunity(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)} @@ -683,6 +686,9 @@ func awsAwsjson10_deserializeOpErrorGetEngagementInvitation(response *smithyhttp case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -705,14 +711,14 @@ func awsAwsjson10_deserializeOpErrorGetEngagementInvitation(response *smithyhttp } } -type awsAwsjson10_deserializeOpGetOpportunity struct { +type awsAwsjson10_deserializeOpCreateResourceSnapshot struct { } -func (*awsAwsjson10_deserializeOpGetOpportunity) ID() string { +func (*awsAwsjson10_deserializeOpCreateResourceSnapshot) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetOpportunity) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateResourceSnapshot) 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) @@ -730,9 +736,9 @@ func (m *awsAwsjson10_deserializeOpGetOpportunity) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetOpportunity(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateResourceSnapshot(response, &metadata) } - output := &GetOpportunityOutput{} + output := &CreateResourceSnapshotOutput{} out.Result = output var buff [1024]byte @@ -752,7 +758,7 @@ func (m *awsAwsjson10_deserializeOpGetOpportunity) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetOpportunityOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateResourceSnapshotOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -766,7 +772,7 @@ func (m *awsAwsjson10_deserializeOpGetOpportunity) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetOpportunity(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateResourceSnapshot(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)} @@ -806,12 +812,15 @@ func awsAwsjson10_deserializeOpErrorGetOpportunity(response *smithyhttp.Response case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): - return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -828,14 +837,14 @@ func awsAwsjson10_deserializeOpErrorGetOpportunity(response *smithyhttp.Response } } -type awsAwsjson10_deserializeOpListEngagementInvitations struct { +type awsAwsjson10_deserializeOpCreateResourceSnapshotJob struct { } -func (*awsAwsjson10_deserializeOpListEngagementInvitations) ID() string { +func (*awsAwsjson10_deserializeOpCreateResourceSnapshotJob) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListEngagementInvitations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateResourceSnapshotJob) 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) @@ -853,9 +862,9 @@ func (m *awsAwsjson10_deserializeOpListEngagementInvitations) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListEngagementInvitations(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateResourceSnapshotJob(response, &metadata) } - output := &ListEngagementInvitationsOutput{} + output := &CreateResourceSnapshotJobOutput{} out.Result = output var buff [1024]byte @@ -875,7 +884,7 @@ func (m *awsAwsjson10_deserializeOpListEngagementInvitations) HandleDeserialize( return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListEngagementInvitationsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateResourceSnapshotJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -889,7 +898,7 @@ func (m *awsAwsjson10_deserializeOpListEngagementInvitations) HandleDeserialize( return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListEngagementInvitations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateResourceSnapshotJob(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)} @@ -929,12 +938,15 @@ func awsAwsjson10_deserializeOpErrorListEngagementInvitations(response *smithyht case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): - return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -951,14 +963,14 @@ func awsAwsjson10_deserializeOpErrorListEngagementInvitations(response *smithyht } } -type awsAwsjson10_deserializeOpListOpportunities struct { +type awsAwsjson10_deserializeOpDeleteResourceSnapshotJob struct { } -func (*awsAwsjson10_deserializeOpListOpportunities) ID() string { +func (*awsAwsjson10_deserializeOpDeleteResourceSnapshotJob) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListOpportunities) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteResourceSnapshotJob) 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) @@ -976,43 +988,21 @@ func (m *awsAwsjson10_deserializeOpListOpportunities) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListOpportunities(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteResourceSnapshotJob(response, &metadata) } - output := &ListOpportunitiesOutput{} + output := &DeleteResourceSnapshotJobOutput{} 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_deserializeOpDocumentListOpportunitiesOutput(&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(), + 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 } return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListOpportunities(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteResourceSnapshotJob(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)} @@ -1052,9 +1042,6 @@ func awsAwsjson10_deserializeOpErrorListOpportunities(response *smithyhttp.Respo case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): - return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) @@ -1074,14 +1061,14 @@ func awsAwsjson10_deserializeOpErrorListOpportunities(response *smithyhttp.Respo } } -type awsAwsjson10_deserializeOpListSolutions struct { +type awsAwsjson10_deserializeOpDisassociateOpportunity struct { } -func (*awsAwsjson10_deserializeOpListSolutions) ID() string { +func (*awsAwsjson10_deserializeOpDisassociateOpportunity) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListSolutions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDisassociateOpportunity) 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) @@ -1099,43 +1086,21 @@ func (m *awsAwsjson10_deserializeOpListSolutions) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListSolutions(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDisassociateOpportunity(response, &metadata) } - output := &ListSolutionsOutput{} + output := &DisassociateOpportunityOutput{} 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_deserializeOpDocumentListSolutionsOutput(&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(), + 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 } return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListSolutions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDisassociateOpportunity(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)} @@ -1181,6 +1146,9 @@ func awsAwsjson10_deserializeOpErrorListSolutions(response *smithyhttp.Response, case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -1194,14 +1162,14 @@ func awsAwsjson10_deserializeOpErrorListSolutions(response *smithyhttp.Response, } } -type awsAwsjson10_deserializeOpRejectEngagementInvitation struct { +type awsAwsjson10_deserializeOpGetAwsOpportunitySummary struct { } -func (*awsAwsjson10_deserializeOpRejectEngagementInvitation) ID() string { +func (*awsAwsjson10_deserializeOpGetAwsOpportunitySummary) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpRejectEngagementInvitation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetAwsOpportunitySummary) 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) @@ -1219,21 +1187,43 @@ func (m *awsAwsjson10_deserializeOpRejectEngagementInvitation) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorRejectEngagementInvitation(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetAwsOpportunitySummary(response, &metadata) } - output := &RejectEngagementInvitationOutput{} + output := &GetAwsOpportunitySummaryOutput{} 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), - } - } - + 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_deserializeOpDocumentGetAwsOpportunitySummaryOutput(&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_deserializeOpErrorRejectEngagementInvitation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetAwsOpportunitySummary(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)} @@ -1295,14 +1285,14 @@ func awsAwsjson10_deserializeOpErrorRejectEngagementInvitation(response *smithyh } } -type awsAwsjson10_deserializeOpStartEngagementByAcceptingInvitationTask struct { +type awsAwsjson10_deserializeOpGetEngagement struct { } -func (*awsAwsjson10_deserializeOpStartEngagementByAcceptingInvitationTask) ID() string { +func (*awsAwsjson10_deserializeOpGetEngagement) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpStartEngagementByAcceptingInvitationTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetEngagement) 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) @@ -1320,9 +1310,9 @@ func (m *awsAwsjson10_deserializeOpStartEngagementByAcceptingInvitationTask) Han } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorStartEngagementByAcceptingInvitationTask(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetEngagement(response, &metadata) } - output := &StartEngagementByAcceptingInvitationTaskOutput{} + output := &GetEngagementOutput{} out.Result = output var buff [1024]byte @@ -1342,7 +1332,7 @@ func (m *awsAwsjson10_deserializeOpStartEngagementByAcceptingInvitationTask) Han return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentStartEngagementByAcceptingInvitationTaskOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetEngagementOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1356,7 +1346,7 @@ func (m *awsAwsjson10_deserializeOpStartEngagementByAcceptingInvitationTask) Han return out, metadata, err } -func awsAwsjson10_deserializeOpErrorStartEngagementByAcceptingInvitationTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetEngagement(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)} @@ -1396,18 +1386,9 @@ func awsAwsjson10_deserializeOpErrorStartEngagementByAcceptingInvitationTask(res case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerException", errorCode): - return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -1424,14 +1405,14 @@ func awsAwsjson10_deserializeOpErrorStartEngagementByAcceptingInvitationTask(res } } -type awsAwsjson10_deserializeOpStartEngagementFromOpportunityTask struct { +type awsAwsjson10_deserializeOpGetEngagementInvitation struct { } -func (*awsAwsjson10_deserializeOpStartEngagementFromOpportunityTask) ID() string { +func (*awsAwsjson10_deserializeOpGetEngagementInvitation) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpStartEngagementFromOpportunityTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetEngagementInvitation) 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) @@ -1449,9 +1430,9 @@ func (m *awsAwsjson10_deserializeOpStartEngagementFromOpportunityTask) HandleDes } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorStartEngagementFromOpportunityTask(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetEngagementInvitation(response, &metadata) } - output := &StartEngagementFromOpportunityTaskOutput{} + output := &GetEngagementInvitationOutput{} out.Result = output var buff [1024]byte @@ -1471,7 +1452,7 @@ func (m *awsAwsjson10_deserializeOpStartEngagementFromOpportunityTask) HandleDes return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentStartEngagementFromOpportunityTaskOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetEngagementInvitationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1485,7 +1466,7 @@ func (m *awsAwsjson10_deserializeOpStartEngagementFromOpportunityTask) HandleDes return out, metadata, err } -func awsAwsjson10_deserializeOpErrorStartEngagementFromOpportunityTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetEngagementInvitation(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)} @@ -1525,18 +1506,12 @@ func awsAwsjson10_deserializeOpErrorStartEngagementFromOpportunityTask(response case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -1553,14 +1528,14 @@ func awsAwsjson10_deserializeOpErrorStartEngagementFromOpportunityTask(response } } -type awsAwsjson10_deserializeOpUpdateOpportunity struct { +type awsAwsjson10_deserializeOpGetOpportunity struct { } -func (*awsAwsjson10_deserializeOpUpdateOpportunity) ID() string { +func (*awsAwsjson10_deserializeOpGetOpportunity) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUpdateOpportunity) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetOpportunity) 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) @@ -1578,9 +1553,9 @@ func (m *awsAwsjson10_deserializeOpUpdateOpportunity) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorUpdateOpportunity(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetOpportunity(response, &metadata) } - output := &UpdateOpportunityOutput{} + output := &GetOpportunityOutput{} out.Result = output var buff [1024]byte @@ -1600,7 +1575,7 @@ func (m *awsAwsjson10_deserializeOpUpdateOpportunity) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUpdateOpportunityOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetOpportunityOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1614,7 +1589,7 @@ func (m *awsAwsjson10_deserializeOpUpdateOpportunity) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUpdateOpportunity(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetOpportunity(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)} @@ -1654,9 +1629,6 @@ func awsAwsjson10_deserializeOpErrorUpdateOpportunity(response *smithyhttp.Respo case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -1679,46 +1651,40 @@ func awsAwsjson10_deserializeOpErrorUpdateOpportunity(response *smithyhttp.Respo } } -func awsAwsjson10_deserializeErrorAccessDeniedException(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 - } +type awsAwsjson10_deserializeOpGetResourceSnapshot struct { +} - output := &types.AccessDeniedException{} - err := awsAwsjson10_deserializeDocumentAccessDeniedException(&output, shape) +func (*awsAwsjson10_deserializeOpGetResourceSnapshot) ID() string { + return "OperationDeserializer" +} +func (m *awsAwsjson10_deserializeOpGetResourceSnapshot) 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 { - 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 + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output -} + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorGetResourceSnapshot(response, &metadata) + } + output := &GetResourceSnapshotOutput{} + out.Result = output -func awsAwsjson10_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -1729,12 +1695,10 @@ func awsAwsjson10_deserializeErrorConflictException(response *smithyhttp.Respons Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.ConflictException{} - err := awsAwsjson10_deserializeDocumentConflictException(&output, shape) - + err = awsAwsjson10_deserializeOpDocumentGetResourceSnapshotOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1742,22 +1706,32 @@ func awsAwsjson10_deserializeErrorConflictException(response *smithyhttp.Respons Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson10_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson10_deserializeOpErrorGetResourceSnapshot(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") + 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 { + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -1767,28 +1741,70 @@ func awsAwsjson10_deserializeErrorInternalServerException(response *smithyhttp.R return err } - output := &types.InternalServerException{} - err := awsAwsjson10_deserializeDocumentInternalServerException(&output, shape) + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - 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(), + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - errorBody.Seek(0, io.SeekStart) - return output +type awsAwsjson10_deserializeOpGetResourceSnapshotJob struct { } -func awsAwsjson10_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func (*awsAwsjson10_deserializeOpGetResourceSnapshotJob) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpGetResourceSnapshotJob) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorGetResourceSnapshotJob(response, &metadata) + } + output := &GetResourceSnapshotJobOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -1799,12 +1815,10 @@ func awsAwsjson10_deserializeErrorResourceNotFoundException(response *smithyhttp Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.ResourceNotFoundException{} - err := awsAwsjson10_deserializeDocumentResourceNotFoundException(&output, shape) - + err = awsAwsjson10_deserializeOpDocumentGetResourceSnapshotJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1812,22 +1826,32 @@ func awsAwsjson10_deserializeErrorResourceNotFoundException(response *smithyhttp Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson10_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson10_deserializeOpErrorGetResourceSnapshotJob(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") + 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 { + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -1837,28 +1861,70 @@ func awsAwsjson10_deserializeErrorServiceQuotaExceededException(response *smithy return err } - output := &types.ServiceQuotaExceededException{} - err := awsAwsjson10_deserializeDocumentServiceQuotaExceededException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - errorBody.Seek(0, io.SeekStart) - return output +type awsAwsjson10_deserializeOpGetSellingSystemSettings struct { } -func awsAwsjson10_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func (*awsAwsjson10_deserializeOpGetSellingSystemSettings) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpGetSellingSystemSettings) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorGetSellingSystemSettings(response, &metadata) + } + output := &GetSellingSystemSettingsOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -1869,12 +1935,42 @@ func awsAwsjson10_deserializeErrorThrottlingException(response *smithyhttp.Respo Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.ThrottlingException{} - err := awsAwsjson10_deserializeDocumentThrottlingException(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetSellingSystemSettingsOutput(&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_deserializeOpErrorGetSellingSystemSettings(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") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1886,14 +1982,69 @@ func awsAwsjson10_deserializeErrorThrottlingException(response *smithyhttp.Respo } errorBody.Seek(0, io.SeekStart) - return output + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } } -func awsAwsjson10_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +type awsAwsjson10_deserializeOpListEngagementByAcceptingInvitationTasks struct { +} + +func (*awsAwsjson10_deserializeOpListEngagementByAcceptingInvitationTasks) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpListEngagementByAcceptingInvitationTasks) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorListEngagementByAcceptingInvitationTasks(response, &metadata) + } + output := &ListEngagementByAcceptingInvitationTasksOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -1904,12 +2055,42 @@ func awsAwsjson10_deserializeErrorValidationException(response *smithyhttp.Respo Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.ValidationException{} - err := awsAwsjson10_deserializeDocumentValidationException(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListEngagementByAcceptingInvitationTasksOutput(&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_deserializeOpErrorListEngagementByAcceptingInvitationTasks(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") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1921,10 +2102,4395 @@ func awsAwsjson10_deserializeErrorValidationException(response *smithyhttp.Respo } errorBody.Seek(0, io.SeekStart) - return output + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } } -func awsAwsjson10_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { +type awsAwsjson10_deserializeOpListEngagementFromOpportunityTasks struct { +} + +func (*awsAwsjson10_deserializeOpListEngagementFromOpportunityTasks) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpListEngagementFromOpportunityTasks) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorListEngagementFromOpportunityTasks(response, &metadata) + } + output := &ListEngagementFromOpportunityTasksOutput{} + 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_deserializeOpDocumentListEngagementFromOpportunityTasksOutput(&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_deserializeOpErrorListEngagementFromOpportunityTasks(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") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpListEngagementInvitations struct { +} + +func (*awsAwsjson10_deserializeOpListEngagementInvitations) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpListEngagementInvitations) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorListEngagementInvitations(response, &metadata) + } + output := &ListEngagementInvitationsOutput{} + 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_deserializeOpDocumentListEngagementInvitationsOutput(&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_deserializeOpErrorListEngagementInvitations(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") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpListEngagementMembers struct { +} + +func (*awsAwsjson10_deserializeOpListEngagementMembers) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpListEngagementMembers) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorListEngagementMembers(response, &metadata) + } + output := &ListEngagementMembersOutput{} + 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_deserializeOpDocumentListEngagementMembersOutput(&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_deserializeOpErrorListEngagementMembers(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") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpListEngagementResourceAssociations struct { +} + +func (*awsAwsjson10_deserializeOpListEngagementResourceAssociations) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpListEngagementResourceAssociations) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorListEngagementResourceAssociations(response, &metadata) + } + output := &ListEngagementResourceAssociationsOutput{} + 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_deserializeOpDocumentListEngagementResourceAssociationsOutput(&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_deserializeOpErrorListEngagementResourceAssociations(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") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpListEngagements struct { +} + +func (*awsAwsjson10_deserializeOpListEngagements) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpListEngagements) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorListEngagements(response, &metadata) + } + output := &ListEngagementsOutput{} + 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_deserializeOpDocumentListEngagementsOutput(&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_deserializeOpErrorListEngagements(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") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpListOpportunities struct { +} + +func (*awsAwsjson10_deserializeOpListOpportunities) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpListOpportunities) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorListOpportunities(response, &metadata) + } + output := &ListOpportunitiesOutput{} + 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_deserializeOpDocumentListOpportunitiesOutput(&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_deserializeOpErrorListOpportunities(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") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpListResourceSnapshotJobs struct { +} + +func (*awsAwsjson10_deserializeOpListResourceSnapshotJobs) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpListResourceSnapshotJobs) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorListResourceSnapshotJobs(response, &metadata) + } + output := &ListResourceSnapshotJobsOutput{} + 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_deserializeOpDocumentListResourceSnapshotJobsOutput(&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_deserializeOpErrorListResourceSnapshotJobs(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") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpListResourceSnapshots struct { +} + +func (*awsAwsjson10_deserializeOpListResourceSnapshots) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpListResourceSnapshots) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorListResourceSnapshots(response, &metadata) + } + output := &ListResourceSnapshotsOutput{} + 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_deserializeOpDocumentListResourceSnapshotsOutput(&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_deserializeOpErrorListResourceSnapshots(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") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpListSolutions struct { +} + +func (*awsAwsjson10_deserializeOpListSolutions) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpListSolutions) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorListSolutions(response, &metadata) + } + output := &ListSolutionsOutput{} + 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_deserializeOpDocumentListSolutionsOutput(&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_deserializeOpErrorListSolutions(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") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpPutSellingSystemSettings struct { +} + +func (*awsAwsjson10_deserializeOpPutSellingSystemSettings) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpPutSellingSystemSettings) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorPutSellingSystemSettings(response, &metadata) + } + output := &PutSellingSystemSettingsOutput{} + 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_deserializeOpDocumentPutSellingSystemSettingsOutput(&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_deserializeOpErrorPutSellingSystemSettings(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") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpRejectEngagementInvitation struct { +} + +func (*awsAwsjson10_deserializeOpRejectEngagementInvitation) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpRejectEngagementInvitation) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorRejectEngagementInvitation(response, &metadata) + } + output := &RejectEngagementInvitationOutput{} + 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 awsAwsjson10_deserializeOpErrorRejectEngagementInvitation(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") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpStartEngagementByAcceptingInvitationTask struct { +} + +func (*awsAwsjson10_deserializeOpStartEngagementByAcceptingInvitationTask) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpStartEngagementByAcceptingInvitationTask) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorStartEngagementByAcceptingInvitationTask(response, &metadata) + } + output := &StartEngagementByAcceptingInvitationTaskOutput{} + 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_deserializeOpDocumentStartEngagementByAcceptingInvitationTaskOutput(&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_deserializeOpErrorStartEngagementByAcceptingInvitationTask(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") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpStartEngagementFromOpportunityTask struct { +} + +func (*awsAwsjson10_deserializeOpStartEngagementFromOpportunityTask) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpStartEngagementFromOpportunityTask) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorStartEngagementFromOpportunityTask(response, &metadata) + } + output := &StartEngagementFromOpportunityTaskOutput{} + 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_deserializeOpDocumentStartEngagementFromOpportunityTaskOutput(&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_deserializeOpErrorStartEngagementFromOpportunityTask(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") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpStartResourceSnapshotJob struct { +} + +func (*awsAwsjson10_deserializeOpStartResourceSnapshotJob) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpStartResourceSnapshotJob) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorStartResourceSnapshotJob(response, &metadata) + } + output := &StartResourceSnapshotJobOutput{} + 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 awsAwsjson10_deserializeOpErrorStartResourceSnapshotJob(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") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpStopResourceSnapshotJob struct { +} + +func (*awsAwsjson10_deserializeOpStopResourceSnapshotJob) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpStopResourceSnapshotJob) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorStopResourceSnapshotJob(response, &metadata) + } + output := &StopResourceSnapshotJobOutput{} + 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 awsAwsjson10_deserializeOpErrorStopResourceSnapshotJob(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") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpSubmitOpportunity struct { +} + +func (*awsAwsjson10_deserializeOpSubmitOpportunity) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpSubmitOpportunity) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorSubmitOpportunity(response, &metadata) + } + output := &SubmitOpportunityOutput{} + 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 awsAwsjson10_deserializeOpErrorSubmitOpportunity(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") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUpdateOpportunity struct { +} + +func (*awsAwsjson10_deserializeOpUpdateOpportunity) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUpdateOpportunity) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorUpdateOpportunity(response, &metadata) + } + output := &UpdateOpportunityOutput{} + 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_deserializeOpDocumentUpdateOpportunityOutput(&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_deserializeOpErrorUpdateOpportunity(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") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsAwsjson10_deserializeErrorAccessDeniedException(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.AccessDeniedException{} + err := awsAwsjson10_deserializeDocumentAccessDeniedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorConflictException(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.ConflictException{} + err := awsAwsjson10_deserializeDocumentConflictException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorInternalServerException(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.InternalServerException{} + err := awsAwsjson10_deserializeDocumentInternalServerException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorResourceNotFoundException(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.ResourceNotFoundException{} + err := awsAwsjson10_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 awsAwsjson10_deserializeErrorServiceQuotaExceededException(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.ServiceQuotaExceededException{} + err := awsAwsjson10_deserializeDocumentServiceQuotaExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorThrottlingException(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.ThrottlingException{} + err := awsAwsjson10_deserializeDocumentThrottlingException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorValidationException(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.ValidationException{} + err := awsAwsjson10_deserializeDocumentValidationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentAccount(v **types.Account, 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.Account + if *v == nil { + sv = &types.Account{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Address": + if err := awsAwsjson10_deserializeDocumentAddress(&sv.Address, value); err != nil { + return err + } + + case "AwsAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccount to be of type string, got %T instead", value) + } + sv.AwsAccountId = ptr.String(jtv) + } + + case "CompanyName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.CompanyName = ptr.String(jtv) + } + + case "Duns": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DunsNumber to be of type string, got %T instead", value) + } + sv.Duns = ptr.String(jtv) + } + + case "Industry": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Industry to be of type string, got %T instead", value) + } + sv.Industry = types.Industry(jtv) + } + + case "OtherIndustry": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.OtherIndustry = ptr.String(jtv) + } + + case "WebsiteUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WebsiteUrl to be of type string, got %T instead", value) + } + sv.WebsiteUrl = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentAccountReceiver(v **types.AccountReceiver, 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.AccountReceiver + if *v == nil { + sv = &types.AccountReceiver{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Alias": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Alias to be of type string, got %T instead", value) + } + sv.Alias = ptr.String(jtv) + } + + case "AwsAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccount to be of type string, got %T instead", value) + } + sv.AwsAccountId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentAccountSummary(v **types.AccountSummary, 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.AccountSummary + if *v == nil { + sv = &types.AccountSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Address": + if err := awsAwsjson10_deserializeDocumentAddressSummary(&sv.Address, value); err != nil { + return err + } + + case "CompanyName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.CompanyName = ptr.String(jtv) + } + + case "Industry": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Industry to be of type string, got %T instead", value) + } + sv.Industry = types.Industry(jtv) + } + + case "OtherIndustry": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.OtherIndustry = ptr.String(jtv) + } + + case "WebsiteUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WebsiteUrl to be of type string, got %T instead", value) + } + sv.WebsiteUrl = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentAddress(v **types.Address, 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.Address + if *v == nil { + sv = &types.Address{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "City": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressPart to be of type string, got %T instead", value) + } + sv.City = ptr.String(jtv) + } + + case "CountryCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CountryCode to be of type string, got %T instead", value) + } + sv.CountryCode = types.CountryCode(jtv) + } + + case "PostalCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressPart to be of type string, got %T instead", value) + } + sv.PostalCode = ptr.String(jtv) + } + + case "StateOrRegion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressPart to be of type string, got %T instead", value) + } + sv.StateOrRegion = ptr.String(jtv) + } + + case "StreetAddress": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressPart to be of type string, got %T instead", value) + } + sv.StreetAddress = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentAddressSummary(v **types.AddressSummary, 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.AddressSummary + if *v == nil { + sv = &types.AddressSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "City": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressPart to be of type string, got %T instead", value) + } + sv.City = ptr.String(jtv) + } + + case "CountryCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CountryCode to be of type string, got %T instead", value) + } + sv.CountryCode = types.CountryCode(jtv) + } + + case "PostalCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressPart to be of type string, got %T instead", value) + } + sv.PostalCode = ptr.String(jtv) + } + + case "StateOrRegion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressPart to be of type string, got %T instead", value) + } + sv.StateOrRegion = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentApnPrograms(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentAwsMarketplaceOfferIdentifiers(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsMarketplaceOfferIdentifier to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentAwsOpportunityCustomer(v **types.AwsOpportunityCustomer, 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.AwsOpportunityCustomer + if *v == nil { + sv = &types.AwsOpportunityCustomer{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Contacts": + if err := awsAwsjson10_deserializeDocumentCustomerContactsList(&sv.Contacts, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentAwsOpportunityInsights(v **types.AwsOpportunityInsights, 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.AwsOpportunityInsights + if *v == nil { + sv = &types.AwsOpportunityInsights{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EngagementScore": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementScore to be of type string, got %T instead", value) + } + sv.EngagementScore = types.EngagementScore(jtv) + } + + case "NextBestActions": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextBestActions = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentAwsOpportunityLifeCycle(v **types.AwsOpportunityLifeCycle, 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.AwsOpportunityLifeCycle + if *v == nil { + sv = &types.AwsOpportunityLifeCycle{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ClosedLostReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsClosedLostReason to be of type string, got %T instead", value) + } + sv.ClosedLostReason = types.AwsClosedLostReason(jtv) + } + + case "NextSteps": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PiiString to be of type string, got %T instead", value) + } + sv.NextSteps = ptr.String(jtv) + } + + case "NextStepsHistory": + if err := awsAwsjson10_deserializeDocumentProfileNextStepsHistories(&sv.NextStepsHistory, value); err != nil { + return err + } + + case "Stage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsOpportunityStage to be of type string, got %T instead", value) + } + sv.Stage = types.AwsOpportunityStage(jtv) + } + + case "TargetCloseDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Date to be of type string, got %T instead", value) + } + sv.TargetCloseDate = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentAwsOpportunityProject(v **types.AwsOpportunityProject, 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.AwsOpportunityProject + if *v == nil { + sv = &types.AwsOpportunityProject{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ExpectedCustomerSpend": + if err := awsAwsjson10_deserializeDocumentExpectedCustomerSpendList(&sv.ExpectedCustomerSpend, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentAwsOpportunityRelatedEntities(v **types.AwsOpportunityRelatedEntities, 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.AwsOpportunityRelatedEntities + if *v == nil { + sv = &types.AwsOpportunityRelatedEntities{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AwsProducts": + if err := awsAwsjson10_deserializeDocumentAwsProductIdentifiers(&sv.AwsProducts, value); err != nil { + return err + } + + case "Solutions": + if err := awsAwsjson10_deserializeDocumentSolutionIdentifiers(&sv.Solutions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentAwsOpportunityTeamMembersList(v *[]types.AwsTeamMember, 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.AwsTeamMember + if *v == nil { + cv = []types.AwsTeamMember{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AwsTeamMember + destAddr := &col + if err := awsAwsjson10_deserializeDocumentAwsTeamMember(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentAwsProductIdentifiers(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsProductIdentifier to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentAwsTeamMember(v **types.AwsTeamMember, 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.AwsTeamMember + if *v == nil { + sv = &types.AwsTeamMember{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BusinessTitle": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsMemberBusinessTitle to be of type string, got %T instead", value) + } + sv.BusinessTitle = types.AwsMemberBusinessTitle(jtv) + } + + case "Email": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Email to be of type string, got %T instead", value) + } + sv.Email = ptr.String(jtv) + } + + case "FirstName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.FirstName = ptr.String(jtv) + } + + case "LastName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.LastName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentChannels(v *[]types.Channel, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Channel + if *v == nil { + cv = []types.Channel{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Channel + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Channel to be of type string, got %T instead", value) + } + col = types.Channel(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConflictException + if *v == nil { + sv = &types.ConflictException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentContact(v **types.Contact, 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.Contact + if *v == nil { + sv = &types.Contact{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BusinessTitle": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobTitle to be of type string, got %T instead", value) + } + sv.BusinessTitle = ptr.String(jtv) + } + + case "Email": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Email to be of type string, got %T instead", value) + } + sv.Email = ptr.String(jtv) + } + + case "FirstName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.FirstName = ptr.String(jtv) + } + + case "LastName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.LastName = ptr.String(jtv) + } + + case "Phone": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PhoneNumber to be of type string, got %T instead", value) + } + sv.Phone = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentCustomer(v **types.Customer, 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.Customer + if *v == nil { + sv = &types.Customer{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Account": + if err := awsAwsjson10_deserializeDocumentAccount(&sv.Account, value); err != nil { + return err + } + + case "Contacts": + if err := awsAwsjson10_deserializeDocumentCustomerContactsList(&sv.Contacts, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentCustomerContactsList(v *[]types.Contact, 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.Contact + if *v == nil { + cv = []types.Contact{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Contact + destAddr := &col + if err := awsAwsjson10_deserializeDocumentContact(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentCustomerProjectsContext(v **types.CustomerProjectsContext, 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.CustomerProjectsContext + if *v == nil { + sv = &types.CustomerProjectsContext{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Customer": + if err := awsAwsjson10_deserializeDocumentEngagementCustomer(&sv.Customer, value); err != nil { + return err + } + + case "Project": + if err := awsAwsjson10_deserializeDocumentEngagementCustomerProjectDetails(&sv.Project, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentCustomerSummary(v **types.CustomerSummary, 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.CustomerSummary + if *v == nil { + sv = &types.CustomerSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Account": + if err := awsAwsjson10_deserializeDocumentAccountSummary(&sv.Account, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentDeliveryModels(v *[]types.DeliveryModel, 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.DeliveryModel + if *v == nil { + cv = []types.DeliveryModel{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DeliveryModel + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeliveryModel to be of type string, got %T instead", value) + } + col = types.DeliveryModel(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentEngagementContextDetails(v **types.EngagementContextDetails, 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.EngagementContextDetails + if *v == nil { + sv = &types.EngagementContextDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Payload": + if err := awsAwsjson10_deserializeDocumentEngagementContextPayload(&sv.Payload, value); err != nil { + return err + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementContextType to be of type string, got %T instead", value) + } + sv.Type = types.EngagementContextType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentEngagementContextPayload(v *types.EngagementContextPayload, 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 uv types.EngagementContextPayload +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "CustomerProject": + var mv types.CustomerProjectsContext + destAddr := &mv + if err := awsAwsjson10_deserializeDocumentCustomerProjectsContext(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.EngagementContextPayloadMemberCustomerProject{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsAwsjson10_deserializeDocumentEngagementContexts(v *[]types.EngagementContextDetails, 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.EngagementContextDetails + if *v == nil { + cv = []types.EngagementContextDetails{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EngagementContextDetails + destAddr := &col + if err := awsAwsjson10_deserializeDocumentEngagementContextDetails(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentEngagementCustomer(v **types.EngagementCustomer, 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.EngagementCustomer + if *v == nil { + sv = &types.EngagementCustomer{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CompanyName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CompanyName to be of type string, got %T instead", value) + } + sv.CompanyName = ptr.String(jtv) + } + + case "CountryCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CountryCode to be of type string, got %T instead", value) + } + sv.CountryCode = types.CountryCode(jtv) + } + + case "Industry": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Industry to be of type string, got %T instead", value) + } + sv.Industry = types.Industry(jtv) + } + + case "WebsiteUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CompanyWebsiteUrl to be of type string, got %T instead", value) + } + sv.WebsiteUrl = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentEngagementCustomerProjectDetails(v **types.EngagementCustomerProjectDetails, 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.EngagementCustomerProjectDetails + if *v == nil { + sv = &types.EngagementCustomerProjectDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BusinessProblem": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementCustomerBusinessProblem to be of type string, got %T instead", value) + } + sv.BusinessProblem = ptr.String(jtv) + } + + case "TargetCompletionDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.TargetCompletionDate = ptr.String(jtv) + } + + case "Title": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementCustomerProjectTitle to be of type string, got %T instead", value) + } + sv.Title = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentEngagementInvitationSummaries(v *[]types.EngagementInvitationSummary, 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.EngagementInvitationSummary + if *v == nil { + cv = []types.EngagementInvitationSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EngagementInvitationSummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentEngagementInvitationSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentEngagementInvitationSummary(v **types.EngagementInvitationSummary, 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.EngagementInvitationSummary + if *v == nil { + sv = &types.EngagementInvitationSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "Catalog": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CatalogIdentifier to be of type string, got %T instead", value) + } + sv.Catalog = ptr.String(jtv) + } + + case "EngagementId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementIdentifier to be of type string, got %T instead", value) + } + sv.EngagementId = ptr.String(jtv) + } + + case "EngagementTitle": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementTitle to be of type string, got %T instead", value) + } + sv.EngagementTitle = ptr.String(jtv) + } + + case "ExpirationDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ExpirationDate = ptr.Time(t) + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementInvitationArnOrIdentifier to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "InvitationDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.InvitationDate = ptr.Time(t) + } + + case "ParticipantType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParticipantType to be of type string, got %T instead", value) + } + sv.ParticipantType = types.ParticipantType(jtv) + } + + case "PayloadType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementInvitationPayloadType to be of type string, got %T instead", value) + } + sv.PayloadType = types.EngagementInvitationPayloadType(jtv) + } + + case "Receiver": + if err := awsAwsjson10_deserializeDocumentReceiver(&sv.Receiver, value); err != nil { + return err + } + + case "SenderAwsAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccount to be of type string, got %T instead", value) + } + sv.SenderAwsAccountId = ptr.String(jtv) + } + + case "SenderCompanyName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.SenderCompanyName = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InvitationStatus to be of type string, got %T instead", value) + } + sv.Status = types.InvitationStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentEngagementMember(v **types.EngagementMember, 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.EngagementMember + if *v == nil { + sv = &types.EngagementMember{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccount to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "CompanyName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MemberCompanyName to be of type string, got %T instead", value) + } + sv.CompanyName = ptr.String(jtv) + } + + case "WebsiteUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.WebsiteUrl = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentEngagementMembers(v *[]types.EngagementMember, 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.EngagementMember + if *v == nil { + cv = []types.EngagementMember{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EngagementMember + destAddr := &col + if err := awsAwsjson10_deserializeDocumentEngagementMember(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentEngagementMemberSummaries(v *[]types.EngagementMemberSummary, 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.EngagementMemberSummary + if *v == nil { + cv = []types.EngagementMemberSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EngagementMemberSummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentEngagementMemberSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentEngagementMemberSummary(v **types.EngagementMemberSummary, 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.EngagementMemberSummary + if *v == nil { + sv = &types.EngagementMemberSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CompanyName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MemberCompanyName to be of type string, got %T instead", value) + } + sv.CompanyName = ptr.String(jtv) + } + + case "WebsiteUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.WebsiteUrl = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentEngagementResourceAssociationSummary(v **types.EngagementResourceAssociationSummary, 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.EngagementResourceAssociationSummary + if *v == nil { + sv = &types.EngagementResourceAssociationSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Catalog": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CatalogIdentifier to be of type string, got %T instead", value) + } + sv.Catalog = ptr.String(jtv) + } + + case "CreatedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccount to be of type string, got %T instead", value) + } + sv.CreatedBy = ptr.String(jtv) + } + + case "EngagementId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementIdentifier to be of type string, got %T instead", value) + } + sv.EngagementId = ptr.String(jtv) + } + + case "ResourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceIdentifier to be of type string, got %T instead", value) + } + sv.ResourceId = 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 = types.ResourceType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentEngagementResourceAssociationSummaryList(v *[]types.EngagementResourceAssociationSummary, 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.EngagementResourceAssociationSummary + if *v == nil { + cv = []types.EngagementResourceAssociationSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EngagementResourceAssociationSummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentEngagementResourceAssociationSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentEngagementSummary(v **types.EngagementSummary, 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.EngagementSummary + if *v == nil { + sv = &types.EngagementSummary{} + } 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 EngagementArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "CreatedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "CreatedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccount to be of type string, got %T instead", value) + } + sv.CreatedBy = ptr.String(jtv) + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementIdentifier to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "MemberCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MemberCount = ptr.Int32(int32(i64)) + } + + case "Title": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementTitle to be of type string, got %T instead", value) + } + sv.Title = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentEngagementSummaryList(v *[]types.EngagementSummary, 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.EngagementSummary + if *v == nil { + cv = []types.EngagementSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EngagementSummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentEngagementSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentExpectedCustomerSpend(v **types.ExpectedCustomerSpend, 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.ExpectedCustomerSpend + if *v == nil { + sv = &types.ExpectedCustomerSpend{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Amount": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Amount = ptr.String(jtv) + } + + case "CurrencyCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CurrencyCode to be of type string, got %T instead", value) + } + sv.CurrencyCode = types.CurrencyCode(jtv) + } + + case "EstimationUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WebsiteUrl to be of type string, got %T instead", value) + } + sv.EstimationUrl = ptr.String(jtv) + } + + case "Frequency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PaymentFrequency to be of type string, got %T instead", value) + } + sv.Frequency = types.PaymentFrequency(jtv) + } + + case "TargetCompany": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.TargetCompany = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentExpectedCustomerSpendList(v *[]types.ExpectedCustomerSpend, 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.ExpectedCustomerSpend + if *v == nil { + cv = []types.ExpectedCustomerSpend{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ExpectedCustomerSpend + destAddr := &col + if err := awsAwsjson10_deserializeDocumentExpectedCustomerSpend(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1937,9 +6503,9 @@ func awsAwsjson10_deserializeDocumentAccessDeniedException(v **types.AccessDenie return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AccessDeniedException + var sv *types.InternalServerException if *v == nil { - sv = &types.AccessDeniedException{} + sv = &types.InternalServerException{} } else { sv = *v } @@ -1964,7 +6530,7 @@ func awsAwsjson10_deserializeDocumentAccessDeniedException(v **types.AccessDenie return nil } -func awsAwsjson10_deserializeDocumentAccount(v **types.Account, value interface{}) error { +func awsAwsjson10_deserializeDocumentLifeCycle(v **types.LifeCycle, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1977,72 +6543,81 @@ func awsAwsjson10_deserializeDocumentAccount(v **types.Account, value interface{ return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Account + var sv *types.LifeCycle if *v == nil { - sv = &types.Account{} + sv = &types.LifeCycle{} } else { sv = *v } for key, value := range shape { switch key { - case "Address": - if err := awsAwsjson10_deserializeDocumentAddress(&sv.Address, value); err != nil { - return err + case "ClosedLostReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ClosedLostReason to be of type string, got %T instead", value) + } + sv.ClosedLostReason = types.ClosedLostReason(jtv) } - case "AwsAccountId": + case "NextSteps": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AwsAccount to be of type string, got %T instead", value) + return fmt.Errorf("expected PiiString to be of type string, got %T instead", value) } - sv.AwsAccountId = ptr.String(jtv) + sv.NextSteps = ptr.String(jtv) } - case "CompanyName": + case "NextStepsHistory": + if err := awsAwsjson10_deserializeDocumentNextStepsHistories(&sv.NextStepsHistory, value); err != nil { + return err + } + + case "ReviewComments": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Name to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.CompanyName = ptr.String(jtv) + sv.ReviewComments = ptr.String(jtv) } - case "Duns": + case "ReviewStatus": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DunsNumber to be of type string, got %T instead", value) + return fmt.Errorf("expected ReviewStatus to be of type string, got %T instead", value) } - sv.Duns = ptr.String(jtv) + sv.ReviewStatus = types.ReviewStatus(jtv) } - case "Industry": + case "ReviewStatusReason": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Industry to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Industry = types.Industry(jtv) + sv.ReviewStatusReason = ptr.String(jtv) } - case "OtherIndustry": + case "Stage": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Stage to be of type string, got %T instead", value) } - sv.OtherIndustry = ptr.String(jtv) + sv.Stage = types.Stage(jtv) } - case "WebsiteUrl": + case "TargetCloseDate": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected WebsiteUrl to be of type string, got %T instead", value) + return fmt.Errorf("expected Date to be of type string, got %T instead", value) } - sv.WebsiteUrl = ptr.String(jtv) + sv.TargetCloseDate = ptr.String(jtv) } default: @@ -2054,7 +6629,7 @@ func awsAwsjson10_deserializeDocumentAccount(v **types.Account, value interface{ return nil } -func awsAwsjson10_deserializeDocumentAccountReceiver(v **types.AccountReceiver, value interface{}) error { +func awsAwsjson10_deserializeDocumentLifeCycleForView(v **types.LifeCycleForView, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2067,31 +6642,49 @@ func awsAwsjson10_deserializeDocumentAccountReceiver(v **types.AccountReceiver, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AccountReceiver + var sv *types.LifeCycleForView if *v == nil { - sv = &types.AccountReceiver{} + sv = &types.LifeCycleForView{} } else { sv = *v } for key, value := range shape { switch key { - case "Alias": + case "NextSteps": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Alias to be of type string, got %T instead", value) + return fmt.Errorf("expected PiiString to be of type string, got %T instead", value) } - sv.Alias = ptr.String(jtv) + sv.NextSteps = ptr.String(jtv) } - case "AwsAccountId": + case "ReviewStatus": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AwsAccount to be of type string, got %T instead", value) + return fmt.Errorf("expected ReviewStatus to be of type string, got %T instead", value) } - sv.AwsAccountId = ptr.String(jtv) + sv.ReviewStatus = types.ReviewStatus(jtv) + } + + case "Stage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Stage to be of type string, got %T instead", value) + } + sv.Stage = types.Stage(jtv) + } + + case "TargetCloseDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Date to be of type string, got %T instead", value) + } + sv.TargetCloseDate = ptr.String(jtv) } default: @@ -2103,7 +6696,7 @@ func awsAwsjson10_deserializeDocumentAccountReceiver(v **types.AccountReceiver, return nil } -func awsAwsjson10_deserializeDocumentAccountSummary(v **types.AccountSummary, value interface{}) error { +func awsAwsjson10_deserializeDocumentLifeCycleSummary(v **types.LifeCycleSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2116,54 +6709,76 @@ func awsAwsjson10_deserializeDocumentAccountSummary(v **types.AccountSummary, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AccountSummary + var sv *types.LifeCycleSummary if *v == nil { - sv = &types.AccountSummary{} + sv = &types.LifeCycleSummary{} } else { sv = *v } for key, value := range shape { switch key { - case "Address": - if err := awsAwsjson10_deserializeDocumentAddressSummary(&sv.Address, value); err != nil { - return err + case "ClosedLostReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ClosedLostReason to be of type string, got %T instead", value) + } + sv.ClosedLostReason = types.ClosedLostReason(jtv) } - case "CompanyName": + case "NextSteps": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Name to be of type string, got %T instead", value) + return fmt.Errorf("expected PiiString to be of type string, got %T instead", value) } - sv.CompanyName = ptr.String(jtv) + sv.NextSteps = ptr.String(jtv) } - case "Industry": + case "ReviewComments": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Industry to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Industry = types.Industry(jtv) + sv.ReviewComments = ptr.String(jtv) } - case "OtherIndustry": + case "ReviewStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReviewStatus to be of type string, got %T instead", value) + } + sv.ReviewStatus = types.ReviewStatus(jtv) + } + + case "ReviewStatusReason": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.OtherIndustry = ptr.String(jtv) + sv.ReviewStatusReason = ptr.String(jtv) } - case "WebsiteUrl": + case "Stage": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected WebsiteUrl to be of type string, got %T instead", value) + return fmt.Errorf("expected Stage to be of type string, got %T instead", value) } - sv.WebsiteUrl = ptr.String(jtv) + sv.Stage = types.Stage(jtv) + } + + case "TargetCloseDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Date to be of type string, got %T instead", value) + } + sv.TargetCloseDate = ptr.String(jtv) } default: @@ -2175,7 +6790,41 @@ func awsAwsjson10_deserializeDocumentAccountSummary(v **types.AccountSummary, va return nil } -func awsAwsjson10_deserializeDocumentAddress(v **types.Address, value interface{}) error { +func awsAwsjson10_deserializeDocumentListEngagementByAcceptingInvitationTaskSummaries(v *[]types.ListEngagementByAcceptingInvitationTaskSummary, 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.ListEngagementByAcceptingInvitationTaskSummary + if *v == nil { + cv = []types.ListEngagementByAcceptingInvitationTaskSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ListEngagementByAcceptingInvitationTaskSummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentListEngagementByAcceptingInvitationTaskSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentListEngagementByAcceptingInvitationTaskSummary(v **types.ListEngagementByAcceptingInvitationTaskSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2188,125 +6837,98 @@ func awsAwsjson10_deserializeDocumentAddress(v **types.Address, value interface{ return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Address + var sv *types.ListEngagementByAcceptingInvitationTaskSummary if *v == nil { - sv = &types.Address{} + sv = &types.ListEngagementByAcceptingInvitationTaskSummary{} } else { sv = *v } for key, value := range shape { switch key { - case "City": + case "EngagementInvitationId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AddressPart to be of type string, got %T instead", value) + return fmt.Errorf("expected EngagementInvitationIdentifier to be of type string, got %T instead", value) } - sv.City = ptr.String(jtv) + sv.EngagementInvitationId = ptr.String(jtv) } - case "CountryCode": + case "Message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CountryCode to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.CountryCode = types.CountryCode(jtv) + sv.Message = ptr.String(jtv) } - case "PostalCode": + case "OpportunityId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AddressPart to be of type string, got %T instead", value) + return fmt.Errorf("expected OpportunityIdentifier to be of type string, got %T instead", value) } - sv.PostalCode = ptr.String(jtv) + sv.OpportunityId = ptr.String(jtv) } - case "StateOrRegion": + case "ReasonCode": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AddressPart to be of type string, got %T instead", value) + return fmt.Errorf("expected ReasonCode to be of type string, got %T instead", value) } - sv.StateOrRegion = ptr.String(jtv) + sv.ReasonCode = types.ReasonCode(jtv) } - case "StreetAddress": + case "ResourceSnapshotJobId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AddressPart to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceSnapshotJobIdentifier to be of type string, got %T instead", value) } - sv.StreetAddress = ptr.String(jtv) + sv.ResourceSnapshotJobId = ptr.String(jtv) } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson10_deserializeDocumentAddressSummary(v **types.AddressSummary, 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.AddressSummary - if *v == nil { - sv = &types.AddressSummary{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "City": + case "StartTime": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AddressPart to be of type string, got %T instead", value) + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) } - sv.City = ptr.String(jtv) + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.StartTime = ptr.Time(t) } - case "CountryCode": + case "TaskArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CountryCode to be of type string, got %T instead", value) + return fmt.Errorf("expected TaskArn to be of type string, got %T instead", value) } - sv.CountryCode = types.CountryCode(jtv) + sv.TaskArn = ptr.String(jtv) } - case "PostalCode": + case "TaskId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AddressPart to be of type string, got %T instead", value) + return fmt.Errorf("expected TaskIdentifier to be of type string, got %T instead", value) } - sv.PostalCode = ptr.String(jtv) + sv.TaskId = ptr.String(jtv) } - case "StateOrRegion": + case "TaskStatus": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AddressPart to be of type string, got %T instead", value) + return fmt.Errorf("expected TaskStatus to be of type string, got %T instead", value) } - sv.StateOrRegion = ptr.String(jtv) + sv.TaskStatus = types.TaskStatus(jtv) } default: @@ -2318,43 +6940,7 @@ func awsAwsjson10_deserializeDocumentAddressSummary(v **types.AddressSummary, va return nil } -func awsAwsjson10_deserializeDocumentApnPrograms(v *[]string, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []string - if *v == nil { - cv = []string{} - } else { - cv = *v - } - - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - col = jtv - } - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsAwsjson10_deserializeDocumentAwsMarketplaceOfferIdentifiers(v *[]string, value interface{}) error { +func awsAwsjson10_deserializeDocumentListEngagementFromOpportunityTaskSummaries(v *[]types.ListEngagementFromOpportunityTaskSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2367,22 +6953,20 @@ func awsAwsjson10_deserializeDocumentAwsMarketplaceOfferIdentifiers(v *[]string, return fmt.Errorf("unexpected JSON type %v", value) } - var cv []string + var cv []types.ListEngagementFromOpportunityTaskSummary if *v == nil { - cv = []string{} + cv = []types.ListEngagementFromOpportunityTaskSummary{} } else { cv = *v } for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AwsMarketplaceOfferIdentifier to be of type string, got %T instead", value) - } - col = jtv + var col types.ListEngagementFromOpportunityTaskSummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentListEngagementFromOpportunityTaskSummary(&destAddr, value); err != nil { + return err } + col = *destAddr cv = append(cv, col) } @@ -2390,7 +6974,7 @@ func awsAwsjson10_deserializeDocumentAwsMarketplaceOfferIdentifiers(v *[]string, return nil } -func awsAwsjson10_deserializeDocumentAwsOpportunityCustomer(v **types.AwsOpportunityCustomer, value interface{}) error { +func awsAwsjson10_deserializeDocumentListEngagementFromOpportunityTaskSummary(v **types.ListEngagementFromOpportunityTaskSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2403,139 +6987,107 @@ func awsAwsjson10_deserializeDocumentAwsOpportunityCustomer(v **types.AwsOpportu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AwsOpportunityCustomer + var sv *types.ListEngagementFromOpportunityTaskSummary if *v == nil { - sv = &types.AwsOpportunityCustomer{} + sv = &types.ListEngagementFromOpportunityTaskSummary{} } else { sv = *v } for key, value := range shape { switch key { - case "Contacts": - if err := awsAwsjson10_deserializeDocumentCustomerContactsList(&sv.Contacts, value); err != nil { - return err + case "EngagementId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementIdentifier to be of type string, got %T instead", value) + } + sv.EngagementId = ptr.String(jtv) } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson10_deserializeDocumentAwsOpportunityInsights(v **types.AwsOpportunityInsights, 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.AwsOpportunityInsights - if *v == nil { - sv = &types.AwsOpportunityInsights{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "EngagementScore": + case "EngagementInvitationId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EngagementScore to be of type string, got %T instead", value) + return fmt.Errorf("expected EngagementInvitationIdentifier to be of type string, got %T instead", value) } - sv.EngagementScore = types.EngagementScore(jtv) + sv.EngagementInvitationId = ptr.String(jtv) } - case "NextBestActions": + case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.NextBestActions = ptr.String(jtv) + sv.Message = ptr.String(jtv) } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson10_deserializeDocumentAwsOpportunityLifeCycle(v **types.AwsOpportunityLifeCycle, 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) - } + case "OpportunityId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpportunityIdentifier to be of type string, got %T instead", value) + } + sv.OpportunityId = ptr.String(jtv) + } - var sv *types.AwsOpportunityLifeCycle - if *v == nil { - sv = &types.AwsOpportunityLifeCycle{} - } else { - sv = *v - } + case "ReasonCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReasonCode to be of type string, got %T instead", value) + } + sv.ReasonCode = types.ReasonCode(jtv) + } - for key, value := range shape { - switch key { - case "ClosedLostReason": + case "ResourceSnapshotJobId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AwsClosedLostReason to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceSnapshotJobIdentifier to be of type string, got %T instead", value) } - sv.ClosedLostReason = types.AwsClosedLostReason(jtv) + sv.ResourceSnapshotJobId = ptr.String(jtv) } - case "NextSteps": + case "StartTime": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected PiiString to be of type string, got %T instead", value) + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) } - sv.NextSteps = ptr.String(jtv) + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.StartTime = ptr.Time(t) } - case "NextStepsHistory": - if err := awsAwsjson10_deserializeDocumentProfileNextStepsHistories(&sv.NextStepsHistory, value); err != nil { - return err + case "TaskArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TaskArn to be of type string, got %T instead", value) + } + sv.TaskArn = ptr.String(jtv) } - case "Stage": + case "TaskId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AwsOpportunityStage to be of type string, got %T instead", value) + return fmt.Errorf("expected TaskIdentifier to be of type string, got %T instead", value) } - sv.Stage = types.AwsOpportunityStage(jtv) + sv.TaskId = ptr.String(jtv) } - case "TargetCloseDate": + case "TaskStatus": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Date to be of type string, got %T instead", value) + return fmt.Errorf("expected TaskStatus to be of type string, got %T instead", value) } - sv.TargetCloseDate = ptr.String(jtv) + sv.TaskStatus = types.TaskStatus(jtv) } default: @@ -2547,7 +7099,7 @@ func awsAwsjson10_deserializeDocumentAwsOpportunityLifeCycle(v **types.AwsOpport return nil } -func awsAwsjson10_deserializeDocumentAwsOpportunityProject(v **types.AwsOpportunityProject, value interface{}) error { +func awsAwsjson10_deserializeDocumentMarketing(v **types.Marketing, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2560,17 +7112,49 @@ func awsAwsjson10_deserializeDocumentAwsOpportunityProject(v **types.AwsOpportun return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AwsOpportunityProject + var sv *types.Marketing if *v == nil { - sv = &types.AwsOpportunityProject{} + sv = &types.Marketing{} } else { sv = *v } for key, value := range shape { switch key { - case "ExpectedCustomerSpend": - if err := awsAwsjson10_deserializeDocumentExpectedCustomerSpendList(&sv.ExpectedCustomerSpend, value); err != nil { + case "AwsFundingUsed": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsFundingUsed to be of type string, got %T instead", value) + } + sv.AwsFundingUsed = types.AwsFundingUsed(jtv) + } + + case "CampaignName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CampaignName = ptr.String(jtv) + } + + case "Channels": + if err := awsAwsjson10_deserializeDocumentChannels(&sv.Channels, value); err != nil { + return err + } + + case "Source": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MarketingSource to be of type string, got %T instead", value) + } + sv.Source = types.MarketingSource(jtv) + } + + case "UseCases": + if err := awsAwsjson10_deserializeDocumentUseCases(&sv.UseCases, value); err != nil { return err } @@ -2583,7 +7167,7 @@ func awsAwsjson10_deserializeDocumentAwsOpportunityProject(v **types.AwsOpportun return nil } -func awsAwsjson10_deserializeDocumentAwsOpportunityRelatedEntities(v **types.AwsOpportunityRelatedEntities, value interface{}) error { +func awsAwsjson10_deserializeDocumentMonetaryValue(v **types.MonetaryValue, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2596,23 +7180,31 @@ func awsAwsjson10_deserializeDocumentAwsOpportunityRelatedEntities(v **types.Aws return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AwsOpportunityRelatedEntities + var sv *types.MonetaryValue if *v == nil { - sv = &types.AwsOpportunityRelatedEntities{} + sv = &types.MonetaryValue{} } else { sv = *v } for key, value := range shape { switch key { - case "AwsProducts": - if err := awsAwsjson10_deserializeDocumentAwsProductIdentifiers(&sv.AwsProducts, value); err != nil { - return err + case "Amount": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Amount = ptr.String(jtv) } - case "Solutions": - if err := awsAwsjson10_deserializeDocumentSolutionIdentifiers(&sv.Solutions, value); err != nil { - return err + case "CurrencyCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CurrencyCode to be of type string, got %T instead", value) + } + sv.CurrencyCode = types.CurrencyCode(jtv) } default: @@ -2624,7 +7216,7 @@ func awsAwsjson10_deserializeDocumentAwsOpportunityRelatedEntities(v **types.Aws return nil } -func awsAwsjson10_deserializeDocumentAwsOpportunityTeamMembersList(v *[]types.AwsTeamMember, value interface{}) error { +func awsAwsjson10_deserializeDocumentNextStepsHistories(v *[]types.NextStepsHistory, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2637,17 +7229,17 @@ func awsAwsjson10_deserializeDocumentAwsOpportunityTeamMembersList(v *[]types.Aw return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.AwsTeamMember + var cv []types.NextStepsHistory if *v == nil { - cv = []types.AwsTeamMember{} + cv = []types.NextStepsHistory{} } else { cv = *v } for _, value := range shape { - var col types.AwsTeamMember + var col types.NextStepsHistory destAddr := &col - if err := awsAwsjson10_deserializeDocumentAwsTeamMember(&destAddr, value); err != nil { + if err := awsAwsjson10_deserializeDocumentNextStepsHistory(&destAddr, value); err != nil { return err } col = *destAddr @@ -2658,7 +7250,7 @@ func awsAwsjson10_deserializeDocumentAwsOpportunityTeamMembersList(v *[]types.Aw return nil } -func awsAwsjson10_deserializeDocumentAwsProductIdentifiers(v *[]string, value interface{}) error { +func awsAwsjson10_deserializeDocumentNextStepsHistory(v **types.NextStepsHistory, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2666,35 +7258,52 @@ func awsAwsjson10_deserializeDocumentAwsProductIdentifiers(v *[]string, value in return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []string + var sv *types.NextStepsHistory if *v == nil { - cv = []string{} + sv = &types.NextStepsHistory{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AwsProductIdentifier to be of type string, got %T instead", value) + for key, value := range shape { + switch key { + case "Time": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.Time = ptr.Time(t) } - col = jtv - } - cv = append(cv, col) + case "Value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } -func awsAwsjson10_deserializeDocumentAwsTeamMember(v **types.AwsTeamMember, value interface{}) error { +func awsAwsjson10_deserializeDocumentOpportunityInvitationPayload(v **types.OpportunityInvitationPayload, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2707,49 +7316,33 @@ func awsAwsjson10_deserializeDocumentAwsTeamMember(v **types.AwsTeamMember, valu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AwsTeamMember + var sv *types.OpportunityInvitationPayload if *v == nil { - sv = &types.AwsTeamMember{} + sv = &types.OpportunityInvitationPayload{} } else { sv = *v } for key, value := range shape { switch key { - case "BusinessTitle": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AwsMemberBusinessTitle to be of type string, got %T instead", value) - } - sv.BusinessTitle = types.AwsMemberBusinessTitle(jtv) + case "Customer": + if err := awsAwsjson10_deserializeDocumentEngagementCustomer(&sv.Customer, value); err != nil { + return err } - case "Email": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Email to be of type string, got %T instead", value) - } - sv.Email = ptr.String(jtv) + case "Project": + if err := awsAwsjson10_deserializeDocumentProjectDetails(&sv.Project, value); err != nil { + return err } - case "FirstName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Name to be of type string, got %T instead", value) - } - sv.FirstName = ptr.String(jtv) + case "ReceiverResponsibilities": + if err := awsAwsjson10_deserializeDocumentReceiverResponsibilityList(&sv.ReceiverResponsibilities, value); err != nil { + return err } - case "LastName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Name to be of type string, got %T instead", value) - } - sv.LastName = ptr.String(jtv) + case "SenderContacts": + if err := awsAwsjson10_deserializeDocumentSenderContactList(&sv.SenderContacts, value); err != nil { + return err } default: @@ -2761,7 +7354,7 @@ func awsAwsjson10_deserializeDocumentAwsTeamMember(v **types.AwsTeamMember, valu return nil } -func awsAwsjson10_deserializeDocumentChannels(v *[]types.Channel, value interface{}) error { +func awsAwsjson10_deserializeDocumentOpportunitySummaries(v *[]types.OpportunitySummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2774,22 +7367,20 @@ func awsAwsjson10_deserializeDocumentChannels(v *[]types.Channel, value interfac return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.Channel + var cv []types.OpportunitySummary if *v == nil { - cv = []types.Channel{} + cv = []types.OpportunitySummary{} } else { cv = *v } for _, value := range shape { - var col types.Channel - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Channel to be of type string, got %T instead", value) - } - col = types.Channel(jtv) + var col types.OpportunitySummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentOpportunitySummary(&destAddr, value); err != nil { + return err } + col = *destAddr cv = append(cv, col) } @@ -2797,7 +7388,7 @@ func awsAwsjson10_deserializeDocumentChannels(v *[]types.Channel, value interfac return nil } -func awsAwsjson10_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { +func awsAwsjson10_deserializeDocumentOpportunitySummary(v **types.OpportunitySummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2810,98 +7401,99 @@ func awsAwsjson10_deserializeDocumentConflictException(v **types.ConflictExcepti return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ConflictException + var sv *types.OpportunitySummary if *v == nil { - sv = &types.ConflictException{} + sv = &types.OpportunitySummary{} } else { sv = *v } for key, value := range shape { switch key { - case "message", "Message": + case "Arn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected OpportunityArn to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.Arn = ptr.String(jtv) } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson10_deserializeDocumentContact(v **types.Contact, 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.Contact - if *v == nil { - sv = &types.Contact{} - } else { - sv = *v - } + case "Catalog": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CatalogIdentifier to be of type string, got %T instead", value) + } + sv.Catalog = ptr.String(jtv) + } - for key, value := range shape { - switch key { - case "BusinessTitle": + case "CreatedDate": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected JobTitle to be of type string, got %T instead", value) + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) } - sv.BusinessTitle = ptr.String(jtv) + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedDate = ptr.Time(t) } - case "Email": + case "Customer": + if err := awsAwsjson10_deserializeDocumentCustomerSummary(&sv.Customer, value); err != nil { + return err + } + + case "Id": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Email to be of type string, got %T instead", value) + return fmt.Errorf("expected OpportunityIdentifier to be of type string, got %T instead", value) } - sv.Email = ptr.String(jtv) + sv.Id = ptr.String(jtv) } - case "FirstName": + case "LastModifiedDate": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Name to be of type string, got %T instead", value) + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) } - sv.FirstName = ptr.String(jtv) + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.LastModifiedDate = ptr.Time(t) } - case "LastName": + case "LifeCycle": + if err := awsAwsjson10_deserializeDocumentLifeCycleSummary(&sv.LifeCycle, value); err != nil { + return err + } + + case "OpportunityType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Name to be of type string, got %T instead", value) + return fmt.Errorf("expected OpportunityType to be of type string, got %T instead", value) } - sv.LastName = ptr.String(jtv) + sv.OpportunityType = types.OpportunityType(jtv) } - case "Phone": + case "PartnerOpportunityIdentifier": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected PhoneNumber to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Phone = ptr.String(jtv) + sv.PartnerOpportunityIdentifier = ptr.String(jtv) + } + + case "Project": + if err := awsAwsjson10_deserializeDocumentProjectSummary(&sv.Project, value); err != nil { + return err } default: @@ -2913,7 +7505,7 @@ func awsAwsjson10_deserializeDocumentContact(v **types.Contact, value interface{ return nil } -func awsAwsjson10_deserializeDocumentCustomer(v **types.Customer, value interface{}) error { +func awsAwsjson10_deserializeDocumentOpportunitySummaryView(v **types.OpportunitySummaryView, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2926,22 +7518,51 @@ func awsAwsjson10_deserializeDocumentCustomer(v **types.Customer, value interfac return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Customer + var sv *types.OpportunitySummaryView if *v == nil { - sv = &types.Customer{} + sv = &types.OpportunitySummaryView{} } else { sv = *v } for key, value := range shape { switch key { - case "Account": - if err := awsAwsjson10_deserializeDocumentAccount(&sv.Account, value); err != nil { + case "Customer": + if err := awsAwsjson10_deserializeDocumentCustomer(&sv.Customer, value); err != nil { + return err + } + + case "Lifecycle": + if err := awsAwsjson10_deserializeDocumentLifeCycleForView(&sv.Lifecycle, value); err != nil { + return err + } + + case "OpportunityTeam": + if err := awsAwsjson10_deserializeDocumentPartnerOpportunityTeamMembersList(&sv.OpportunityTeam, value); err != nil { + return err + } + + case "OpportunityType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpportunityType to be of type string, got %T instead", value) + } + sv.OpportunityType = types.OpportunityType(jtv) + } + + case "PrimaryNeedsFromAws": + if err := awsAwsjson10_deserializeDocumentPrimaryNeedsFromAws(&sv.PrimaryNeedsFromAws, value); err != nil { return err } - case "Contacts": - if err := awsAwsjson10_deserializeDocumentCustomerContactsList(&sv.Contacts, value); err != nil { + case "Project": + if err := awsAwsjson10_deserializeDocumentProjectView(&sv.Project, value); err != nil { + return err + } + + case "RelatedEntityIdentifiers": + if err := awsAwsjson10_deserializeDocumentRelatedEntityIdentifiers(&sv.RelatedEntityIdentifiers, value); err != nil { return err } @@ -2954,7 +7575,7 @@ func awsAwsjson10_deserializeDocumentCustomer(v **types.Customer, value interfac return nil } -func awsAwsjson10_deserializeDocumentCustomerContactsList(v *[]types.Contact, value interface{}) error { +func awsAwsjson10_deserializeDocumentPartnerOpportunityTeamMembersList(v *[]types.Contact, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2988,7 +7609,7 @@ func awsAwsjson10_deserializeDocumentCustomerContactsList(v *[]types.Contact, va return nil } -func awsAwsjson10_deserializeDocumentCustomerSummary(v **types.CustomerSummary, value interface{}) error { +func awsAwsjson10_deserializeDocumentPayload(v *types.Payload, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3001,30 +7622,34 @@ func awsAwsjson10_deserializeDocumentCustomerSummary(v **types.CustomerSummary, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.CustomerSummary - if *v == nil { - sv = &types.CustomerSummary{} - } else { - sv = *v - } - + var uv types.Payload +loop: for key, value := range shape { + if value == nil { + continue + } switch key { - case "Account": - if err := awsAwsjson10_deserializeDocumentAccountSummary(&sv.Account, value); err != nil { + case "OpportunityInvitation": + var mv types.OpportunityInvitationPayload + destAddr := &mv + if err := awsAwsjson10_deserializeDocumentOpportunityInvitationPayload(&destAddr, value); err != nil { return err } + mv = *destAddr + uv = &types.PayloadMemberOpportunityInvitation{Value: mv} + break loop default: - _, _ = key, value + uv = &types.UnknownUnionMember{Tag: key} + break loop } } - *v = sv + *v = uv return nil } -func awsAwsjson10_deserializeDocumentDeliveryModels(v *[]types.DeliveryModel, value interface{}) error { +func awsAwsjson10_deserializeDocumentPrimaryNeedsFromAws(v *[]types.PrimaryNeedFromAws, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3037,21 +7662,21 @@ func awsAwsjson10_deserializeDocumentDeliveryModels(v *[]types.DeliveryModel, va return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.DeliveryModel + var cv []types.PrimaryNeedFromAws if *v == nil { - cv = []types.DeliveryModel{} + cv = []types.PrimaryNeedFromAws{} } else { cv = *v } for _, value := range shape { - var col types.DeliveryModel + var col types.PrimaryNeedFromAws if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DeliveryModel to be of type string, got %T instead", value) + return fmt.Errorf("expected PrimaryNeedFromAws to be of type string, got %T instead", value) } - col = types.DeliveryModel(jtv) + col = types.PrimaryNeedFromAws(jtv) } cv = append(cv, col) @@ -3060,7 +7685,41 @@ func awsAwsjson10_deserializeDocumentDeliveryModels(v *[]types.DeliveryModel, va return nil } -func awsAwsjson10_deserializeDocumentEngagementCustomer(v **types.EngagementCustomer, value interface{}) error { +func awsAwsjson10_deserializeDocumentProfileNextStepsHistories(v *[]types.ProfileNextStepsHistory, 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.ProfileNextStepsHistory + if *v == nil { + cv = []types.ProfileNextStepsHistory{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ProfileNextStepsHistory + destAddr := &col + if err := awsAwsjson10_deserializeDocumentProfileNextStepsHistory(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentProfileNextStepsHistory(v **types.ProfileNextStepsHistory, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3073,49 +7732,35 @@ func awsAwsjson10_deserializeDocumentEngagementCustomer(v **types.EngagementCust return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EngagementCustomer + var sv *types.ProfileNextStepsHistory if *v == nil { - sv = &types.EngagementCustomer{} + sv = &types.ProfileNextStepsHistory{} } else { sv = *v } for key, value := range shape { switch key { - case "CompanyName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected CompanyName to be of type string, got %T instead", value) - } - sv.CompanyName = ptr.String(jtv) - } - - case "CountryCode": + case "Time": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CountryCode to be of type string, got %T instead", value) + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) } - sv.CountryCode = types.CountryCode(jtv) - } - - case "Industry": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Industry to be of type string, got %T instead", value) + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err } - sv.Industry = types.Industry(jtv) + sv.Time = ptr.Time(t) } - case "WebsiteUrl": + case "Value": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CompanyWebsiteUrl to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.WebsiteUrl = ptr.String(jtv) + sv.Value = ptr.String(jtv) } default: @@ -3127,41 +7772,7 @@ func awsAwsjson10_deserializeDocumentEngagementCustomer(v **types.EngagementCust return nil } -func awsAwsjson10_deserializeDocumentEngagementInvitationSummaries(v *[]types.EngagementInvitationSummary, 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.EngagementInvitationSummary - if *v == nil { - cv = []types.EngagementInvitationSummary{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.EngagementInvitationSummary - destAddr := &col - if err := awsAwsjson10_deserializeDocumentEngagementInvitationSummary(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsAwsjson10_deserializeDocumentEngagementInvitationSummary(v **types.EngagementInvitationSummary, value interface{}) error { +func awsAwsjson10_deserializeDocumentProject(v **types.Project, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3174,116 +7785,209 @@ func awsAwsjson10_deserializeDocumentEngagementInvitationSummary(v **types.Engag return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EngagementInvitationSummary + var sv *types.Project if *v == nil { - sv = &types.EngagementInvitationSummary{} + sv = &types.Project{} } else { sv = *v } for key, value := range shape { switch key { - case "Arn": + case "AdditionalComments": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Arn = ptr.String(jtv) + sv.AdditionalComments = ptr.String(jtv) } - case "Catalog": + case "ApnPrograms": + if err := awsAwsjson10_deserializeDocumentApnPrograms(&sv.ApnPrograms, value); err != nil { + return err + } + + case "CompetitorName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CatalogIdentifier to be of type string, got %T instead", value) + return fmt.Errorf("expected CompetitorName to be of type string, got %T instead", value) } - sv.Catalog = ptr.String(jtv) + sv.CompetitorName = types.CompetitorName(jtv) } - case "EngagementTitle": + case "CustomerBusinessProblem": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EngagementTitle to be of type string, got %T instead", value) + return fmt.Errorf("expected PiiString to be of type string, got %T instead", value) } - sv.EngagementTitle = ptr.String(jtv) + sv.CustomerBusinessProblem = ptr.String(jtv) } - case "ExpirationDate": + case "CustomerUseCase": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err + sv.CustomerUseCase = ptr.String(jtv) + } + + case "DeliveryModels": + if err := awsAwsjson10_deserializeDocumentDeliveryModels(&sv.DeliveryModels, value); err != nil { + return err + } + + case "ExpectedCustomerSpend": + if err := awsAwsjson10_deserializeDocumentExpectedCustomerSpendList(&sv.ExpectedCustomerSpend, value); err != nil { + return err + } + + case "OtherCompetitorNames": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.ExpirationDate = ptr.Time(t) + sv.OtherCompetitorNames = ptr.String(jtv) } - case "Id": + case "OtherSolutionDescription": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EngagementInvitationArnOrIdentifier to be of type string, got %T instead", value) + return fmt.Errorf("expected PiiString to be of type string, got %T instead", value) } - sv.Id = ptr.String(jtv) + sv.OtherSolutionDescription = ptr.String(jtv) } - case "InvitationDate": + case "RelatedOpportunityIdentifier": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) + return fmt.Errorf("expected OpportunityIdentifier to be of type string, got %T instead", value) } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err + sv.RelatedOpportunityIdentifier = ptr.String(jtv) + } + + case "SalesActivities": + if err := awsAwsjson10_deserializeDocumentSalesActivities(&sv.SalesActivities, value); err != nil { + return err + } + + case "Title": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PiiString to be of type string, got %T instead", value) } - sv.InvitationDate = ptr.Time(t) + sv.Title = ptr.String(jtv) } - case "PayloadType": + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentProjectDetails(v **types.ProjectDetails, 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.ProjectDetails + if *v == nil { + sv = &types.ProjectDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BusinessProblem": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EngagementInvitationPayloadType to be of type string, got %T instead", value) + return fmt.Errorf("expected EngagementCustomerBusinessProblem to be of type string, got %T instead", value) } - sv.PayloadType = types.EngagementInvitationPayloadType(jtv) + sv.BusinessProblem = ptr.String(jtv) } - case "Receiver": - if err := awsAwsjson10_deserializeDocumentReceiver(&sv.Receiver, value); err != nil { + case "ExpectedCustomerSpend": + if err := awsAwsjson10_deserializeDocumentExpectedCustomerSpendList(&sv.ExpectedCustomerSpend, value); err != nil { return err } - case "SenderAwsAccountId": + case "TargetCompletionDate": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AwsAccountIdOrLabel to be of type string, got %T instead", value) + return fmt.Errorf("expected Date to be of type string, got %T instead", value) } - sv.SenderAwsAccountId = ptr.String(jtv) + sv.TargetCompletionDate = ptr.String(jtv) } - case "SenderCompanyName": + case "Title": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.SenderCompanyName = ptr.String(jtv) + sv.Title = ptr.String(jtv) } - case "Status": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected InvitationStatus to be of type string, got %T instead", value) - } - sv.Status = types.InvitationStatus(jtv) + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentProjectSummary(v **types.ProjectSummary, 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.ProjectSummary + if *v == nil { + sv = &types.ProjectSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DeliveryModels": + if err := awsAwsjson10_deserializeDocumentDeliveryModels(&sv.DeliveryModels, value); err != nil { + return err + } + + case "ExpectedCustomerSpend": + if err := awsAwsjson10_deserializeDocumentExpectedCustomerSpendList(&sv.ExpectedCustomerSpend, value); err != nil { + return err } default: @@ -3295,7 +7999,7 @@ func awsAwsjson10_deserializeDocumentEngagementInvitationSummary(v **types.Engag return nil } -func awsAwsjson10_deserializeDocumentExpectedCustomerSpend(v **types.ExpectedCustomerSpend, value interface{}) error { +func awsAwsjson10_deserializeDocumentProjectView(v **types.ProjectView, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3308,49 +8012,46 @@ func awsAwsjson10_deserializeDocumentExpectedCustomerSpend(v **types.ExpectedCus return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ExpectedCustomerSpend + var sv *types.ProjectView if *v == nil { - sv = &types.ExpectedCustomerSpend{} + sv = &types.ProjectView{} } else { sv = *v } for key, value := range shape { switch key { - case "Amount": + case "CustomerUseCase": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Amount = ptr.String(jtv) + sv.CustomerUseCase = ptr.String(jtv) } - case "CurrencyCode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected CurrencyCode to be of type string, got %T instead", value) - } - sv.CurrencyCode = types.CurrencyCode(jtv) + case "DeliveryModels": + if err := awsAwsjson10_deserializeDocumentDeliveryModels(&sv.DeliveryModels, value); err != nil { + return err } - case "Frequency": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected PaymentFrequency to be of type string, got %T instead", value) - } - sv.Frequency = types.PaymentFrequency(jtv) + case "ExpectedCustomerSpend": + if err := awsAwsjson10_deserializeDocumentExpectedCustomerSpendList(&sv.ExpectedCustomerSpend, value); err != nil { + return err } - case "TargetCompany": + case "OtherSolutionDescription": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected PiiString to be of type string, got %T instead", value) } - sv.TargetCompany = ptr.String(jtv) + sv.OtherSolutionDescription = ptr.String(jtv) + } + + case "SalesActivities": + if err := awsAwsjson10_deserializeDocumentSalesActivities(&sv.SalesActivities, value); err != nil { + return err } default: @@ -3362,7 +8063,47 @@ func awsAwsjson10_deserializeDocumentExpectedCustomerSpend(v **types.ExpectedCus return nil } -func awsAwsjson10_deserializeDocumentExpectedCustomerSpendList(v *[]types.ExpectedCustomerSpend, value interface{}) error { +func awsAwsjson10_deserializeDocumentReceiver(v *types.Receiver, 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 uv types.Receiver +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "Account": + var mv types.AccountReceiver + destAddr := &mv + if err := awsAwsjson10_deserializeDocumentAccountReceiver(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.ReceiverMemberAccount{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsAwsjson10_deserializeDocumentReceiverResponsibilityList(v *[]types.ReceiverResponsibility, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3375,20 +8116,22 @@ func awsAwsjson10_deserializeDocumentExpectedCustomerSpendList(v *[]types.Expect return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ExpectedCustomerSpend + var cv []types.ReceiverResponsibility if *v == nil { - cv = []types.ExpectedCustomerSpend{} + cv = []types.ReceiverResponsibility{} } else { cv = *v } for _, value := range shape { - var col types.ExpectedCustomerSpend - destAddr := &col - if err := awsAwsjson10_deserializeDocumentExpectedCustomerSpend(&destAddr, value); err != nil { - return err + var col types.ReceiverResponsibility + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReceiverResponsibility to be of type string, got %T instead", value) + } + col = types.ReceiverResponsibility(jtv) } - col = *destAddr cv = append(cv, col) } @@ -3396,7 +8139,7 @@ func awsAwsjson10_deserializeDocumentExpectedCustomerSpendList(v *[]types.Expect return nil } -func awsAwsjson10_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { +func awsAwsjson10_deserializeDocumentRelatedEntityIdentifiers(v **types.RelatedEntityIdentifiers, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3409,22 +8152,28 @@ func awsAwsjson10_deserializeDocumentInternalServerException(v **types.InternalS return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InternalServerException + var sv *types.RelatedEntityIdentifiers if *v == nil { - sv = &types.InternalServerException{} + sv = &types.RelatedEntityIdentifiers{} } else { sv = *v } for key, value := range shape { switch key { - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) + case "AwsMarketplaceOffers": + if err := awsAwsjson10_deserializeDocumentAwsMarketplaceOfferIdentifiers(&sv.AwsMarketplaceOffers, value); err != nil { + return err + } + + case "AwsProducts": + if err := awsAwsjson10_deserializeDocumentAwsProductIdentifiers(&sv.AwsProducts, value); err != nil { + return err + } + + case "Solutions": + if err := awsAwsjson10_deserializeDocumentSolutionIdentifiers(&sv.Solutions, value); err != nil { + return err } default: @@ -3436,7 +8185,7 @@ func awsAwsjson10_deserializeDocumentInternalServerException(v **types.InternalS return nil } -func awsAwsjson10_deserializeDocumentLifeCycle(v **types.LifeCycle, value interface{}) error { +func awsAwsjson10_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3449,81 +8198,89 @@ func awsAwsjson10_deserializeDocumentLifeCycle(v **types.LifeCycle, value interf return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.LifeCycle + var sv *types.ResourceNotFoundException if *v == nil { - sv = &types.LifeCycle{} + sv = &types.ResourceNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { - case "ClosedLostReason": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ClosedLostReason to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.ClosedLostReason = types.ClosedLostReason(jtv) + sv.Message = ptr.String(jtv) } - case "NextSteps": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected PiiString to be of type string, got %T instead", value) - } - sv.NextSteps = ptr.String(jtv) - } + default: + _, _ = key, value - case "NextStepsHistory": - if err := awsAwsjson10_deserializeDocumentNextStepsHistories(&sv.NextStepsHistory, value); err != nil { - return err - } + } + } + *v = sv + return nil +} - case "ReviewComments": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.ReviewComments = ptr.String(jtv) - } +func awsAwsjson10_deserializeDocumentResourceSnapshotJobSummary(v **types.ResourceSnapshotJobSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - case "ReviewStatus": + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceSnapshotJobSummary + if *v == nil { + sv = &types.ResourceSnapshotJobSummary{} + } 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 ReviewStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceSnapshotJobArn to be of type string, got %T instead", value) } - sv.ReviewStatus = types.ReviewStatus(jtv) + sv.Arn = ptr.String(jtv) } - case "ReviewStatusReason": + case "EngagementId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected EngagementIdentifier to be of type string, got %T instead", value) } - sv.ReviewStatusReason = ptr.String(jtv) + sv.EngagementId = ptr.String(jtv) } - case "Stage": + case "Id": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Stage to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceSnapshotJobIdentifier to be of type string, got %T instead", value) } - sv.Stage = types.Stage(jtv) + sv.Id = ptr.String(jtv) } - case "TargetCloseDate": + case "Status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Date to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceSnapshotJobStatus to be of type string, got %T instead", value) } - sv.TargetCloseDate = ptr.String(jtv) + sv.Status = types.ResourceSnapshotJobStatus(jtv) } default: @@ -3535,7 +8292,41 @@ func awsAwsjson10_deserializeDocumentLifeCycle(v **types.LifeCycle, value interf return nil } -func awsAwsjson10_deserializeDocumentLifeCycleSummary(v **types.LifeCycleSummary, value interface{}) error { +func awsAwsjson10_deserializeDocumentResourceSnapshotJobSummaryList(v *[]types.ResourceSnapshotJobSummary, 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.ResourceSnapshotJobSummary + if *v == nil { + cv = []types.ResourceSnapshotJobSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ResourceSnapshotJobSummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentResourceSnapshotJobSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentResourceSnapshotPayload(v *types.ResourceSnapshotPayload, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3548,76 +8339,111 @@ func awsAwsjson10_deserializeDocumentLifeCycleSummary(v **types.LifeCycleSummary return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.LifeCycleSummary + var uv types.ResourceSnapshotPayload +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "OpportunitySummary": + var mv types.OpportunitySummaryView + destAddr := &mv + if err := awsAwsjson10_deserializeDocumentOpportunitySummaryView(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.ResourceSnapshotPayloadMemberOpportunitySummary{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsAwsjson10_deserializeDocumentResourceSnapshotSummary(v **types.ResourceSnapshotSummary, 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.ResourceSnapshotSummary if *v == nil { - sv = &types.LifeCycleSummary{} + sv = &types.ResourceSnapshotSummary{} } else { sv = *v } for key, value := range shape { switch key { - case "ClosedLostReason": + case "Arn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ClosedLostReason to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceSnapshotArn to be of type string, got %T instead", value) } - sv.ClosedLostReason = types.ClosedLostReason(jtv) + sv.Arn = ptr.String(jtv) } - case "NextSteps": + case "CreatedBy": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected PiiString to be of type string, got %T instead", value) + return fmt.Errorf("expected AwsAccount to be of type string, got %T instead", value) } - sv.NextSteps = ptr.String(jtv) + sv.CreatedBy = ptr.String(jtv) } - case "ReviewComments": + case "ResourceId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceIdentifier to be of type string, got %T instead", value) } - sv.ReviewComments = ptr.String(jtv) + sv.ResourceId = ptr.String(jtv) } - case "ReviewStatus": + case "ResourceSnapshotTemplateName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ReviewStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceTemplateName to be of type string, got %T instead", value) } - sv.ReviewStatus = types.ReviewStatus(jtv) + sv.ResourceSnapshotTemplateName = ptr.String(jtv) } - case "ReviewStatusReason": + case "ResourceType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value) } - sv.ReviewStatusReason = ptr.String(jtv) + sv.ResourceType = types.ResourceType(jtv) } - case "Stage": + case "Revision": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected Stage to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceSnapshotRevision to be json.Number, got %T instead", value) } - sv.Stage = types.Stage(jtv) - } - - case "TargetCloseDate": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Date to be of type string, got %T instead", value) + i64, err := jtv.Int64() + if err != nil { + return err } - sv.TargetCloseDate = ptr.String(jtv) + sv.Revision = ptr.Int32(int32(i64)) } default: @@ -3629,7 +8455,7 @@ func awsAwsjson10_deserializeDocumentLifeCycleSummary(v **types.LifeCycleSummary return nil } -func awsAwsjson10_deserializeDocumentMarketing(v **types.Marketing, value interface{}) error { +func awsAwsjson10_deserializeDocumentResourceSnapshotSummaryList(v *[]types.ResourceSnapshotSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3637,67 +8463,69 @@ func awsAwsjson10_deserializeDocumentMarketing(v **types.Marketing, value interf return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Marketing + var cv []types.ResourceSnapshotSummary if *v == nil { - sv = &types.Marketing{} + cv = []types.ResourceSnapshotSummary{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "AwsFundingUsed": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AwsFundingUsed to be of type string, got %T instead", value) - } - sv.AwsFundingUsed = types.AwsFundingUsed(jtv) - } - - case "CampaignName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.CampaignName = ptr.String(jtv) - } + for _, value := range shape { + var col types.ResourceSnapshotSummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentResourceSnapshotSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) - case "Channels": - if err := awsAwsjson10_deserializeDocumentChannels(&sv.Channels, value); err != nil { - return err - } + } + *v = cv + return nil +} - case "Source": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MarketingSource to be of type string, got %T instead", value) - } - sv.Source = types.MarketingSource(jtv) - } +func awsAwsjson10_deserializeDocumentSalesActivities(v *[]types.SalesActivity, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - case "UseCases": - if err := awsAwsjson10_deserializeDocumentUseCases(&sv.UseCases, value); err != nil { - return err - } + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - default: - _, _ = key, value + var cv []types.SalesActivity + if *v == nil { + cv = []types.SalesActivity{} + } else { + cv = *v + } + for _, value := range shape { + var col types.SalesActivity + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SalesActivity to be of type string, got %T instead", value) + } + col = types.SalesActivity(jtv) } + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson10_deserializeDocumentMonetaryValue(v **types.MonetaryValue, value interface{}) error { +func awsAwsjson10_deserializeDocumentSenderContact(v **types.SenderContact, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3710,31 +8538,58 @@ func awsAwsjson10_deserializeDocumentMonetaryValue(v **types.MonetaryValue, valu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.MonetaryValue + var sv *types.SenderContact if *v == nil { - sv = &types.MonetaryValue{} + sv = &types.SenderContact{} } else { sv = *v } for key, value := range shape { switch key { - case "Amount": + case "BusinessTitle": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected JobTitle to be of type string, got %T instead", value) } - sv.Amount = ptr.String(jtv) + sv.BusinessTitle = ptr.String(jtv) } - case "CurrencyCode": + case "Email": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CurrencyCode to be of type string, got %T instead", value) + return fmt.Errorf("expected SenderContactEmail to be of type string, got %T instead", value) } - sv.CurrencyCode = types.CurrencyCode(jtv) + sv.Email = ptr.String(jtv) + } + + case "FirstName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.FirstName = ptr.String(jtv) + } + + case "LastName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.LastName = ptr.String(jtv) + } + + case "Phone": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PhoneNumber to be of type string, got %T instead", value) + } + sv.Phone = ptr.String(jtv) } default: @@ -3746,7 +8601,7 @@ func awsAwsjson10_deserializeDocumentMonetaryValue(v **types.MonetaryValue, valu return nil } -func awsAwsjson10_deserializeDocumentNextStepsHistories(v *[]types.NextStepsHistory, value interface{}) error { +func awsAwsjson10_deserializeDocumentSenderContactList(v *[]types.SenderContact, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3759,17 +8614,17 @@ func awsAwsjson10_deserializeDocumentNextStepsHistories(v *[]types.NextStepsHist return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.NextStepsHistory + var cv []types.SenderContact if *v == nil { - cv = []types.NextStepsHistory{} + cv = []types.SenderContact{} } else { cv = *v } for _, value := range shape { - var col types.NextStepsHistory + var col types.SenderContact destAddr := &col - if err := awsAwsjson10_deserializeDocumentNextStepsHistory(&destAddr, value); err != nil { + if err := awsAwsjson10_deserializeDocumentSenderContact(&destAddr, value); err != nil { return err } col = *destAddr @@ -3780,7 +8635,7 @@ func awsAwsjson10_deserializeDocumentNextStepsHistories(v *[]types.NextStepsHist return nil } -func awsAwsjson10_deserializeDocumentNextStepsHistory(v **types.NextStepsHistory, value interface{}) error { +func awsAwsjson10_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3793,35 +8648,22 @@ func awsAwsjson10_deserializeDocumentNextStepsHistory(v **types.NextStepsHistory return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.NextStepsHistory + var sv *types.ServiceQuotaExceededException if *v == nil { - sv = &types.NextStepsHistory{} + sv = &types.ServiceQuotaExceededException{} } else { sv = *v } for key, value := range shape { switch key { - case "Time": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.Time = ptr.Time(t) - } - - case "Value": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Value = ptr.String(jtv) + sv.Message = ptr.String(jtv) } default: @@ -3833,7 +8675,7 @@ func awsAwsjson10_deserializeDocumentNextStepsHistory(v **types.NextStepsHistory return nil } -func awsAwsjson10_deserializeDocumentOpportunityInvitationPayload(v **types.OpportunityInvitationPayload, value interface{}) error { +func awsAwsjson10_deserializeDocumentSoftwareRevenue(v **types.SoftwareRevenue, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3846,32 +8688,44 @@ func awsAwsjson10_deserializeDocumentOpportunityInvitationPayload(v **types.Oppo return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.OpportunityInvitationPayload + var sv *types.SoftwareRevenue if *v == nil { - sv = &types.OpportunityInvitationPayload{} + sv = &types.SoftwareRevenue{} } else { sv = *v } for key, value := range shape { switch key { - case "Customer": - if err := awsAwsjson10_deserializeDocumentEngagementCustomer(&sv.Customer, value); err != nil { - return err + case "DeliveryModel": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RevenueModel to be of type string, got %T instead", value) + } + sv.DeliveryModel = types.RevenueModel(jtv) } - case "Project": - if err := awsAwsjson10_deserializeDocumentProjectDetails(&sv.Project, value); err != nil { - return err + case "EffectiveDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Date to be of type string, got %T instead", value) + } + sv.EffectiveDate = ptr.String(jtv) } - case "ReceiverResponsibilities": - if err := awsAwsjson10_deserializeDocumentReceiverResponsibilityList(&sv.ReceiverResponsibilities, value); err != nil { - return err + case "ExpirationDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Date to be of type string, got %T instead", value) + } + sv.ExpirationDate = ptr.String(jtv) } - case "SenderContacts": - if err := awsAwsjson10_deserializeDocumentSenderContactList(&sv.SenderContacts, value); err != nil { + case "Value": + if err := awsAwsjson10_deserializeDocumentMonetaryValue(&sv.Value, value); err != nil { return err } @@ -3884,41 +8738,7 @@ func awsAwsjson10_deserializeDocumentOpportunityInvitationPayload(v **types.Oppo return nil } -func awsAwsjson10_deserializeDocumentOpportunitySummaries(v *[]types.OpportunitySummary, 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.OpportunitySummary - if *v == nil { - cv = []types.OpportunitySummary{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.OpportunitySummary - destAddr := &col - if err := awsAwsjson10_deserializeDocumentOpportunitySummary(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsAwsjson10_deserializeDocumentOpportunitySummary(v **types.OpportunitySummary, value interface{}) error { +func awsAwsjson10_deserializeDocumentSolutionBase(v **types.SolutionBase, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3931,52 +8751,43 @@ func awsAwsjson10_deserializeDocumentOpportunitySummary(v **types.OpportunitySum return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.OpportunitySummary + var sv *types.SolutionBase if *v == nil { - sv = &types.OpportunitySummary{} + sv = &types.SolutionBase{} } else { sv = *v } for key, value := range shape { switch key { - case "Catalog": + case "Arn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CatalogIdentifier to be of type string, got %T instead", value) + return fmt.Errorf("expected SolutionArn to be of type string, got %T instead", value) } - sv.Catalog = ptr.String(jtv) + sv.Arn = ptr.String(jtv) } - case "CreatedDate": + case "Catalog": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err + return fmt.Errorf("expected CatalogIdentifier to be of type string, got %T instead", value) } - sv.CreatedDate = ptr.Time(t) - } - - case "Customer": - if err := awsAwsjson10_deserializeDocumentCustomerSummary(&sv.Customer, value); err != nil { - return err + sv.Catalog = ptr.String(jtv) } - case "Id": + case "Category": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected OpportunityIdentifier to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Id = ptr.String(jtv) + sv.Category = ptr.String(jtv) } - case "LastModifiedDate": + case "CreatedDate": if value != nil { jtv, ok := value.(string) if !ok { @@ -3986,35 +8797,34 @@ func awsAwsjson10_deserializeDocumentOpportunitySummary(v **types.OpportunitySum if err != nil { return err } - sv.LastModifiedDate = ptr.Time(t) - } - - case "LifeCycle": - if err := awsAwsjson10_deserializeDocumentLifeCycleSummary(&sv.LifeCycle, value); err != nil { - return err + sv.CreatedDate = ptr.Time(t) } - case "OpportunityType": + case "Id": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected OpportunityType to be of type string, got %T instead", value) + return fmt.Errorf("expected SolutionIdentifier to be of type string, got %T instead", value) } - sv.OpportunityType = types.OpportunityType(jtv) + sv.Id = ptr.String(jtv) } - case "PartnerOpportunityIdentifier": + case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.PartnerOpportunityIdentifier = ptr.String(jtv) + sv.Name = ptr.String(jtv) } - case "Project": - if err := awsAwsjson10_deserializeDocumentProjectSummary(&sv.Project, value); err != nil { - return err + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SolutionStatus to be of type string, got %T instead", value) + } + sv.Status = types.SolutionStatus(jtv) } default: @@ -4026,81 +8836,7 @@ func awsAwsjson10_deserializeDocumentOpportunitySummary(v **types.OpportunitySum return nil } -func awsAwsjson10_deserializeDocumentPartnerOpportunityTeamMembersList(v *[]types.Contact, 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.Contact - if *v == nil { - cv = []types.Contact{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.Contact - destAddr := &col - if err := awsAwsjson10_deserializeDocumentContact(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsAwsjson10_deserializeDocumentPayload(v *types.Payload, 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 uv types.Payload -loop: - for key, value := range shape { - if value == nil { - continue - } - switch key { - case "OpportunityInvitation": - var mv types.OpportunityInvitationPayload - destAddr := &mv - if err := awsAwsjson10_deserializeDocumentOpportunityInvitationPayload(&destAddr, value); err != nil { - return err - } - mv = *destAddr - uv = &types.PayloadMemberOpportunityInvitation{Value: mv} - break loop - - default: - uv = &types.UnknownUnionMember{Tag: key} - break loop - - } - } - *v = uv - return nil -} - -func awsAwsjson10_deserializeDocumentPrimaryNeedsFromAws(v *[]types.PrimaryNeedFromAws, value interface{}) error { +func awsAwsjson10_deserializeDocumentSolutionIdentifiers(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4113,21 +8849,21 @@ func awsAwsjson10_deserializeDocumentPrimaryNeedsFromAws(v *[]types.PrimaryNeedF return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.PrimaryNeedFromAws + var cv []string if *v == nil { - cv = []types.PrimaryNeedFromAws{} + cv = []string{} } else { cv = *v } for _, value := range shape { - var col types.PrimaryNeedFromAws + var col string if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected PrimaryNeedFromAws to be of type string, got %T instead", value) + return fmt.Errorf("expected SolutionIdentifier to be of type string, got %T instead", value) } - col = types.PrimaryNeedFromAws(jtv) + col = jtv } cv = append(cv, col) @@ -4136,7 +8872,7 @@ func awsAwsjson10_deserializeDocumentPrimaryNeedsFromAws(v *[]types.PrimaryNeedF return nil } -func awsAwsjson10_deserializeDocumentProfileNextStepsHistories(v *[]types.ProfileNextStepsHistory, value interface{}) error { +func awsAwsjson10_deserializeDocumentSolutionList(v *[]types.SolutionBase, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4149,17 +8885,17 @@ func awsAwsjson10_deserializeDocumentProfileNextStepsHistories(v *[]types.Profil return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ProfileNextStepsHistory + var cv []types.SolutionBase if *v == nil { - cv = []types.ProfileNextStepsHistory{} + cv = []types.SolutionBase{} } else { cv = *v } for _, value := range shape { - var col types.ProfileNextStepsHistory + var col types.SolutionBase destAddr := &col - if err := awsAwsjson10_deserializeDocumentProfileNextStepsHistory(&destAddr, value); err != nil { + if err := awsAwsjson10_deserializeDocumentSolutionBase(&destAddr, value); err != nil { return err } col = *destAddr @@ -4170,7 +8906,7 @@ func awsAwsjson10_deserializeDocumentProfileNextStepsHistories(v *[]types.Profil return nil } -func awsAwsjson10_deserializeDocumentProfileNextStepsHistory(v **types.ProfileNextStepsHistory, value interface{}) error { +func awsAwsjson10_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4183,35 +8919,22 @@ func awsAwsjson10_deserializeDocumentProfileNextStepsHistory(v **types.ProfileNe return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ProfileNextStepsHistory + var sv *types.ThrottlingException if *v == nil { - sv = &types.ProfileNextStepsHistory{} + sv = &types.ThrottlingException{} } else { sv = *v } for key, value := range shape { switch key { - case "Time": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.Time = ptr.Time(t) - } - - case "Value": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Value = ptr.String(jtv) + sv.Message = ptr.String(jtv) } default: @@ -4223,7 +8946,7 @@ func awsAwsjson10_deserializeDocumentProfileNextStepsHistory(v **types.ProfileNe return nil } -func awsAwsjson10_deserializeDocumentProject(v **types.Project, value interface{}) error { +func awsAwsjson10_deserializeDocumentUseCases(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4231,122 +8954,35 @@ func awsAwsjson10_deserializeDocumentProject(v **types.Project, value interface{ return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Project + var cv []string if *v == nil { - sv = &types.Project{} + cv = []string{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "AdditionalComments": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.AdditionalComments = ptr.String(jtv) - } - - case "ApnPrograms": - if err := awsAwsjson10_deserializeDocumentApnPrograms(&sv.ApnPrograms, value); err != nil { - return err - } - - case "CompetitorName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected CompetitorName to be of type string, got %T instead", value) - } - sv.CompetitorName = types.CompetitorName(jtv) - } - - case "CustomerBusinessProblem": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected PiiString to be of type string, got %T instead", value) - } - sv.CustomerBusinessProblem = ptr.String(jtv) - } - - case "CustomerUseCase": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.CustomerUseCase = ptr.String(jtv) - } - - case "DeliveryModels": - if err := awsAwsjson10_deserializeDocumentDeliveryModels(&sv.DeliveryModels, value); err != nil { - return err - } - - case "ExpectedCustomerSpend": - if err := awsAwsjson10_deserializeDocumentExpectedCustomerSpendList(&sv.ExpectedCustomerSpend, value); err != nil { - return err - } - - case "OtherCompetitorNames": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.OtherCompetitorNames = ptr.String(jtv) - } - - case "OtherSolutionDescription": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected PiiString to be of type string, got %T instead", value) - } - sv.OtherSolutionDescription = ptr.String(jtv) - } - - case "RelatedOpportunityIdentifier": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected OpportunityIdentifier to be of type string, got %T instead", value) - } - sv.RelatedOpportunityIdentifier = ptr.String(jtv) - } - - case "SalesActivities": - if err := awsAwsjson10_deserializeDocumentSalesActivities(&sv.SalesActivities, value); err != nil { - return err - } - - case "Title": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected PiiString to be of type string, got %T instead", value) - } - sv.Title = ptr.String(jtv) + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - - default: - _, _ = key, value - + col = jtv } + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson10_deserializeDocumentProjectDetails(v **types.ProjectDetails, value interface{}) error { +func awsAwsjson10_deserializeDocumentValidationException(v **types.ValidationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4359,45 +8995,36 @@ func awsAwsjson10_deserializeDocumentProjectDetails(v **types.ProjectDetails, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ProjectDetails + var sv *types.ValidationException if *v == nil { - sv = &types.ProjectDetails{} + sv = &types.ValidationException{} } else { sv = *v } for key, value := range shape { switch key { - case "BusinessProblem": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EngagementCustomerBusinessProblem to be of type string, got %T instead", value) - } - sv.BusinessProblem = ptr.String(jtv) - } - - case "ExpectedCustomerSpend": - if err := awsAwsjson10_deserializeDocumentExpectedCustomerSpendList(&sv.ExpectedCustomerSpend, value); err != nil { + case "ErrorList": + if err := awsAwsjson10_deserializeDocumentValidationExceptionErrorList(&sv.ErrorList, value); err != nil { return err } - case "TargetCompletionDate": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Date to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.TargetCompletionDate = ptr.String(jtv) + sv.Message = ptr.String(jtv) } - case "Title": + case "Reason": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ValidationExceptionReason to be of type string, got %T instead", value) } - sv.Title = ptr.String(jtv) + sv.Reason = types.ValidationExceptionReason(jtv) } default: @@ -4409,7 +9036,7 @@ func awsAwsjson10_deserializeDocumentProjectDetails(v **types.ProjectDetails, va return nil } -func awsAwsjson10_deserializeDocumentProjectSummary(v **types.ProjectSummary, value interface{}) error { +func awsAwsjson10_deserializeDocumentValidationExceptionError(v **types.ValidationExceptionError, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4422,75 +9049,52 @@ func awsAwsjson10_deserializeDocumentProjectSummary(v **types.ProjectSummary, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ProjectSummary + var sv *types.ValidationExceptionError if *v == nil { - sv = &types.ProjectSummary{} + sv = &types.ValidationExceptionError{} } else { sv = *v } for key, value := range shape { switch key { - case "DeliveryModels": - if err := awsAwsjson10_deserializeDocumentDeliveryModels(&sv.DeliveryModels, value); err != nil { - return err + case "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ValidationExceptionErrorCode to be of type string, got %T instead", value) + } + sv.Code = types.ValidationExceptionErrorCode(jtv) } - case "ExpectedCustomerSpend": - if err := awsAwsjson10_deserializeDocumentExpectedCustomerSpendList(&sv.ExpectedCustomerSpend, value); err != nil { - return err + case "FieldName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.FieldName = ptr.String(jtv) } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson10_deserializeDocumentReceiver(v *types.Receiver, 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 uv types.Receiver -loop: - for key, value := range shape { - if value == nil { - continue - } - switch key { - case "Account": - var mv types.AccountReceiver - destAddr := &mv - if err := awsAwsjson10_deserializeDocumentAccountReceiver(&destAddr, value); err != nil { - return err + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) } - mv = *destAddr - uv = &types.ReceiverMemberAccount{Value: mv} - break loop default: - uv = &types.UnknownUnionMember{Tag: key} - break loop + _, _ = key, value } } - *v = uv + *v = sv return nil } -func awsAwsjson10_deserializeDocumentReceiverResponsibilityList(v *[]types.ReceiverResponsibility, value interface{}) error { +func awsAwsjson10_deserializeDocumentValidationExceptionErrorList(v *[]types.ValidationExceptionError, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4503,22 +9107,20 @@ func awsAwsjson10_deserializeDocumentReceiverResponsibilityList(v *[]types.Recei return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ReceiverResponsibility + var cv []types.ValidationExceptionError if *v == nil { - cv = []types.ReceiverResponsibility{} + cv = []types.ValidationExceptionError{} } else { cv = *v } - for _, value := range shape { - var col types.ReceiverResponsibility - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ReceiverResponsibility to be of type string, got %T instead", value) - } - col = types.ReceiverResponsibility(jtv) + for _, value := range shape { + var col types.ValidationExceptionError + destAddr := &col + if err := awsAwsjson10_deserializeDocumentValidationExceptionError(&destAddr, value); err != nil { + return err } + col = *destAddr cv = append(cv, col) } @@ -4526,7 +9128,7 @@ func awsAwsjson10_deserializeDocumentReceiverResponsibilityList(v *[]types.Recei return nil } -func awsAwsjson10_deserializeDocumentRelatedEntityIdentifiers(v **types.RelatedEntityIdentifiers, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentCreateEngagementInvitationOutput(v **CreateEngagementInvitationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4539,28 +9141,31 @@ func awsAwsjson10_deserializeDocumentRelatedEntityIdentifiers(v **types.RelatedE return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.RelatedEntityIdentifiers + var sv *CreateEngagementInvitationOutput if *v == nil { - sv = &types.RelatedEntityIdentifiers{} + sv = &CreateEngagementInvitationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AwsMarketplaceOffers": - if err := awsAwsjson10_deserializeDocumentAwsMarketplaceOfferIdentifiers(&sv.AwsMarketplaceOffers, value); err != nil { - return err - } - - case "AwsProducts": - if err := awsAwsjson10_deserializeDocumentAwsProductIdentifiers(&sv.AwsProducts, value); err != nil { - return err + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementInvitationArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) } - case "Solutions": - if err := awsAwsjson10_deserializeDocumentSolutionIdentifiers(&sv.Solutions, value); err != nil { - return err + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementInvitationIdentifier to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) } default: @@ -4572,7 +9177,7 @@ func awsAwsjson10_deserializeDocumentRelatedEntityIdentifiers(v **types.RelatedE return nil } -func awsAwsjson10_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentCreateEngagementOutput(v **CreateEngagementOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4585,22 +9190,31 @@ func awsAwsjson10_deserializeDocumentResourceNotFoundException(v **types.Resourc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ResourceNotFoundException + var sv *CreateEngagementOutput if *v == nil { - sv = &types.ResourceNotFoundException{} + sv = &CreateEngagementOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "message", "Message": + case "Arn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected EngagementArn to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.Arn = ptr.String(jtv) + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementIdentifier to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) } default: @@ -4612,43 +9226,7 @@ func awsAwsjson10_deserializeDocumentResourceNotFoundException(v **types.Resourc return nil } -func awsAwsjson10_deserializeDocumentSalesActivities(v *[]types.SalesActivity, 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.SalesActivity - if *v == nil { - cv = []types.SalesActivity{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.SalesActivity - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SalesActivity to be of type string, got %T instead", value) - } - col = types.SalesActivity(jtv) - } - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsAwsjson10_deserializeDocumentSenderContact(v **types.SenderContact, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentCreateOpportunityOutput(v **CreateOpportunityOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4661,58 +9239,44 @@ func awsAwsjson10_deserializeDocumentSenderContact(v **types.SenderContact, valu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.SenderContact + var sv *CreateOpportunityOutput if *v == nil { - sv = &types.SenderContact{} + sv = &CreateOpportunityOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "BusinessTitle": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected JobTitle to be of type string, got %T instead", value) - } - sv.BusinessTitle = ptr.String(jtv) - } - - case "Email": + case "Id": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SenderContactEmail to be of type string, got %T instead", value) + return fmt.Errorf("expected OpportunityIdentifier to be of type string, got %T instead", value) } - sv.Email = ptr.String(jtv) + sv.Id = ptr.String(jtv) } - case "FirstName": + case "LastModifiedDate": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Name to be of type string, got %T instead", value) + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) } - sv.FirstName = ptr.String(jtv) - } - - case "LastName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Name to be of type string, got %T instead", value) + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err } - sv.LastName = ptr.String(jtv) + sv.LastModifiedDate = ptr.Time(t) } - case "Phone": + case "PartnerOpportunityIdentifier": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected PhoneNumber to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Phone = ptr.String(jtv) + sv.PartnerOpportunityIdentifier = ptr.String(jtv) } default: @@ -4724,7 +9288,7 @@ func awsAwsjson10_deserializeDocumentSenderContact(v **types.SenderContact, valu return nil } -func awsAwsjson10_deserializeDocumentSenderContactList(v *[]types.SenderContact, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentCreateResourceSnapshotJobOutput(v **CreateResourceSnapshotJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4732,33 +9296,48 @@ func awsAwsjson10_deserializeDocumentSenderContactList(v *[]types.SenderContact, return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.SenderContact + var sv *CreateResourceSnapshotJobOutput if *v == nil { - cv = []types.SenderContact{} + sv = &CreateResourceSnapshotJobOutput{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.SenderContact - destAddr := &col - if err := awsAwsjson10_deserializeDocumentSenderContact(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceSnapshotJobArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceSnapshotJobIdentifier to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsAwsjson10_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentCreateResourceSnapshotOutput(v **CreateResourceSnapshotOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4771,22 +9350,35 @@ func awsAwsjson10_deserializeDocumentServiceQuotaExceededException(v **types.Ser return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ServiceQuotaExceededException + var sv *CreateResourceSnapshotOutput if *v == nil { - sv = &types.ServiceQuotaExceededException{} + sv = &CreateResourceSnapshotOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "message", "Message": + case "Arn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.Arn = ptr.String(jtv) + } + + case "Revision": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ResourceSnapshotRevision to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Revision = ptr.Int32(int32(i64)) } default: @@ -4798,7 +9390,7 @@ func awsAwsjson10_deserializeDocumentServiceQuotaExceededException(v **types.Ser return nil } -func awsAwsjson10_deserializeDocumentSoftwareRevenue(v **types.SoftwareRevenue, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentGetAwsOpportunitySummaryOutput(v **GetAwsOpportunitySummaryOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4811,45 +9403,97 @@ func awsAwsjson10_deserializeDocumentSoftwareRevenue(v **types.SoftwareRevenue, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.SoftwareRevenue + var sv *GetAwsOpportunitySummaryOutput if *v == nil { - sv = &types.SoftwareRevenue{} + sv = &GetAwsOpportunitySummaryOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DeliveryModel": + case "Catalog": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RevenueModel to be of type string, got %T instead", value) + return fmt.Errorf("expected CatalogIdentifier to be of type string, got %T instead", value) } - sv.DeliveryModel = types.RevenueModel(jtv) + sv.Catalog = ptr.String(jtv) } - case "EffectiveDate": + case "Customer": + if err := awsAwsjson10_deserializeDocumentAwsOpportunityCustomer(&sv.Customer, value); err != nil { + return err + } + + case "Insights": + if err := awsAwsjson10_deserializeDocumentAwsOpportunityInsights(&sv.Insights, value); err != nil { + return err + } + + case "InvolvementType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Date to be of type string, got %T instead", value) + return fmt.Errorf("expected SalesInvolvementType to be of type string, got %T instead", value) + } + sv.InvolvementType = types.SalesInvolvementType(jtv) + } + + case "InvolvementTypeChangeReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InvolvementTypeChangeReason to be of type string, got %T instead", value) + } + sv.InvolvementTypeChangeReason = types.InvolvementTypeChangeReason(jtv) + } + + case "LifeCycle": + if err := awsAwsjson10_deserializeDocumentAwsOpportunityLifeCycle(&sv.LifeCycle, value); err != nil { + return err + } + + case "OpportunityTeam": + if err := awsAwsjson10_deserializeDocumentAwsOpportunityTeamMembersList(&sv.OpportunityTeam, value); err != nil { + return err + } + + case "Origin": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpportunityOrigin to be of type string, got %T instead", value) + } + sv.Origin = types.OpportunityOrigin(jtv) + } + + case "Project": + if err := awsAwsjson10_deserializeDocumentAwsOpportunityProject(&sv.Project, value); err != nil { + return err + } + + case "RelatedEntityIds": + if err := awsAwsjson10_deserializeDocumentAwsOpportunityRelatedEntities(&sv.RelatedEntityIds, value); err != nil { + return err + } + + case "RelatedOpportunityId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpportunityIdentifier to be of type string, got %T instead", value) } - sv.EffectiveDate = ptr.String(jtv) + sv.RelatedOpportunityId = ptr.String(jtv) } - case "ExpirationDate": + case "Visibility": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Date to be of type string, got %T instead", value) + return fmt.Errorf("expected Visibility to be of type string, got %T instead", value) } - sv.ExpirationDate = ptr.String(jtv) - } - - case "Value": - if err := awsAwsjson10_deserializeDocumentMonetaryValue(&sv.Value, value); err != nil { - return err + sv.Visibility = types.Visibility(jtv) } default: @@ -4861,7 +9505,7 @@ func awsAwsjson10_deserializeDocumentSoftwareRevenue(v **types.SoftwareRevenue, return nil } -func awsAwsjson10_deserializeDocumentSolutionBase(v **types.SolutionBase, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentGetEngagementInvitationOutput(v **GetEngagementInvitationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4874,15 +9518,24 @@ func awsAwsjson10_deserializeDocumentSolutionBase(v **types.SolutionBase, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.SolutionBase + var sv *GetEngagementInvitationOutput if *v == nil { - sv = &types.SolutionBase{} + sv = &GetEngagementInvitationOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + case "Catalog": if value != nil { jtv, ok := value.(string) @@ -4892,16 +9545,39 @@ func awsAwsjson10_deserializeDocumentSolutionBase(v **types.SolutionBase, value sv.Catalog = ptr.String(jtv) } - case "Category": + case "EngagementDescription": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected EngagementDescription to be of type string, got %T instead", value) } - sv.Category = ptr.String(jtv) + sv.EngagementDescription = ptr.String(jtv) } - case "CreatedDate": + case "EngagementId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementIdentifier to be of type string, got %T instead", value) + } + sv.EngagementId = ptr.String(jtv) + } + + case "EngagementTitle": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementTitle to be of type string, got %T instead", value) + } + sv.EngagementTitle = ptr.String(jtv) + } + + case "ExistingMembers": + if err := awsAwsjson10_deserializeDocumentEngagementMemberSummaries(&sv.ExistingMembers, value); err != nil { + return err + } + + case "ExpirationDate": if value != nil { jtv, ok := value.(string) if !ok { @@ -4911,116 +9587,105 @@ func awsAwsjson10_deserializeDocumentSolutionBase(v **types.SolutionBase, value if err != nil { return err } - sv.CreatedDate = ptr.Time(t) + sv.ExpirationDate = ptr.Time(t) } case "Id": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SolutionIdentifier to be of type string, got %T instead", value) + return fmt.Errorf("expected EngagementInvitationArnOrIdentifier to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } - case "Name": + case "InvitationDate": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.InvitationDate = ptr.Time(t) } - case "Status": + case "InvitationMessage": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SolutionStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected InvitationMessage to be of type string, got %T instead", value) } - sv.Status = types.SolutionStatus(jtv) + sv.InvitationMessage = ptr.String(jtv) } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson10_deserializeDocumentSolutionIdentifiers(v *[]string, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } + case "Payload": + if err := awsAwsjson10_deserializeDocumentPayload(&sv.Payload, value); err != nil { + return err + } - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + case "PayloadType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementInvitationPayloadType to be of type string, got %T instead", value) + } + sv.PayloadType = types.EngagementInvitationPayloadType(jtv) + } - var cv []string - if *v == nil { - cv = []string{} - } else { - cv = *v - } + case "Receiver": + if err := awsAwsjson10_deserializeDocumentReceiver(&sv.Receiver, value); err != nil { + return err + } - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SolutionIdentifier to be of type string, got %T instead", value) + case "RejectionReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RejectionReasonString to be of type string, got %T instead", value) + } + sv.RejectionReason = ptr.String(jtv) } - col = jtv - } - cv = append(cv, col) - } - *v = cv - return nil -} + case "SenderAwsAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccount to be of type string, got %T instead", value) + } + sv.SenderAwsAccountId = ptr.String(jtv) + } -func awsAwsjson10_deserializeDocumentSolutionList(v *[]types.SolutionBase, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } + case "SenderCompanyName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.SenderCompanyName = ptr.String(jtv) + } - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InvitationStatus to be of type string, got %T instead", value) + } + sv.Status = types.InvitationStatus(jtv) + } - var cv []types.SolutionBase - if *v == nil { - cv = []types.SolutionBase{} - } else { - cv = *v - } + default: + _, _ = key, value - for _, value := range shape { - var col types.SolutionBase - destAddr := &col - if err := awsAwsjson10_deserializeDocumentSolutionBase(&destAddr, value); err != nil { - return err } - col = *destAddr - cv = append(cv, col) - } - *v = cv + *v = sv return nil } -func awsAwsjson10_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentGetEngagementOutput(v **GetEngagementOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5033,70 +9698,101 @@ func awsAwsjson10_deserializeDocumentThrottlingException(v **types.ThrottlingExc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ThrottlingException + var sv *GetEngagementOutput if *v == nil { - sv = &types.ThrottlingException{} + sv = &GetEngagementOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "message", "Message": + case "Arn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected EngagementArn to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.Arn = ptr.String(jtv) } - default: - _, _ = key, value + case "Contexts": + if err := awsAwsjson10_deserializeDocumentEngagementContexts(&sv.Contexts, value); err != nil { + return err + } - } - } - *v = sv - return nil -} + case "CreatedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } -func awsAwsjson10_deserializeDocumentUseCases(v *[]string, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } + case "CreatedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccount to be of type string, got %T instead", value) + } + sv.CreatedBy = ptr.String(jtv) + } - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementIdentifier to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "MemberCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MemberCount = ptr.Int32(int32(i64)) + } + + case "Title": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementTitle to be of type string, got %T instead", value) + } + sv.Title = ptr.String(jtv) + } - var cv []string - if *v == nil { - cv = []string{} - } else { - cv = *v - } + default: + _, _ = key, value - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - col = jtv } - cv = append(cv, col) - } - *v = cv + *v = sv return nil } -func awsAwsjson10_deserializeDocumentValidationException(v **types.ValidationException, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentGetOpportunityOutput(v **GetOpportunityOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5109,94 +9805,133 @@ func awsAwsjson10_deserializeDocumentValidationException(v **types.ValidationExc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ValidationException + var sv *GetOpportunityOutput if *v == nil { - sv = &types.ValidationException{} + sv = &GetOpportunityOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ErrorList": - if err := awsAwsjson10_deserializeDocumentValidationExceptionErrorList(&sv.ErrorList, value); err != nil { - return err + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpportunityArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) } - case "message", "Message": + case "Catalog": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected CatalogIdentifier to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.Catalog = ptr.String(jtv) } - case "Reason": + case "CreatedDate": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ValidationExceptionReason to be of type string, got %T instead", value) + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) } - sv.Reason = types.ValidationExceptionReason(jtv) + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedDate = ptr.Time(t) } - default: - _, _ = key, value + case "Customer": + if err := awsAwsjson10_deserializeDocumentCustomer(&sv.Customer, value); err != nil { + return err + } - } - } - *v = sv - return nil -} + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpportunityIdentifier to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } -func awsAwsjson10_deserializeDocumentValidationExceptionError(v **types.ValidationExceptionError, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } + case "LastModifiedDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.LastModifiedDate = ptr.Time(t) + } - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + case "LifeCycle": + if err := awsAwsjson10_deserializeDocumentLifeCycle(&sv.LifeCycle, value); err != nil { + return err + } - var sv *types.ValidationExceptionError - if *v == nil { - sv = &types.ValidationExceptionError{} - } else { - sv = *v - } + case "Marketing": + if err := awsAwsjson10_deserializeDocumentMarketing(&sv.Marketing, value); err != nil { + return err + } - for key, value := range shape { - switch key { - case "Code": + case "NationalSecurity": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ValidationExceptionErrorCode to be of type string, got %T instead", value) + return fmt.Errorf("expected NationalSecurity to be of type string, got %T instead", value) } - sv.Code = types.ValidationExceptionErrorCode(jtv) + sv.NationalSecurity = types.NationalSecurity(jtv) } - case "FieldName": + case "OpportunityTeam": + if err := awsAwsjson10_deserializeDocumentPartnerOpportunityTeamMembersList(&sv.OpportunityTeam, value); err != nil { + return err + } + + case "OpportunityType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected OpportunityType to be of type string, got %T instead", value) } - sv.FieldName = ptr.String(jtv) + sv.OpportunityType = types.OpportunityType(jtv) } - case "Message": + case "PartnerOpportunityIdentifier": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.PartnerOpportunityIdentifier = ptr.String(jtv) + } + + case "PrimaryNeedsFromAws": + if err := awsAwsjson10_deserializeDocumentPrimaryNeedsFromAws(&sv.PrimaryNeedsFromAws, value); err != nil { + return err + } + + case "Project": + if err := awsAwsjson10_deserializeDocumentProject(&sv.Project, value); err != nil { + return err + } + + case "RelatedEntityIdentifiers": + if err := awsAwsjson10_deserializeDocumentRelatedEntityIdentifiers(&sv.RelatedEntityIdentifiers, value); err != nil { + return err + } + + case "SoftwareRevenue": + if err := awsAwsjson10_deserializeDocumentSoftwareRevenue(&sv.SoftwareRevenue, value); err != nil { + return err } default: @@ -5208,7 +9943,7 @@ func awsAwsjson10_deserializeDocumentValidationExceptionError(v **types.Validati return nil } -func awsAwsjson10_deserializeDocumentValidationExceptionErrorList(v *[]types.ValidationExceptionError, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentGetResourceSnapshotJobOutput(v **GetResourceSnapshotJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5216,83 +9951,134 @@ func awsAwsjson10_deserializeDocumentValidationExceptionErrorList(v *[]types.Val return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ValidationExceptionError + var sv *GetResourceSnapshotJobOutput if *v == nil { - cv = []types.ValidationExceptionError{} + sv = &GetResourceSnapshotJobOutput{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.ValidationExceptionError - destAddr := &col - if err := awsAwsjson10_deserializeDocumentValidationExceptionError(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceSnapshotJobArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } - } - *v = cv - return nil -} + case "Catalog": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CatalogIdentifier to be of type string, got %T instead", value) + } + sv.Catalog = ptr.String(jtv) + } -func awsAwsjson10_deserializeOpDocumentCreateOpportunityOutput(v **CreateOpportunityOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } + case "CreatedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + case "EngagementId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementIdentifier to be of type string, got %T instead", value) + } + sv.EngagementId = ptr.String(jtv) + } - var sv *CreateOpportunityOutput - if *v == nil { - sv = &CreateOpportunityOutput{} - } else { - sv = *v - } + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceSnapshotJobIdentifier to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "LastFailure": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.LastFailure = ptr.String(jtv) + } + + case "LastSuccessfulExecutionDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.LastSuccessfulExecutionDate = ptr.Time(t) + } + + case "ResourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) + } + sv.ResourceArn = ptr.String(jtv) + } + + case "ResourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceIdentifier to be of type string, got %T instead", value) + } + sv.ResourceId = ptr.String(jtv) + } - for key, value := range shape { - switch key { - case "Id": + case "ResourceSnapshotTemplateName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected OpportunityIdentifier to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceTemplateName to be of type string, got %T instead", value) } - sv.Id = ptr.String(jtv) + sv.ResourceSnapshotTemplateName = ptr.String(jtv) } - case "LastModifiedDate": + case "ResourceType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err + return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value) } - sv.LastModifiedDate = ptr.Time(t) + sv.ResourceType = types.ResourceType(jtv) } - case "PartnerOpportunityIdentifier": + case "Status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceSnapshotJobStatus to be of type string, got %T instead", value) } - sv.PartnerOpportunityIdentifier = ptr.String(jtv) + sv.Status = types.ResourceSnapshotJobStatus(jtv) } default: @@ -5304,7 +10090,7 @@ func awsAwsjson10_deserializeOpDocumentCreateOpportunityOutput(v **CreateOpportu return nil } -func awsAwsjson10_deserializeOpDocumentGetAwsOpportunitySummaryOutput(v **GetAwsOpportunitySummaryOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentGetResourceSnapshotOutput(v **GetResourceSnapshotOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5317,15 +10103,24 @@ func awsAwsjson10_deserializeOpDocumentGetAwsOpportunitySummaryOutput(v **GetAws return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetAwsOpportunitySummaryOutput + var sv *GetResourceSnapshotOutput if *v == nil { - sv = &GetAwsOpportunitySummaryOutput{} + sv = &GetResourceSnapshotOutput{} } 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 ResourceArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + case "Catalog": if value != nil { jtv, ok := value.(string) @@ -5335,79 +10130,80 @@ func awsAwsjson10_deserializeOpDocumentGetAwsOpportunitySummaryOutput(v **GetAws sv.Catalog = ptr.String(jtv) } - case "Customer": - if err := awsAwsjson10_deserializeDocumentAwsOpportunityCustomer(&sv.Customer, value); err != nil { - return err - } - - case "Insights": - if err := awsAwsjson10_deserializeDocumentAwsOpportunityInsights(&sv.Insights, value); err != nil { - return err - } - - case "InvolvementType": + case "CreatedAt": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SalesInvolvementType to be of type string, got %T instead", value) + return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) } - sv.InvolvementType = types.SalesInvolvementType(jtv) + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) } - case "InvolvementTypeChangeReason": + case "CreatedBy": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected InvolvementTypeChangeReason to be of type string, got %T instead", value) + return fmt.Errorf("expected AwsAccount to be of type string, got %T instead", value) } - sv.InvolvementTypeChangeReason = types.InvolvementTypeChangeReason(jtv) + sv.CreatedBy = ptr.String(jtv) } - case "LifeCycle": - if err := awsAwsjson10_deserializeDocumentAwsOpportunityLifeCycle(&sv.LifeCycle, value); err != nil { - return err + case "EngagementId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementIdentifier to be of type string, got %T instead", value) + } + sv.EngagementId = ptr.String(jtv) } - case "OpportunityTeam": - if err := awsAwsjson10_deserializeDocumentAwsOpportunityTeamMembersList(&sv.OpportunityTeam, value); err != nil { + case "Payload": + if err := awsAwsjson10_deserializeDocumentResourceSnapshotPayload(&sv.Payload, value); err != nil { return err } - case "Origin": + case "ResourceId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected OpportunityOrigin to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceIdentifier to be of type string, got %T instead", value) } - sv.Origin = types.OpportunityOrigin(jtv) - } - - case "Project": - if err := awsAwsjson10_deserializeDocumentAwsOpportunityProject(&sv.Project, value); err != nil { - return err + sv.ResourceId = ptr.String(jtv) } - case "RelatedEntityIds": - if err := awsAwsjson10_deserializeDocumentAwsOpportunityRelatedEntities(&sv.RelatedEntityIds, value); err != nil { - return err + case "ResourceSnapshotTemplateName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceTemplateName to be of type string, got %T instead", value) + } + sv.ResourceSnapshotTemplateName = ptr.String(jtv) } - case "RelatedOpportunityId": + case "ResourceType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected OpportunityIdentifier to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value) } - sv.RelatedOpportunityId = ptr.String(jtv) + sv.ResourceType = types.ResourceType(jtv) } - case "Visibility": + case "Revision": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected Visibility to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceSnapshotRevision to be json.Number, got %T instead", value) } - sv.Visibility = types.Visibility(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Revision = ptr.Int32(int32(i64)) } default: @@ -5419,7 +10215,7 @@ func awsAwsjson10_deserializeOpDocumentGetAwsOpportunitySummaryOutput(v **GetAws return nil } -func awsAwsjson10_deserializeOpDocumentGetEngagementInvitationOutput(v **GetEngagementInvitationOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentGetSellingSystemSettingsOutput(v **GetSellingSystemSettingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5432,24 +10228,15 @@ func awsAwsjson10_deserializeOpDocumentGetEngagementInvitationOutput(v **GetEnga return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetEngagementInvitationOutput + var sv *GetSellingSystemSettingsOutput if *v == nil { - sv = &GetEngagementInvitationOutput{} + sv = &GetSellingSystemSettingsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - case "Catalog": if value != nil { jtv, ok := value.(string) @@ -5459,103 +10246,193 @@ func awsAwsjson10_deserializeOpDocumentGetEngagementInvitationOutput(v **GetEnga sv.Catalog = ptr.String(jtv) } - case "EngagementTitle": + case "ResourceSnapshotJobRoleArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EngagementTitle to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceSnapshotJobRoleArn to be of type string, got %T instead", value) } - sv.EngagementTitle = ptr.String(jtv) + sv.ResourceSnapshotJobRoleArn = ptr.String(jtv) } - case "ExpirationDate": + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentListEngagementByAcceptingInvitationTasksOutput(v **ListEngagementByAcceptingInvitationTasksOutput, 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 *ListEngagementByAcceptingInvitationTasksOutput + if *v == nil { + sv = &ListEngagementByAcceptingInvitationTasksOutput{} + } 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 DateTime to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.ExpirationDate = ptr.Time(t) + sv.NextToken = ptr.String(jtv) } - case "Id": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EngagementInvitationArnOrIdentifier to be of type string, got %T instead", value) - } - sv.Id = ptr.String(jtv) + case "TaskSummaries": + if err := awsAwsjson10_deserializeDocumentListEngagementByAcceptingInvitationTaskSummaries(&sv.TaskSummaries, value); err != nil { + return err } - case "InvitationDate": + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentListEngagementFromOpportunityTasksOutput(v **ListEngagementFromOpportunityTasksOutput, 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 *ListEngagementFromOpportunityTasksOutput + if *v == nil { + sv = &ListEngagementFromOpportunityTasksOutput{} + } 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 DateTime to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.InvitationDate = ptr.Time(t) + sv.NextToken = ptr.String(jtv) } - case "Payload": - if err := awsAwsjson10_deserializeDocumentPayload(&sv.Payload, value); err != nil { + case "TaskSummaries": + if err := awsAwsjson10_deserializeDocumentListEngagementFromOpportunityTaskSummaries(&sv.TaskSummaries, value); err != nil { return err } - case "PayloadType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EngagementInvitationPayloadType to be of type string, got %T instead", value) - } - sv.PayloadType = types.EngagementInvitationPayloadType(jtv) - } + default: + _, _ = key, value - case "Receiver": - if err := awsAwsjson10_deserializeDocumentReceiver(&sv.Receiver, value); err != nil { + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentListEngagementInvitationsOutput(v **ListEngagementInvitationsOutput, 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 *ListEngagementInvitationsOutput + if *v == nil { + sv = &ListEngagementInvitationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EngagementInvitationSummaries": + if err := awsAwsjson10_deserializeDocumentEngagementInvitationSummaries(&sv.EngagementInvitationSummaries, value); err != nil { return err } - case "RejectionReason": + case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RejectionReasonString to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.RejectionReason = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } - case "SenderAwsAccountId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AwsAccountIdOrLabel to be of type string, got %T instead", value) - } - sv.SenderAwsAccountId = ptr.String(jtv) + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentListEngagementMembersOutput(v **ListEngagementMembersOutput, 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 *ListEngagementMembersOutput + if *v == nil { + sv = &ListEngagementMembersOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EngagementMemberList": + if err := awsAwsjson10_deserializeDocumentEngagementMembers(&sv.EngagementMemberList, value); err != nil { + return err } - case "SenderCompanyName": + case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.SenderCompanyName = ptr.String(jtv) - } - - case "Status": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected InvitationStatus to be of type string, got %T instead", value) - } - sv.Status = types.InvitationStatus(jtv) + sv.NextToken = ptr.String(jtv) } default: @@ -5567,7 +10444,7 @@ func awsAwsjson10_deserializeOpDocumentGetEngagementInvitationOutput(v **GetEnga return nil } -func awsAwsjson10_deserializeOpDocumentGetOpportunityOutput(v **GetOpportunityOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentListEngagementResourceAssociationsOutput(v **ListEngagementResourceAssociationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5580,123 +10457,116 @@ func awsAwsjson10_deserializeOpDocumentGetOpportunityOutput(v **GetOpportunityOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetOpportunityOutput + var sv *ListEngagementResourceAssociationsOutput if *v == nil { - sv = &GetOpportunityOutput{} + sv = &ListEngagementResourceAssociationsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Catalog": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected CatalogIdentifier to be of type string, got %T instead", value) - } - sv.Catalog = ptr.String(jtv) + case "EngagementResourceAssociationSummaries": + if err := awsAwsjson10_deserializeDocumentEngagementResourceAssociationSummaryList(&sv.EngagementResourceAssociationSummaries, value); err != nil { + return err } - case "CreatedDate": + case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.CreatedDate = ptr.Time(t) + sv.NextToken = ptr.String(jtv) } - case "Customer": - if err := awsAwsjson10_deserializeDocumentCustomer(&sv.Customer, value); err != nil { - return err - } + default: + _, _ = key, value - case "Id": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected OpportunityIdentifier to be of type string, got %T instead", value) - } - sv.Id = ptr.String(jtv) - } + } + } + *v = sv + return nil +} - case "LastModifiedDate": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DateTime to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.LastModifiedDate = ptr.Time(t) - } +func awsAwsjson10_deserializeOpDocumentListEngagementsOutput(v **ListEngagementsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - case "LifeCycle": - if err := awsAwsjson10_deserializeDocumentLifeCycle(&sv.LifeCycle, value); err != nil { - return err - } + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - case "Marketing": - if err := awsAwsjson10_deserializeDocumentMarketing(&sv.Marketing, value); err != nil { + var sv *ListEngagementsOutput + if *v == nil { + sv = &ListEngagementsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EngagementSummaryList": + if err := awsAwsjson10_deserializeDocumentEngagementSummaryList(&sv.EngagementSummaryList, value); err != nil { return err } - case "NationalSecurity": + case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NationalSecurity to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.NationalSecurity = types.NationalSecurity(jtv) + sv.NextToken = ptr.String(jtv) } - case "OpportunityTeam": - if err := awsAwsjson10_deserializeDocumentPartnerOpportunityTeamMembersList(&sv.OpportunityTeam, value); err != nil { - return err - } + default: + _, _ = key, value - case "OpportunityType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected OpportunityType to be of type string, got %T instead", value) - } - sv.OpportunityType = types.OpportunityType(jtv) - } + } + } + *v = sv + return nil +} - case "PartnerOpportunityIdentifier": +func awsAwsjson10_deserializeOpDocumentListOpportunitiesOutput(v **ListOpportunitiesOutput, 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 *ListOpportunitiesOutput + if *v == nil { + sv = &ListOpportunitiesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.PartnerOpportunityIdentifier = ptr.String(jtv) - } - - case "PrimaryNeedsFromAws": - if err := awsAwsjson10_deserializeDocumentPrimaryNeedsFromAws(&sv.PrimaryNeedsFromAws, value); err != nil { - return err - } - - case "Project": - if err := awsAwsjson10_deserializeDocumentProject(&sv.Project, value); err != nil { - return err - } - - case "RelatedEntityIdentifiers": - if err := awsAwsjson10_deserializeDocumentRelatedEntityIdentifiers(&sv.RelatedEntityIdentifiers, value); err != nil { - return err + sv.NextToken = ptr.String(jtv) } - case "SoftwareRevenue": - if err := awsAwsjson10_deserializeDocumentSoftwareRevenue(&sv.SoftwareRevenue, value); err != nil { + case "OpportunitySummaries": + if err := awsAwsjson10_deserializeDocumentOpportunitySummaries(&sv.OpportunitySummaries, value); err != nil { return err } @@ -5709,7 +10579,7 @@ func awsAwsjson10_deserializeOpDocumentGetOpportunityOutput(v **GetOpportunityOu return nil } -func awsAwsjson10_deserializeOpDocumentListEngagementInvitationsOutput(v **ListEngagementInvitationsOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentListResourceSnapshotJobsOutput(v **ListResourceSnapshotJobsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5722,20 +10592,15 @@ func awsAwsjson10_deserializeOpDocumentListEngagementInvitationsOutput(v **ListE return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListEngagementInvitationsOutput + var sv *ListResourceSnapshotJobsOutput if *v == nil { - sv = &ListEngagementInvitationsOutput{} + sv = &ListResourceSnapshotJobsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "EngagementInvitationSummaries": - if err := awsAwsjson10_deserializeDocumentEngagementInvitationSummaries(&sv.EngagementInvitationSummaries, value); err != nil { - return err - } - case "NextToken": if value != nil { jtv, ok := value.(string) @@ -5745,6 +10610,11 @@ func awsAwsjson10_deserializeOpDocumentListEngagementInvitationsOutput(v **ListE sv.NextToken = ptr.String(jtv) } + case "ResourceSnapshotJobSummaries": + if err := awsAwsjson10_deserializeDocumentResourceSnapshotJobSummaryList(&sv.ResourceSnapshotJobSummaries, value); err != nil { + return err + } + default: _, _ = key, value @@ -5754,7 +10624,7 @@ func awsAwsjson10_deserializeOpDocumentListEngagementInvitationsOutput(v **ListE return nil } -func awsAwsjson10_deserializeOpDocumentListOpportunitiesOutput(v **ListOpportunitiesOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentListResourceSnapshotsOutput(v **ListResourceSnapshotsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5767,9 +10637,9 @@ func awsAwsjson10_deserializeOpDocumentListOpportunitiesOutput(v **ListOpportuni return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListOpportunitiesOutput + var sv *ListResourceSnapshotsOutput if *v == nil { - sv = &ListOpportunitiesOutput{} + sv = &ListResourceSnapshotsOutput{} } else { sv = *v } @@ -5785,8 +10655,8 @@ func awsAwsjson10_deserializeOpDocumentListOpportunitiesOutput(v **ListOpportuni sv.NextToken = ptr.String(jtv) } - case "OpportunitySummaries": - if err := awsAwsjson10_deserializeDocumentOpportunitySummaries(&sv.OpportunitySummaries, value); err != nil { + case "ResourceSnapshotSummaries": + if err := awsAwsjson10_deserializeDocumentResourceSnapshotSummaryList(&sv.ResourceSnapshotSummaries, value); err != nil { return err } @@ -5844,6 +10714,55 @@ func awsAwsjson10_deserializeOpDocumentListSolutionsOutput(v **ListSolutionsOutp return nil } +func awsAwsjson10_deserializeOpDocumentPutSellingSystemSettingsOutput(v **PutSellingSystemSettingsOutput, 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 *PutSellingSystemSettingsOutput + if *v == nil { + sv = &PutSellingSystemSettingsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Catalog": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CatalogIdentifier to be of type string, got %T instead", value) + } + sv.Catalog = ptr.String(jtv) + } + + case "ResourceSnapshotJobRoleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceSnapshotJobRoleArn to be of type string, got %T instead", value) + } + sv.ResourceSnapshotJobRoleArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentStartEngagementByAcceptingInvitationTaskOutput(v **StartEngagementByAcceptingInvitationTaskOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -5902,6 +10821,15 @@ func awsAwsjson10_deserializeOpDocumentStartEngagementByAcceptingInvitationTaskO sv.ReasonCode = types.ReasonCode(jtv) } + case "ResourceSnapshotJobId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceSnapshotJobIdentifier to be of type string, got %T instead", value) + } + sv.ResourceSnapshotJobId = ptr.String(jtv) + } + case "StartTime": if value != nil { jtv, ok := value.(string) @@ -5973,6 +10901,24 @@ func awsAwsjson10_deserializeOpDocumentStartEngagementFromOpportunityTaskOutput( for key, value := range shape { switch key { + case "EngagementId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementIdentifier to be of type string, got %T instead", value) + } + sv.EngagementId = ptr.String(jtv) + } + + case "EngagementInvitationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementInvitationIdentifier to be of type string, got %T instead", value) + } + sv.EngagementInvitationId = ptr.String(jtv) + } + case "Message": if value != nil { jtv, ok := value.(string) @@ -6000,6 +10946,15 @@ func awsAwsjson10_deserializeOpDocumentStartEngagementFromOpportunityTaskOutput( sv.ReasonCode = types.ReasonCode(jtv) } + case "ResourceSnapshotJobId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceSnapshotJobIdentifier to be of type string, got %T instead", value) + } + sv.ResourceSnapshotJobId = ptr.String(jtv) + } + case "StartTime": if value != nil { jtv, ok := value.(string) diff --git a/service/partnercentralselling/generated.json b/service/partnercentralselling/generated.json index df8b69c7af9..62f6f22cc93 100644 --- a/service/partnercentralselling/generated.json +++ b/service/partnercentralselling/generated.json @@ -8,19 +8,40 @@ "files": [ "api_client.go", "api_client_test.go", + "api_op_AcceptEngagementInvitation.go", "api_op_AssignOpportunity.go", "api_op_AssociateOpportunity.go", + "api_op_CreateEngagement.go", + "api_op_CreateEngagementInvitation.go", "api_op_CreateOpportunity.go", + "api_op_CreateResourceSnapshot.go", + "api_op_CreateResourceSnapshotJob.go", + "api_op_DeleteResourceSnapshotJob.go", "api_op_DisassociateOpportunity.go", "api_op_GetAwsOpportunitySummary.go", + "api_op_GetEngagement.go", "api_op_GetEngagementInvitation.go", "api_op_GetOpportunity.go", + "api_op_GetResourceSnapshot.go", + "api_op_GetResourceSnapshotJob.go", + "api_op_GetSellingSystemSettings.go", + "api_op_ListEngagementByAcceptingInvitationTasks.go", + "api_op_ListEngagementFromOpportunityTasks.go", "api_op_ListEngagementInvitations.go", + "api_op_ListEngagementMembers.go", + "api_op_ListEngagementResourceAssociations.go", + "api_op_ListEngagements.go", "api_op_ListOpportunities.go", + "api_op_ListResourceSnapshotJobs.go", + "api_op_ListResourceSnapshots.go", "api_op_ListSolutions.go", + "api_op_PutSellingSystemSettings.go", "api_op_RejectEngagementInvitation.go", "api_op_StartEngagementByAcceptingInvitationTask.go", "api_op_StartEngagementFromOpportunityTask.go", + "api_op_StartResourceSnapshotJob.go", + "api_op_StopResourceSnapshotJob.go", + "api_op_SubmitOpportunity.go", "api_op_UpdateOpportunity.go", "auth.go", "deserializers.go", diff --git a/service/partnercentralselling/serializers.go b/service/partnercentralselling/serializers.go index 24b19718ad6..825a9929057 100644 --- a/service/partnercentralselling/serializers.go +++ b/service/partnercentralselling/serializers.go @@ -17,6 +17,67 @@ import ( "path" ) +type awsAwsjson10_serializeOpAcceptEngagementInvitation struct { +} + +func (*awsAwsjson10_serializeOpAcceptEngagementInvitation) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpAcceptEngagementInvitation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*AcceptEngagementInvitationInput) + _ = 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("AWSPartnerCentralSelling.AcceptEngagementInvitation") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentAcceptEngagementInvitationInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpAssignOpportunity struct { } @@ -139,14 +200,14 @@ func (m *awsAwsjson10_serializeOpAssociateOpportunity) HandleSerialize(ctx conte return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpCreateOpportunity struct { +type awsAwsjson10_serializeOpCreateEngagement struct { } -func (*awsAwsjson10_serializeOpCreateOpportunity) ID() string { +func (*awsAwsjson10_serializeOpCreateEngagement) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpCreateOpportunity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpCreateEngagement) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -158,7 +219,7 @@ func (m *awsAwsjson10_serializeOpCreateOpportunity) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateOpportunityInput) + input, ok := in.Parameters.(*CreateEngagementInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -179,10 +240,10 @@ func (m *awsAwsjson10_serializeOpCreateOpportunity) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.CreateOpportunity") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.CreateEngagement") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentCreateOpportunityInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentCreateEngagementInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -200,14 +261,14 @@ func (m *awsAwsjson10_serializeOpCreateOpportunity) HandleSerialize(ctx context. return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpDisassociateOpportunity struct { +type awsAwsjson10_serializeOpCreateEngagementInvitation struct { } -func (*awsAwsjson10_serializeOpDisassociateOpportunity) ID() string { +func (*awsAwsjson10_serializeOpCreateEngagementInvitation) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpDisassociateOpportunity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpCreateEngagementInvitation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -219,7 +280,7 @@ func (m *awsAwsjson10_serializeOpDisassociateOpportunity) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DisassociateOpportunityInput) + input, ok := in.Parameters.(*CreateEngagementInvitationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -240,10 +301,10 @@ func (m *awsAwsjson10_serializeOpDisassociateOpportunity) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.DisassociateOpportunity") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.CreateEngagementInvitation") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentDisassociateOpportunityInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentCreateEngagementInvitationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -261,14 +322,14 @@ func (m *awsAwsjson10_serializeOpDisassociateOpportunity) HandleSerialize(ctx co return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpGetAwsOpportunitySummary struct { +type awsAwsjson10_serializeOpCreateOpportunity struct { } -func (*awsAwsjson10_serializeOpGetAwsOpportunitySummary) ID() string { +func (*awsAwsjson10_serializeOpCreateOpportunity) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpGetAwsOpportunitySummary) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpCreateOpportunity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -280,7 +341,7 @@ func (m *awsAwsjson10_serializeOpGetAwsOpportunitySummary) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetAwsOpportunitySummaryInput) + input, ok := in.Parameters.(*CreateOpportunityInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -301,10 +362,10 @@ func (m *awsAwsjson10_serializeOpGetAwsOpportunitySummary) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.GetAwsOpportunitySummary") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.CreateOpportunity") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentGetAwsOpportunitySummaryInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentCreateOpportunityInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -322,14 +383,14 @@ func (m *awsAwsjson10_serializeOpGetAwsOpportunitySummary) HandleSerialize(ctx c return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpGetEngagementInvitation struct { +type awsAwsjson10_serializeOpCreateResourceSnapshot struct { } -func (*awsAwsjson10_serializeOpGetEngagementInvitation) ID() string { +func (*awsAwsjson10_serializeOpCreateResourceSnapshot) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpGetEngagementInvitation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpCreateResourceSnapshot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -341,7 +402,7 @@ func (m *awsAwsjson10_serializeOpGetEngagementInvitation) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetEngagementInvitationInput) + input, ok := in.Parameters.(*CreateResourceSnapshotInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -362,10 +423,10 @@ func (m *awsAwsjson10_serializeOpGetEngagementInvitation) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.GetEngagementInvitation") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.CreateResourceSnapshot") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentGetEngagementInvitationInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentCreateResourceSnapshotInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -383,14 +444,14 @@ func (m *awsAwsjson10_serializeOpGetEngagementInvitation) HandleSerialize(ctx co return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpGetOpportunity struct { +type awsAwsjson10_serializeOpCreateResourceSnapshotJob struct { } -func (*awsAwsjson10_serializeOpGetOpportunity) ID() string { +func (*awsAwsjson10_serializeOpCreateResourceSnapshotJob) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpGetOpportunity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpCreateResourceSnapshotJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -402,7 +463,7 @@ func (m *awsAwsjson10_serializeOpGetOpportunity) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetOpportunityInput) + input, ok := in.Parameters.(*CreateResourceSnapshotJobInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -423,10 +484,10 @@ func (m *awsAwsjson10_serializeOpGetOpportunity) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.GetOpportunity") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.CreateResourceSnapshotJob") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentGetOpportunityInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentCreateResourceSnapshotJobInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -444,14 +505,14 @@ func (m *awsAwsjson10_serializeOpGetOpportunity) HandleSerialize(ctx context.Con return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpListEngagementInvitations struct { +type awsAwsjson10_serializeOpDeleteResourceSnapshotJob struct { } -func (*awsAwsjson10_serializeOpListEngagementInvitations) ID() string { +func (*awsAwsjson10_serializeOpDeleteResourceSnapshotJob) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpListEngagementInvitations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpDeleteResourceSnapshotJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -463,7 +524,7 @@ func (m *awsAwsjson10_serializeOpListEngagementInvitations) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListEngagementInvitationsInput) + input, ok := in.Parameters.(*DeleteResourceSnapshotJobInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -484,10 +545,10 @@ func (m *awsAwsjson10_serializeOpListEngagementInvitations) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.ListEngagementInvitations") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.DeleteResourceSnapshotJob") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentListEngagementInvitationsInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentDeleteResourceSnapshotJobInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -505,14 +566,14 @@ func (m *awsAwsjson10_serializeOpListEngagementInvitations) HandleSerialize(ctx return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpListOpportunities struct { +type awsAwsjson10_serializeOpDisassociateOpportunity struct { } -func (*awsAwsjson10_serializeOpListOpportunities) ID() string { +func (*awsAwsjson10_serializeOpDisassociateOpportunity) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpListOpportunities) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpDisassociateOpportunity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -524,7 +585,7 @@ func (m *awsAwsjson10_serializeOpListOpportunities) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListOpportunitiesInput) + input, ok := in.Parameters.(*DisassociateOpportunityInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -545,10 +606,10 @@ func (m *awsAwsjson10_serializeOpListOpportunities) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.ListOpportunities") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.DisassociateOpportunity") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentListOpportunitiesInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentDisassociateOpportunityInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -566,14 +627,14 @@ func (m *awsAwsjson10_serializeOpListOpportunities) HandleSerialize(ctx context. return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpListSolutions struct { +type awsAwsjson10_serializeOpGetAwsOpportunitySummary struct { } -func (*awsAwsjson10_serializeOpListSolutions) ID() string { +func (*awsAwsjson10_serializeOpGetAwsOpportunitySummary) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpListSolutions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpGetAwsOpportunitySummary) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -585,7 +646,7 @@ func (m *awsAwsjson10_serializeOpListSolutions) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListSolutionsInput) + input, ok := in.Parameters.(*GetAwsOpportunitySummaryInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -606,10 +667,10 @@ func (m *awsAwsjson10_serializeOpListSolutions) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.ListSolutions") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.GetAwsOpportunitySummary") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentListSolutionsInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentGetAwsOpportunitySummaryInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -627,14 +688,14 @@ func (m *awsAwsjson10_serializeOpListSolutions) HandleSerialize(ctx context.Cont return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpRejectEngagementInvitation struct { +type awsAwsjson10_serializeOpGetEngagement struct { } -func (*awsAwsjson10_serializeOpRejectEngagementInvitation) ID() string { +func (*awsAwsjson10_serializeOpGetEngagement) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpRejectEngagementInvitation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpGetEngagement) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -646,7 +707,7 @@ func (m *awsAwsjson10_serializeOpRejectEngagementInvitation) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*RejectEngagementInvitationInput) + input, ok := in.Parameters.(*GetEngagementInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -667,10 +728,10 @@ func (m *awsAwsjson10_serializeOpRejectEngagementInvitation) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.RejectEngagementInvitation") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.GetEngagement") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentRejectEngagementInvitationInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentGetEngagementInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -688,14 +749,14 @@ func (m *awsAwsjson10_serializeOpRejectEngagementInvitation) HandleSerialize(ctx return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpStartEngagementByAcceptingInvitationTask struct { +type awsAwsjson10_serializeOpGetEngagementInvitation struct { } -func (*awsAwsjson10_serializeOpStartEngagementByAcceptingInvitationTask) ID() string { +func (*awsAwsjson10_serializeOpGetEngagementInvitation) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpStartEngagementByAcceptingInvitationTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpGetEngagementInvitation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -707,7 +768,7 @@ func (m *awsAwsjson10_serializeOpStartEngagementByAcceptingInvitationTask) Handl return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*StartEngagementByAcceptingInvitationTaskInput) + input, ok := in.Parameters.(*GetEngagementInvitationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -728,10 +789,10 @@ func (m *awsAwsjson10_serializeOpStartEngagementByAcceptingInvitationTask) Handl return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.StartEngagementByAcceptingInvitationTask") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.GetEngagementInvitation") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentStartEngagementByAcceptingInvitationTaskInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentGetEngagementInvitationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -749,14 +810,14 @@ func (m *awsAwsjson10_serializeOpStartEngagementByAcceptingInvitationTask) Handl return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpStartEngagementFromOpportunityTask struct { +type awsAwsjson10_serializeOpGetOpportunity struct { } -func (*awsAwsjson10_serializeOpStartEngagementFromOpportunityTask) ID() string { +func (*awsAwsjson10_serializeOpGetOpportunity) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpStartEngagementFromOpportunityTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpGetOpportunity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -768,7 +829,7 @@ func (m *awsAwsjson10_serializeOpStartEngagementFromOpportunityTask) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*StartEngagementFromOpportunityTaskInput) + input, ok := in.Parameters.(*GetOpportunityInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -789,10 +850,10 @@ func (m *awsAwsjson10_serializeOpStartEngagementFromOpportunityTask) HandleSeria return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.StartEngagementFromOpportunityTask") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.GetOpportunity") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentStartEngagementFromOpportunityTaskInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentGetOpportunityInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -810,14 +871,14 @@ func (m *awsAwsjson10_serializeOpStartEngagementFromOpportunityTask) HandleSeria return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpUpdateOpportunity struct { +type awsAwsjson10_serializeOpGetResourceSnapshot struct { } -func (*awsAwsjson10_serializeOpUpdateOpportunity) ID() string { +func (*awsAwsjson10_serializeOpGetResourceSnapshot) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpUpdateOpportunity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpGetResourceSnapshot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -829,7 +890,7 @@ func (m *awsAwsjson10_serializeOpUpdateOpportunity) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*UpdateOpportunityInput) + input, ok := in.Parameters.(*GetResourceSnapshotInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -850,10 +911,10 @@ func (m *awsAwsjson10_serializeOpUpdateOpportunity) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.UpdateOpportunity") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPartnerCentralSelling.GetResourceSnapshot") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentUpdateOpportunityInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentGetResourceSnapshotInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -870,138 +931,2191 @@ func (m *awsAwsjson10_serializeOpUpdateOpportunity) HandleSerialize(ctx context. span.End() return next.HandleSerialize(ctx, in) } -func awsAwsjson10_serializeDocumentAccount(v *types.Account, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - if v.Address != nil { - ok := object.Key("Address") - if err := awsAwsjson10_serializeDocumentAddress(v.Address, ok); err != nil { - return err - } - } +type awsAwsjson10_serializeOpGetResourceSnapshotJob struct { +} - if v.AwsAccountId != nil { - ok := object.Key("AwsAccountId") - ok.String(*v.AwsAccountId) +func (*awsAwsjson10_serializeOpGetResourceSnapshotJob) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpGetResourceSnapshotJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - if v.CompanyName != nil { - ok := object.Key("CompanyName") - ok.String(*v.CompanyName) + input, ok := in.Parameters.(*GetResourceSnapshotJobInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - if v.Duns != nil { - ok := object.Key("Duns") - ok.String(*v.Duns) + 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("AWSPartnerCentralSelling.GetResourceSnapshotJob") - if len(v.Industry) > 0 { - ok := object.Key("Industry") - ok.String(string(v.Industry)) + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentGetResourceSnapshotJobInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} } - if v.OtherIndustry != nil { - ok := object.Key("OtherIndustry") - ok.String(*v.OtherIndustry) + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} } - if v.WebsiteUrl != nil { - ok := object.Key("WebsiteUrl") - ok.String(*v.WebsiteUrl) + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} } + in.Request = request - return nil + endTimer() + span.End() + return next.HandleSerialize(ctx, in) } -func awsAwsjson10_serializeDocumentAddress(v *types.Address, value smithyjson.Value) error { - object := value.Object() - defer object.Close() +type awsAwsjson10_serializeOpGetSellingSystemSettings struct { +} - if v.City != nil { - ok := object.Key("City") - ok.String(*v.City) - } +func (*awsAwsjson10_serializeOpGetSellingSystemSettings) ID() string { + return "OperationSerializer" +} - if len(v.CountryCode) > 0 { - ok := object.Key("CountryCode") - ok.String(string(v.CountryCode)) +func (m *awsAwsjson10_serializeOpGetSellingSystemSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - if v.PostalCode != nil { - ok := object.Key("PostalCode") - ok.String(*v.PostalCode) + input, ok := in.Parameters.(*GetSellingSystemSettingsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - if v.StateOrRegion != nil { - ok := object.Key("StateOrRegion") - ok.String(*v.StateOrRegion) + 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("AWSPartnerCentralSelling.GetSellingSystemSettings") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentGetSellingSystemSettingsInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpListEngagementByAcceptingInvitationTasks struct { +} + +func (*awsAwsjson10_serializeOpListEngagementByAcceptingInvitationTasks) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpListEngagementByAcceptingInvitationTasks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*ListEngagementByAcceptingInvitationTasksInput) + _ = 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("AWSPartnerCentralSelling.ListEngagementByAcceptingInvitationTasks") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListEngagementByAcceptingInvitationTasksInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpListEngagementFromOpportunityTasks struct { +} + +func (*awsAwsjson10_serializeOpListEngagementFromOpportunityTasks) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpListEngagementFromOpportunityTasks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*ListEngagementFromOpportunityTasksInput) + _ = 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("AWSPartnerCentralSelling.ListEngagementFromOpportunityTasks") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListEngagementFromOpportunityTasksInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpListEngagementInvitations struct { +} + +func (*awsAwsjson10_serializeOpListEngagementInvitations) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpListEngagementInvitations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*ListEngagementInvitationsInput) + _ = 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("AWSPartnerCentralSelling.ListEngagementInvitations") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListEngagementInvitationsInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpListEngagementMembers struct { +} + +func (*awsAwsjson10_serializeOpListEngagementMembers) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpListEngagementMembers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*ListEngagementMembersInput) + _ = 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("AWSPartnerCentralSelling.ListEngagementMembers") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListEngagementMembersInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpListEngagementResourceAssociations struct { +} + +func (*awsAwsjson10_serializeOpListEngagementResourceAssociations) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpListEngagementResourceAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*ListEngagementResourceAssociationsInput) + _ = 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("AWSPartnerCentralSelling.ListEngagementResourceAssociations") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListEngagementResourceAssociationsInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpListEngagements struct { +} + +func (*awsAwsjson10_serializeOpListEngagements) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpListEngagements) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*ListEngagementsInput) + _ = 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("AWSPartnerCentralSelling.ListEngagements") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListEngagementsInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpListOpportunities struct { +} + +func (*awsAwsjson10_serializeOpListOpportunities) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpListOpportunities) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*ListOpportunitiesInput) + _ = 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("AWSPartnerCentralSelling.ListOpportunities") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListOpportunitiesInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpListResourceSnapshotJobs struct { +} + +func (*awsAwsjson10_serializeOpListResourceSnapshotJobs) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpListResourceSnapshotJobs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*ListResourceSnapshotJobsInput) + _ = 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("AWSPartnerCentralSelling.ListResourceSnapshotJobs") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListResourceSnapshotJobsInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpListResourceSnapshots struct { +} + +func (*awsAwsjson10_serializeOpListResourceSnapshots) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpListResourceSnapshots) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*ListResourceSnapshotsInput) + _ = 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("AWSPartnerCentralSelling.ListResourceSnapshots") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListResourceSnapshotsInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpListSolutions struct { +} + +func (*awsAwsjson10_serializeOpListSolutions) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpListSolutions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*ListSolutionsInput) + _ = 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("AWSPartnerCentralSelling.ListSolutions") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListSolutionsInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpPutSellingSystemSettings struct { +} + +func (*awsAwsjson10_serializeOpPutSellingSystemSettings) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpPutSellingSystemSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*PutSellingSystemSettingsInput) + _ = 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("AWSPartnerCentralSelling.PutSellingSystemSettings") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentPutSellingSystemSettingsInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpRejectEngagementInvitation struct { +} + +func (*awsAwsjson10_serializeOpRejectEngagementInvitation) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpRejectEngagementInvitation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*RejectEngagementInvitationInput) + _ = 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("AWSPartnerCentralSelling.RejectEngagementInvitation") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentRejectEngagementInvitationInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpStartEngagementByAcceptingInvitationTask struct { +} + +func (*awsAwsjson10_serializeOpStartEngagementByAcceptingInvitationTask) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpStartEngagementByAcceptingInvitationTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*StartEngagementByAcceptingInvitationTaskInput) + _ = 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("AWSPartnerCentralSelling.StartEngagementByAcceptingInvitationTask") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentStartEngagementByAcceptingInvitationTaskInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpStartEngagementFromOpportunityTask struct { +} + +func (*awsAwsjson10_serializeOpStartEngagementFromOpportunityTask) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpStartEngagementFromOpportunityTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*StartEngagementFromOpportunityTaskInput) + _ = 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("AWSPartnerCentralSelling.StartEngagementFromOpportunityTask") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentStartEngagementFromOpportunityTaskInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpStartResourceSnapshotJob struct { +} + +func (*awsAwsjson10_serializeOpStartResourceSnapshotJob) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpStartResourceSnapshotJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*StartResourceSnapshotJobInput) + _ = 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("AWSPartnerCentralSelling.StartResourceSnapshotJob") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentStartResourceSnapshotJobInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpStopResourceSnapshotJob struct { +} + +func (*awsAwsjson10_serializeOpStopResourceSnapshotJob) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpStopResourceSnapshotJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*StopResourceSnapshotJobInput) + _ = 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("AWSPartnerCentralSelling.StopResourceSnapshotJob") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentStopResourceSnapshotJobInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpSubmitOpportunity struct { +} + +func (*awsAwsjson10_serializeOpSubmitOpportunity) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpSubmitOpportunity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*SubmitOpportunityInput) + _ = 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("AWSPartnerCentralSelling.SubmitOpportunity") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentSubmitOpportunityInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpUpdateOpportunity struct { +} + +func (*awsAwsjson10_serializeOpUpdateOpportunity) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpUpdateOpportunity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*UpdateOpportunityInput) + _ = 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("AWSPartnerCentralSelling.UpdateOpportunity") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentUpdateOpportunityInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsAwsjson10_serializeDocumentAccount(v *types.Account, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Address != nil { + ok := object.Key("Address") + if err := awsAwsjson10_serializeDocumentAddress(v.Address, ok); err != nil { + return err + } + } + + if v.AwsAccountId != nil { + ok := object.Key("AwsAccountId") + ok.String(*v.AwsAccountId) + } + + if v.CompanyName != nil { + ok := object.Key("CompanyName") + ok.String(*v.CompanyName) + } + + if v.Duns != nil { + ok := object.Key("Duns") + ok.String(*v.Duns) + } + + if len(v.Industry) > 0 { + ok := object.Key("Industry") + ok.String(string(v.Industry)) + } + + if v.OtherIndustry != nil { + ok := object.Key("OtherIndustry") + ok.String(*v.OtherIndustry) + } + + if v.WebsiteUrl != nil { + ok := object.Key("WebsiteUrl") + ok.String(*v.WebsiteUrl) + } + + return nil +} + +func awsAwsjson10_serializeDocumentAccountReceiver(v *types.AccountReceiver, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Alias != nil { + ok := object.Key("Alias") + ok.String(*v.Alias) + } + + if v.AwsAccountId != nil { + ok := object.Key("AwsAccountId") + ok.String(*v.AwsAccountId) + } + + return nil +} + +func awsAwsjson10_serializeDocumentAddress(v *types.Address, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.City != nil { + ok := object.Key("City") + ok.String(*v.City) + } + + if len(v.CountryCode) > 0 { + ok := object.Key("CountryCode") + ok.String(string(v.CountryCode)) + } + + if v.PostalCode != nil { + ok := object.Key("PostalCode") + ok.String(*v.PostalCode) + } + + if v.StateOrRegion != nil { + ok := object.Key("StateOrRegion") + ok.String(*v.StateOrRegion) + } + + if v.StreetAddress != nil { + ok := object.Key("StreetAddress") + ok.String(*v.StreetAddress) + } + + return nil +} + +func awsAwsjson10_serializeDocumentApnPrograms(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_serializeDocumentAssigneeContact(v *types.AssigneeContact, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BusinessTitle != nil { + ok := object.Key("BusinessTitle") + ok.String(*v.BusinessTitle) + } + + if v.Email != nil { + ok := object.Key("Email") + ok.String(*v.Email) + } + + if v.FirstName != nil { + ok := object.Key("FirstName") + ok.String(*v.FirstName) + } + + if v.LastName != nil { + ok := object.Key("LastName") + ok.String(*v.LastName) + } + + return nil +} + +func awsAwsjson10_serializeDocumentAwsAccountIdOrAliasList(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_serializeDocumentAwsAccountList(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_serializeDocumentAwsSubmission(v *types.AwsSubmission, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.InvolvementType) > 0 { + ok := object.Key("InvolvementType") + ok.String(string(v.InvolvementType)) + } + + if len(v.Visibility) > 0 { + ok := object.Key("Visibility") + ok.String(string(v.Visibility)) + } + + return nil +} + +func awsAwsjson10_serializeDocumentChannels(v []types.Channel, 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_serializeDocumentContact(v *types.Contact, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BusinessTitle != nil { + ok := object.Key("BusinessTitle") + ok.String(*v.BusinessTitle) + } + + if v.Email != nil { + ok := object.Key("Email") + ok.String(*v.Email) + } + + if v.FirstName != nil { + ok := object.Key("FirstName") + ok.String(*v.FirstName) + } + + if v.LastName != nil { + ok := object.Key("LastName") + ok.String(*v.LastName) + } + + if v.Phone != nil { + ok := object.Key("Phone") + ok.String(*v.Phone) + } + + return nil +} + +func awsAwsjson10_serializeDocumentCustomer(v *types.Customer, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Account != nil { + ok := object.Key("Account") + if err := awsAwsjson10_serializeDocumentAccount(v.Account, ok); err != nil { + return err + } + } + + if v.Contacts != nil { + ok := object.Key("Contacts") + if err := awsAwsjson10_serializeDocumentCustomerContactsList(v.Contacts, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeDocumentCustomerContactsList(v []types.Contact, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentContact(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentCustomerProjectsContext(v *types.CustomerProjectsContext, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Customer != nil { + ok := object.Key("Customer") + if err := awsAwsjson10_serializeDocumentEngagementCustomer(v.Customer, ok); err != nil { + return err + } + } + + if v.Project != nil { + ok := object.Key("Project") + if err := awsAwsjson10_serializeDocumentEngagementCustomerProjectDetails(v.Project, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeDocumentDeliveryModels(v []types.DeliveryModel, 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_serializeDocumentEngagementContextDetails(v *types.EngagementContextDetails, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Payload != nil { + ok := object.Key("Payload") + if err := awsAwsjson10_serializeDocumentEngagementContextPayload(v.Payload, ok); err != nil { + return err + } + } + + if len(v.Type) > 0 { + ok := object.Key("Type") + ok.String(string(v.Type)) + } + + return nil +} + +func awsAwsjson10_serializeDocumentEngagementContextPayload(v types.EngagementContextPayload, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.EngagementContextPayloadMemberCustomerProject: + av := object.Key("CustomerProject") + if err := awsAwsjson10_serializeDocumentCustomerProjectsContext(&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_serializeDocumentEngagementContexts(v []types.EngagementContextDetails, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentEngagementContextDetails(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentEngagementCustomer(v *types.EngagementCustomer, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CompanyName != nil { + ok := object.Key("CompanyName") + ok.String(*v.CompanyName) + } + + if len(v.CountryCode) > 0 { + ok := object.Key("CountryCode") + ok.String(string(v.CountryCode)) + } + + if len(v.Industry) > 0 { + ok := object.Key("Industry") + ok.String(string(v.Industry)) + } + + if v.WebsiteUrl != nil { + ok := object.Key("WebsiteUrl") + ok.String(*v.WebsiteUrl) + } + + return nil +} + +func awsAwsjson10_serializeDocumentEngagementCustomerProjectDetails(v *types.EngagementCustomerProjectDetails, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BusinessProblem != nil { + ok := object.Key("BusinessProblem") + ok.String(*v.BusinessProblem) + } + + if v.TargetCompletionDate != nil { + ok := object.Key("TargetCompletionDate") + ok.String(*v.TargetCompletionDate) + } + + if v.Title != nil { + ok := object.Key("Title") + ok.String(*v.Title) + } + + return nil +} + +func awsAwsjson10_serializeDocumentEngagementIdentifiers(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_serializeDocumentEngagementInvitationIdentifiers(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_serializeDocumentEngagementInvitationsPayloadType(v []types.EngagementInvitationPayloadType, 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_serializeDocumentEngagementSort(v *types.EngagementSort, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + 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_serializeDocumentExpectedCustomerSpend(v *types.ExpectedCustomerSpend, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Amount != nil { + ok := object.Key("Amount") + ok.String(*v.Amount) + } + + if len(v.CurrencyCode) > 0 { + ok := object.Key("CurrencyCode") + ok.String(string(v.CurrencyCode)) + } + + if v.EstimationUrl != nil { + ok := object.Key("EstimationUrl") + ok.String(*v.EstimationUrl) + } + + if len(v.Frequency) > 0 { + ok := object.Key("Frequency") + ok.String(string(v.Frequency)) + } + + if v.TargetCompany != nil { + ok := object.Key("TargetCompany") + ok.String(*v.TargetCompany) + } + + return nil +} + +func awsAwsjson10_serializeDocumentExpectedCustomerSpendList(v []types.ExpectedCustomerSpend, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentExpectedCustomerSpend(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentFilterIdentifier(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_serializeDocumentFilterLifeCycleReviewStatus(v []types.ReviewStatus, 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_serializeDocumentFilterLifeCycleStage(v []types.Stage, 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_serializeDocumentFilterStatus(v []types.SolutionStatus, 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_serializeDocumentInvitation(v *types.Invitation, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Message != nil { + ok := object.Key("Message") + ok.String(*v.Message) + } + + if v.Payload != nil { + ok := object.Key("Payload") + if err := awsAwsjson10_serializeDocumentPayload(v.Payload, ok); err != nil { + return err + } + } + + if v.Receiver != nil { + ok := object.Key("Receiver") + if err := awsAwsjson10_serializeDocumentReceiver(v.Receiver, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeDocumentInvitationStatusList(v []types.InvitationStatus, 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_serializeDocumentLastModifiedDate(v *types.LastModifiedDate, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AfterLastModifiedDate != nil { + ok := object.Key("AfterLastModifiedDate") + ok.String(smithytime.FormatDateTime(*v.AfterLastModifiedDate)) + } + + if v.BeforeLastModifiedDate != nil { + ok := object.Key("BeforeLastModifiedDate") + ok.String(smithytime.FormatDateTime(*v.BeforeLastModifiedDate)) + } + + return nil +} + +func awsAwsjson10_serializeDocumentLifeCycle(v *types.LifeCycle, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.ClosedLostReason) > 0 { + ok := object.Key("ClosedLostReason") + ok.String(string(v.ClosedLostReason)) + } + + if v.NextSteps != nil { + ok := object.Key("NextSteps") + ok.String(*v.NextSteps) + } + + if v.NextStepsHistory != nil { + ok := object.Key("NextStepsHistory") + if err := awsAwsjson10_serializeDocumentNextStepsHistories(v.NextStepsHistory, ok); err != nil { + return err + } + } + + if v.ReviewComments != nil { + ok := object.Key("ReviewComments") + ok.String(*v.ReviewComments) + } + + if len(v.ReviewStatus) > 0 { + ok := object.Key("ReviewStatus") + ok.String(string(v.ReviewStatus)) + } + + if v.ReviewStatusReason != nil { + ok := object.Key("ReviewStatusReason") + ok.String(*v.ReviewStatusReason) + } + + if len(v.Stage) > 0 { + ok := object.Key("Stage") + ok.String(string(v.Stage)) + } + + if v.TargetCloseDate != nil { + ok := object.Key("TargetCloseDate") + ok.String(*v.TargetCloseDate) + } + + return nil +} + +func awsAwsjson10_serializeDocumentListTasksSortBase(v *types.ListTasksSortBase, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + 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_serializeDocumentMarketing(v *types.Marketing, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.AwsFundingUsed) > 0 { + ok := object.Key("AwsFundingUsed") + ok.String(string(v.AwsFundingUsed)) + } + + if v.CampaignName != nil { + ok := object.Key("CampaignName") + ok.String(*v.CampaignName) + } + + if v.Channels != nil { + ok := object.Key("Channels") + if err := awsAwsjson10_serializeDocumentChannels(v.Channels, ok); err != nil { + return err + } + } + + if len(v.Source) > 0 { + ok := object.Key("Source") + ok.String(string(v.Source)) + } + + if v.UseCases != nil { + ok := object.Key("UseCases") + if err := awsAwsjson10_serializeDocumentUseCases(v.UseCases, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeDocumentMonetaryValue(v *types.MonetaryValue, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Amount != nil { + ok := object.Key("Amount") + ok.String(*v.Amount) + } + + if len(v.CurrencyCode) > 0 { + ok := object.Key("CurrencyCode") + ok.String(string(v.CurrencyCode)) + } + + return nil +} + +func awsAwsjson10_serializeDocumentNextStepsHistories(v []types.NextStepsHistory, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentNextStepsHistory(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentNextStepsHistory(v *types.NextStepsHistory, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Time != nil { + ok := object.Key("Time") + ok.String(smithytime.FormatDateTime(*v.Time)) + } + + if v.Value != nil { + ok := object.Key("Value") + ok.String(*v.Value) + } + + return nil +} + +func awsAwsjson10_serializeDocumentOpportunityEngagementInvitationSort(v *types.OpportunityEngagementInvitationSort, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + 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_serializeDocumentOpportunityIdentifiers(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_serializeDocumentOpportunityInvitationPayload(v *types.OpportunityInvitationPayload, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Customer != nil { + ok := object.Key("Customer") + if err := awsAwsjson10_serializeDocumentEngagementCustomer(v.Customer, ok); err != nil { + return err + } + } + + if v.Project != nil { + ok := object.Key("Project") + if err := awsAwsjson10_serializeDocumentProjectDetails(v.Project, ok); err != nil { + return err + } + } + + if v.ReceiverResponsibilities != nil { + ok := object.Key("ReceiverResponsibilities") + if err := awsAwsjson10_serializeDocumentReceiverResponsibilityList(v.ReceiverResponsibilities, ok); err != nil { + return err + } + } + + if v.SenderContacts != nil { + ok := object.Key("SenderContacts") + if err := awsAwsjson10_serializeDocumentSenderContactList(v.SenderContacts, ok); err != nil { + return err + } } - if v.StreetAddress != nil { - ok := object.Key("StreetAddress") - ok.String(*v.StreetAddress) + return nil +} + +func awsAwsjson10_serializeDocumentOpportunitySort(v *types.OpportunitySort, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + 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_serializeDocumentApnPrograms(v []string, value smithyjson.Value) error { +func awsAwsjson10_serializeDocumentPartnerOpportunityTeamMembersList(v []types.Contact, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() - av.String(v[i]) + if err := awsAwsjson10_serializeDocumentContact(&v[i], av); err != nil { + return err + } } return nil } -func awsAwsjson10_serializeDocumentAssigneeContact(v *types.AssigneeContact, value smithyjson.Value) error { +func awsAwsjson10_serializeDocumentPayload(v types.Payload, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.BusinessTitle != nil { - ok := object.Key("BusinessTitle") - ok.String(*v.BusinessTitle) + switch uv := v.(type) { + case *types.PayloadMemberOpportunityInvitation: + av := object.Key("OpportunityInvitation") + if err := awsAwsjson10_serializeDocumentOpportunityInvitationPayload(&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 +} - if v.Email != nil { - ok := object.Key("Email") - ok.String(*v.Email) +func awsAwsjson10_serializeDocumentPrimaryNeedsFromAws(v []types.PrimaryNeedFromAws, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) } + return nil +} - if v.FirstName != nil { - ok := object.Key("FirstName") - ok.String(*v.FirstName) +func awsAwsjson10_serializeDocumentProject(v *types.Project, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AdditionalComments != nil { + ok := object.Key("AdditionalComments") + ok.String(*v.AdditionalComments) } - if v.LastName != nil { - ok := object.Key("LastName") - ok.String(*v.LastName) + if v.ApnPrograms != nil { + ok := object.Key("ApnPrograms") + if err := awsAwsjson10_serializeDocumentApnPrograms(v.ApnPrograms, ok); err != nil { + return err + } + } + + if len(v.CompetitorName) > 0 { + ok := object.Key("CompetitorName") + ok.String(string(v.CompetitorName)) + } + + if v.CustomerBusinessProblem != nil { + ok := object.Key("CustomerBusinessProblem") + ok.String(*v.CustomerBusinessProblem) + } + + if v.CustomerUseCase != nil { + ok := object.Key("CustomerUseCase") + ok.String(*v.CustomerUseCase) + } + + if v.DeliveryModels != nil { + ok := object.Key("DeliveryModels") + if err := awsAwsjson10_serializeDocumentDeliveryModels(v.DeliveryModels, ok); err != nil { + return err + } + } + + if v.ExpectedCustomerSpend != nil { + ok := object.Key("ExpectedCustomerSpend") + if err := awsAwsjson10_serializeDocumentExpectedCustomerSpendList(v.ExpectedCustomerSpend, ok); err != nil { + return err + } + } + + if v.OtherCompetitorNames != nil { + ok := object.Key("OtherCompetitorNames") + ok.String(*v.OtherCompetitorNames) + } + + if v.OtherSolutionDescription != nil { + ok := object.Key("OtherSolutionDescription") + ok.String(*v.OtherSolutionDescription) + } + + if v.RelatedOpportunityIdentifier != nil { + ok := object.Key("RelatedOpportunityIdentifier") + ok.String(*v.RelatedOpportunityIdentifier) + } + + if v.SalesActivities != nil { + ok := object.Key("SalesActivities") + if err := awsAwsjson10_serializeDocumentSalesActivities(v.SalesActivities, ok); err != nil { + return err + } + } + + if v.Title != nil { + ok := object.Key("Title") + ok.String(*v.Title) } return nil } -func awsAwsjson10_serializeDocumentAwsSubmission(v *types.AwsSubmission, value smithyjson.Value) error { +func awsAwsjson10_serializeDocumentProjectDetails(v *types.ProjectDetails, value smithyjson.Value) error { object := value.Object() defer object.Close() - if len(v.InvolvementType) > 0 { - ok := object.Key("InvolvementType") - ok.String(string(v.InvolvementType)) + if v.BusinessProblem != nil { + ok := object.Key("BusinessProblem") + ok.String(*v.BusinessProblem) } - if len(v.Visibility) > 0 { - ok := object.Key("Visibility") - ok.String(string(v.Visibility)) + if v.ExpectedCustomerSpend != nil { + ok := object.Key("ExpectedCustomerSpend") + if err := awsAwsjson10_serializeDocumentExpectedCustomerSpendList(v.ExpectedCustomerSpend, ok); err != nil { + return err + } + } + + if v.TargetCompletionDate != nil { + ok := object.Key("TargetCompletionDate") + ok.String(*v.TargetCompletionDate) + } + + if v.Title != nil { + ok := object.Key("Title") + ok.String(*v.Title) } return nil } -func awsAwsjson10_serializeDocumentChannels(v []types.Channel, value smithyjson.Value) error { +func awsAwsjson10_serializeDocumentReceiver(v types.Receiver, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.ReceiverMemberAccount: + av := object.Key("Account") + if err := awsAwsjson10_serializeDocumentAccountReceiver(&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_serializeDocumentReceiverResponsibilityList(v []types.ReceiverResponsibility, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -1012,7 +3126,18 @@ func awsAwsjson10_serializeDocumentChannels(v []types.Channel, value smithyjson. return nil } -func awsAwsjson10_serializeDocumentContact(v *types.Contact, value smithyjson.Value) error { +func awsAwsjson10_serializeDocumentSalesActivities(v []types.SalesActivity, 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_serializeDocumentSenderContact(v *types.SenderContact, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1044,103 +3169,94 @@ func awsAwsjson10_serializeDocumentContact(v *types.Contact, value smithyjson.Va return nil } -func awsAwsjson10_serializeDocumentCustomer(v *types.Customer, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Account != nil { - ok := object.Key("Account") - if err := awsAwsjson10_serializeDocumentAccount(v.Account, ok); err != nil { - return err - } - } - - if v.Contacts != nil { - ok := object.Key("Contacts") - if err := awsAwsjson10_serializeDocumentCustomerContactsList(v.Contacts, ok); err != nil { - return err - } - } - - return nil -} - -func awsAwsjson10_serializeDocumentCustomerContactsList(v []types.Contact, value smithyjson.Value) error { +func awsAwsjson10_serializeDocumentSenderContactList(v []types.SenderContact, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() - if err := awsAwsjson10_serializeDocumentContact(&v[i], av); err != nil { + if err := awsAwsjson10_serializeDocumentSenderContact(&v[i], av); err != nil { return err } } return nil } -func awsAwsjson10_serializeDocumentDeliveryModels(v []types.DeliveryModel, value smithyjson.Value) error { - array := value.Array() - defer array.Close() +func awsAwsjson10_serializeDocumentSoftwareRevenue(v *types.SoftwareRevenue, value smithyjson.Value) error { + object := value.Object() + defer object.Close() - for i := range v { - av := array.Value() - av.String(string(v[i])) + if len(v.DeliveryModel) > 0 { + ok := object.Key("DeliveryModel") + ok.String(string(v.DeliveryModel)) + } + + if v.EffectiveDate != nil { + ok := object.Key("EffectiveDate") + ok.String(*v.EffectiveDate) + } + + if v.ExpirationDate != nil { + ok := object.Key("ExpirationDate") + ok.String(*v.ExpirationDate) } + + if v.Value != nil { + ok := object.Key("Value") + if err := awsAwsjson10_serializeDocumentMonetaryValue(v.Value, ok); err != nil { + return err + } + } + return nil } -func awsAwsjson10_serializeDocumentEngagementInvitationsPayloadType(v []types.EngagementInvitationPayloadType, value smithyjson.Value) error { +func awsAwsjson10_serializeDocumentSolutionIdentifiers(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() - av.String(string(v[i])) + av.String(v[i]) } return nil } -func awsAwsjson10_serializeDocumentExpectedCustomerSpend(v *types.ExpectedCustomerSpend, value smithyjson.Value) error { +func awsAwsjson10_serializeDocumentSolutionSort(v *types.SolutionSort, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.Amount != nil { - ok := object.Key("Amount") - ok.String(*v.Amount) - } - - if len(v.CurrencyCode) > 0 { - ok := object.Key("CurrencyCode") - ok.String(string(v.CurrencyCode)) - } - - if len(v.Frequency) > 0 { - ok := object.Key("Frequency") - ok.String(string(v.Frequency)) + if len(v.SortBy) > 0 { + ok := object.Key("SortBy") + ok.String(string(v.SortBy)) } - if v.TargetCompany != nil { - ok := object.Key("TargetCompany") - ok.String(*v.TargetCompany) + if len(v.SortOrder) > 0 { + ok := object.Key("SortOrder") + ok.String(string(v.SortOrder)) } return nil } -func awsAwsjson10_serializeDocumentExpectedCustomerSpendList(v []types.ExpectedCustomerSpend, value smithyjson.Value) error { - array := value.Array() - defer array.Close() +func awsAwsjson10_serializeDocumentSortObject(v *types.SortObject, value smithyjson.Value) error { + object := value.Object() + defer object.Close() - for i := range v { - av := array.Value() - if err := awsAwsjson10_serializeDocumentExpectedCustomerSpend(&v[i], av); err != nil { - return err - } + 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_serializeDocumentFilterIdentifier(v []string, value smithyjson.Value) error { +func awsAwsjson10_serializeDocumentStringList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -1151,18 +3267,18 @@ func awsAwsjson10_serializeDocumentFilterIdentifier(v []string, value smithyjson return nil } -func awsAwsjson10_serializeDocumentFilterLifeCycleReviewStatus(v []types.ReviewStatus, value smithyjson.Value) error { +func awsAwsjson10_serializeDocumentTaskIdentifiers(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() - av.String(string(v[i])) + av.String(v[i]) } return nil } -func awsAwsjson10_serializeDocumentFilterLifeCycleStage(v []types.Stage, value smithyjson.Value) error { +func awsAwsjson10_serializeDocumentTaskStatuses(v []types.TaskStatus, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -1173,400 +3289,407 @@ func awsAwsjson10_serializeDocumentFilterLifeCycleStage(v []types.Stage, value s return nil } -func awsAwsjson10_serializeDocumentFilterStatus(v []types.SolutionStatus, value smithyjson.Value) error { +func awsAwsjson10_serializeDocumentUseCases(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() - av.String(string(v[i])) + av.String(v[i]) } return nil } -func awsAwsjson10_serializeDocumentLastModifiedDate(v *types.LastModifiedDate, value smithyjson.Value) error { +func awsAwsjson10_serializeOpDocumentAcceptEngagementInvitationInput(v *AcceptEngagementInvitationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.AfterLastModifiedDate != nil { - ok := object.Key("AfterLastModifiedDate") - ok.String(smithytime.FormatDateTime(*v.AfterLastModifiedDate)) + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) } - if v.BeforeLastModifiedDate != nil { - ok := object.Key("BeforeLastModifiedDate") - ok.String(smithytime.FormatDateTime(*v.BeforeLastModifiedDate)) + if v.Identifier != nil { + ok := object.Key("Identifier") + ok.String(*v.Identifier) } return nil } -func awsAwsjson10_serializeDocumentLifeCycle(v *types.LifeCycle, value smithyjson.Value) error { +func awsAwsjson10_serializeOpDocumentAssignOpportunityInput(v *AssignOpportunityInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if len(v.ClosedLostReason) > 0 { - ok := object.Key("ClosedLostReason") - ok.String(string(v.ClosedLostReason)) + if v.Assignee != nil { + ok := object.Key("Assignee") + if err := awsAwsjson10_serializeDocumentAssigneeContact(v.Assignee, ok); err != nil { + return err + } } - if v.NextSteps != nil { - ok := object.Key("NextSteps") - ok.String(*v.NextSteps) + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) } - if v.NextStepsHistory != nil { - ok := object.Key("NextStepsHistory") - if err := awsAwsjson10_serializeDocumentNextStepsHistories(v.NextStepsHistory, ok); err != nil { - return err - } + if v.Identifier != nil { + ok := object.Key("Identifier") + ok.String(*v.Identifier) } - if v.ReviewComments != nil { - ok := object.Key("ReviewComments") - ok.String(*v.ReviewComments) - } + return nil +} - if len(v.ReviewStatus) > 0 { - ok := object.Key("ReviewStatus") - ok.String(string(v.ReviewStatus)) +func awsAwsjson10_serializeOpDocumentAssociateOpportunityInput(v *AssociateOpportunityInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) } - if v.ReviewStatusReason != nil { - ok := object.Key("ReviewStatusReason") - ok.String(*v.ReviewStatusReason) + if v.OpportunityIdentifier != nil { + ok := object.Key("OpportunityIdentifier") + ok.String(*v.OpportunityIdentifier) } - if len(v.Stage) > 0 { - ok := object.Key("Stage") - ok.String(string(v.Stage)) + if v.RelatedEntityIdentifier != nil { + ok := object.Key("RelatedEntityIdentifier") + ok.String(*v.RelatedEntityIdentifier) } - if v.TargetCloseDate != nil { - ok := object.Key("TargetCloseDate") - ok.String(*v.TargetCloseDate) + if len(v.RelatedEntityType) > 0 { + ok := object.Key("RelatedEntityType") + ok.String(string(v.RelatedEntityType)) } return nil } -func awsAwsjson10_serializeDocumentMarketing(v *types.Marketing, value smithyjson.Value) error { +func awsAwsjson10_serializeOpDocumentCreateEngagementInput(v *CreateEngagementInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if len(v.AwsFundingUsed) > 0 { - ok := object.Key("AwsFundingUsed") - ok.String(string(v.AwsFundingUsed)) + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) } - if v.CampaignName != nil { - ok := object.Key("CampaignName") - ok.String(*v.CampaignName) + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) } - if v.Channels != nil { - ok := object.Key("Channels") - if err := awsAwsjson10_serializeDocumentChannels(v.Channels, ok); err != nil { + if v.Contexts != nil { + ok := object.Key("Contexts") + if err := awsAwsjson10_serializeDocumentEngagementContexts(v.Contexts, ok); err != nil { return err } } - if len(v.Source) > 0 { - ok := object.Key("Source") - ok.String(string(v.Source)) + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) } - if v.UseCases != nil { - ok := object.Key("UseCases") - if err := awsAwsjson10_serializeDocumentUseCases(v.UseCases, ok); err != nil { - return err - } + if v.Title != nil { + ok := object.Key("Title") + ok.String(*v.Title) } return nil } -func awsAwsjson10_serializeDocumentMonetaryValue(v *types.MonetaryValue, value smithyjson.Value) error { +func awsAwsjson10_serializeOpDocumentCreateEngagementInvitationInput(v *CreateEngagementInvitationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.Amount != nil { - ok := object.Key("Amount") - ok.String(*v.Amount) + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) } - if len(v.CurrencyCode) > 0 { - ok := object.Key("CurrencyCode") - ok.String(string(v.CurrencyCode)) + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) } - return nil -} - -func awsAwsjson10_serializeDocumentNextStepsHistories(v []types.NextStepsHistory, value smithyjson.Value) error { - array := value.Array() - defer array.Close() + if v.EngagementIdentifier != nil { + ok := object.Key("EngagementIdentifier") + ok.String(*v.EngagementIdentifier) + } - for i := range v { - av := array.Value() - if err := awsAwsjson10_serializeDocumentNextStepsHistory(&v[i], av); err != nil { + if v.Invitation != nil { + ok := object.Key("Invitation") + if err := awsAwsjson10_serializeDocumentInvitation(v.Invitation, ok); err != nil { return err } } + return nil } -func awsAwsjson10_serializeDocumentNextStepsHistory(v *types.NextStepsHistory, value smithyjson.Value) error { +func awsAwsjson10_serializeOpDocumentCreateOpportunityInput(v *CreateOpportunityInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.Time != nil { - ok := object.Key("Time") - ok.String(smithytime.FormatDateTime(*v.Time)) + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) } - if v.Value != nil { - ok := object.Key("Value") - ok.String(*v.Value) + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) } - return nil -} - -func awsAwsjson10_serializeDocumentOpportunityEngagementInvitationSort(v *types.OpportunityEngagementInvitationSort, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if len(v.SortBy) > 0 { - ok := object.Key("SortBy") - ok.String(string(v.SortBy)) + if v.Customer != nil { + ok := object.Key("Customer") + if err := awsAwsjson10_serializeDocumentCustomer(v.Customer, ok); err != nil { + return err + } } - if len(v.SortOrder) > 0 { - ok := object.Key("SortOrder") - ok.String(string(v.SortOrder)) + if v.LifeCycle != nil { + ok := object.Key("LifeCycle") + if err := awsAwsjson10_serializeDocumentLifeCycle(v.LifeCycle, ok); err != nil { + return err + } } - return nil -} + if v.Marketing != nil { + ok := object.Key("Marketing") + if err := awsAwsjson10_serializeDocumentMarketing(v.Marketing, ok); err != nil { + return err + } + } -func awsAwsjson10_serializeDocumentOpportunitySort(v *types.OpportunitySort, value smithyjson.Value) error { - object := value.Object() - defer object.Close() + if len(v.NationalSecurity) > 0 { + ok := object.Key("NationalSecurity") + ok.String(string(v.NationalSecurity)) + } - if len(v.SortBy) > 0 { - ok := object.Key("SortBy") - ok.String(string(v.SortBy)) + if v.OpportunityTeam != nil { + ok := object.Key("OpportunityTeam") + if err := awsAwsjson10_serializeDocumentPartnerOpportunityTeamMembersList(v.OpportunityTeam, ok); err != nil { + return err + } } - if len(v.SortOrder) > 0 { - ok := object.Key("SortOrder") - ok.String(string(v.SortOrder)) + if len(v.OpportunityType) > 0 { + ok := object.Key("OpportunityType") + ok.String(string(v.OpportunityType)) } - return nil -} + if len(v.Origin) > 0 { + ok := object.Key("Origin") + ok.String(string(v.Origin)) + } -func awsAwsjson10_serializeDocumentPartnerOpportunityTeamMembersList(v []types.Contact, value smithyjson.Value) error { - array := value.Array() - defer array.Close() + if v.PartnerOpportunityIdentifier != nil { + ok := object.Key("PartnerOpportunityIdentifier") + ok.String(*v.PartnerOpportunityIdentifier) + } - for i := range v { - av := array.Value() - if err := awsAwsjson10_serializeDocumentContact(&v[i], av); err != nil { + if v.PrimaryNeedsFromAws != nil { + ok := object.Key("PrimaryNeedsFromAws") + if err := awsAwsjson10_serializeDocumentPrimaryNeedsFromAws(v.PrimaryNeedsFromAws, ok); err != nil { return err } } - return nil -} -func awsAwsjson10_serializeDocumentPrimaryNeedsFromAws(v []types.PrimaryNeedFromAws, value smithyjson.Value) error { - array := value.Array() - defer array.Close() + if v.Project != nil { + ok := object.Key("Project") + if err := awsAwsjson10_serializeDocumentProject(v.Project, ok); err != nil { + return err + } + } - for i := range v { - av := array.Value() - av.String(string(v[i])) + if v.SoftwareRevenue != nil { + ok := object.Key("SoftwareRevenue") + if err := awsAwsjson10_serializeDocumentSoftwareRevenue(v.SoftwareRevenue, ok); err != nil { + return err + } } + return nil } -func awsAwsjson10_serializeDocumentProject(v *types.Project, value smithyjson.Value) error { +func awsAwsjson10_serializeOpDocumentCreateResourceSnapshotInput(v *CreateResourceSnapshotInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.AdditionalComments != nil { - ok := object.Key("AdditionalComments") - ok.String(*v.AdditionalComments) + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) } - if v.ApnPrograms != nil { - ok := object.Key("ApnPrograms") - if err := awsAwsjson10_serializeDocumentApnPrograms(v.ApnPrograms, ok); err != nil { - return err - } + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) } - if len(v.CompetitorName) > 0 { - ok := object.Key("CompetitorName") - ok.String(string(v.CompetitorName)) + if v.EngagementIdentifier != nil { + ok := object.Key("EngagementIdentifier") + ok.String(*v.EngagementIdentifier) } - if v.CustomerBusinessProblem != nil { - ok := object.Key("CustomerBusinessProblem") - ok.String(*v.CustomerBusinessProblem) + if v.ResourceIdentifier != nil { + ok := object.Key("ResourceIdentifier") + ok.String(*v.ResourceIdentifier) } - if v.CustomerUseCase != nil { - ok := object.Key("CustomerUseCase") - ok.String(*v.CustomerUseCase) + if v.ResourceSnapshotTemplateIdentifier != nil { + ok := object.Key("ResourceSnapshotTemplateIdentifier") + ok.String(*v.ResourceSnapshotTemplateIdentifier) } - if v.DeliveryModels != nil { - ok := object.Key("DeliveryModels") - if err := awsAwsjson10_serializeDocumentDeliveryModels(v.DeliveryModels, ok); err != nil { - return err - } + if len(v.ResourceType) > 0 { + ok := object.Key("ResourceType") + ok.String(string(v.ResourceType)) } - if v.ExpectedCustomerSpend != nil { - ok := object.Key("ExpectedCustomerSpend") - if err := awsAwsjson10_serializeDocumentExpectedCustomerSpendList(v.ExpectedCustomerSpend, ok); err != nil { - return err - } + return nil +} + +func awsAwsjson10_serializeOpDocumentCreateResourceSnapshotJobInput(v *CreateResourceSnapshotJobInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) } - if v.OtherCompetitorNames != nil { - ok := object.Key("OtherCompetitorNames") - ok.String(*v.OtherCompetitorNames) + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) } - if v.OtherSolutionDescription != nil { - ok := object.Key("OtherSolutionDescription") - ok.String(*v.OtherSolutionDescription) + if v.EngagementIdentifier != nil { + ok := object.Key("EngagementIdentifier") + ok.String(*v.EngagementIdentifier) } - if v.RelatedOpportunityIdentifier != nil { - ok := object.Key("RelatedOpportunityIdentifier") - ok.String(*v.RelatedOpportunityIdentifier) + if v.ResourceIdentifier != nil { + ok := object.Key("ResourceIdentifier") + ok.String(*v.ResourceIdentifier) } - if v.SalesActivities != nil { - ok := object.Key("SalesActivities") - if err := awsAwsjson10_serializeDocumentSalesActivities(v.SalesActivities, ok); err != nil { - return err - } + if v.ResourceSnapshotTemplateIdentifier != nil { + ok := object.Key("ResourceSnapshotTemplateIdentifier") + ok.String(*v.ResourceSnapshotTemplateIdentifier) } - if v.Title != nil { - ok := object.Key("Title") - ok.String(*v.Title) + if len(v.ResourceType) > 0 { + ok := object.Key("ResourceType") + ok.String(string(v.ResourceType)) } return nil } -func awsAwsjson10_serializeDocumentSalesActivities(v []types.SalesActivity, value smithyjson.Value) error { - array := value.Array() - defer array.Close() +func awsAwsjson10_serializeOpDocumentDeleteResourceSnapshotJobInput(v *DeleteResourceSnapshotJobInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() - for i := range v { - av := array.Value() - av.String(string(v[i])) + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) + } + + if v.ResourceSnapshotJobIdentifier != nil { + ok := object.Key("ResourceSnapshotJobIdentifier") + ok.String(*v.ResourceSnapshotJobIdentifier) } + return nil } -func awsAwsjson10_serializeDocumentSoftwareRevenue(v *types.SoftwareRevenue, value smithyjson.Value) error { +func awsAwsjson10_serializeOpDocumentDisassociateOpportunityInput(v *DisassociateOpportunityInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if len(v.DeliveryModel) > 0 { - ok := object.Key("DeliveryModel") - ok.String(string(v.DeliveryModel)) + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) } - if v.EffectiveDate != nil { - ok := object.Key("EffectiveDate") - ok.String(*v.EffectiveDate) + if v.OpportunityIdentifier != nil { + ok := object.Key("OpportunityIdentifier") + ok.String(*v.OpportunityIdentifier) } - if v.ExpirationDate != nil { - ok := object.Key("ExpirationDate") - ok.String(*v.ExpirationDate) + if v.RelatedEntityIdentifier != nil { + ok := object.Key("RelatedEntityIdentifier") + ok.String(*v.RelatedEntityIdentifier) } - if v.Value != nil { - ok := object.Key("Value") - if err := awsAwsjson10_serializeDocumentMonetaryValue(v.Value, ok); err != nil { - return err - } + if len(v.RelatedEntityType) > 0 { + ok := object.Key("RelatedEntityType") + ok.String(string(v.RelatedEntityType)) } return nil } -func awsAwsjson10_serializeDocumentSolutionIdentifiers(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() +func awsAwsjson10_serializeOpDocumentGetAwsOpportunitySummaryInput(v *GetAwsOpportunitySummaryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() - for i := range v { - av := array.Value() - av.String(v[i]) + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) + } + + if v.RelatedOpportunityIdentifier != nil { + ok := object.Key("RelatedOpportunityIdentifier") + ok.String(*v.RelatedOpportunityIdentifier) } + return nil } -func awsAwsjson10_serializeDocumentSolutionSort(v *types.SolutionSort, value smithyjson.Value) error { +func awsAwsjson10_serializeOpDocumentGetEngagementInput(v *GetEngagementInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if len(v.SortBy) > 0 { - ok := object.Key("SortBy") - ok.String(string(v.SortBy)) + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) } - if len(v.SortOrder) > 0 { - ok := object.Key("SortOrder") - ok.String(string(v.SortOrder)) + if v.Identifier != nil { + ok := object.Key("Identifier") + ok.String(*v.Identifier) } return nil } -func awsAwsjson10_serializeDocumentStringList(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() +func awsAwsjson10_serializeOpDocumentGetEngagementInvitationInput(v *GetEngagementInvitationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() - for i := range v { - av := array.Value() - av.String(v[i]) + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) } - return nil -} - -func awsAwsjson10_serializeDocumentUseCases(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - for i := range v { - av := array.Value() - av.String(v[i]) + if v.Identifier != nil { + ok := object.Key("Identifier") + ok.String(*v.Identifier) } + return nil } -func awsAwsjson10_serializeOpDocumentAssignOpportunityInput(v *AssignOpportunityInput, value smithyjson.Value) error { +func awsAwsjson10_serializeOpDocumentGetOpportunityInput(v *GetOpportunityInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.Assignee != nil { - ok := object.Key("Assignee") - if err := awsAwsjson10_serializeDocumentAssigneeContact(v.Assignee, ok); err != nil { - return err - } - } - if v.Catalog != nil { ok := object.Key("Catalog") ok.String(*v.Catalog) @@ -1580,7 +3703,7 @@ func awsAwsjson10_serializeOpDocumentAssignOpportunityInput(v *AssignOpportunity return nil } -func awsAwsjson10_serializeOpDocumentAssociateOpportunityInput(v *AssociateOpportunityInput, value smithyjson.Value) error { +func awsAwsjson10_serializeOpDocumentGetResourceSnapshotInput(v *GetResourceSnapshotInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1589,25 +3712,35 @@ func awsAwsjson10_serializeOpDocumentAssociateOpportunityInput(v *AssociateOppor ok.String(*v.Catalog) } - if v.OpportunityIdentifier != nil { - ok := object.Key("OpportunityIdentifier") - ok.String(*v.OpportunityIdentifier) + if v.EngagementIdentifier != nil { + ok := object.Key("EngagementIdentifier") + ok.String(*v.EngagementIdentifier) } - if v.RelatedEntityIdentifier != nil { - ok := object.Key("RelatedEntityIdentifier") - ok.String(*v.RelatedEntityIdentifier) + if v.ResourceIdentifier != nil { + ok := object.Key("ResourceIdentifier") + ok.String(*v.ResourceIdentifier) } - if len(v.RelatedEntityType) > 0 { - ok := object.Key("RelatedEntityType") - ok.String(string(v.RelatedEntityType)) + if v.ResourceSnapshotTemplateIdentifier != nil { + ok := object.Key("ResourceSnapshotTemplateIdentifier") + ok.String(*v.ResourceSnapshotTemplateIdentifier) + } + + if len(v.ResourceType) > 0 { + ok := object.Key("ResourceType") + ok.String(string(v.ResourceType)) + } + + if v.Revision != nil { + ok := object.Key("Revision") + ok.Integer(*v.Revision) } return nil } -func awsAwsjson10_serializeOpDocumentCreateOpportunityInput(v *CreateOpportunityInput, value smithyjson.Value) error { +func awsAwsjson10_serializeOpDocumentGetResourceSnapshotJobInput(v *GetResourceSnapshotJobInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1616,76 +3749,133 @@ func awsAwsjson10_serializeOpDocumentCreateOpportunityInput(v *CreateOpportunity ok.String(*v.Catalog) } - if v.ClientToken != nil { - ok := object.Key("ClientToken") - ok.String(*v.ClientToken) + if v.ResourceSnapshotJobIdentifier != nil { + ok := object.Key("ResourceSnapshotJobIdentifier") + ok.String(*v.ResourceSnapshotJobIdentifier) } - if v.Customer != nil { - ok := object.Key("Customer") - if err := awsAwsjson10_serializeDocumentCustomer(v.Customer, ok); err != nil { + return nil +} + +func awsAwsjson10_serializeOpDocumentGetSellingSystemSettingsInput(v *GetSellingSystemSettingsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentListEngagementByAcceptingInvitationTasksInput(v *ListEngagementByAcceptingInvitationTasksInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) + } + + if v.EngagementInvitationIdentifier != nil { + ok := object.Key("EngagementInvitationIdentifier") + if err := awsAwsjson10_serializeDocumentEngagementInvitationIdentifiers(v.EngagementInvitationIdentifier, ok); err != nil { return err } } - if v.LifeCycle != nil { - ok := object.Key("LifeCycle") - if err := awsAwsjson10_serializeDocumentLifeCycle(v.LifeCycle, ok); err != nil { + 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.OpportunityIdentifier != nil { + ok := object.Key("OpportunityIdentifier") + if err := awsAwsjson10_serializeDocumentOpportunityIdentifiers(v.OpportunityIdentifier, ok); err != nil { return err } } - if v.Marketing != nil { - ok := object.Key("Marketing") - if err := awsAwsjson10_serializeDocumentMarketing(v.Marketing, ok); err != nil { + if v.Sort != nil { + ok := object.Key("Sort") + if err := awsAwsjson10_serializeDocumentListTasksSortBase(v.Sort, ok); err != nil { return err } } - if len(v.NationalSecurity) > 0 { - ok := object.Key("NationalSecurity") - ok.String(string(v.NationalSecurity)) + if v.TaskIdentifier != nil { + ok := object.Key("TaskIdentifier") + if err := awsAwsjson10_serializeDocumentTaskIdentifiers(v.TaskIdentifier, ok); err != nil { + return err + } } - if v.OpportunityTeam != nil { - ok := object.Key("OpportunityTeam") - if err := awsAwsjson10_serializeDocumentPartnerOpportunityTeamMembersList(v.OpportunityTeam, ok); err != nil { + if v.TaskStatus != nil { + ok := object.Key("TaskStatus") + if err := awsAwsjson10_serializeDocumentTaskStatuses(v.TaskStatus, ok); err != nil { return err } } - if len(v.OpportunityType) > 0 { - ok := object.Key("OpportunityType") - ok.String(string(v.OpportunityType)) + return nil +} + +func awsAwsjson10_serializeOpDocumentListEngagementFromOpportunityTasksInput(v *ListEngagementFromOpportunityTasksInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) } - if len(v.Origin) > 0 { - ok := object.Key("Origin") - ok.String(string(v.Origin)) + if v.EngagementIdentifier != nil { + ok := object.Key("EngagementIdentifier") + if err := awsAwsjson10_serializeDocumentEngagementIdentifiers(v.EngagementIdentifier, 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.PartnerOpportunityIdentifier != nil { - ok := object.Key("PartnerOpportunityIdentifier") - ok.String(*v.PartnerOpportunityIdentifier) + if v.OpportunityIdentifier != nil { + ok := object.Key("OpportunityIdentifier") + if err := awsAwsjson10_serializeDocumentOpportunityIdentifiers(v.OpportunityIdentifier, ok); err != nil { + return err + } } - if v.PrimaryNeedsFromAws != nil { - ok := object.Key("PrimaryNeedsFromAws") - if err := awsAwsjson10_serializeDocumentPrimaryNeedsFromAws(v.PrimaryNeedsFromAws, ok); err != nil { + if v.Sort != nil { + ok := object.Key("Sort") + if err := awsAwsjson10_serializeDocumentListTasksSortBase(v.Sort, ok); err != nil { return err } } - if v.Project != nil { - ok := object.Key("Project") - if err := awsAwsjson10_serializeDocumentProject(v.Project, ok); err != nil { + if v.TaskIdentifier != nil { + ok := object.Key("TaskIdentifier") + if err := awsAwsjson10_serializeDocumentTaskIdentifiers(v.TaskIdentifier, ok); err != nil { return err } } - if v.SoftwareRevenue != nil { - ok := object.Key("SoftwareRevenue") - if err := awsAwsjson10_serializeDocumentSoftwareRevenue(v.SoftwareRevenue, ok); err != nil { + if v.TaskStatus != nil { + ok := object.Key("TaskStatus") + if err := awsAwsjson10_serializeDocumentTaskStatuses(v.TaskStatus, ok); err != nil { return err } } @@ -1693,7 +3883,7 @@ func awsAwsjson10_serializeOpDocumentCreateOpportunityInput(v *CreateOpportunity return nil } -func awsAwsjson10_serializeOpDocumentDisassociateOpportunityInput(v *DisassociateOpportunityInput, value smithyjson.Value) error { +func awsAwsjson10_serializeOpDocumentListEngagementInvitationsInput(v *ListEngagementInvitationsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1702,42 +3892,60 @@ func awsAwsjson10_serializeOpDocumentDisassociateOpportunityInput(v *Disassociat ok.String(*v.Catalog) } - if v.OpportunityIdentifier != nil { - ok := object.Key("OpportunityIdentifier") - ok.String(*v.OpportunityIdentifier) + if v.EngagementIdentifier != nil { + ok := object.Key("EngagementIdentifier") + if err := awsAwsjson10_serializeDocumentEngagementIdentifiers(v.EngagementIdentifier, ok); err != nil { + return err + } } - if v.RelatedEntityIdentifier != nil { - ok := object.Key("RelatedEntityIdentifier") - ok.String(*v.RelatedEntityIdentifier) + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) } - if len(v.RelatedEntityType) > 0 { - ok := object.Key("RelatedEntityType") - ok.String(string(v.RelatedEntityType)) + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) } - return nil -} + if len(v.ParticipantType) > 0 { + ok := object.Key("ParticipantType") + ok.String(string(v.ParticipantType)) + } -func awsAwsjson10_serializeOpDocumentGetAwsOpportunitySummaryInput(v *GetAwsOpportunitySummaryInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() + if v.PayloadType != nil { + ok := object.Key("PayloadType") + if err := awsAwsjson10_serializeDocumentEngagementInvitationsPayloadType(v.PayloadType, ok); err != nil { + return err + } + } - if v.Catalog != nil { - ok := object.Key("Catalog") - ok.String(*v.Catalog) + if v.SenderAwsAccountId != nil { + ok := object.Key("SenderAwsAccountId") + if err := awsAwsjson10_serializeDocumentAwsAccountIdOrAliasList(v.SenderAwsAccountId, ok); err != nil { + return err + } } - if v.RelatedOpportunityIdentifier != nil { - ok := object.Key("RelatedOpportunityIdentifier") - ok.String(*v.RelatedOpportunityIdentifier) + if v.Sort != nil { + ok := object.Key("Sort") + if err := awsAwsjson10_serializeDocumentOpportunityEngagementInvitationSort(v.Sort, ok); err != nil { + return err + } + } + + if v.Status != nil { + ok := object.Key("Status") + if err := awsAwsjson10_serializeDocumentInvitationStatusList(v.Status, ok); err != nil { + return err + } } return nil } -func awsAwsjson10_serializeOpDocumentGetEngagementInvitationInput(v *GetEngagementInvitationInput, value smithyjson.Value) error { +func awsAwsjson10_serializeOpDocumentListEngagementMembersInput(v *ListEngagementMembersInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1751,10 +3959,20 @@ func awsAwsjson10_serializeOpDocumentGetEngagementInvitationInput(v *GetEngageme ok.String(*v.Identifier) } + 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_serializeOpDocumentGetOpportunityInput(v *GetOpportunityInput, value smithyjson.Value) error { +func awsAwsjson10_serializeOpDocumentListEngagementResourceAssociationsInput(v *ListEngagementResourceAssociationsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1763,15 +3981,40 @@ func awsAwsjson10_serializeOpDocumentGetOpportunityInput(v *GetOpportunityInput, ok.String(*v.Catalog) } - if v.Identifier != nil { - ok := object.Key("Identifier") - ok.String(*v.Identifier) + if v.CreatedBy != nil { + ok := object.Key("CreatedBy") + ok.String(*v.CreatedBy) + } + + if v.EngagementIdentifier != nil { + ok := object.Key("EngagementIdentifier") + ok.String(*v.EngagementIdentifier) + } + + 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.ResourceIdentifier != nil { + ok := object.Key("ResourceIdentifier") + ok.String(*v.ResourceIdentifier) + } + + if len(v.ResourceType) > 0 { + ok := object.Key("ResourceType") + ok.String(string(v.ResourceType)) } return nil } -func awsAwsjson10_serializeOpDocumentListEngagementInvitationsInput(v *ListEngagementInvitationsInput, value smithyjson.Value) error { +func awsAwsjson10_serializeOpDocumentListEngagementsInput(v *ListEngagementsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1780,6 +4023,27 @@ func awsAwsjson10_serializeOpDocumentListEngagementInvitationsInput(v *ListEngag ok.String(*v.Catalog) } + if v.CreatedBy != nil { + ok := object.Key("CreatedBy") + if err := awsAwsjson10_serializeDocumentAwsAccountList(v.CreatedBy, ok); err != nil { + return err + } + } + + if v.EngagementIdentifier != nil { + ok := object.Key("EngagementIdentifier") + if err := awsAwsjson10_serializeDocumentEngagementIdentifiers(v.EngagementIdentifier, ok); err != nil { + return err + } + } + + if v.ExcludeCreatedBy != nil { + ok := object.Key("ExcludeCreatedBy") + if err := awsAwsjson10_serializeDocumentAwsAccountList(v.ExcludeCreatedBy, ok); err != nil { + return err + } + } + if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) @@ -1790,21 +4054,9 @@ func awsAwsjson10_serializeOpDocumentListEngagementInvitationsInput(v *ListEngag ok.String(*v.NextToken) } - if len(v.ParticipantType) > 0 { - ok := object.Key("ParticipantType") - ok.String(string(v.ParticipantType)) - } - - if v.PayloadType != nil { - ok := object.Key("PayloadType") - if err := awsAwsjson10_serializeDocumentEngagementInvitationsPayloadType(v.PayloadType, ok); err != nil { - return err - } - } - if v.Sort != nil { ok := object.Key("Sort") - if err := awsAwsjson10_serializeDocumentOpportunityEngagementInvitationSort(v.Sort, ok); err != nil { + if err := awsAwsjson10_serializeDocumentEngagementSort(v.Sort, ok); err != nil { return err } } @@ -1876,6 +4128,92 @@ func awsAwsjson10_serializeOpDocumentListOpportunitiesInput(v *ListOpportunities return nil } +func awsAwsjson10_serializeOpDocumentListResourceSnapshotJobsInput(v *ListResourceSnapshotJobsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) + } + + if v.EngagementIdentifier != nil { + ok := object.Key("EngagementIdentifier") + ok.String(*v.EngagementIdentifier) + } + + 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.Sort != nil { + ok := object.Key("Sort") + if err := awsAwsjson10_serializeDocumentSortObject(v.Sort, ok); err != nil { + return err + } + } + + if len(v.Status) > 0 { + ok := object.Key("Status") + ok.String(string(v.Status)) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentListResourceSnapshotsInput(v *ListResourceSnapshotsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) + } + + if v.CreatedBy != nil { + ok := object.Key("CreatedBy") + ok.String(*v.CreatedBy) + } + + if v.EngagementIdentifier != nil { + ok := object.Key("EngagementIdentifier") + ok.String(*v.EngagementIdentifier) + } + + 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.ResourceIdentifier != nil { + ok := object.Key("ResourceIdentifier") + ok.String(*v.ResourceIdentifier) + } + + if v.ResourceSnapshotTemplateIdentifier != nil { + ok := object.Key("ResourceSnapshotTemplateIdentifier") + ok.String(*v.ResourceSnapshotTemplateIdentifier) + } + + if len(v.ResourceType) > 0 { + ok := object.Key("ResourceType") + ok.String(string(v.ResourceType)) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentListSolutionsInput(v *ListSolutionsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1926,6 +4264,23 @@ func awsAwsjson10_serializeOpDocumentListSolutionsInput(v *ListSolutionsInput, v return nil } +func awsAwsjson10_serializeOpDocumentPutSellingSystemSettingsInput(v *PutSellingSystemSettingsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) + } + + if v.ResourceSnapshotJobRoleIdentifier != nil { + ok := object.Key("ResourceSnapshotJobRoleIdentifier") + ok.String(*v.ResourceSnapshotJobRoleIdentifier) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentRejectEngagementInvitationInput(v *RejectEngagementInvitationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1999,6 +4354,67 @@ func awsAwsjson10_serializeOpDocumentStartEngagementFromOpportunityTaskInput(v * return nil } +func awsAwsjson10_serializeOpDocumentStartResourceSnapshotJobInput(v *StartResourceSnapshotJobInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) + } + + if v.ResourceSnapshotJobIdentifier != nil { + ok := object.Key("ResourceSnapshotJobIdentifier") + ok.String(*v.ResourceSnapshotJobIdentifier) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentStopResourceSnapshotJobInput(v *StopResourceSnapshotJobInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) + } + + if v.ResourceSnapshotJobIdentifier != nil { + ok := object.Key("ResourceSnapshotJobIdentifier") + ok.String(*v.ResourceSnapshotJobIdentifier) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentSubmitOpportunityInput(v *SubmitOpportunityInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Catalog != nil { + ok := object.Key("Catalog") + ok.String(*v.Catalog) + } + + if v.Identifier != nil { + ok := object.Key("Identifier") + ok.String(*v.Identifier) + } + + if len(v.InvolvementType) > 0 { + ok := object.Key("InvolvementType") + ok.String(string(v.InvolvementType)) + } + + if len(v.Visibility) > 0 { + ok := object.Key("Visibility") + ok.String(string(v.Visibility)) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentUpdateOpportunityInput(v *UpdateOpportunityInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/partnercentralselling/snapshot/api_op_AcceptEngagementInvitation.go.snap b/service/partnercentralselling/snapshot/api_op_AcceptEngagementInvitation.go.snap new file mode 100644 index 00000000000..2d5e3b750c1 --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_AcceptEngagementInvitation.go.snap @@ -0,0 +1,41 @@ +AcceptEngagementInvitation + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_CreateEngagement.go.snap b/service/partnercentralselling/snapshot/api_op_CreateEngagement.go.snap new file mode 100644 index 00000000000..5300fba69bd --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_CreateEngagement.go.snap @@ -0,0 +1,42 @@ +CreateEngagement + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + OperationIdempotencyTokenAutoFill + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_CreateEngagementInvitation.go.snap b/service/partnercentralselling/snapshot/api_op_CreateEngagementInvitation.go.snap new file mode 100644 index 00000000000..92be3628835 --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_CreateEngagementInvitation.go.snap @@ -0,0 +1,42 @@ +CreateEngagementInvitation + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + OperationIdempotencyTokenAutoFill + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_CreateResourceSnapshot.go.snap b/service/partnercentralselling/snapshot/api_op_CreateResourceSnapshot.go.snap new file mode 100644 index 00000000000..4a3149e2295 --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_CreateResourceSnapshot.go.snap @@ -0,0 +1,42 @@ +CreateResourceSnapshot + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + OperationIdempotencyTokenAutoFill + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_CreateResourceSnapshotJob.go.snap b/service/partnercentralselling/snapshot/api_op_CreateResourceSnapshotJob.go.snap new file mode 100644 index 00000000000..ee43ab7d419 --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_CreateResourceSnapshotJob.go.snap @@ -0,0 +1,42 @@ +CreateResourceSnapshotJob + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + OperationIdempotencyTokenAutoFill + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_DeleteResourceSnapshotJob.go.snap b/service/partnercentralselling/snapshot/api_op_DeleteResourceSnapshotJob.go.snap new file mode 100644 index 00000000000..db13ecfdcfa --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_DeleteResourceSnapshotJob.go.snap @@ -0,0 +1,41 @@ +DeleteResourceSnapshotJob + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_GetEngagement.go.snap b/service/partnercentralselling/snapshot/api_op_GetEngagement.go.snap new file mode 100644 index 00000000000..c84c94be935 --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_GetEngagement.go.snap @@ -0,0 +1,41 @@ +GetEngagement + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_GetResourceSnapshot.go.snap b/service/partnercentralselling/snapshot/api_op_GetResourceSnapshot.go.snap new file mode 100644 index 00000000000..560789f141f --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_GetResourceSnapshot.go.snap @@ -0,0 +1,41 @@ +GetResourceSnapshot + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_GetResourceSnapshotJob.go.snap b/service/partnercentralselling/snapshot/api_op_GetResourceSnapshotJob.go.snap new file mode 100644 index 00000000000..d6734a7d982 --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_GetResourceSnapshotJob.go.snap @@ -0,0 +1,41 @@ +GetResourceSnapshotJob + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_GetSellingSystemSettings.go.snap b/service/partnercentralselling/snapshot/api_op_GetSellingSystemSettings.go.snap new file mode 100644 index 00000000000..6532aa71eab --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_GetSellingSystemSettings.go.snap @@ -0,0 +1,41 @@ +GetSellingSystemSettings + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_ListEngagementByAcceptingInvitationTasks.go.snap b/service/partnercentralselling/snapshot/api_op_ListEngagementByAcceptingInvitationTasks.go.snap new file mode 100644 index 00000000000..cba931e9005 --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_ListEngagementByAcceptingInvitationTasks.go.snap @@ -0,0 +1,41 @@ +ListEngagementByAcceptingInvitationTasks + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_ListEngagementFromOpportunityTasks.go.snap b/service/partnercentralselling/snapshot/api_op_ListEngagementFromOpportunityTasks.go.snap new file mode 100644 index 00000000000..610f9f1b60b --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_ListEngagementFromOpportunityTasks.go.snap @@ -0,0 +1,41 @@ +ListEngagementFromOpportunityTasks + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_ListEngagementMembers.go.snap b/service/partnercentralselling/snapshot/api_op_ListEngagementMembers.go.snap new file mode 100644 index 00000000000..be4842b7b13 --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_ListEngagementMembers.go.snap @@ -0,0 +1,41 @@ +ListEngagementMembers + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_ListEngagementResourceAssociations.go.snap b/service/partnercentralselling/snapshot/api_op_ListEngagementResourceAssociations.go.snap new file mode 100644 index 00000000000..5ada5f8a88d --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_ListEngagementResourceAssociations.go.snap @@ -0,0 +1,41 @@ +ListEngagementResourceAssociations + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_ListEngagements.go.snap b/service/partnercentralselling/snapshot/api_op_ListEngagements.go.snap new file mode 100644 index 00000000000..8456a02020b --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_ListEngagements.go.snap @@ -0,0 +1,41 @@ +ListEngagements + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_ListResourceSnapshotJobs.go.snap b/service/partnercentralselling/snapshot/api_op_ListResourceSnapshotJobs.go.snap new file mode 100644 index 00000000000..8de6ad75968 --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_ListResourceSnapshotJobs.go.snap @@ -0,0 +1,41 @@ +ListResourceSnapshotJobs + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_ListResourceSnapshots.go.snap b/service/partnercentralselling/snapshot/api_op_ListResourceSnapshots.go.snap new file mode 100644 index 00000000000..7da238d42c7 --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_ListResourceSnapshots.go.snap @@ -0,0 +1,41 @@ +ListResourceSnapshots + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_PutSellingSystemSettings.go.snap b/service/partnercentralselling/snapshot/api_op_PutSellingSystemSettings.go.snap new file mode 100644 index 00000000000..b246bccd0d1 --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_PutSellingSystemSettings.go.snap @@ -0,0 +1,41 @@ +PutSellingSystemSettings + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_StartResourceSnapshotJob.go.snap b/service/partnercentralselling/snapshot/api_op_StartResourceSnapshotJob.go.snap new file mode 100644 index 00000000000..268ad5da649 --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_StartResourceSnapshotJob.go.snap @@ -0,0 +1,41 @@ +StartResourceSnapshotJob + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_StopResourceSnapshotJob.go.snap b/service/partnercentralselling/snapshot/api_op_StopResourceSnapshotJob.go.snap new file mode 100644 index 00000000000..d956fa9fe1a --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_StopResourceSnapshotJob.go.snap @@ -0,0 +1,41 @@ +StopResourceSnapshotJob + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot/api_op_SubmitOpportunity.go.snap b/service/partnercentralselling/snapshot/api_op_SubmitOpportunity.go.snap new file mode 100644 index 00000000000..4f3c9e671ae --- /dev/null +++ b/service/partnercentralselling/snapshot/api_op_SubmitOpportunity.go.snap @@ -0,0 +1,41 @@ +SubmitOpportunity + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/partnercentralselling/snapshot_test.go b/service/partnercentralselling/snapshot_test.go index 3f856528be4..94c7ad299f3 100644 --- a/service/partnercentralselling/snapshot_test.go +++ b/service/partnercentralselling/snapshot_test.go @@ -62,6 +62,18 @@ func testSnapshot(stack *middleware.Stack, operation string) error { } return snapshotOK{} } +func TestCheckSnapshot_AcceptEngagementInvitation(t *testing.T) { + svc := New(Options{}) + _, err := svc.AcceptEngagementInvitation(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "AcceptEngagementInvitation") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_AssignOpportunity(t *testing.T) { svc := New(Options{}) _, err := svc.AssignOpportunity(context.Background(), nil, func(o *Options) { @@ -86,6 +98,30 @@ func TestCheckSnapshot_AssociateOpportunity(t *testing.T) { } } +func TestCheckSnapshot_CreateEngagement(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateEngagement(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateEngagement") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_CreateEngagementInvitation(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateEngagementInvitation(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateEngagementInvitation") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateOpportunity(t *testing.T) { svc := New(Options{}) _, err := svc.CreateOpportunity(context.Background(), nil, func(o *Options) { @@ -98,6 +134,42 @@ func TestCheckSnapshot_CreateOpportunity(t *testing.T) { } } +func TestCheckSnapshot_CreateResourceSnapshot(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateResourceSnapshot(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateResourceSnapshot") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_CreateResourceSnapshotJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateResourceSnapshotJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateResourceSnapshotJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_DeleteResourceSnapshotJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteResourceSnapshotJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteResourceSnapshotJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DisassociateOpportunity(t *testing.T) { svc := New(Options{}) _, err := svc.DisassociateOpportunity(context.Background(), nil, func(o *Options) { @@ -122,6 +194,18 @@ func TestCheckSnapshot_GetAwsOpportunitySummary(t *testing.T) { } } +func TestCheckSnapshot_GetEngagement(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetEngagement(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetEngagement") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetEngagementInvitation(t *testing.T) { svc := New(Options{}) _, err := svc.GetEngagementInvitation(context.Background(), nil, func(o *Options) { @@ -146,6 +230,66 @@ func TestCheckSnapshot_GetOpportunity(t *testing.T) { } } +func TestCheckSnapshot_GetResourceSnapshot(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetResourceSnapshot(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetResourceSnapshot") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_GetResourceSnapshotJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetResourceSnapshotJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetResourceSnapshotJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_GetSellingSystemSettings(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetSellingSystemSettings(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetSellingSystemSettings") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_ListEngagementByAcceptingInvitationTasks(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListEngagementByAcceptingInvitationTasks(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListEngagementByAcceptingInvitationTasks") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_ListEngagementFromOpportunityTasks(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListEngagementFromOpportunityTasks(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListEngagementFromOpportunityTasks") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListEngagementInvitations(t *testing.T) { svc := New(Options{}) _, err := svc.ListEngagementInvitations(context.Background(), nil, func(o *Options) { @@ -158,6 +302,42 @@ func TestCheckSnapshot_ListEngagementInvitations(t *testing.T) { } } +func TestCheckSnapshot_ListEngagementMembers(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListEngagementMembers(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListEngagementMembers") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_ListEngagementResourceAssociations(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListEngagementResourceAssociations(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListEngagementResourceAssociations") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_ListEngagements(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListEngagements(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListEngagements") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListOpportunities(t *testing.T) { svc := New(Options{}) _, err := svc.ListOpportunities(context.Background(), nil, func(o *Options) { @@ -170,6 +350,30 @@ func TestCheckSnapshot_ListOpportunities(t *testing.T) { } } +func TestCheckSnapshot_ListResourceSnapshotJobs(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListResourceSnapshotJobs(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListResourceSnapshotJobs") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_ListResourceSnapshots(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListResourceSnapshots(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListResourceSnapshots") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListSolutions(t *testing.T) { svc := New(Options{}) _, err := svc.ListSolutions(context.Background(), nil, func(o *Options) { @@ -182,6 +386,18 @@ func TestCheckSnapshot_ListSolutions(t *testing.T) { } } +func TestCheckSnapshot_PutSellingSystemSettings(t *testing.T) { + svc := New(Options{}) + _, err := svc.PutSellingSystemSettings(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "PutSellingSystemSettings") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_RejectEngagementInvitation(t *testing.T) { svc := New(Options{}) _, err := svc.RejectEngagementInvitation(context.Background(), nil, func(o *Options) { @@ -218,6 +434,42 @@ func TestCheckSnapshot_StartEngagementFromOpportunityTask(t *testing.T) { } } +func TestCheckSnapshot_StartResourceSnapshotJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.StartResourceSnapshotJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "StartResourceSnapshotJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_StopResourceSnapshotJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.StopResourceSnapshotJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "StopResourceSnapshotJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_SubmitOpportunity(t *testing.T) { + svc := New(Options{}) + _, err := svc.SubmitOpportunity(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "SubmitOpportunity") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_UpdateOpportunity(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateOpportunity(context.Background(), nil, func(o *Options) { @@ -229,6 +481,18 @@ func TestCheckSnapshot_UpdateOpportunity(t *testing.T) { t.Fatal(err) } } +func TestUpdateSnapshot_AcceptEngagementInvitation(t *testing.T) { + svc := New(Options{}) + _, err := svc.AcceptEngagementInvitation(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "AcceptEngagementInvitation") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_AssignOpportunity(t *testing.T) { svc := New(Options{}) _, err := svc.AssignOpportunity(context.Background(), nil, func(o *Options) { @@ -253,6 +517,30 @@ func TestUpdateSnapshot_AssociateOpportunity(t *testing.T) { } } +func TestUpdateSnapshot_CreateEngagement(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateEngagement(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateEngagement") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_CreateEngagementInvitation(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateEngagementInvitation(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateEngagementInvitation") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateOpportunity(t *testing.T) { svc := New(Options{}) _, err := svc.CreateOpportunity(context.Background(), nil, func(o *Options) { @@ -265,6 +553,42 @@ func TestUpdateSnapshot_CreateOpportunity(t *testing.T) { } } +func TestUpdateSnapshot_CreateResourceSnapshot(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateResourceSnapshot(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateResourceSnapshot") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_CreateResourceSnapshotJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateResourceSnapshotJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateResourceSnapshotJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_DeleteResourceSnapshotJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteResourceSnapshotJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteResourceSnapshotJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DisassociateOpportunity(t *testing.T) { svc := New(Options{}) _, err := svc.DisassociateOpportunity(context.Background(), nil, func(o *Options) { @@ -289,6 +613,18 @@ func TestUpdateSnapshot_GetAwsOpportunitySummary(t *testing.T) { } } +func TestUpdateSnapshot_GetEngagement(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetEngagement(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetEngagement") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetEngagementInvitation(t *testing.T) { svc := New(Options{}) _, err := svc.GetEngagementInvitation(context.Background(), nil, func(o *Options) { @@ -313,6 +649,66 @@ func TestUpdateSnapshot_GetOpportunity(t *testing.T) { } } +func TestUpdateSnapshot_GetResourceSnapshot(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetResourceSnapshot(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetResourceSnapshot") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_GetResourceSnapshotJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetResourceSnapshotJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetResourceSnapshotJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_GetSellingSystemSettings(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetSellingSystemSettings(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetSellingSystemSettings") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_ListEngagementByAcceptingInvitationTasks(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListEngagementByAcceptingInvitationTasks(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListEngagementByAcceptingInvitationTasks") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_ListEngagementFromOpportunityTasks(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListEngagementFromOpportunityTasks(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListEngagementFromOpportunityTasks") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListEngagementInvitations(t *testing.T) { svc := New(Options{}) _, err := svc.ListEngagementInvitations(context.Background(), nil, func(o *Options) { @@ -325,6 +721,42 @@ func TestUpdateSnapshot_ListEngagementInvitations(t *testing.T) { } } +func TestUpdateSnapshot_ListEngagementMembers(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListEngagementMembers(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListEngagementMembers") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_ListEngagementResourceAssociations(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListEngagementResourceAssociations(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListEngagementResourceAssociations") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_ListEngagements(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListEngagements(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListEngagements") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListOpportunities(t *testing.T) { svc := New(Options{}) _, err := svc.ListOpportunities(context.Background(), nil, func(o *Options) { @@ -337,6 +769,30 @@ func TestUpdateSnapshot_ListOpportunities(t *testing.T) { } } +func TestUpdateSnapshot_ListResourceSnapshotJobs(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListResourceSnapshotJobs(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListResourceSnapshotJobs") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_ListResourceSnapshots(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListResourceSnapshots(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListResourceSnapshots") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListSolutions(t *testing.T) { svc := New(Options{}) _, err := svc.ListSolutions(context.Background(), nil, func(o *Options) { @@ -349,6 +805,18 @@ func TestUpdateSnapshot_ListSolutions(t *testing.T) { } } +func TestUpdateSnapshot_PutSellingSystemSettings(t *testing.T) { + svc := New(Options{}) + _, err := svc.PutSellingSystemSettings(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "PutSellingSystemSettings") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_RejectEngagementInvitation(t *testing.T) { svc := New(Options{}) _, err := svc.RejectEngagementInvitation(context.Background(), nil, func(o *Options) { @@ -385,6 +853,42 @@ func TestUpdateSnapshot_StartEngagementFromOpportunityTask(t *testing.T) { } } +func TestUpdateSnapshot_StartResourceSnapshotJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.StartResourceSnapshotJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "StartResourceSnapshotJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_StopResourceSnapshotJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.StopResourceSnapshotJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "StopResourceSnapshotJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_SubmitOpportunity(t *testing.T) { + svc := New(Options{}) + _, err := svc.SubmitOpportunity(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "SubmitOpportunity") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_UpdateOpportunity(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateOpportunity(context.Background(), nil, func(o *Options) { diff --git a/service/partnercentralselling/types/enums.go b/service/partnercentralselling/types/enums.go index 0cd7845854a..d6d0723e0df 100644 --- a/service/partnercentralselling/types/enums.go +++ b/service/partnercentralselling/types/enums.go @@ -1244,6 +1244,23 @@ func (DeliveryModel) Values() []DeliveryModel { } } +type EngagementContextType string + +// Enum values for EngagementContextType +const ( + EngagementContextTypeCustomerProject EngagementContextType = "CustomerProject" +) + +// Values returns all known values for EngagementContextType. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (EngagementContextType) Values() []EngagementContextType { + return []EngagementContextType{ + "CustomerProject", + } +} + type EngagementInvitationPayloadType string // Enum values for EngagementInvitationPayloadType @@ -1283,6 +1300,23 @@ func (EngagementScore) Values() []EngagementScore { } } +type EngagementSortName string + +// Enum values for EngagementSortName +const ( + EngagementSortNameCreatedDate EngagementSortName = "CreatedDate" +) + +// Values returns all known values for EngagementSortName. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (EngagementSortName) Values() []EngagementSortName { + return []EngagementSortName{ + "CreatedDate", + } +} + type Industry string // Enum values for Industry @@ -1402,6 +1436,23 @@ func (InvolvementTypeChangeReason) Values() []InvolvementTypeChangeReason { } } +type ListTasksSortName string + +// Enum values for ListTasksSortName +const ( + ListTasksSortNameStartTime ListTasksSortName = "StartTime" +) + +// Values returns all known values for ListTasksSortName. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ListTasksSortName) Values() []ListTasksSortName { + return []ListTasksSortName{ + "StartTime", + } +} + type MarketingSource string // Enum values for MarketingSource @@ -1523,6 +1574,7 @@ type ParticipantType string // Enum values for ParticipantType const ( + ParticipantTypeSender ParticipantType = "SENDER" ParticipantTypeReceiver ParticipantType = "RECEIVER" ) @@ -1532,6 +1584,7 @@ const ( // The ordering of this slice is not guaranteed to be stable across updates. func (ParticipantType) Values() []ParticipantType { return []ParticipantType{ + "SENDER", "RECEIVER", } } @@ -1588,17 +1641,25 @@ type ReasonCode string // Enum values for ReasonCode const ( - ReasonCodeInvitationAccessDenied ReasonCode = "InvitationAccessDenied" - ReasonCodeEngagementAccessDenied ReasonCode = "EngagementAccessDenied" - ReasonCodeOpportunityAccessDenied ReasonCode = "OpportunityAccessDenied" - ReasonCodeResourceSnapshotJobAccessDenied ReasonCode = "ResourceSnapshotJobAccessDenied" - ReasonCodeEngagementValidationFailed ReasonCode = "EngagementValidationFailed" - ReasonCodeOpportunitySubmissionFailed ReasonCode = "OpportunitySubmissionFailed" - ReasonCodeEngagementInvitationConflict ReasonCode = "EngagementInvitationConflict" - ReasonCodeInternalError ReasonCode = "InternalError" - ReasonCodeOpportunityValidationFailed ReasonCode = "OpportunityValidationFailed" - ReasonCodeOpportunityConflict ReasonCode = "OpportunityConflict" - ReasonCodeResourceSnapshotAccessDenied ReasonCode = "ResourceSnapshotAccessDenied" + ReasonCodeInvitationAccessDenied ReasonCode = "InvitationAccessDenied" + ReasonCodeInvitationValidationFailed ReasonCode = "InvitationValidationFailed" + ReasonCodeEngagementAccessDenied ReasonCode = "EngagementAccessDenied" + ReasonCodeOpportunityAccessDenied ReasonCode = "OpportunityAccessDenied" + ReasonCodeResourceSnapshotJobAccessDenied ReasonCode = "ResourceSnapshotJobAccessDenied" + ReasonCodeResourceSnapshotJobValidationFailed ReasonCode = "ResourceSnapshotJobValidationFailed" + ReasonCodeResourceSnapshotJobConflict ReasonCode = "ResourceSnapshotJobConflict" + ReasonCodeEngagementValidationFailed ReasonCode = "EngagementValidationFailed" + ReasonCodeEngagementConflict ReasonCode = "EngagementConflict" + ReasonCodeOpportunitySubmissionFailed ReasonCode = "OpportunitySubmissionFailed" + ReasonCodeEngagementInvitationConflict ReasonCode = "EngagementInvitationConflict" + ReasonCodeOpportunityValidationFailed ReasonCode = "OpportunityValidationFailed" + ReasonCodeOpportunityConflict ReasonCode = "OpportunityConflict" + ReasonCodeResourceSnapshotAccessDenied ReasonCode = "ResourceSnapshotAccessDenied" + ReasonCodeResourceSnapshotValidationFailed ReasonCode = "ResourceSnapshotValidationFailed" + ReasonCodeResourceSnapshotConflict ReasonCode = "ResourceSnapshotConflict" + ReasonCodeInternalError ReasonCode = "InternalError" + ReasonCodeServiceQuotaExceeded ReasonCode = "ServiceQuotaExceeded" + ReasonCodeRequestThrottled ReasonCode = "RequestThrottled" ) // Values returns all known values for ReasonCode. Note that this can be expanded @@ -1608,16 +1669,24 @@ const ( func (ReasonCode) Values() []ReasonCode { return []ReasonCode{ "InvitationAccessDenied", + "InvitationValidationFailed", "EngagementAccessDenied", "OpportunityAccessDenied", "ResourceSnapshotJobAccessDenied", + "ResourceSnapshotJobValidationFailed", + "ResourceSnapshotJobConflict", "EngagementValidationFailed", + "EngagementConflict", "OpportunitySubmissionFailed", "EngagementInvitationConflict", - "InternalError", "OpportunityValidationFailed", "OpportunityConflict", "ResourceSnapshotAccessDenied", + "ResourceSnapshotValidationFailed", + "ResourceSnapshotConflict", + "InternalError", + "ServiceQuotaExceeded", + "RequestThrottled", } } @@ -1675,6 +1744,42 @@ func (RelatedEntityType) Values() []RelatedEntityType { } } +type ResourceSnapshotJobStatus string + +// Enum values for ResourceSnapshotJobStatus +const ( + ResourceSnapshotJobStatusRunning ResourceSnapshotJobStatus = "Running" + ResourceSnapshotJobStatusStopped ResourceSnapshotJobStatus = "Stopped" +) + +// Values returns all known values for ResourceSnapshotJobStatus. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ResourceSnapshotJobStatus) Values() []ResourceSnapshotJobStatus { + return []ResourceSnapshotJobStatus{ + "Running", + "Stopped", + } +} + +type ResourceType string + +// Enum values for ResourceType +const ( + ResourceTypeOpportunity ResourceType = "Opportunity" +) + +// Values returns all known values for ResourceType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ResourceType) Values() []ResourceType { + return []ResourceType{ + "Opportunity", + } +} + type RevenueModel string // Enum values for RevenueModel @@ -1819,6 +1924,23 @@ func (SolutionStatus) Values() []SolutionStatus { } } +type SortBy string + +// Enum values for SortBy +const ( + SortByCreatedDate SortBy = "CreatedDate" +) + +// Values returns all known values for SortBy. Note that this can be expanded in +// the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SortBy) Values() []SortBy { + return []SortBy{ + "CreatedDate", + } +} + type SortOrder string // Enum values for SortOrder diff --git a/service/partnercentralselling/types/types.go b/service/partnercentralselling/types/types.go index 70006e2ea3f..381ba03b048 100644 --- a/service/partnercentralselling/types/types.go +++ b/service/partnercentralselling/types/types.go @@ -34,10 +34,10 @@ type Account struct { // the selected value in the Industry field is Other . OtherIndustry *string - // Specifies the end customer's company website URL associated with the - // Opportunity . This value is crucial to map the customer within the Amazon Web - // Services CRM system. This field is required in all cases except when the - // opportunity is related to national security. + // Specifies the end customer's company website URL associated with the Opportunity + // . This value is crucial to map the customer within the Amazon Web Services CRM + // system. This field is required in all cases except when the opportunity is + // related to national security. WebsiteUrl *string noSmithyDocumentSerde @@ -307,22 +307,21 @@ type AwsSubmission struct { noSmithyDocumentSerde } -// Represents an Amazon Web Services team member for the engagement. This -// +// Represents an Amazon Web Services team member for the engagement. This // structure includes details such as name, email, and business title. type AwsTeamMember struct { - // Specifies the Amazon Web Services team member's business title and indicates + // Specifies the Amazon Web Services team member's business title and indicates // their organizational role. BusinessTitle AwsMemberBusinessTitle - // Provides the Amazon Web Services team member's email address. + // Provides the Amazon Web Services team member's email address. Email *string - // Provides the Amazon Web Services team member's first name. + // Provides the Amazon Web Services team member's first name. FirstName *string - // Provides the Amazon Web Services team member's last name. + // Provides the Amazon Web Services team member's last name. LastName *string noSmithyDocumentSerde @@ -365,6 +364,29 @@ type Customer struct { noSmithyDocumentSerde } +// The CustomerProjects structure in Engagements offers a flexible framework for +// +// managing customer-project relationships. It supports multiple customers per +// Engagement and multiple projects per customer, while also allowing for customers +// without projects and projects without specific customers. +// +// All Engagement members have full visibility of customers and their associated +// projects, enabling the capture of relevant context even when project details are +// not fully defined. This structure also facilitates targeted invitations, +// allowing partners to focus on specific customers and their business problems +// when sending Engagement invitations. +type CustomerProjectsContext struct { + + // Contains details about the customer associated with the Engagement Invitation, + // including company information and industry. + Customer *EngagementCustomer + + // Information about the customer project associated with the Engagement. + Project *EngagementCustomerProjectDetails + + noSmithyDocumentSerde +} + // An object that contains a Customer object's subset of fields. type CustomerSummary struct { @@ -374,6 +396,48 @@ type CustomerSummary struct { noSmithyDocumentSerde } +// Provides detailed context information for an Engagement. This structure allows +// +// for specifying the type of context and its associated payload. +type EngagementContextDetails struct { + + // Specifies the type of Engagement context. Valid values are "CustomerProject" + // or "Document", indicating whether the context relates to a customer project or a + // document respectively. + // + // This member is required. + Type EngagementContextType + + // Contains the specific details of the Engagement context. The structure of this + // payload varies depending on the Type field. + Payload EngagementContextPayload + + noSmithyDocumentSerde +} + +// Represents the payload of an Engagement context. The structure of this payload +// +// varies based on the context type specified in the EngagementContextDetails. +// +// The following types satisfy this interface: +// +// EngagementContextPayloadMemberCustomerProject +type EngagementContextPayload interface { + isEngagementContextPayload() +} + +// Contains detailed information about a customer project when the context type +// +// is "CustomerProject". This field is present only when the Type in +// EngagementContextDetails is set to "CustomerProject". +type EngagementContextPayloadMemberCustomerProject struct { + Value CustomerProjectsContext + + noSmithyDocumentSerde +} + +func (*EngagementContextPayloadMemberCustomerProject) isEngagementContextPayload() {} + // Contains details about the customer associated with the Engagement Invitation, // including company information and industry. type EngagementCustomer struct { @@ -405,6 +469,30 @@ type EngagementCustomer struct { noSmithyDocumentSerde } +// Provides comprehensive details about a customer project associated with an +// +// Engagement. This may include information such as project goals, timelines, and +// specific customer requirements. +type EngagementCustomerProjectDetails struct { + + // A description of the business problem the project aims to solve. + // + // This member is required. + BusinessProblem *string + + // The target completion date for the customer's project. + // + // This member is required. + TargetCompletionDate *string + + // The title of the project. + // + // This member is required. + Title *string + + noSmithyDocumentSerde +} + // Provides a summarized view of the Engagement Invitation, including details like // the identifier, status, and sender. This summary helps partners track and manage // AWS originated opportunities. @@ -429,6 +517,10 @@ type EngagementInvitationSummary struct { // system and manage its lifecycle. Arn *string + // The identifier of the Engagement associated with this invitation. This links + // the invitation to its parent Engagement. + EngagementId *string + // Provides a short title or description of the Engagement Invitation. This title // helps partners quickly identify and differentiate between multiple engagement // opportunities. @@ -444,6 +536,9 @@ type EngagementInvitationSummary struct { // timeline for engagement. InvitationDate *time.Time + // Identifies the role of the caller in the engagement invitation. + ParticipantType ParticipantType + // Describes the type of payload associated with the Engagement Invitation, such // as Opportunity or MarketplaceOffer . This helps partners understand the nature // of the engagement request from AWS. @@ -472,6 +567,123 @@ type EngagementInvitationSummary struct { noSmithyDocumentSerde } +// Engagement members are the participants in an Engagement, which is likely a +// collaborative project or business opportunity within the AWS partner network. +// Members can be different partner organizations or AWS accounts that are working +// together on a specific engagement. +// +// Each member is represented by their AWS Account ID, Company Name, and +// associated details. Members have a status within the Engagement (PENDING, +// ACCEPTED, REJECTED, or WITHDRAWN), indicating their current state of +// participation. Only existing members of an Engagement can view the list of other +// members. This implies a level of privacy and access control within the +// Engagement structure. +type EngagementMember struct { + + // This is the unique identifier for the AWS account associated with the member + // organization. It's used for AWS-related operations and identity verification. + AccountId *string + + // The official name of the member's company or organization. + CompanyName *string + + // The URL of the member company's website. This offers a way to find more + // information about the member organization and serves as an additional + // identifier. + WebsiteUrl *string + + noSmithyDocumentSerde +} + +// The EngagementMemberSummary provides a snapshot of essential information about +// +// participants in an AWS Partner Central Engagement. This compact data structure +// encapsulates key details of each member, facilitating efficient collaboration +// and management within the Engagement. +type EngagementMemberSummary struct { + + // The official name of the member's company or organization. + CompanyName *string + + // The URL of the member company's website. This offers a way to find more + // information about the member organization and serves as an additional + // identifier. + WebsiteUrl *string + + noSmithyDocumentSerde +} + +// This provide a streamlined view of the relationships between engagements and +// +// resources. These summaries offer a crucial link between collaborative +// engagements and the specific resources involved, such as opportunities.These +// summaries are particularly valuable for partners navigating complex engagements +// with multiple resources. They enable quick insights into resource distribution +// across engagements, support efficient resource management, and help maintain a +// clear overview of collaborative activities. +type EngagementResourceAssociationSummary struct { + + // Indicates the environment in which the resource and engagement exist. + // + // This member is required. + Catalog *string + + // The AWS account ID of the entity that created the association. + CreatedBy *string + + // A unique identifier for the engagement associated with the resource. + EngagementId *string + + // A unique identifier for the specific resource. Varies depending on the + // resource type. + ResourceId *string + + // Categorizes the type of resource associated with the engagement. + ResourceType ResourceType + + noSmithyDocumentSerde +} + +// Specifies the sorting parameters for listing Engagements. +type EngagementSort struct { + + // The field by which to sort the results. + // + // This member is required. + SortBy EngagementSortName + + // The order in which to sort the results. + // + // This member is required. + SortOrder SortOrder + + noSmithyDocumentSerde +} + +// An object that contains an Engagement 's subset of fields. +type EngagementSummary struct { + + // The Amazon Resource Name (ARN) of the created engagement. + Arn *string + + // The date and time when the engagement was created. + CreatedAt *time.Time + + // The AWS account ID of the engagement creator. + CreatedBy *string + + // The unique identifier for the engagement. + Id *string + + // The number of members in the engagement. + MemberCount *int32 + + // The title of the engagement. + Title *string + + noSmithyDocumentSerde +} + // Provides an estimate of the revenue that the partner is expected to generate // from the opportunity. This information helps partners assess the financial value // of the project. @@ -503,6 +715,37 @@ type ExpectedCustomerSpend struct { // This member is required. TargetCompany *string + // A URL providing additional information or context about the spend estimation. + EstimationUrl *string + + noSmithyDocumentSerde +} + +// The Invitation structure represents an invitation exchanged between partners +// +// and AWS. It includes a message, receiver information, and a payload providing +// context for the invitation. +type Invitation struct { + + // A message accompanying the invitation. + // + // This member is required. + Message *string + + // Contains the data payload associated with the Engagement Invitation. This + // payload includes essential details related to the AWS opportunity and is used by + // partners to evaluate whether to accept or reject the engagement. + // + // This member is required. + Payload Payload + + // Represents the entity that received the Engagement Invitation, including + // account and company details. This field is essential for tracking the partner + // who is being invited to collaborate. + // + // This member is required. + Receiver Receiver + noSmithyDocumentSerde } @@ -526,7 +769,7 @@ type LastModifiedDate struct { // An object that contains the Opportunity lifecycle's details. type LifeCycle struct { - // Specifies the reason code when an opportunity is marked as Closed Lost. When + // Specifies the reason code when an opportunity is marked as Closed Lost. When // you select an appropriate reason code, you communicate the context for closing // the Opportunity , and aid in accurate reports and analysis of opportunity // outcomes. The possible values are: @@ -587,9 +830,8 @@ type LifeCycle struct { // take corrective action based on the ReviewComments . ReviewComments *string - // Indicates the review status of an opportunity referred by a partner. This - // field is read-only and only applicable for partner referrals. The possible - // values are: + // Indicates the review status of an opportunity referred by a partner. This field + // is read-only and only applicable for partner referrals. The possible values are: // // - Pending Submission: Not submitted for validation (editable). // @@ -636,14 +878,14 @@ type LifeCycle struct { // - Rejected: Disqualified (read-only). ReviewStatus ReviewStatus - // Indicates the reason a decision was made during the opportunity review - // process. This field combines the reasons for both disqualified and action - // required statuses, and provide clarity for why an opportunity was disqualified - // or requires further action. + // Indicates the reason a decision was made during the opportunity review process. + // This field combines the reasons for both disqualified and action required + // statuses, and provide clarity for why an opportunity was disqualified or + // requires further action. ReviewStatusReason *string - // Specifies the current stage of the Opportunity 's lifecycle as it maps to - // Amazon Web Services stages from the current stage in the partner CRM. This field + // Specifies the current stage of the Opportunity 's lifecycle as it maps to Amazon + // Web Services stages from the current stage in the partner CRM. This field // provides a translated value of the stage, and offers insight into the // Opportunity 's progression in the sales cycle, according to Amazon Web Services // definitions. @@ -677,7 +919,7 @@ type LifeCycle struct { // forward. Stage Stage - // Specifies the date when Amazon Web Services expects to start significant + // Specifies the date when Amazon Web Services expects to start significant // billing, when the project finishes, and when it moves into production. This // field informs the Amazon Web Services seller about when the opportunity launches // and starts to incur Amazon Web Services usage. @@ -688,6 +930,26 @@ type LifeCycle struct { noSmithyDocumentSerde } +// Provides the lifecycle view of an opportunity resource shared through a +// +// snapshot. +type LifeCycleForView struct { + + // Describes the next steps for the opportunity shared through a snapshot. + NextSteps *string + + // Defines the approval status of the opportunity shared through a snapshot. + ReviewStatus ReviewStatus + + // Defines the current stage of the opportunity shared through a snapshot. + Stage Stage + + // The projected launch date of the opportunity shared through a snapshot. + TargetCloseDate *string + + noSmithyDocumentSerde +} + // An object that contains a LifeCycle object's subset of fields. type LifeCycleSummary struct { @@ -706,7 +968,7 @@ type LifeCycleSummary struct { // take corrective action based on the ReviewComments . ReviewComments *string - // Indicates the review status of a partner referred opportunity. This field is + // Indicates the review status of a partner referred opportunity. This field is // read-only and only applicable for partner referrals. Valid values: // // - Pending Submission: Not submitted for validation (editable). @@ -753,14 +1015,14 @@ type LifeCycleSummary struct { // - Rejected: Disqualified (read-only). ReviewStatus ReviewStatus - // Indicates the reason a specific decision was taken during the opportunity + // Indicates the reason a specific decision was taken during the opportunity // review process. This field combines the reasons for both disqualified and action // required statuses, and provides clarity for why an opportunity was disqualified // or required further action. ReviewStatusReason *string - // Specifies the current stage of the Opportunity 's lifecycle as it maps to - // Amazon Web Services stages from the current stage in the partner CRM. This field + // Specifies the current stage of the Opportunity 's lifecycle as it maps to Amazon + // Web Services stages from the current stage in the partner CRM. This field // provides a translated value of the stage, and offers insight into the // Opportunity 's progression in the sales cycle, according to Amazon Web Services // definitions. @@ -794,7 +1056,7 @@ type LifeCycleSummary struct { // forward. Stage Stage - // Specifies the date when Amazon Web Services expects to start significant + // Specifies the date when Amazon Web Services expects to start significant // billing, when the project finishes, and when it moves into production. This // field informs the Amazon Web Services seller about when the opportunity launches // and starts to incur Amazon Web Services usage. @@ -805,6 +1067,109 @@ type LifeCycleSummary struct { noSmithyDocumentSerde } +// Specifies a subset of fields associated with tasks related to accepting an +// +// engagement invitation. +type ListEngagementByAcceptingInvitationTaskSummary struct { + + // The unique identifier of the engagement invitation that was accepted. + EngagementInvitationId *string + + // Detailed message describing the failure and possible recovery steps. + Message *string + + // Unique identifier of opportunity that was created. + OpportunityId *string + + // A code pointing to the specific reason for the failure. + ReasonCode ReasonCode + + // Unique identifier of the resource snapshot job that was created. + ResourceSnapshotJobId *string + + // Task start timestamp. + StartTime *time.Time + + // The Amazon Resource Name (ARN) that uniquely identifies the task. + TaskArn *string + + // Unique identifier of the task. + TaskId *string + + // Status of the task. + TaskStatus TaskStatus + + noSmithyDocumentSerde +} + +// Provides a summary of a task related to creating an engagement from an +// +// opportunity. This structure contains key information about the task's status, +// associated identifiers, and any failure details. +type ListEngagementFromOpportunityTaskSummary struct { + + // The unique identifier of the engagement created as a result of the task. This + // field is populated when the task is completed successfully. + EngagementId *string + + // The unique identifier of the engagement identifier created as a result of the + // task. This field is populated when the task is completed successfully. + EngagementInvitationId *string + + // A detailed message providing additional information about the task, especially + // useful in case of failures. This field may contain error details or other + // relevant information about the task's execution + Message *string + + // The unique identifier of the original Opportunity from which the Engagement is + // being created. This field helps track the source of the Engagement creation + // task. + OpportunityId *string + + // A code indicating the specific reason for a task failure. This field is + // populated when the task status is FAILED and provides a categorized reason for + // the failure. + ReasonCode ReasonCode + + // The identifier of the resource snapshot job associated with this task, if a + // snapshot was created as part of the Engagement creation process. + ResourceSnapshotJobId *string + + // The timestamp indicating when the task was initiated, in RFC 3339 5.6 + // date-time format. + StartTime *time.Time + + // The Amazon Resource Name (ARN) uniquely identifying this task within AWS. This + // ARN can be used for referencing the task in other AWS services or APIs. + TaskArn *string + + // A unique identifier for a specific task. + TaskId *string + + // The current status of the task. + TaskStatus TaskStatus + + noSmithyDocumentSerde +} + +// Defines the sorting parameters for listing tasks. This structure allows for +// +// specifying the field to sort by and the order of sorting. +type ListTasksSortBase struct { + + // Specifies the field by which the task list should be sorted. + // + // This member is required. + SortBy ListTasksSortName + + // Determines the order in which the sorted results are presented. + // + // This member is required. + SortOrder SortOrder + + noSmithyDocumentSerde +} + // An object that contains marketing details for the Opportunity . type Marketing struct { @@ -825,17 +1190,17 @@ type Marketing struct { // contact. Channels []Channel - // Indicates if the Opportunity was sourced from an Amazon Web Services marketing + // Indicates if the Opportunity was sourced from an Amazon Web Services marketing // activity. Use the value Marketing Activity . Use None if it's not associated // with an Amazon Web Services marketing activity. This field helps Amazon Web // Services track the return on marketing investments and enables better // distribution of marketing budgets among partners. Source MarketingSource - // Specifies the marketing activity use case or purpose that led to the - // Opportunity 's creation or contact. This field captures the context or marketing - // activity's execution's intention and the direct correlation to the generated - // opportunity or contact. Must be empty when Marketing.AWSFundingUsed = No . + // Specifies the marketing activity use case or purpose that led to the Opportunity + // 's creation or contact. This field captures the context or marketing activity's + // execution's intention and the direct correlation to the generated opportunity or + // contact. Must be empty when Marketing.AWSFundingUsed = No . // // Valid values: AI/ML | Analytics | Application Integration | Blockchain | // Business Applications | Cloud Financial Management | Compute | Containers | @@ -957,6 +1322,10 @@ type OpportunitySummary struct { // This member is required. Catalog *string + // The Amazon Resource Name (ARN) for the opportunity. This globally unique + // identifier can be used for IAM policies and cross-service references. + Arn *string + // DateTime when the Opportunity was last created. CreatedDate *time.Time @@ -972,7 +1341,7 @@ type OpportunitySummary struct { // An object that contains the Opportunity 's lifecycle details. LifeCycle *LifeCycleSummary - // Specifies opportunity type as a renewal, new, or expansion. + // Specifies opportunity type as a renewal, new, or expansion. // // Opportunity types: // @@ -1000,6 +1369,42 @@ type OpportunitySummary struct { noSmithyDocumentSerde } +// Provides a comprehensive view of an opportunity summary, including lifecycle +// +// information, team details, opportunity type, primary needs from AWS, and +// associated project information. +type OpportunitySummaryView struct { + + // An object that contains the customer's Account and Contact . + Customer *Customer + + // Contains information about the opportunity's lifecycle, including its current + // stage, status, and important dates such as creation and last modification times. + Lifecycle *LifeCycleForView + + // Represents the internal team handling the opportunity. Specify the members + // involved in collaborating on an opportunity within the partner's organization. + OpportunityTeam []Contact + + // Specifies the opportunity type. + OpportunityType OpportunityType + + // Identifies the type of support the partner needs from AWS. + PrimaryNeedsFromAws []PrimaryNeedFromAws + + // Contains summary information about the project associated with the + // opportunity, including project name, description, timeline, and other relevant + // details. + Project *ProjectView + + // This field provides the associations' information for other entities with the + // opportunity. These entities include identifiers for AWSProducts , Partner + // Solutions , and AWSMarketplaceOffers . + RelatedEntityIdentifiers *RelatedEntityIdentifiers + + noSmithyDocumentSerde +} + // Contains the data payload associated with the Engagement Invitation. This // payload includes essential details related to the AWS opportunity and is used by // partners to evaluate whether to accept or reject the engagement. @@ -1049,7 +1454,7 @@ type Project struct { // captured in other fields. AdditionalComments *string - // Specifies the Amazon Partner Network (APN) program that influenced the + // Specifies the Amazon Partner Network (APN) program that influenced the // Opportunity . APN programs refer to specific partner programs or initiatives // that can impact the Opportunity . // @@ -1077,7 +1482,7 @@ type Project struct { // Opportunity and the strategic fit of the partner's solution. CustomerBusinessProblem *string - // Specifies the proposed solution focus or type of workload for the Opportunity. + // Specifies the proposed solution focus or type of workload for the Opportunity. // This field captures the primary use case or objective of the proposed solution, // and provides context and clarity to the addressed workload. // @@ -1098,7 +1503,7 @@ type Project struct { // | VMC | VMWare | Web development & DevOps CustomerUseCase *string - // Specifies the deployment or consumption model for your solution or service in + // Specifies the deployment or consumption model for your solution or service in // the Opportunity 's context. You can select multiple options. // // Options' descriptions from the Delivery Model field are: @@ -1138,7 +1543,7 @@ type Project struct { // Specifies the current opportunity's parent opportunity identifier. RelatedOpportunityIdentifier *string - // Specifies the Opportunity 's sales activities conducted with the end customer. + // Specifies the Opportunity 's sales activities conducted with the end customer. // These activities help drive Amazon Web Services assignment priority. // // Valid values: @@ -1208,7 +1613,7 @@ type ProjectDetails struct { // An object that contains a Project object's subset of fields. type ProjectSummary struct { - // Specifies your solution or service's deployment or consumption model in the + // Specifies your solution or service's deployment or consumption model in the // Opportunity 's context. You can select multiple options. // // Options' descriptions from the Delivery Model field are: @@ -1240,6 +1645,37 @@ type ProjectSummary struct { noSmithyDocumentSerde } +// Provides the project view of an opportunity resource shared through a +// +// snapshot. +type ProjectView struct { + + // Specifies the proposed solution focus or type of workload for the project. + CustomerUseCase *string + + // Describes the deployment or consumption model for the partner solution or + // offering. This field indicates how the project's solution will be delivered or + // implemented for the customer. + DeliveryModels []DeliveryModel + + // Provides information about the anticipated customer spend related to this + // project. This may include details such as amount, frequency, and currency of + // expected expenditure. + ExpectedCustomerSpend []ExpectedCustomerSpend + + // Offers a description of other solutions if the standard solutions do not + // adequately cover the project's scope. + OtherSolutionDescription *string + + // Lists the pre-sales activities that have occurred with the end-customer + // related to the opportunity. This field is conditionally mandatory when the + // project is qualified for Co-Sell and helps drive assignment priority on the AWS + // side. It provides insight into the engagement level with the customer. + SalesActivities []SalesActivity + + noSmithyDocumentSerde +} + // Represents the entity that received the Engagement Invitation, including // account and company details. This field is essential for tracking the partner // who is being invited to collaborate. @@ -1262,13 +1698,12 @@ type ReceiverMemberAccount struct { func (*ReceiverMemberAccount) isReceiver() {} -// This field provides the associations' information for other entities with the -// +// This field provides the associations' information for other entities with the // opportunity. These entities include identifiers for AWSProducts , Partner // Solutions , and AWSMarketplaceOffers . type RelatedEntityIdentifiers struct { - // Takes one value per opportunity. Each value is an Amazon Resource Name (ARN), + // Takes one value per opportunity. Each value is an Amazon Resource Name (ARN), // in this format: "offers": // ["arn:aws:aws-marketplace:us-east-1:999999999999:AWSMarketplace/Offer/offer-sampleOffer32"] // . @@ -1279,7 +1714,7 @@ type RelatedEntityIdentifiers struct { // [ListEntities]: https://docs.aws.amazon.com/marketplace-catalog/latest/api-reference/API_ListEntities.html AwsMarketplaceOffers []string - // Enables the association of specific Amazon Web Services products with the + // Enables the association of specific Amazon Web Services products with the // Opportunity . Partners can indicate the relevant Amazon Web Services products // for the Opportunity 's solution and align with the customer's needs. Returns // multiple values separated by commas. For example, "AWSProducts" : @@ -1290,7 +1725,7 @@ type RelatedEntityIdentifiers struct { // [Amazon Web Services products]: https://github.com/aws-samples/partner-crm-integration-samples/blob/main/resources/aws_products.json AwsProducts []string - // Enables partner solutions or offerings' association with an opportunity. To + // Enables partner solutions or offerings' association with an opportunity. To // associate a solution, provide the solution's unique identifier, which you can // obtain with the ListSolutions operation. // @@ -1307,6 +1742,81 @@ type RelatedEntityIdentifiers struct { noSmithyDocumentSerde } +// An object that contains a Resource Snapshot Job 's subset of fields. +type ResourceSnapshotJobSummary struct { + + // The Amazon Resource Name (ARN) for the resource snapshot job. + Arn *string + + // The unique identifier for the engagement within the AWS Partner Central + // system. This ID is used for direct references to the engagement within the + // service. + EngagementId *string + + // The unique identifier for the resource snapshot job within the AWS Partner + // Central system. This ID is used for direct references to the job within the + // service. + Id *string + + // Represents the current status of the resource snapshot job. + Status ResourceSnapshotJobStatus + + noSmithyDocumentSerde +} + +// Represents the payload of a resource snapshot. This structure is designed to +// +// accommodate different types of resource snapshots, currently supporting +// opportunity summaries. +// +// The following types satisfy this interface: +// +// ResourceSnapshotPayloadMemberOpportunitySummary +type ResourceSnapshotPayload interface { + isResourceSnapshotPayload() +} + +// An object that contains an opportunity 's subset of fields. +type ResourceSnapshotPayloadMemberOpportunitySummary struct { + Value OpportunitySummaryView + + noSmithyDocumentSerde +} + +func (*ResourceSnapshotPayloadMemberOpportunitySummary) isResourceSnapshotPayload() {} + +// Provides a concise summary of a resource snapshot, including its unique +// +// identifier and version information. This structure is used to quickly reference +// and identify specific versions of resource snapshots. +type ResourceSnapshotSummary struct { + + // The Amazon Resource Name (ARN) of the snapshot. This globally unique + // identifier can be used for cross-service references and in IAM policies. + Arn *string + + // The AWS account ID of the principal (user or role) who created the snapshot. + // This helps in tracking the origin of the snapshot. + CreatedBy *string + + // The identifier of the specific resource snapshotted. The format might vary + // depending on the ResourceType. + ResourceId *string + + // The name of the template used to create the snapshot. + ResourceSnapshotTemplateName *string + + // The type of resource snapshotted. + ResourceType ResourceType + + // The revision number of the snapshot. This integer value is incremented each + // time the snapshot is updated, allowing for version tracking of the resource + // snapshot. + Revision *int32 + + noSmithyDocumentSerde +} + // An object that contains the details of the sender-provided contact person for // the EngagementInvitation . type SenderContact struct { @@ -1370,7 +1880,7 @@ type SolutionBase struct { // This member is required. Catalog *string - // Specifies the solution category, which helps to categorize and organize the + // Specifies the solution category, which helps to categorize and organize the // solutions partners offer. Valid values: Software Product | Consulting Service | // Hardware Product | Communications Product | Professional Service | Managed // Service | Value-Added Resale Amazon Web Services Service | Distribution Service @@ -1394,7 +1904,7 @@ type SolutionBase struct { // This member is required. Name *string - // Specifies the solution's current status, which indicates its state in the + // Specifies the solution's current status, which indicates its state in the // system. Valid values: Active | Inactive | Draft . The status helps partners and // Amazon Web Services track the solution's lifecycle and availability. Filter for // Active solutions for association to an opportunity. @@ -1402,20 +1912,22 @@ type SolutionBase struct { // This member is required. Status SolutionStatus + // The SolutionBase structure provides essential information about a solution. + Arn *string + noSmithyDocumentSerde } -// Configures the solutions' response sorting that enables partners to order -// +// Configures the solutions' response sorting that enables partners to order // solutions based on specified attributes. type SolutionSort struct { - // Specifies the attribute to sort by, such as Name , CreatedDate , or Status . + // Specifies the attribute to sort by, such as Name , CreatedDate , or Status . // // This member is required. SortBy SolutionSortName - // Specifies the sorting order, either Ascending or Descending . The default is + // Specifies the sorting order, either Ascending or Descending . The default is // Descending . // // This member is required. @@ -1424,9 +1936,23 @@ type SolutionSort struct { noSmithyDocumentSerde } -// Indicates an invalid value for a field. +// Defines the sorting parameters for listing resource snapshot jobs. This +// +// structure allows you to specify the field to sort by and the order of sorting. +type SortObject struct { + + // Specifies the field by which to sort the resource snapshot jobs. + SortBy SortBy + + // Determines the order in which the sorted results are presented. + SortOrder SortOrder + + noSmithyDocumentSerde +} + +// Indicates an invalid value for a field. // -// - REQUIRED_FIELD_MISSING: The request is missing a required field. +// - REQUIRED_FIELD_MISSING: The request is missing a required field. // // Fix: Verify your request payload includes all required fields. // @@ -1495,5 +2021,7 @@ type UnknownUnionMember struct { noSmithyDocumentSerde } -func (*UnknownUnionMember) isPayload() {} -func (*UnknownUnionMember) isReceiver() {} +func (*UnknownUnionMember) isEngagementContextPayload() {} +func (*UnknownUnionMember) isPayload() {} +func (*UnknownUnionMember) isReceiver() {} +func (*UnknownUnionMember) isResourceSnapshotPayload() {} diff --git a/service/partnercentralselling/types/types_exported_test.go b/service/partnercentralselling/types/types_exported_test.go index 532e5ee2611..7a78e35140a 100644 --- a/service/partnercentralselling/types/types_exported_test.go +++ b/service/partnercentralselling/types/types_exported_test.go @@ -7,6 +7,24 @@ import ( "github.com/aws/aws-sdk-go-v2/service/partnercentralselling/types" ) +func ExampleEngagementContextPayload_outputUsage() { + var union types.EngagementContextPayload + // type switches can be used to check the union value + switch v := union.(type) { + case *types.EngagementContextPayloadMemberCustomerProject: + _ = v.Value // Value is types.CustomerProjectsContext + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.CustomerProjectsContext + func ExamplePayload_outputUsage() { var union types.Payload // type switches can be used to check the union value @@ -42,3 +60,21 @@ func ExampleReceiver_outputUsage() { } var _ *types.AccountReceiver + +func ExampleResourceSnapshotPayload_outputUsage() { + var union types.ResourceSnapshotPayload + // type switches can be used to check the union value + switch v := union.(type) { + case *types.ResourceSnapshotPayloadMemberOpportunitySummary: + _ = v.Value // Value is types.OpportunitySummaryView + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.OpportunitySummaryView diff --git a/service/partnercentralselling/validators.go b/service/partnercentralselling/validators.go index 79d1cf86b2d..4854b9b4817 100644 --- a/service/partnercentralselling/validators.go +++ b/service/partnercentralselling/validators.go @@ -10,6 +10,26 @@ import ( "github.com/aws/smithy-go/middleware" ) +type validateOpAcceptEngagementInvitation struct { +} + +func (*validateOpAcceptEngagementInvitation) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAcceptEngagementInvitation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AcceptEngagementInvitationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAcceptEngagementInvitationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpAssignOpportunity struct { } @@ -50,6 +70,46 @@ func (m *validateOpAssociateOpportunity) HandleInitialize(ctx context.Context, i return next.HandleInitialize(ctx, in) } +type validateOpCreateEngagement struct { +} + +func (*validateOpCreateEngagement) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateEngagement) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateEngagementInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateEngagementInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateEngagementInvitation struct { +} + +func (*validateOpCreateEngagementInvitation) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateEngagementInvitation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateEngagementInvitationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateEngagementInvitationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateOpportunity struct { } @@ -70,6 +130,66 @@ func (m *validateOpCreateOpportunity) HandleInitialize(ctx context.Context, in m return next.HandleInitialize(ctx, in) } +type validateOpCreateResourceSnapshot struct { +} + +func (*validateOpCreateResourceSnapshot) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateResourceSnapshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateResourceSnapshotInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateResourceSnapshotInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateResourceSnapshotJob struct { +} + +func (*validateOpCreateResourceSnapshotJob) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateResourceSnapshotJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateResourceSnapshotJobInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateResourceSnapshotJobInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteResourceSnapshotJob struct { +} + +func (*validateOpDeleteResourceSnapshotJob) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteResourceSnapshotJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteResourceSnapshotJobInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteResourceSnapshotJobInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDisassociateOpportunity struct { } @@ -110,6 +230,26 @@ func (m *validateOpGetAwsOpportunitySummary) HandleInitialize(ctx context.Contex return next.HandleInitialize(ctx, in) } +type validateOpGetEngagement struct { +} + +func (*validateOpGetEngagement) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetEngagement) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetEngagementInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetEngagementInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetEngagementInvitation struct { } @@ -150,248 +290,1096 @@ func (m *validateOpGetOpportunity) HandleInitialize(ctx context.Context, in midd return next.HandleInitialize(ctx, in) } -type validateOpListEngagementInvitations struct { +type validateOpGetResourceSnapshot struct { } -func (*validateOpListEngagementInvitations) ID() string { +func (*validateOpGetResourceSnapshot) ID() string { return "OperationInputValidation" } -func (m *validateOpListEngagementInvitations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpGetResourceSnapshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*ListEngagementInvitationsInput) + input, ok := in.Parameters.(*GetResourceSnapshotInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpListEngagementInvitationsInput(input); err != nil { + if err := validateOpGetResourceSnapshotInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpListOpportunities struct { +type validateOpGetResourceSnapshotJob struct { } -func (*validateOpListOpportunities) ID() string { +func (*validateOpGetResourceSnapshotJob) ID() string { return "OperationInputValidation" } -func (m *validateOpListOpportunities) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpGetResourceSnapshotJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*ListOpportunitiesInput) + input, ok := in.Parameters.(*GetResourceSnapshotJobInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpListOpportunitiesInput(input); err != nil { + if err := validateOpGetResourceSnapshotJobInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpListSolutions struct { +type validateOpGetSellingSystemSettings struct { } -func (*validateOpListSolutions) ID() string { +func (*validateOpGetSellingSystemSettings) ID() string { return "OperationInputValidation" } -func (m *validateOpListSolutions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpGetSellingSystemSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*ListSolutionsInput) + input, ok := in.Parameters.(*GetSellingSystemSettingsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpListSolutionsInput(input); err != nil { + if err := validateOpGetSellingSystemSettingsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpRejectEngagementInvitation struct { +type validateOpListEngagementByAcceptingInvitationTasks struct { } -func (*validateOpRejectEngagementInvitation) ID() string { +func (*validateOpListEngagementByAcceptingInvitationTasks) ID() string { return "OperationInputValidation" } -func (m *validateOpRejectEngagementInvitation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpListEngagementByAcceptingInvitationTasks) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*RejectEngagementInvitationInput) + input, ok := in.Parameters.(*ListEngagementByAcceptingInvitationTasksInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpRejectEngagementInvitationInput(input); err != nil { + if err := validateOpListEngagementByAcceptingInvitationTasksInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpStartEngagementByAcceptingInvitationTask struct { +type validateOpListEngagementFromOpportunityTasks struct { } -func (*validateOpStartEngagementByAcceptingInvitationTask) ID() string { +func (*validateOpListEngagementFromOpportunityTasks) ID() string { return "OperationInputValidation" } -func (m *validateOpStartEngagementByAcceptingInvitationTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpListEngagementFromOpportunityTasks) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*StartEngagementByAcceptingInvitationTaskInput) + input, ok := in.Parameters.(*ListEngagementFromOpportunityTasksInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpStartEngagementByAcceptingInvitationTaskInput(input); err != nil { + if err := validateOpListEngagementFromOpportunityTasksInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpStartEngagementFromOpportunityTask struct { +type validateOpListEngagementInvitations struct { } -func (*validateOpStartEngagementFromOpportunityTask) ID() string { +func (*validateOpListEngagementInvitations) ID() string { return "OperationInputValidation" } -func (m *validateOpStartEngagementFromOpportunityTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpListEngagementInvitations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*StartEngagementFromOpportunityTaskInput) + input, ok := in.Parameters.(*ListEngagementInvitationsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpStartEngagementFromOpportunityTaskInput(input); err != nil { + if err := validateOpListEngagementInvitationsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpUpdateOpportunity struct { +type validateOpListEngagementMembers struct { } -func (*validateOpUpdateOpportunity) ID() string { +func (*validateOpListEngagementMembers) ID() string { return "OperationInputValidation" } -func (m *validateOpUpdateOpportunity) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpListEngagementMembers) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*UpdateOpportunityInput) + input, ok := in.Parameters.(*ListEngagementMembersInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpUpdateOpportunityInput(input); err != nil { + if err := validateOpListEngagementMembersInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -func addOpAssignOpportunityValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssignOpportunity{}, middleware.After) +type validateOpListEngagementResourceAssociations struct { } -func addOpAssociateOpportunityValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssociateOpportunity{}, middleware.After) +func (*validateOpListEngagementResourceAssociations) ID() string { + return "OperationInputValidation" } -func addOpCreateOpportunityValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateOpportunity{}, middleware.After) +func (m *validateOpListEngagementResourceAssociations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListEngagementResourceAssociationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListEngagementResourceAssociationsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) } -func addOpDisassociateOpportunityValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisassociateOpportunity{}, middleware.After) +type validateOpListEngagements struct { } -func addOpGetAwsOpportunitySummaryValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetAwsOpportunitySummary{}, middleware.After) +func (*validateOpListEngagements) ID() string { + return "OperationInputValidation" } -func addOpGetEngagementInvitationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetEngagementInvitation{}, middleware.After) +func (m *validateOpListEngagements) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListEngagementsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListEngagementsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) } -func addOpGetOpportunityValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetOpportunity{}, middleware.After) +type validateOpListOpportunities struct { } -func addOpListEngagementInvitationsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListEngagementInvitations{}, middleware.After) +func (*validateOpListOpportunities) ID() string { + return "OperationInputValidation" } -func addOpListOpportunitiesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListOpportunities{}, middleware.After) +func (m *validateOpListOpportunities) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListOpportunitiesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListOpportunitiesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) } -func addOpListSolutionsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListSolutions{}, middleware.After) +type validateOpListResourceSnapshotJobs struct { } -func addOpRejectEngagementInvitationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRejectEngagementInvitation{}, middleware.After) +func (*validateOpListResourceSnapshotJobs) ID() string { + return "OperationInputValidation" } -func addOpStartEngagementByAcceptingInvitationTaskValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpStartEngagementByAcceptingInvitationTask{}, middleware.After) +func (m *validateOpListResourceSnapshotJobs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListResourceSnapshotJobsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListResourceSnapshotJobsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) } -func addOpStartEngagementFromOpportunityTaskValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpStartEngagementFromOpportunityTask{}, middleware.After) +type validateOpListResourceSnapshots struct { } -func addOpUpdateOpportunityValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateOpportunity{}, middleware.After) +func (*validateOpListResourceSnapshots) ID() string { + return "OperationInputValidation" } -func validateAccount(v *types.Account) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "Account"} - if v.CompanyName == nil { - invalidParams.Add(smithy.NewErrParamRequired("CompanyName")) +func (m *validateOpListResourceSnapshots) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListResourceSnapshotsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil + if err := validateOpListResourceSnapshotsInput(input); err != nil { + return out, metadata, err } + return next.HandleInitialize(ctx, in) } -func validateAssigneeContact(v *types.AssigneeContact) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AssigneeContact"} - if v.Email == nil { - invalidParams.Add(smithy.NewErrParamRequired("Email")) - } - if v.FirstName == nil { - invalidParams.Add(smithy.NewErrParamRequired("FirstName")) - } - if v.LastName == nil { - invalidParams.Add(smithy.NewErrParamRequired("LastName")) - } - if v.BusinessTitle == nil { - invalidParams.Add(smithy.NewErrParamRequired("BusinessTitle")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } +type validateOpListSolutions struct { } -func validateAwsSubmission(v *types.AwsSubmission) error { +func (*validateOpListSolutions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListSolutions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListSolutionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListSolutionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutSellingSystemSettings struct { +} + +func (*validateOpPutSellingSystemSettings) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutSellingSystemSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutSellingSystemSettingsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutSellingSystemSettingsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpRejectEngagementInvitation struct { +} + +func (*validateOpRejectEngagementInvitation) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRejectEngagementInvitation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RejectEngagementInvitationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRejectEngagementInvitationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStartEngagementByAcceptingInvitationTask struct { +} + +func (*validateOpStartEngagementByAcceptingInvitationTask) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartEngagementByAcceptingInvitationTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartEngagementByAcceptingInvitationTaskInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartEngagementByAcceptingInvitationTaskInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStartEngagementFromOpportunityTask struct { +} + +func (*validateOpStartEngagementFromOpportunityTask) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartEngagementFromOpportunityTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartEngagementFromOpportunityTaskInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartEngagementFromOpportunityTaskInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStartResourceSnapshotJob struct { +} + +func (*validateOpStartResourceSnapshotJob) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartResourceSnapshotJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartResourceSnapshotJobInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartResourceSnapshotJobInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStopResourceSnapshotJob struct { +} + +func (*validateOpStopResourceSnapshotJob) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStopResourceSnapshotJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StopResourceSnapshotJobInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStopResourceSnapshotJobInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpSubmitOpportunity struct { +} + +func (*validateOpSubmitOpportunity) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSubmitOpportunity) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SubmitOpportunityInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSubmitOpportunityInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateOpportunity struct { +} + +func (*validateOpUpdateOpportunity) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateOpportunity) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateOpportunityInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateOpportunityInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpAcceptEngagementInvitationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAcceptEngagementInvitation{}, middleware.After) +} + +func addOpAssignOpportunityValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAssignOpportunity{}, middleware.After) +} + +func addOpAssociateOpportunityValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAssociateOpportunity{}, middleware.After) +} + +func addOpCreateEngagementValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateEngagement{}, middleware.After) +} + +func addOpCreateEngagementInvitationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateEngagementInvitation{}, middleware.After) +} + +func addOpCreateOpportunityValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateOpportunity{}, middleware.After) +} + +func addOpCreateResourceSnapshotValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateResourceSnapshot{}, middleware.After) +} + +func addOpCreateResourceSnapshotJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateResourceSnapshotJob{}, middleware.After) +} + +func addOpDeleteResourceSnapshotJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteResourceSnapshotJob{}, middleware.After) +} + +func addOpDisassociateOpportunityValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDisassociateOpportunity{}, middleware.After) +} + +func addOpGetAwsOpportunitySummaryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetAwsOpportunitySummary{}, middleware.After) +} + +func addOpGetEngagementValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetEngagement{}, middleware.After) +} + +func addOpGetEngagementInvitationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetEngagementInvitation{}, middleware.After) +} + +func addOpGetOpportunityValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetOpportunity{}, middleware.After) +} + +func addOpGetResourceSnapshotValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetResourceSnapshot{}, middleware.After) +} + +func addOpGetResourceSnapshotJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetResourceSnapshotJob{}, middleware.After) +} + +func addOpGetSellingSystemSettingsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetSellingSystemSettings{}, middleware.After) +} + +func addOpListEngagementByAcceptingInvitationTasksValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListEngagementByAcceptingInvitationTasks{}, middleware.After) +} + +func addOpListEngagementFromOpportunityTasksValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListEngagementFromOpportunityTasks{}, middleware.After) +} + +func addOpListEngagementInvitationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListEngagementInvitations{}, middleware.After) +} + +func addOpListEngagementMembersValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListEngagementMembers{}, middleware.After) +} + +func addOpListEngagementResourceAssociationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListEngagementResourceAssociations{}, middleware.After) +} + +func addOpListEngagementsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListEngagements{}, middleware.After) +} + +func addOpListOpportunitiesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListOpportunities{}, middleware.After) +} + +func addOpListResourceSnapshotJobsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListResourceSnapshotJobs{}, middleware.After) +} + +func addOpListResourceSnapshotsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListResourceSnapshots{}, middleware.After) +} + +func addOpListSolutionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListSolutions{}, middleware.After) +} + +func addOpPutSellingSystemSettingsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutSellingSystemSettings{}, middleware.After) +} + +func addOpRejectEngagementInvitationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRejectEngagementInvitation{}, middleware.After) +} + +func addOpStartEngagementByAcceptingInvitationTaskValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartEngagementByAcceptingInvitationTask{}, middleware.After) +} + +func addOpStartEngagementFromOpportunityTaskValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartEngagementFromOpportunityTask{}, middleware.After) +} + +func addOpStartResourceSnapshotJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartResourceSnapshotJob{}, middleware.After) +} + +func addOpStopResourceSnapshotJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStopResourceSnapshotJob{}, middleware.After) +} + +func addOpSubmitOpportunityValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSubmitOpportunity{}, middleware.After) +} + +func addOpUpdateOpportunityValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateOpportunity{}, middleware.After) +} + +func validateAccount(v *types.Account) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Account"} + if v.CompanyName == nil { + invalidParams.Add(smithy.NewErrParamRequired("CompanyName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAccountReceiver(v *types.AccountReceiver) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AccountReceiver"} + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAssigneeContact(v *types.AssigneeContact) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssigneeContact"} + if v.Email == nil { + invalidParams.Add(smithy.NewErrParamRequired("Email")) + } + if v.FirstName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FirstName")) + } + if v.LastName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LastName")) + } + if v.BusinessTitle == nil { + invalidParams.Add(smithy.NewErrParamRequired("BusinessTitle")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAwsSubmission(v *types.AwsSubmission) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AwsSubmission"} + if len(v.InvolvementType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("InvolvementType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCustomer(v *types.Customer) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Customer"} + if v.Account != nil { + if err := validateAccount(v.Account); err != nil { + invalidParams.AddNested("Account", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCustomerProjectsContext(v *types.CustomerProjectsContext) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CustomerProjectsContext"} + if v.Customer != nil { + if err := validateEngagementCustomer(v.Customer); err != nil { + invalidParams.AddNested("Customer", err.(smithy.InvalidParamsError)) + } + } + if v.Project != nil { + if err := validateEngagementCustomerProjectDetails(v.Project); err != nil { + invalidParams.AddNested("Project", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateEngagementContextDetails(v *types.EngagementContextDetails) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EngagementContextDetails"} + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if v.Payload != nil { + if err := validateEngagementContextPayload(v.Payload); err != nil { + invalidParams.AddNested("Payload", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateEngagementContextPayload(v types.EngagementContextPayload) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EngagementContextPayload"} + switch uv := v.(type) { + case *types.EngagementContextPayloadMemberCustomerProject: + if err := validateCustomerProjectsContext(&uv.Value); err != nil { + invalidParams.AddNested("[CustomerProject]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateEngagementContexts(v []types.EngagementContextDetails) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EngagementContexts"} + for i := range v { + if err := validateEngagementContextDetails(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateEngagementCustomer(v *types.EngagementCustomer) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EngagementCustomer"} + if len(v.Industry) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Industry")) + } + if v.CompanyName == nil { + invalidParams.Add(smithy.NewErrParamRequired("CompanyName")) + } + if v.WebsiteUrl == nil { + invalidParams.Add(smithy.NewErrParamRequired("WebsiteUrl")) + } + if len(v.CountryCode) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("CountryCode")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateEngagementCustomerProjectDetails(v *types.EngagementCustomerProjectDetails) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EngagementCustomerProjectDetails"} + if v.Title == nil { + invalidParams.Add(smithy.NewErrParamRequired("Title")) + } + if v.BusinessProblem == nil { + invalidParams.Add(smithy.NewErrParamRequired("BusinessProblem")) + } + if v.TargetCompletionDate == nil { + invalidParams.Add(smithy.NewErrParamRequired("TargetCompletionDate")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateEngagementSort(v *types.EngagementSort) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EngagementSort"} + if len(v.SortOrder) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("SortOrder")) + } + if len(v.SortBy) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("SortBy")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateExpectedCustomerSpend(v *types.ExpectedCustomerSpend) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ExpectedCustomerSpend"} + if v.Amount == nil { + invalidParams.Add(smithy.NewErrParamRequired("Amount")) + } + if len(v.CurrencyCode) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("CurrencyCode")) + } + if len(v.Frequency) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Frequency")) + } + if v.TargetCompany == nil { + invalidParams.Add(smithy.NewErrParamRequired("TargetCompany")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateExpectedCustomerSpendList(v []types.ExpectedCustomerSpend) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ExpectedCustomerSpendList"} + for i := range v { + if err := validateExpectedCustomerSpend(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInvitation(v *types.Invitation) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Invitation"} + if v.Message == nil { + invalidParams.Add(smithy.NewErrParamRequired("Message")) + } + if v.Receiver == nil { + invalidParams.Add(smithy.NewErrParamRequired("Receiver")) + } else if v.Receiver != nil { + if err := validateReceiver(v.Receiver); err != nil { + invalidParams.AddNested("Receiver", err.(smithy.InvalidParamsError)) + } + } + if v.Payload == nil { + invalidParams.Add(smithy.NewErrParamRequired("Payload")) + } else if v.Payload != nil { + if err := validatePayload(v.Payload); err != nil { + invalidParams.AddNested("Payload", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateLifeCycle(v *types.LifeCycle) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LifeCycle"} + if v.NextStepsHistory != nil { + if err := validateNextStepsHistories(v.NextStepsHistory); err != nil { + invalidParams.AddNested("NextStepsHistory", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateListTasksSortBase(v *types.ListTasksSortBase) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListTasksSortBase"} + if len(v.SortOrder) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("SortOrder")) + } + if len(v.SortBy) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("SortBy")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMonetaryValue(v *types.MonetaryValue) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MonetaryValue"} + if v.Amount == nil { + invalidParams.Add(smithy.NewErrParamRequired("Amount")) + } + if len(v.CurrencyCode) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("CurrencyCode")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateNextStepsHistories(v []types.NextStepsHistory) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "NextStepsHistories"} + for i := range v { + if err := validateNextStepsHistory(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateNextStepsHistory(v *types.NextStepsHistory) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "NextStepsHistory"} + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if v.Time == nil { + invalidParams.Add(smithy.NewErrParamRequired("Time")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpportunityEngagementInvitationSort(v *types.OpportunityEngagementInvitationSort) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OpportunityEngagementInvitationSort"} + if len(v.SortOrder) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("SortOrder")) + } + if len(v.SortBy) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("SortBy")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpportunityInvitationPayload(v *types.OpportunityInvitationPayload) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OpportunityInvitationPayload"} + if v.SenderContacts != nil { + if err := validateSenderContactList(v.SenderContacts); err != nil { + invalidParams.AddNested("SenderContacts", err.(smithy.InvalidParamsError)) + } + } + if v.ReceiverResponsibilities == nil { + invalidParams.Add(smithy.NewErrParamRequired("ReceiverResponsibilities")) + } + if v.Customer == nil { + invalidParams.Add(smithy.NewErrParamRequired("Customer")) + } else if v.Customer != nil { + if err := validateEngagementCustomer(v.Customer); err != nil { + invalidParams.AddNested("Customer", err.(smithy.InvalidParamsError)) + } + } + if v.Project == nil { + invalidParams.Add(smithy.NewErrParamRequired("Project")) + } else if v.Project != nil { + if err := validateProjectDetails(v.Project); err != nil { + invalidParams.AddNested("Project", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpportunitySort(v *types.OpportunitySort) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OpportunitySort"} + if len(v.SortOrder) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("SortOrder")) + } + if len(v.SortBy) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("SortBy")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePayload(v types.Payload) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Payload"} + switch uv := v.(type) { + case *types.PayloadMemberOpportunityInvitation: + if err := validateOpportunityInvitationPayload(&uv.Value); err != nil { + invalidParams.AddNested("[OpportunityInvitation]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateProject(v *types.Project) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Project"} + if v.ExpectedCustomerSpend != nil { + if err := validateExpectedCustomerSpendList(v.ExpectedCustomerSpend); err != nil { + invalidParams.AddNested("ExpectedCustomerSpend", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateProjectDetails(v *types.ProjectDetails) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ProjectDetails"} + if v.BusinessProblem == nil { + invalidParams.Add(smithy.NewErrParamRequired("BusinessProblem")) + } + if v.Title == nil { + invalidParams.Add(smithy.NewErrParamRequired("Title")) + } + if v.TargetCompletionDate == nil { + invalidParams.Add(smithy.NewErrParamRequired("TargetCompletionDate")) + } + if v.ExpectedCustomerSpend == nil { + invalidParams.Add(smithy.NewErrParamRequired("ExpectedCustomerSpend")) + } else if v.ExpectedCustomerSpend != nil { + if err := validateExpectedCustomerSpendList(v.ExpectedCustomerSpend); err != nil { + invalidParams.AddNested("ExpectedCustomerSpend", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateReceiver(v types.Receiver) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "AwsSubmission"} - if len(v.InvolvementType) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("InvolvementType")) + invalidParams := smithy.InvalidParamsError{Context: "Receiver"} + switch uv := v.(type) { + case *types.ReceiverMemberAccount: + if err := validateAccountReceiver(&uv.Value); err != nil { + invalidParams.AddNested("[Account]", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -400,14 +1388,29 @@ func validateAwsSubmission(v *types.AwsSubmission) error { } } -func validateCustomer(v *types.Customer) error { +func validateSenderContact(v *types.SenderContact) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "Customer"} - if v.Account != nil { - if err := validateAccount(v.Account); err != nil { - invalidParams.AddNested("Account", err.(smithy.InvalidParamsError)) + invalidParams := smithy.InvalidParamsError{Context: "SenderContact"} + if v.Email == nil { + invalidParams.Add(smithy.NewErrParamRequired("Email")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSenderContactList(v []types.SenderContact) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SenderContactList"} + for i := range v { + if err := validateSenderContact(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { @@ -417,22 +1420,33 @@ func validateCustomer(v *types.Customer) error { } } -func validateExpectedCustomerSpend(v *types.ExpectedCustomerSpend) error { +func validateSoftwareRevenue(v *types.SoftwareRevenue) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "ExpectedCustomerSpend"} - if v.Amount == nil { - invalidParams.Add(smithy.NewErrParamRequired("Amount")) + invalidParams := smithy.InvalidParamsError{Context: "SoftwareRevenue"} + if v.Value != nil { + if err := validateMonetaryValue(v.Value); err != nil { + invalidParams.AddNested("Value", err.(smithy.InvalidParamsError)) + } } - if len(v.CurrencyCode) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("CurrencyCode")) + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil } - if len(v.Frequency) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Frequency")) +} + +func validateSolutionSort(v *types.SolutionSort) error { + if v == nil { + return nil } - if v.TargetCompany == nil { - invalidParams.Add(smithy.NewErrParamRequired("TargetCompany")) + invalidParams := smithy.InvalidParamsError{Context: "SolutionSort"} + if len(v.SortOrder) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("SortOrder")) + } + if len(v.SortBy) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("SortBy")) } if invalidParams.Len() > 0 { return invalidParams @@ -441,14 +1455,40 @@ func validateExpectedCustomerSpend(v *types.ExpectedCustomerSpend) error { } } -func validateExpectedCustomerSpendList(v []types.ExpectedCustomerSpend) error { +func validateOpAcceptEngagementInvitationInput(v *AcceptEngagementInvitationInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "ExpectedCustomerSpendList"} - for i := range v { - if err := validateExpectedCustomerSpend(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + invalidParams := smithy.InvalidParamsError{Context: "AcceptEngagementInvitationInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) + } + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpAssignOpportunityInput(v *AssignOpportunityInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssignOpportunityInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) + } + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if v.Assignee == nil { + invalidParams.Add(smithy.NewErrParamRequired("Assignee")) + } else if v.Assignee != nil { + if err := validateAssigneeContact(v.Assignee); err != nil { + invalidParams.AddNested("Assignee", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { @@ -458,15 +1498,219 @@ func validateExpectedCustomerSpendList(v []types.ExpectedCustomerSpend) error { } } -func validateLifeCycle(v *types.LifeCycle) error { +func validateOpAssociateOpportunityInput(v *AssociateOpportunityInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssociateOpportunityInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) + } + if v.OpportunityIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("OpportunityIdentifier")) + } + if len(v.RelatedEntityType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("RelatedEntityType")) + } + if v.RelatedEntityIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("RelatedEntityIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateEngagementInput(v *CreateEngagementInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateEngagementInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) + } + if v.ClientToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClientToken")) + } + if v.Title == nil { + invalidParams.Add(smithy.NewErrParamRequired("Title")) + } + if v.Description == nil { + invalidParams.Add(smithy.NewErrParamRequired("Description")) + } + if v.Contexts != nil { + if err := validateEngagementContexts(v.Contexts); err != nil { + invalidParams.AddNested("Contexts", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateEngagementInvitationInput(v *CreateEngagementInvitationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateEngagementInvitationInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) + } + if v.ClientToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClientToken")) + } + if v.EngagementIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("EngagementIdentifier")) + } + if v.Invitation == nil { + invalidParams.Add(smithy.NewErrParamRequired("Invitation")) + } else if v.Invitation != nil { + if err := validateInvitation(v.Invitation); err != nil { + invalidParams.AddNested("Invitation", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateOpportunityInput(v *CreateOpportunityInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateOpportunityInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) + } + if v.Customer != nil { + if err := validateCustomer(v.Customer); err != nil { + invalidParams.AddNested("Customer", err.(smithy.InvalidParamsError)) + } + } + if v.Project != nil { + if err := validateProject(v.Project); err != nil { + invalidParams.AddNested("Project", err.(smithy.InvalidParamsError)) + } + } + if v.SoftwareRevenue != nil { + if err := validateSoftwareRevenue(v.SoftwareRevenue); err != nil { + invalidParams.AddNested("SoftwareRevenue", err.(smithy.InvalidParamsError)) + } + } + if v.ClientToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClientToken")) + } + if v.LifeCycle != nil { + if err := validateLifeCycle(v.LifeCycle); err != nil { + invalidParams.AddNested("LifeCycle", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateResourceSnapshotInput(v *CreateResourceSnapshotInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateResourceSnapshotInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) + } + if v.EngagementIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("EngagementIdentifier")) + } + if len(v.ResourceType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ResourceType")) + } + if v.ResourceIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceIdentifier")) + } + if v.ResourceSnapshotTemplateIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceSnapshotTemplateIdentifier")) + } + if v.ClientToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClientToken")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateResourceSnapshotJobInput(v *CreateResourceSnapshotJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateResourceSnapshotJobInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) + } + if v.ClientToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClientToken")) + } + if v.EngagementIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("EngagementIdentifier")) + } + if len(v.ResourceType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ResourceType")) + } + if v.ResourceIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceIdentifier")) + } + if v.ResourceSnapshotTemplateIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceSnapshotTemplateIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteResourceSnapshotJobInput(v *DeleteResourceSnapshotJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteResourceSnapshotJobInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) + } + if v.ResourceSnapshotJobIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceSnapshotJobIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDisassociateOpportunityInput(v *DisassociateOpportunityInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "LifeCycle"} - if v.NextStepsHistory != nil { - if err := validateNextStepsHistories(v.NextStepsHistory); err != nil { - invalidParams.AddNested("NextStepsHistory", err.(smithy.InvalidParamsError)) - } + invalidParams := smithy.InvalidParamsError{Context: "DisassociateOpportunityInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) + } + if v.OpportunityIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("OpportunityIdentifier")) + } + if len(v.RelatedEntityType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("RelatedEntityType")) + } + if v.RelatedEntityIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("RelatedEntityIdentifier")) } if invalidParams.Len() > 0 { return invalidParams @@ -475,16 +1719,16 @@ func validateLifeCycle(v *types.LifeCycle) error { } } -func validateMonetaryValue(v *types.MonetaryValue) error { +func validateOpGetAwsOpportunitySummaryInput(v *GetAwsOpportunitySummaryInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "MonetaryValue"} - if v.Amount == nil { - invalidParams.Add(smithy.NewErrParamRequired("Amount")) + invalidParams := smithy.InvalidParamsError{Context: "GetAwsOpportunitySummaryInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) } - if len(v.CurrencyCode) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("CurrencyCode")) + if v.RelatedOpportunityIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("RelatedOpportunityIdentifier")) } if invalidParams.Len() > 0 { return invalidParams @@ -493,15 +1737,16 @@ func validateMonetaryValue(v *types.MonetaryValue) error { } } -func validateNextStepsHistories(v []types.NextStepsHistory) error { +func validateOpGetEngagementInput(v *GetEngagementInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "NextStepsHistories"} - for i := range v { - if err := validateNextStepsHistory(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } + invalidParams := smithy.InvalidParamsError{Context: "GetEngagementInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) + } + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) } if invalidParams.Len() > 0 { return invalidParams @@ -510,16 +1755,16 @@ func validateNextStepsHistories(v []types.NextStepsHistory) error { } } -func validateNextStepsHistory(v *types.NextStepsHistory) error { +func validateOpGetEngagementInvitationInput(v *GetEngagementInvitationInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "NextStepsHistory"} - if v.Value == nil { - invalidParams.Add(smithy.NewErrParamRequired("Value")) + invalidParams := smithy.InvalidParamsError{Context: "GetEngagementInvitationInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) } - if v.Time == nil { - invalidParams.Add(smithy.NewErrParamRequired("Time")) + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) } if invalidParams.Len() > 0 { return invalidParams @@ -528,16 +1773,16 @@ func validateNextStepsHistory(v *types.NextStepsHistory) error { } } -func validateOpportunityEngagementInvitationSort(v *types.OpportunityEngagementInvitationSort) error { +func validateOpGetOpportunityInput(v *GetOpportunityInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "OpportunityEngagementInvitationSort"} - if len(v.SortOrder) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("SortOrder")) + invalidParams := smithy.InvalidParamsError{Context: "GetOpportunityInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) } - if len(v.SortBy) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("SortBy")) + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) } if invalidParams.Len() > 0 { return invalidParams @@ -546,16 +1791,25 @@ func validateOpportunityEngagementInvitationSort(v *types.OpportunityEngagementI } } -func validateOpportunitySort(v *types.OpportunitySort) error { +func validateOpGetResourceSnapshotInput(v *GetResourceSnapshotInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "OpportunitySort"} - if len(v.SortOrder) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("SortOrder")) + invalidParams := smithy.InvalidParamsError{Context: "GetResourceSnapshotInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) } - if len(v.SortBy) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("SortBy")) + if v.EngagementIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("EngagementIdentifier")) + } + if len(v.ResourceType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ResourceType")) + } + if v.ResourceIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceIdentifier")) + } + if v.ResourceSnapshotTemplateIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceSnapshotTemplateIdentifier")) } if invalidParams.Len() > 0 { return invalidParams @@ -564,15 +1818,16 @@ func validateOpportunitySort(v *types.OpportunitySort) error { } } -func validateProject(v *types.Project) error { +func validateOpGetResourceSnapshotJobInput(v *GetResourceSnapshotJobInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "Project"} - if v.ExpectedCustomerSpend != nil { - if err := validateExpectedCustomerSpendList(v.ExpectedCustomerSpend); err != nil { - invalidParams.AddNested("ExpectedCustomerSpend", err.(smithy.InvalidParamsError)) - } + invalidParams := smithy.InvalidParamsError{Context: "GetResourceSnapshotJobInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) + } + if v.ResourceSnapshotJobIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceSnapshotJobIdentifier")) } if invalidParams.Len() > 0 { return invalidParams @@ -581,15 +1836,13 @@ func validateProject(v *types.Project) error { } } -func validateSoftwareRevenue(v *types.SoftwareRevenue) error { +func validateOpGetSellingSystemSettingsInput(v *GetSellingSystemSettingsInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "SoftwareRevenue"} - if v.Value != nil { - if err := validateMonetaryValue(v.Value); err != nil { - invalidParams.AddNested("Value", err.(smithy.InvalidParamsError)) - } + invalidParams := smithy.InvalidParamsError{Context: "GetSellingSystemSettingsInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) } if invalidParams.Len() > 0 { return invalidParams @@ -598,16 +1851,18 @@ func validateSoftwareRevenue(v *types.SoftwareRevenue) error { } } -func validateSolutionSort(v *types.SolutionSort) error { +func validateOpListEngagementByAcceptingInvitationTasksInput(v *ListEngagementByAcceptingInvitationTasksInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "SolutionSort"} - if len(v.SortOrder) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("SortOrder")) + invalidParams := smithy.InvalidParamsError{Context: "ListEngagementByAcceptingInvitationTasksInput"} + if v.Sort != nil { + if err := validateListTasksSortBase(v.Sort); err != nil { + invalidParams.AddNested("Sort", err.(smithy.InvalidParamsError)) + } } - if len(v.SortBy) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("SortBy")) + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) } if invalidParams.Len() > 0 { return invalidParams @@ -616,24 +1871,19 @@ func validateSolutionSort(v *types.SolutionSort) error { } } -func validateOpAssignOpportunityInput(v *AssignOpportunityInput) error { +func validateOpListEngagementFromOpportunityTasksInput(v *ListEngagementFromOpportunityTasksInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "AssignOpportunityInput"} + invalidParams := smithy.InvalidParamsError{Context: "ListEngagementFromOpportunityTasksInput"} + if v.Sort != nil { + if err := validateListTasksSortBase(v.Sort); err != nil { + invalidParams.AddNested("Sort", err.(smithy.InvalidParamsError)) + } + } if v.Catalog == nil { invalidParams.Add(smithy.NewErrParamRequired("Catalog")) } - if v.Identifier == nil { - invalidParams.Add(smithy.NewErrParamRequired("Identifier")) - } - if v.Assignee == nil { - invalidParams.Add(smithy.NewErrParamRequired("Assignee")) - } else if v.Assignee != nil { - if err := validateAssigneeContact(v.Assignee); err != nil { - invalidParams.AddNested("Assignee", err.(smithy.InvalidParamsError)) - } - } if invalidParams.Len() > 0 { return invalidParams } else { @@ -641,22 +1891,21 @@ func validateOpAssignOpportunityInput(v *AssignOpportunityInput) error { } } -func validateOpAssociateOpportunityInput(v *AssociateOpportunityInput) error { +func validateOpListEngagementInvitationsInput(v *ListEngagementInvitationsInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "AssociateOpportunityInput"} + invalidParams := smithy.InvalidParamsError{Context: "ListEngagementInvitationsInput"} if v.Catalog == nil { invalidParams.Add(smithy.NewErrParamRequired("Catalog")) } - if v.OpportunityIdentifier == nil { - invalidParams.Add(smithy.NewErrParamRequired("OpportunityIdentifier")) - } - if len(v.RelatedEntityType) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("RelatedEntityType")) + if v.Sort != nil { + if err := validateOpportunityEngagementInvitationSort(v.Sort); err != nil { + invalidParams.AddNested("Sort", err.(smithy.InvalidParamsError)) + } } - if v.RelatedEntityIdentifier == nil { - invalidParams.Add(smithy.NewErrParamRequired("RelatedEntityIdentifier")) + if len(v.ParticipantType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ParticipantType")) } if invalidParams.Len() > 0 { return invalidParams @@ -665,36 +1914,16 @@ func validateOpAssociateOpportunityInput(v *AssociateOpportunityInput) error { } } -func validateOpCreateOpportunityInput(v *CreateOpportunityInput) error { +func validateOpListEngagementMembersInput(v *ListEngagementMembersInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "CreateOpportunityInput"} + invalidParams := smithy.InvalidParamsError{Context: "ListEngagementMembersInput"} if v.Catalog == nil { invalidParams.Add(smithy.NewErrParamRequired("Catalog")) } - if v.Customer != nil { - if err := validateCustomer(v.Customer); err != nil { - invalidParams.AddNested("Customer", err.(smithy.InvalidParamsError)) - } - } - if v.Project != nil { - if err := validateProject(v.Project); err != nil { - invalidParams.AddNested("Project", err.(smithy.InvalidParamsError)) - } - } - if v.SoftwareRevenue != nil { - if err := validateSoftwareRevenue(v.SoftwareRevenue); err != nil { - invalidParams.AddNested("SoftwareRevenue", err.(smithy.InvalidParamsError)) - } - } - if v.ClientToken == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientToken")) - } - if v.LifeCycle != nil { - if err := validateLifeCycle(v.LifeCycle); err != nil { - invalidParams.AddNested("LifeCycle", err.(smithy.InvalidParamsError)) - } + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) } if invalidParams.Len() > 0 { return invalidParams @@ -703,23 +1932,14 @@ func validateOpCreateOpportunityInput(v *CreateOpportunityInput) error { } } -func validateOpDisassociateOpportunityInput(v *DisassociateOpportunityInput) error { +func validateOpListEngagementResourceAssociationsInput(v *ListEngagementResourceAssociationsInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "DisassociateOpportunityInput"} + invalidParams := smithy.InvalidParamsError{Context: "ListEngagementResourceAssociationsInput"} if v.Catalog == nil { invalidParams.Add(smithy.NewErrParamRequired("Catalog")) } - if v.OpportunityIdentifier == nil { - invalidParams.Add(smithy.NewErrParamRequired("OpportunityIdentifier")) - } - if len(v.RelatedEntityType) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("RelatedEntityType")) - } - if v.RelatedEntityIdentifier == nil { - invalidParams.Add(smithy.NewErrParamRequired("RelatedEntityIdentifier")) - } if invalidParams.Len() > 0 { return invalidParams } else { @@ -727,16 +1947,18 @@ func validateOpDisassociateOpportunityInput(v *DisassociateOpportunityInput) err } } -func validateOpGetAwsOpportunitySummaryInput(v *GetAwsOpportunitySummaryInput) error { +func validateOpListEngagementsInput(v *ListEngagementsInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "GetAwsOpportunitySummaryInput"} + invalidParams := smithy.InvalidParamsError{Context: "ListEngagementsInput"} if v.Catalog == nil { invalidParams.Add(smithy.NewErrParamRequired("Catalog")) } - if v.RelatedOpportunityIdentifier == nil { - invalidParams.Add(smithy.NewErrParamRequired("RelatedOpportunityIdentifier")) + if v.Sort != nil { + if err := validateEngagementSort(v.Sort); err != nil { + invalidParams.AddNested("Sort", err.(smithy.InvalidParamsError)) + } } if invalidParams.Len() > 0 { return invalidParams @@ -745,16 +1967,18 @@ func validateOpGetAwsOpportunitySummaryInput(v *GetAwsOpportunitySummaryInput) e } } -func validateOpGetEngagementInvitationInput(v *GetEngagementInvitationInput) error { +func validateOpListOpportunitiesInput(v *ListOpportunitiesInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "GetEngagementInvitationInput"} + invalidParams := smithy.InvalidParamsError{Context: "ListOpportunitiesInput"} if v.Catalog == nil { invalidParams.Add(smithy.NewErrParamRequired("Catalog")) } - if v.Identifier == nil { - invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + if v.Sort != nil { + if err := validateOpportunitySort(v.Sort); err != nil { + invalidParams.AddNested("Sort", err.(smithy.InvalidParamsError)) + } } if invalidParams.Len() > 0 { return invalidParams @@ -763,17 +1987,14 @@ func validateOpGetEngagementInvitationInput(v *GetEngagementInvitationInput) err } } -func validateOpGetOpportunityInput(v *GetOpportunityInput) error { +func validateOpListResourceSnapshotJobsInput(v *ListResourceSnapshotJobsInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "GetOpportunityInput"} + invalidParams := smithy.InvalidParamsError{Context: "ListResourceSnapshotJobsInput"} if v.Catalog == nil { invalidParams.Add(smithy.NewErrParamRequired("Catalog")) } - if v.Identifier == nil { - invalidParams.Add(smithy.NewErrParamRequired("Identifier")) - } if invalidParams.Len() > 0 { return invalidParams } else { @@ -781,21 +2002,16 @@ func validateOpGetOpportunityInput(v *GetOpportunityInput) error { } } -func validateOpListEngagementInvitationsInput(v *ListEngagementInvitationsInput) error { +func validateOpListResourceSnapshotsInput(v *ListResourceSnapshotsInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "ListEngagementInvitationsInput"} + invalidParams := smithy.InvalidParamsError{Context: "ListResourceSnapshotsInput"} if v.Catalog == nil { invalidParams.Add(smithy.NewErrParamRequired("Catalog")) } - if v.Sort != nil { - if err := validateOpportunityEngagementInvitationSort(v.Sort); err != nil { - invalidParams.AddNested("Sort", err.(smithy.InvalidParamsError)) - } - } - if len(v.ParticipantType) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("ParticipantType")) + if v.EngagementIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("EngagementIdentifier")) } if invalidParams.Len() > 0 { return invalidParams @@ -804,16 +2020,16 @@ func validateOpListEngagementInvitationsInput(v *ListEngagementInvitationsInput) } } -func validateOpListOpportunitiesInput(v *ListOpportunitiesInput) error { +func validateOpListSolutionsInput(v *ListSolutionsInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "ListOpportunitiesInput"} + invalidParams := smithy.InvalidParamsError{Context: "ListSolutionsInput"} if v.Catalog == nil { invalidParams.Add(smithy.NewErrParamRequired("Catalog")) } if v.Sort != nil { - if err := validateOpportunitySort(v.Sort); err != nil { + if err := validateSolutionSort(v.Sort); err != nil { invalidParams.AddNested("Sort", err.(smithy.InvalidParamsError)) } } @@ -824,19 +2040,14 @@ func validateOpListOpportunitiesInput(v *ListOpportunitiesInput) error { } } -func validateOpListSolutionsInput(v *ListSolutionsInput) error { +func validateOpPutSellingSystemSettingsInput(v *PutSellingSystemSettingsInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "ListSolutionsInput"} + invalidParams := smithy.InvalidParamsError{Context: "PutSellingSystemSettingsInput"} if v.Catalog == nil { invalidParams.Add(smithy.NewErrParamRequired("Catalog")) } - if v.Sort != nil { - if err := validateSolutionSort(v.Sort); err != nil { - invalidParams.AddNested("Sort", err.(smithy.InvalidParamsError)) - } - } if invalidParams.Len() > 0 { return invalidParams } else { @@ -911,6 +2122,63 @@ func validateOpStartEngagementFromOpportunityTaskInput(v *StartEngagementFromOpp } } +func validateOpStartResourceSnapshotJobInput(v *StartResourceSnapshotJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartResourceSnapshotJobInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) + } + if v.ResourceSnapshotJobIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceSnapshotJobIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpStopResourceSnapshotJobInput(v *StopResourceSnapshotJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StopResourceSnapshotJobInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) + } + if v.ResourceSnapshotJobIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceSnapshotJobIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpSubmitOpportunityInput(v *SubmitOpportunityInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SubmitOpportunityInput"} + if v.Catalog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Catalog")) + } + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if len(v.InvolvementType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("InvolvementType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateOpportunityInput(v *UpdateOpportunityInput) error { if v == nil { return nil diff --git a/service/qbusiness/api_op_SearchRelevantContent.go b/service/qbusiness/api_op_SearchRelevantContent.go index 4d28efd6048..bdc38214448 100644 --- a/service/qbusiness/api_op_SearchRelevantContent.go +++ b/service/qbusiness/api_op_SearchRelevantContent.go @@ -13,11 +13,11 @@ import ( // Searches for relevant content in a Q Business application based on a query. // This operation takes a search query text, the Q Business application identifier, -// and optional filters (such as user ID, user groups, content source, and maximum -// results) as input. It returns a list of relevant content items, where each item -// includes the content text, the unique document identifier, the document title, -// the document URI, any relevant document attributes, and score attributes -// indicating the confidence level of the relevance. +// and optional filters (such as content source and maximum results) as input. It +// returns a list of relevant content items, where each item includes the content +// text, the unique document identifier, the document title, the document URI, any +// relevant document attributes, and score attributes indicating the confidence +// level of the relevance. func (c *Client) SearchRelevantContent(ctx context.Context, params *SearchRelevantContentInput, optFns ...func(*Options)) (*SearchRelevantContentOutput, error) { if params == nil { params = &SearchRelevantContentInput{} @@ -60,12 +60,6 @@ type SearchRelevantContentInput struct { // call.) NextToken *string - // The groups the user belongs to. Used for access control. - UserGroups []string - - // The ID of the user performing the search. Used for access control. - UserId *string - noSmithyDocumentSerde } diff --git a/service/qbusiness/serializers.go b/service/qbusiness/serializers.go index 5ea9c19ab91..5a83696590c 100644 --- a/service/qbusiness/serializers.go +++ b/service/qbusiness/serializers.go @@ -5375,16 +5375,6 @@ func awsRestjson1_serializeOpHttpBindingsSearchRelevantContentInput(v *SearchRel } } - if v.UserGroups != nil { - for i := range v.UserGroups { - encoder.AddQuery("userGroups").String(v.UserGroups[i]) - } - } - - if v.UserId != nil { - encoder.SetQuery("userId").String(*v.UserId) - } - return nil }