diff --git a/.changelog/75136fc2e2754d7fa57be5275bc52068.json b/.changelog/75136fc2e2754d7fa57be5275bc52068.json new file mode 100644 index 00000000000..85da9547595 --- /dev/null +++ b/.changelog/75136fc2e2754d7fa57be5275bc52068.json @@ -0,0 +1,8 @@ +{ + "id": "75136fc2-e275-4d7f-a57b-e5275bc52068", + "type": "documentation", + "description": "Document-only update to refresh CLI documentation for AWS Private CA. No change to the service.", + "modules": [ + "service/acmpca" + ] +} \ No newline at end of file diff --git a/.changelog/dd44dfe3d32941f9b9fb5356ad608d30.json b/.changelog/dd44dfe3d32941f9b9fb5356ad608d30.json new file mode 100644 index 00000000000..facd7aff674 --- /dev/null +++ b/.changelog/dd44dfe3d32941f9b9fb5356ad608d30.json @@ -0,0 +1,8 @@ +{ + "id": "dd44dfe3-d329-41f9-b9fb-5356ad608d30", + "type": "feature", + "description": "This release adds search APIs for Prompts, Quick Connects and Hours of Operations, which can be used to search for those resources within a Connect Instance.", + "modules": [ + "service/connect" + ] +} \ No newline at end of file diff --git a/service/acmpca/api_op_CreateCertificateAuthority.go b/service/acmpca/api_op_CreateCertificateAuthority.go index 6398cfc976f..4731529e0b7 100644 --- a/service/acmpca/api_op_CreateCertificateAuthority.go +++ b/service/acmpca/api_op_CreateCertificateAuthority.go @@ -69,15 +69,15 @@ type CreateCertificateAuthorityInput struct { IdempotencyToken *string // Specifies a cryptographic key management compliance standard used for handling - // CA keys. Default: FIPS_140_2_LEVEL_3_OR_HIGHER Note: - // FIPS_140_2_LEVEL_3_OR_HIGHER is not supported in the following Regions: - // - ap-northeast-3 - // - ap-southeast-3 - // When creating a CA in these Regions, you must provide - // FIPS_140_2_LEVEL_2_OR_HIGHER as the argument for KeyStorageSecurityStandard . - // Failure to do this results in an InvalidArgsException with the message, "A - // certificate authority cannot be created in this region with the specified - // security standard." + // CA keys. Default: FIPS_140_2_LEVEL_3_OR_HIGHER Some Amazon Web Services Regions + // do not support the default. When creating a CA in these Regions, you must + // provide FIPS_140_2_LEVEL_2_OR_HIGHER as the argument for + // KeyStorageSecurityStandard . Failure to do this results in an + // InvalidArgsException with the message, "A certificate authority cannot be + // created in this region with the specified security standard." For information + // about security standard support in various Regions, see Storage and security + // compliance of Amazon Web Services Private CA private keys (https://docs.aws.amazon.com/privateca/latest/userguide/data-protection.html#private-keys) + // . KeyStorageSecurityStandard types.KeyStorageSecurityStandard // Contains information to enable Online Certificate Status Protocol (OCSP) diff --git a/service/acmpca/api_op_IssueCertificate.go b/service/acmpca/api_op_IssueCertificate.go index a9c0c55c7d1..d72e0bb41d0 100644 --- a/service/acmpca/api_op_IssueCertificate.go +++ b/service/acmpca/api_op_IssueCertificate.go @@ -60,7 +60,7 @@ type IssueCertificateInput struct { // The name of the algorithm that will be used to sign the certificate to be // issued. This parameter should not be confused with the SigningAlgorithm // parameter used to sign a CSR in the CreateCertificateAuthority action. The - // specified signing algorithm family (RSA or ECDSA) much match the algorithm + // specified signing algorithm family (RSA or ECDSA) must match the algorithm // family of the CA's secret key. // // This member is required. @@ -120,7 +120,7 @@ type IssueCertificateInput struct { // used to customize the “Not Before” value. Unlike the Validity parameter, the // ValidityNotBefore parameter is optional. The ValidityNotBefore value is // expressed as an explicit date and time, using the Validity type value ABSOLUTE . - // For more information, see Validity (https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_Validity.html) + // For more information, see Validity (https://docs.aws.amazon.com/privateca/latest/APIReference/API_Validity.html) // in this API reference and Validity (https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.5) // in RFC 5280. ValidityNotBefore *types.Validity diff --git a/service/connect/api_op_SearchHoursOfOperations.go b/service/connect/api_op_SearchHoursOfOperations.go new file mode 100644 index 00000000000..abcdaf1fffc --- /dev/null +++ b/service/connect/api_op_SearchHoursOfOperations.go @@ -0,0 +1,238 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/connect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Searches the hours of operation in an Amazon Connect instance, with optional +// filtering. +func (c *Client) SearchHoursOfOperations(ctx context.Context, params *SearchHoursOfOperationsInput, optFns ...func(*Options)) (*SearchHoursOfOperationsOutput, error) { + if params == nil { + params = &SearchHoursOfOperationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SearchHoursOfOperations", params, optFns, c.addOperationSearchHoursOfOperationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SearchHoursOfOperationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SearchHoursOfOperationsInput struct { + + // The identifier of the Amazon Connect instance. You can find the instance ID (https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html) + // in the Amazon Resource Name (ARN) of the instance. + // + // This member is required. + InstanceId *string + + // The maximum number of results to return per page. + MaxResults *int32 + + // The token for the next set of results. Use the value returned in the previous + // response in the next request to retrieve the next set of results. + NextToken *string + + // The search criteria to be used to return hours of operations. + SearchCriteria *types.HoursOfOperationSearchCriteria + + // Filters to be applied to search results. + SearchFilter *types.HoursOfOperationSearchFilter + + noSmithyDocumentSerde +} + +type SearchHoursOfOperationsOutput struct { + + // The total number of hours of operations which matched your search query. + ApproximateTotalCount *int64 + + // Information about the hours of operations. + HoursOfOperations []types.HoursOfOperation + + // If there are additional results, this is the token for the next set of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSearchHoursOfOperationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpSearchHoursOfOperations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpSearchHoursOfOperations{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpSearchHoursOfOperationsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchHoursOfOperations(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// SearchHoursOfOperationsAPIClient is a client that implements the +// SearchHoursOfOperations operation. +type SearchHoursOfOperationsAPIClient interface { + SearchHoursOfOperations(context.Context, *SearchHoursOfOperationsInput, ...func(*Options)) (*SearchHoursOfOperationsOutput, error) +} + +var _ SearchHoursOfOperationsAPIClient = (*Client)(nil) + +// SearchHoursOfOperationsPaginatorOptions is the paginator options for +// SearchHoursOfOperations +type SearchHoursOfOperationsPaginatorOptions struct { + // The maximum number of results to return per page. + 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 +} + +// SearchHoursOfOperationsPaginator is a paginator for SearchHoursOfOperations +type SearchHoursOfOperationsPaginator struct { + options SearchHoursOfOperationsPaginatorOptions + client SearchHoursOfOperationsAPIClient + params *SearchHoursOfOperationsInput + nextToken *string + firstPage bool +} + +// NewSearchHoursOfOperationsPaginator returns a new +// SearchHoursOfOperationsPaginator +func NewSearchHoursOfOperationsPaginator(client SearchHoursOfOperationsAPIClient, params *SearchHoursOfOperationsInput, optFns ...func(*SearchHoursOfOperationsPaginatorOptions)) *SearchHoursOfOperationsPaginator { + if params == nil { + params = &SearchHoursOfOperationsInput{} + } + + options := SearchHoursOfOperationsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &SearchHoursOfOperationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *SearchHoursOfOperationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next SearchHoursOfOperations page. +func (p *SearchHoursOfOperationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*SearchHoursOfOperationsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.SearchHoursOfOperations(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opSearchHoursOfOperations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "connect", + OperationName: "SearchHoursOfOperations", + } +} diff --git a/service/connect/api_op_SearchPrompts.go b/service/connect/api_op_SearchPrompts.go new file mode 100644 index 00000000000..78449229c7a --- /dev/null +++ b/service/connect/api_op_SearchPrompts.go @@ -0,0 +1,234 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/connect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Searches prompts in an Amazon Connect instance, with optional filtering. +func (c *Client) SearchPrompts(ctx context.Context, params *SearchPromptsInput, optFns ...func(*Options)) (*SearchPromptsOutput, error) { + if params == nil { + params = &SearchPromptsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SearchPrompts", params, optFns, c.addOperationSearchPromptsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SearchPromptsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SearchPromptsInput struct { + + // The identifier of the Amazon Connect instance. You can find the instance ID (https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html) + // in the Amazon Resource Name (ARN) of the instance. + // + // This member is required. + InstanceId *string + + // The maximum number of results to return per page. + MaxResults *int32 + + // The token for the next set of results. Use the value returned in the previous + // response in the next request to retrieve the next set of results. + NextToken *string + + // The search criteria to be used to return prompts. + SearchCriteria *types.PromptSearchCriteria + + // Filters to be applied to search results. + SearchFilter *types.PromptSearchFilter + + noSmithyDocumentSerde +} + +type SearchPromptsOutput struct { + + // The total number of quick connects which matched your search query. + ApproximateTotalCount *int64 + + // If there are additional results, this is the token for the next set of results. + NextToken *string + + // Information about the prompts. + Prompts []types.Prompt + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSearchPromptsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpSearchPrompts{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpSearchPrompts{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpSearchPromptsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchPrompts(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// SearchPromptsAPIClient is a client that implements the SearchPrompts operation. +type SearchPromptsAPIClient interface { + SearchPrompts(context.Context, *SearchPromptsInput, ...func(*Options)) (*SearchPromptsOutput, error) +} + +var _ SearchPromptsAPIClient = (*Client)(nil) + +// SearchPromptsPaginatorOptions is the paginator options for SearchPrompts +type SearchPromptsPaginatorOptions struct { + // The maximum number of results to return per page. + 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 +} + +// SearchPromptsPaginator is a paginator for SearchPrompts +type SearchPromptsPaginator struct { + options SearchPromptsPaginatorOptions + client SearchPromptsAPIClient + params *SearchPromptsInput + nextToken *string + firstPage bool +} + +// NewSearchPromptsPaginator returns a new SearchPromptsPaginator +func NewSearchPromptsPaginator(client SearchPromptsAPIClient, params *SearchPromptsInput, optFns ...func(*SearchPromptsPaginatorOptions)) *SearchPromptsPaginator { + if params == nil { + params = &SearchPromptsInput{} + } + + options := SearchPromptsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &SearchPromptsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *SearchPromptsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next SearchPrompts page. +func (p *SearchPromptsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*SearchPromptsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.SearchPrompts(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opSearchPrompts(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "connect", + OperationName: "SearchPrompts", + } +} diff --git a/service/connect/api_op_SearchQuickConnects.go b/service/connect/api_op_SearchQuickConnects.go new file mode 100644 index 00000000000..732ba9f9d59 --- /dev/null +++ b/service/connect/api_op_SearchQuickConnects.go @@ -0,0 +1,236 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/connect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Searches quick connects in an Amazon Connect instance, with optional filtering. +func (c *Client) SearchQuickConnects(ctx context.Context, params *SearchQuickConnectsInput, optFns ...func(*Options)) (*SearchQuickConnectsOutput, error) { + if params == nil { + params = &SearchQuickConnectsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SearchQuickConnects", params, optFns, c.addOperationSearchQuickConnectsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SearchQuickConnectsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SearchQuickConnectsInput struct { + + // The identifier of the Amazon Connect instance. You can find the instance ID (https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html) + // in the Amazon Resource Name (ARN) of the instance. + // + // This member is required. + InstanceId *string + + // The maximum number of results to return per page. + MaxResults *int32 + + // The token for the next set of results. Use the value returned in the previous + // response in the next request to retrieve the next set of results. + NextToken *string + + // The search criteria to be used to return quick connects. + SearchCriteria *types.QuickConnectSearchCriteria + + // Filters to be applied to search results. + SearchFilter *types.QuickConnectSearchFilter + + noSmithyDocumentSerde +} + +type SearchQuickConnectsOutput struct { + + // The total number of quick connects which matched your search query. + ApproximateTotalCount *int64 + + // If there are additional results, this is the token for the next set of results. + NextToken *string + + // Information about the quick connects. + QuickConnects []types.QuickConnect + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSearchQuickConnectsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpSearchQuickConnects{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpSearchQuickConnects{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpSearchQuickConnectsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchQuickConnects(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// SearchQuickConnectsAPIClient is a client that implements the +// SearchQuickConnects operation. +type SearchQuickConnectsAPIClient interface { + SearchQuickConnects(context.Context, *SearchQuickConnectsInput, ...func(*Options)) (*SearchQuickConnectsOutput, error) +} + +var _ SearchQuickConnectsAPIClient = (*Client)(nil) + +// SearchQuickConnectsPaginatorOptions is the paginator options for +// SearchQuickConnects +type SearchQuickConnectsPaginatorOptions struct { + // The maximum number of results to return per page. + 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 +} + +// SearchQuickConnectsPaginator is a paginator for SearchQuickConnects +type SearchQuickConnectsPaginator struct { + options SearchQuickConnectsPaginatorOptions + client SearchQuickConnectsAPIClient + params *SearchQuickConnectsInput + nextToken *string + firstPage bool +} + +// NewSearchQuickConnectsPaginator returns a new SearchQuickConnectsPaginator +func NewSearchQuickConnectsPaginator(client SearchQuickConnectsAPIClient, params *SearchQuickConnectsInput, optFns ...func(*SearchQuickConnectsPaginatorOptions)) *SearchQuickConnectsPaginator { + if params == nil { + params = &SearchQuickConnectsInput{} + } + + options := SearchQuickConnectsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &SearchQuickConnectsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *SearchQuickConnectsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next SearchQuickConnects page. +func (p *SearchQuickConnectsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*SearchQuickConnectsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.SearchQuickConnects(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opSearchQuickConnects(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "connect", + OperationName: "SearchQuickConnects", + } +} diff --git a/service/connect/deserializers.go b/service/connect/deserializers.go index 81d290f2f6c..7da4ff75d1b 100644 --- a/service/connect/deserializers.go +++ b/service/connect/deserializers.go @@ -19881,6 +19881,368 @@ func awsRestjson1_deserializeOpDocumentSearchAvailablePhoneNumbersOutput(v **Sea return nil } +type awsRestjson1_deserializeOpSearchHoursOfOperations struct { +} + +func (*awsRestjson1_deserializeOpSearchHoursOfOperations) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpSearchHoursOfOperations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorSearchHoursOfOperations(response, &metadata) + } + output := &SearchHoursOfOperationsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentSearchHoursOfOperationsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorSearchHoursOfOperations(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentSearchHoursOfOperationsOutput(v **SearchHoursOfOperationsOutput, 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 *SearchHoursOfOperationsOutput + if *v == nil { + sv = &SearchHoursOfOperationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApproximateTotalCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ApproximateTotalCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ApproximateTotalCount = ptr.Int64(i64) + } + + case "HoursOfOperations": + if err := awsRestjson1_deserializeDocumentHoursOfOperationList(&sv.HoursOfOperations, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken2500 to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpSearchPrompts struct { +} + +func (*awsRestjson1_deserializeOpSearchPrompts) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpSearchPrompts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorSearchPrompts(response, &metadata) + } + output := &SearchPromptsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentSearchPromptsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorSearchPrompts(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentSearchPromptsOutput(v **SearchPromptsOutput, 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 *SearchPromptsOutput + if *v == nil { + sv = &SearchPromptsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApproximateTotalCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ApproximateTotalCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ApproximateTotalCount = ptr.Int64(i64) + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken2500 to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Prompts": + if err := awsRestjson1_deserializeDocumentPromptList(&sv.Prompts, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpSearchQueues struct { } @@ -20062,6 +20424,187 @@ func awsRestjson1_deserializeOpDocumentSearchQueuesOutput(v **SearchQueuesOutput return nil } +type awsRestjson1_deserializeOpSearchQuickConnects struct { +} + +func (*awsRestjson1_deserializeOpSearchQuickConnects) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpSearchQuickConnects) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorSearchQuickConnects(response, &metadata) + } + output := &SearchQuickConnectsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentSearchQuickConnectsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorSearchQuickConnects(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentSearchQuickConnectsOutput(v **SearchQuickConnectsOutput, 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 *SearchQuickConnectsOutput + if *v == nil { + sv = &SearchQuickConnectsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApproximateTotalCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ApproximateTotalCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ApproximateTotalCount = ptr.Int64(i64) + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken2500 to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "QuickConnects": + if err := awsRestjson1_deserializeDocumentQuickConnectSearchSummaryList(&sv.QuickConnects, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpSearchRoutingProfiles struct { } @@ -33540,6 +34083,40 @@ func awsRestjson1_deserializeDocumentHoursOfOperationConfigList(v *[]types.Hours return nil } +func awsRestjson1_deserializeDocumentHoursOfOperationList(v *[]types.HoursOfOperation, 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.HoursOfOperation + if *v == nil { + cv = []types.HoursOfOperation{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.HoursOfOperation + destAddr := &col + if err := awsRestjson1_deserializeDocumentHoursOfOperation(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentHoursOfOperationSummary(v **types.HoursOfOperationSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -36173,6 +36750,40 @@ func awsRestjson1_deserializeDocumentPrompt(v **types.Prompt, value interface{}) return nil } +func awsRestjson1_deserializeDocumentPromptList(v *[]types.Prompt, 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.Prompt + if *v == nil { + cv = []types.Prompt{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Prompt + destAddr := &col + if err := awsRestjson1_deserializeDocumentPrompt(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentPromptSummary(v **types.PromptSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -36931,6 +37542,40 @@ func awsRestjson1_deserializeDocumentQuickConnectConfig(v **types.QuickConnectCo return nil } +func awsRestjson1_deserializeDocumentQuickConnectSearchSummaryList(v *[]types.QuickConnect, 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.QuickConnect + if *v == nil { + cv = []types.QuickConnect{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.QuickConnect + destAddr := &col + if err := awsRestjson1_deserializeDocumentQuickConnect(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentQuickConnectSummary(v **types.QuickConnectSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/connect/generated.json b/service/connect/generated.json index 2d57699deac..b9cfd4b8bc4 100644 --- a/service/connect/generated.json +++ b/service/connect/generated.json @@ -140,7 +140,10 @@ "api_op_ReplicateInstance.go", "api_op_ResumeContactRecording.go", "api_op_SearchAvailablePhoneNumbers.go", + "api_op_SearchHoursOfOperations.go", + "api_op_SearchPrompts.go", "api_op_SearchQueues.go", + "api_op_SearchQuickConnects.go", "api_op_SearchRoutingProfiles.go", "api_op_SearchSecurityProfiles.go", "api_op_SearchUsers.go", diff --git a/service/connect/serializers.go b/service/connect/serializers.go index 8a7fb745620..6af125ac9c6 100644 --- a/service/connect/serializers.go +++ b/service/connect/serializers.go @@ -10300,6 +10300,190 @@ func awsRestjson1_serializeOpDocumentSearchAvailablePhoneNumbersInput(v *SearchA return nil } +type awsRestjson1_serializeOpSearchHoursOfOperations struct { +} + +func (*awsRestjson1_serializeOpSearchHoursOfOperations) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpSearchHoursOfOperations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*SearchHoursOfOperationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/search-hours-of-operations") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentSearchHoursOfOperationsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsSearchHoursOfOperationsInput(v *SearchHoursOfOperationsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentSearchHoursOfOperationsInput(v *SearchHoursOfOperationsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) + } + + 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.SearchCriteria != nil { + ok := object.Key("SearchCriteria") + if err := awsRestjson1_serializeDocumentHoursOfOperationSearchCriteria(v.SearchCriteria, ok); err != nil { + return err + } + } + + if v.SearchFilter != nil { + ok := object.Key("SearchFilter") + if err := awsRestjson1_serializeDocumentHoursOfOperationSearchFilter(v.SearchFilter, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpSearchPrompts struct { +} + +func (*awsRestjson1_serializeOpSearchPrompts) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpSearchPrompts) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*SearchPromptsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/search-prompts") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentSearchPromptsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsSearchPromptsInput(v *SearchPromptsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentSearchPromptsInput(v *SearchPromptsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) + } + + 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.SearchCriteria != nil { + ok := object.Key("SearchCriteria") + if err := awsRestjson1_serializeDocumentPromptSearchCriteria(v.SearchCriteria, ok); err != nil { + return err + } + } + + if v.SearchFilter != nil { + ok := object.Key("SearchFilter") + if err := awsRestjson1_serializeDocumentPromptSearchFilter(v.SearchFilter, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpSearchQueues struct { } @@ -10392,6 +10576,98 @@ func awsRestjson1_serializeOpDocumentSearchQueuesInput(v *SearchQueuesInput, val return nil } +type awsRestjson1_serializeOpSearchQuickConnects struct { +} + +func (*awsRestjson1_serializeOpSearchQuickConnects) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpSearchQuickConnects) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*SearchQuickConnectsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/search-quick-connects") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentSearchQuickConnectsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsSearchQuickConnectsInput(v *SearchQuickConnectsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentSearchQuickConnectsInput(v *SearchQuickConnectsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) + } + + 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.SearchCriteria != nil { + ok := object.Key("SearchCriteria") + if err := awsRestjson1_serializeDocumentQuickConnectSearchCriteria(v.SearchCriteria, ok); err != nil { + return err + } + } + + if v.SearchFilter != nil { + ok := object.Key("SearchFilter") + if err := awsRestjson1_serializeDocumentQuickConnectSearchFilter(v.SearchFilter, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpSearchRoutingProfiles struct { } @@ -16800,6 +17076,61 @@ func awsRestjson1_serializeDocumentHoursOfOperationConfigList(v []types.HoursOfO return nil } +func awsRestjson1_serializeDocumentHoursOfOperationSearchConditionList(v []types.HoursOfOperationSearchCriteria, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentHoursOfOperationSearchCriteria(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentHoursOfOperationSearchCriteria(v *types.HoursOfOperationSearchCriteria, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AndConditions != nil { + ok := object.Key("AndConditions") + if err := awsRestjson1_serializeDocumentHoursOfOperationSearchConditionList(v.AndConditions, ok); err != nil { + return err + } + } + + if v.OrConditions != nil { + ok := object.Key("OrConditions") + if err := awsRestjson1_serializeDocumentHoursOfOperationSearchConditionList(v.OrConditions, ok); err != nil { + return err + } + } + + if v.StringCondition != nil { + ok := object.Key("StringCondition") + if err := awsRestjson1_serializeDocumentStringCondition(v.StringCondition, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentHoursOfOperationSearchFilter(v *types.HoursOfOperationSearchFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TagFilter != nil { + ok := object.Key("TagFilter") + if err := awsRestjson1_serializeDocumentControlPlaneTagFilter(v.TagFilter, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentHoursOfOperationTimeSlice(v *types.HoursOfOperationTimeSlice, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -17288,6 +17619,61 @@ func awsRestjson1_serializeDocumentPhoneNumberTypes(v []types.PhoneNumberType, v return nil } +func awsRestjson1_serializeDocumentPromptSearchConditionList(v []types.PromptSearchCriteria, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentPromptSearchCriteria(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentPromptSearchCriteria(v *types.PromptSearchCriteria, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AndConditions != nil { + ok := object.Key("AndConditions") + if err := awsRestjson1_serializeDocumentPromptSearchConditionList(v.AndConditions, ok); err != nil { + return err + } + } + + if v.OrConditions != nil { + ok := object.Key("OrConditions") + if err := awsRestjson1_serializeDocumentPromptSearchConditionList(v.OrConditions, ok); err != nil { + return err + } + } + + if v.StringCondition != nil { + ok := object.Key("StringCondition") + if err := awsRestjson1_serializeDocumentStringCondition(v.StringCondition, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentPromptSearchFilter(v *types.PromptSearchFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TagFilter != nil { + ok := object.Key("TagFilter") + if err := awsRestjson1_serializeDocumentControlPlaneTagFilter(v.TagFilter, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentQueueQuickConnectConfig(v *types.QueueQuickConnectConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -17409,6 +17795,61 @@ func awsRestjson1_serializeDocumentQuickConnectConfig(v *types.QuickConnectConfi return nil } +func awsRestjson1_serializeDocumentQuickConnectSearchConditionList(v []types.QuickConnectSearchCriteria, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentQuickConnectSearchCriteria(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentQuickConnectSearchCriteria(v *types.QuickConnectSearchCriteria, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AndConditions != nil { + ok := object.Key("AndConditions") + if err := awsRestjson1_serializeDocumentQuickConnectSearchConditionList(v.AndConditions, ok); err != nil { + return err + } + } + + if v.OrConditions != nil { + ok := object.Key("OrConditions") + if err := awsRestjson1_serializeDocumentQuickConnectSearchConditionList(v.OrConditions, ok); err != nil { + return err + } + } + + if v.StringCondition != nil { + ok := object.Key("StringCondition") + if err := awsRestjson1_serializeDocumentStringCondition(v.StringCondition, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentQuickConnectSearchFilter(v *types.QuickConnectSearchFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TagFilter != nil { + ok := object.Key("TagFilter") + if err := awsRestjson1_serializeDocumentControlPlaneTagFilter(v.TagFilter, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentQuickConnectsList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() diff --git a/service/connect/types/types.go b/service/connect/types/types.go index c7a5f65d65e..747c983ed35 100644 --- a/service/connect/types/types.go +++ b/service/connect/types/types.go @@ -1698,6 +1698,35 @@ type HoursOfOperationConfig struct { noSmithyDocumentSerde } +// The search criteria to be used to return hours of operations. +type HoursOfOperationSearchCriteria struct { + + // A list of conditions which would be applied together with an AND condition. + AndConditions []HoursOfOperationSearchCriteria + + // A list of conditions which would be applied together with an OR condition. + OrConditions []HoursOfOperationSearchCriteria + + // A leaf node condition which can be used to specify a string condition. The + // currently supported values for FieldName are name , description , timezone , and + // resourceID . + StringCondition *StringCondition + + noSmithyDocumentSerde +} + +// Filters to be applied to search results. +type HoursOfOperationSearchFilter struct { + + // An object that can be used to specify Tag conditions inside the SearchFilter . + // This accepts an OR of AND (List of List) input where: + // - Top level list specifies conditions that need to be applied with OR operator + // - Inner list specifies conditions that need to be applied with AND operator. + TagFilter *ControlPlaneTagFilter + + noSmithyDocumentSerde +} + // Contains summary information about hours of operation for a contact center. type HoursOfOperationSummary struct { @@ -2328,7 +2357,7 @@ type ProblemDetail struct { // Information about a prompt. type Prompt struct { - // A description for the prompt. + // The description of the prompt. Description *string // The name of the prompt. @@ -2347,6 +2376,35 @@ type Prompt struct { noSmithyDocumentSerde } +// The search criteria to be used to return prompts. +type PromptSearchCriteria struct { + + // A list of conditions which would be applied together with an AND condition. + AndConditions []PromptSearchCriteria + + // A list of conditions which would be applied together with an OR condition. + OrConditions []PromptSearchCriteria + + // A leaf node condition which can be used to specify a string condition. The + // currently supported values for FieldName are name , description , and resourceID + // . + StringCondition *StringCondition + + noSmithyDocumentSerde +} + +// Filters to be applied to search results. +type PromptSearchFilter struct { + + // An object that can be used to specify Tag conditions inside the SearchFilter . + // This accepts an OR of AND (List of List) input where: + // - Top level list specifies conditions that need to be applied with OR operator + // - Inner list specifies conditions that need to be applied with AND operator. + TagFilter *ControlPlaneTagFilter + + noSmithyDocumentSerde +} + // Contains information about the prompt. type PromptSummary struct { @@ -2475,7 +2533,8 @@ type QueueSearchCriteria struct { QueueTypeCondition SearchableQueueType // A leaf node condition which can be used to specify a string condition. The - // currently supported value for FieldName : name + // currently supported values for FieldName are name , description , and resourceID + // . StringCondition *StringCondition noSmithyDocumentSerde @@ -2559,6 +2618,35 @@ type QuickConnectConfig struct { noSmithyDocumentSerde } +// The search criteria to be used to return quick connects. +type QuickConnectSearchCriteria struct { + + // A list of conditions which would be applied together with an AND condition. + AndConditions []QuickConnectSearchCriteria + + // A list of conditions which would be applied together with an OR condition. + OrConditions []QuickConnectSearchCriteria + + // A leaf node condition which can be used to specify a string condition. The + // currently supported values for FieldName are name , description , and resourceID + // . + StringCondition *StringCondition + + noSmithyDocumentSerde +} + +// Filters to be applied to search results. +type QuickConnectSearchFilter struct { + + // An object that can be used to specify Tag conditions inside the SearchFilter . + // This accepts an OR of AND (List of List) input where: + // - Top level list specifies conditions that need to be applied with OR operator + // - Inner list specifies conditions that need to be applied with AND operator. + TagFilter *ControlPlaneTagFilter + + noSmithyDocumentSerde +} + // Contains summary information about a quick connect. type QuickConnectSummary struct { @@ -2833,7 +2921,8 @@ type RoutingProfileSearchCriteria struct { OrConditions []RoutingProfileSearchCriteria // A leaf node condition which can be used to specify a string condition. The - // currently supported value for FieldName : name + // currently supported values for FieldName are name , description , and resourceID + // . StringCondition *StringCondition noSmithyDocumentSerde @@ -3093,8 +3182,7 @@ type SecurityProfileSearchCriteria struct { // A list of conditions which would be applied together with an OR condition. OrConditions []SecurityProfileSearchCriteria - // A leaf node condition which can be used to specify a string condition. The - // currently supported value for FieldName : name + // A leaf node condition which can be used to specify a string condition. StringCondition *StringCondition noSmithyDocumentSerde @@ -3210,8 +3298,7 @@ type SingleSelectQuestionRuleCategoryAutomation struct { noSmithyDocumentSerde } -// A leaf node condition which can be used to specify a string condition. The -// currently supported value for FieldName : name +// A leaf node condition which can be used to specify a string condition. type StringCondition struct { // The type of comparison to be made when evaluating the string condition. @@ -3732,7 +3819,9 @@ type UserSearchCriteria struct { // A list of conditions which would be applied together with an OR condition. OrConditions []UserSearchCriteria - // A leaf node condition which can be used to specify a string condition. + // A leaf node condition which can be used to specify a string condition. The + // currently supported values for FieldName are name , description , and resourceID + // . StringCondition *StringCondition noSmithyDocumentSerde diff --git a/service/connect/validators.go b/service/connect/validators.go index 12c05282edc..dc63ffe2ca2 100644 --- a/service/connect/validators.go +++ b/service/connect/validators.go @@ -2590,6 +2590,46 @@ func (m *validateOpSearchAvailablePhoneNumbers) HandleInitialize(ctx context.Con return next.HandleInitialize(ctx, in) } +type validateOpSearchHoursOfOperations struct { +} + +func (*validateOpSearchHoursOfOperations) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSearchHoursOfOperations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SearchHoursOfOperationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSearchHoursOfOperationsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpSearchPrompts struct { +} + +func (*validateOpSearchPrompts) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSearchPrompts) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SearchPromptsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSearchPromptsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpSearchQueues struct { } @@ -2610,6 +2650,26 @@ func (m *validateOpSearchQueues) HandleInitialize(ctx context.Context, in middle return next.HandleInitialize(ctx, in) } +type validateOpSearchQuickConnects struct { +} + +func (*validateOpSearchQuickConnects) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSearchQuickConnects) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SearchQuickConnectsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSearchQuickConnectsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpSearchRoutingProfiles struct { } @@ -4246,10 +4306,22 @@ func addOpSearchAvailablePhoneNumbersValidationMiddleware(stack *middleware.Stac return stack.Initialize.Add(&validateOpSearchAvailablePhoneNumbers{}, middleware.After) } +func addOpSearchHoursOfOperationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSearchHoursOfOperations{}, middleware.After) +} + +func addOpSearchPromptsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSearchPrompts{}, middleware.After) +} + func addOpSearchQueuesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpSearchQueues{}, middleware.After) } +func addOpSearchQuickConnectsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSearchQuickConnects{}, middleware.After) +} + func addOpSearchRoutingProfilesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpSearchRoutingProfiles{}, middleware.After) } @@ -8129,6 +8201,36 @@ func validateOpSearchAvailablePhoneNumbersInput(v *SearchAvailablePhoneNumbersIn } } +func validateOpSearchHoursOfOperationsInput(v *SearchHoursOfOperationsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SearchHoursOfOperationsInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpSearchPromptsInput(v *SearchPromptsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SearchPromptsInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpSearchQueuesInput(v *SearchQueuesInput) error { if v == nil { return nil @@ -8144,6 +8246,21 @@ func validateOpSearchQueuesInput(v *SearchQueuesInput) error { } } +func validateOpSearchQuickConnectsInput(v *SearchQuickConnectsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SearchQuickConnectsInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpSearchRoutingProfilesInput(v *SearchRoutingProfilesInput) error { if v == nil { return nil